Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move in Microsite content type #286

Open
2 of 4 tasks
mariacha opened this issue Jul 18, 2024 · 7 comments
Open
2 of 4 tasks

Move in Microsite content type #286

mariacha opened this issue Jul 18, 2024 · 7 comments
Assignees

Comments

@mariacha
Copy link
Collaborator

mariacha commented Jul 18, 2024

Right now there's a "wri_microsite" module on wriflagship. The config may be out of date, and it only lives on flagship. This task would be to update the config to the latest version from live, and move the module into this wri_sites install profile.

Dev tasks

  • Export any config related to the microsites into the wri_microsites module.
  • Move the wri_microsites module into the Indonesia site as its own module.
  • Move the wri_microsites module from Indonesia into the wri_sites install profile. See https://github.com/wri/wri-indonesia/pull/72 for all the config changes needed.
  • Note that adding the microsites module messes up menu item translations. You have to enable Menu Content Translations for all menus when you add the menu_item_extras module.

Timeline

Deploy to Indonesia Thurs, July 25

@mariacha mariacha self-assigned this Jul 23, 2024
@mariacha
Copy link
Collaborator Author

Ok @wthomaswri I've done the bare minimum and gotten up a microsite:
https://pr-72-wri-indonesia.pantheonsite.io/id/test-microsite-page

I made an English and Indonesian translation for this page, but didn't add any subpages. It's possible you'll run into issues with the subpages menu always being in one language (this is noted in #197).

Let me know what you run up against!

@wthomaswri
Copy link
Collaborator

Thanks so much @mariacha. Will let you know what I find by day's end

@wthomaswri
Copy link
Collaborator

wthomaswri commented Jul 24, 2024

Hi @mariacha looks good so far. Yeah the only thing would be the translations i'm guessing for menus but also curious about embed blocks. I'm not sure if embeds can be translated easily but if not that's fine, we can create a duplicate and swap it on the translation.

https://pr-72-wri-indonesia.pantheonsite.io/id/regional-offices

@mariacha
Copy link
Collaborator Author

I've turned on translations for Embeds:
https://pr-72-wri-indonesia.pantheonsite.io/id/media/3562/edit/translations

I'm seeing that when I try to save the english translation there's some kind of error, so I'll see about that. Then I'll debug the menu languages.

@mariacha
Copy link
Collaborator Author

Menu translations are working now -- There's some nuance on how you have to add items though, which I'll write up. For now, here's the proof of concept:
https://pr-72-wri-indonesia.pantheonsite.io/en/regional-offices-en

changing the language changes the language of the menu links too!

@mariacha
Copy link
Collaborator Author

This work is up on live:
https://wri-indonesia.org/en/regional-offices/bali

@wthomaswri It looks like you already figured out what happens when you add a translation, but I'll write it out here too.

When you add a new translation for an existing subpage, the translation gets added to the menu, which we don't want. The fix is to edit the menu itself, delete the new subpage link, and then translate the existing menu item.

For example, if I have a subpage "America" in English but "Amerika" in Indonesia, I would do this:

  1. Create the America subpage in English. There should now be a submenu link to "America"
  2. Create the "Amerika" translation subpage in Indonenesian. There will now be a second submenu link "Amerika"
  3. Edit the menu and delete the link to "Amerika"
  4. Add a translation for the "America" menu link and set it to "Amerika"

When that's done, on English pages the link will be to "America" and on Indonesian subpages it will be to "Amerika".

That double-menu-item issue is something I can work on fixing in #197.

@mariacha mariacha removed their assignment Jul 25, 2024
@wthomaswri
Copy link
Collaborator

Thanks so much for this @mariacha :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants