Skip to content

Localized PNI categories and products#6391

Closed
KalobTaulien wants to merge 3 commits intowagtail-localizefrom
6064-test-localized-category-reassignment
Closed

Localized PNI categories and products#6391
KalobTaulien wants to merge 3 commits intowagtail-localizefrom
6064-test-localized-category-reassignment

Conversation

@KalobTaulien
Copy link
Copy Markdown
Contributor

Closes #6064

Steps for user testing:

  1. Create a new env.
  2. Create a new locale (Settings -> Locales -> Create a new one; ie. French)
  3. Create a new Buyers Guide Product Category snippet (I made a brand new one that was easier to track). And then create a translated version of that same category (ie. One English and One French version).
  4. Edit an existing English PNI product and change the category to your new English category you made in step 3.
  5. Translate the page and edit the French version - change the category to your French category you made in step 3.
  6. Go to http://localhost:8000/en/privacynotincluded/ to see your English product. Your English category should show up too.
  7. Go to http://localhost:8000/fr/privacynotincluded/ to see your French product. The French category should show up too.
  8. Click the category at the top of the page to filter your products. Make sure only your English product shows up in the English category, and only the French product shows up in the French category.

☝️ That's a lot of steps. Ping me on slack if anyone needs assistance.

Requesting Theo for user testing review and Pomax for code review.

@mofodevops mofodevops temporarily deployed to foundation-s-6064-test--ucaqtp March 17, 2021 19:22 Inactive
Pomax
Pomax previously requested changes Mar 17, 2021
@KalobTaulien
Copy link
Copy Markdown
Contributor Author

KalobTaulien commented Mar 22, 2021

I've run into a bit of a hiccup here. My instructions above are wrong. We need Alias Pages (ie. French pages) to be able to select their own snippets. Otherwise what we're doing is editing an English page and changing it's category - which may not reflect the exact behaviour we want out of wagtail-localize.

Ideally, wagtail-localize would provide a way for us to select Snippets in the translation-view (Alias Page). Currently, I can't seem to enable that behaviour.

I'm moving this ticket to blocked until I can get some more information around this.

Edit: On second thought, there's an easier way around this.

We can select multiple categories (ie. English Entertainment and French Entertainment) and then filter products based on their categories. Then auto-aliasing can kick in and only one page needs to manage the category content. And that would unblock this ticket.

@TheoChevalier
Copy link
Copy Markdown
Contributor

I've run into a bit of a hiccup here. My instructions above are wrong. We need Alias Pages (ie. French pages) to be able to select their own snippets. Otherwise what we're doing is editing an English page and changing it's category - which may not reflect the exact behaviour we want out of wagtail-localize.

Ah, I was going to ask about this!

Ideally, wagtail-localize would provide a way for us to select Snippets in the translation-view (Alias Page). Currently, I can't seem to enable that behaviour.

I'm moving this ticket to blocked until I can get some more information around this.

Edit: On second thought, there's an easier way around this.

We can select multiple categories (ie. English Entertainment and French Entertainment) and then filter products based on their categories. Then auto-aliasing can kick in and only one page needs to manage the category content. And that would unblock this ticket.

Can’t we use the same mechanism that Karl mentioned to get the snippets synchronized, like any other field? I think he suggested we could just mark the snippet as synchronized? Or is that what you mean with auto-aliasing?

My general feedback on this is that don’t really want something like this to be manual, as it would be way too hard to keep in sync for all locales, doesn’t really scale, and is hard to track. I.e. if a category is added to an existing product in English, you’d have to :

  1. be notified about that change
  2. go through all the translations to make the same change
  3. QA all the translations to make sure you picked the right category for all of them/didn’t forget one

@KalobTaulien
Copy link
Copy Markdown
Contributor Author

Yeah so what I think we're going to end up doing @TheoChevalier is managing all the categories through the English page. So there could be Entertainment (English), Entertainment (French), Entertainment (Spanish) etc. At least that would be a good first step to finishing this ticket, and then we can do back and get more clever with this so they only need to select one category. But I feel like that's a tad out of scope for this ticket. Definitely open to feedback though!

@KalobTaulien KalobTaulien requested a review from Pomax March 22, 2021 20:35
@KalobTaulien KalobTaulien changed the title Localized PNI categories and products Keep PR for now, but don't merge this. Localized PNI categories and products Apr 13, 2021
@Pomax Pomax removed request for Pomax and TheoChevalier April 14, 2021 19:37
@TheoChevalier TheoChevalier changed the base branch from wagtail-localize to wagtail-localize-2021 July 16, 2021 08:10
@TheoChevalier TheoChevalier changed the title Keep PR for now, but don't merge this. Localized PNI categories and products Localized PNI categories and products Jul 16, 2021
@TheoChevalier TheoChevalier changed the base branch from wagtail-localize-2021 to wagtail-localize July 16, 2021 08:12
@TheoChevalier
Copy link
Copy Markdown
Contributor

Closing in favor of #7124

@Pomax Pomax deleted the 6064-test-localized-category-reassignment branch August 16, 2021 17:56
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

Successfully merging this pull request may close these issues.

5 participants