addons icon indicating copy to clipboard operation
addons copied to clipboard

Collection name and description display different values specific to the locale used when the fields were edited

Open AlexandraMoga opened this issue 6 years ago • 9 comments

Refiled from https://github.com/mozilla/addons/issues/5592

STR:

  1. Log in to AMO -dev
  2. Go to My Collections and select one of your collections to view its details page
  3. Switch to a different locale
  4. Edit the collection name and description
  5. Switch back to the previous locale

Actual result: The updated collection name and description are not displayed

Expected result: Updated collection name and description should be displayed regardless of the locale used when the fields are edited

Notes:

  • a localization issue (#https://github.com/mozilla/addons/issues/11651) was was also reported for the legacy edit collection page, currently in use
  • reproduced on AMO -dev with FF60, WIn10x64

coll loc

┆Issue is synchronized with this Jira Task

AlexandraMoga avatar Jun 27 '18 16:06 AlexandraMoga

Comment from @diox

In devhub we display a widget allowing you to see / edit localized fields in all languages. The API was designed for this as well, returning all translations if you don't pass a lang parameter. So the frontend can implement something like this. In any case, it's a frontend bug. The bug is really that the frontend should let you know which locale you're editing and possibly let you see/edit other locales at the same time.

AlexandraMoga avatar Jun 27 '18 16:06 AlexandraMoga

This is the same localizedString issue that we've come across for reviews, as well as something else I cannot recall. I'm not sure that these localizations are something that we want to support on the front end. The implementation allows for a user to have different versions of a collection name and description for different locales, but I don't think that's actually something we intend to support. I think it's just a result of the implementation.

We should discuss whether this is something we want to support, and if not we should consider making these simple strings rather than localizedStrings because the latter only seems to cause headaches.

@jvillalobos what do you think?

bobsilverberg avatar Jun 27 '18 20:06 bobsilverberg

I agree that it's better to treat those fields as not localizable.

jvillalobos avatar Jun 27 '18 21:06 jvillalobos

We need to go back to addons-server then and modify the API to make these fields proper CharFields (which will require database migrations)

diox avatar Jun 28 '18 10:06 diox

I do think that makes the most sense, and I also realize it isn't an entirely trivial task. I think we should take that approach with any localizedStrings that we don't intend to actually be localizable, as we seem to keep having issues with them.

@diox Should we create an issue on addons-server for this?

bobsilverberg avatar Jun 28 '18 13:06 bobsilverberg

Yeah, please do :)

diox avatar Jun 28 '18 15:06 diox

I opened https://github.com/mozilla/addons/issues/5716 to cover this on the server. We can keep this issue open as something to verify once that change has been made.

bobsilverberg avatar Jun 29 '18 16:06 bobsilverberg

Update:

Collection comments are also affected by the issue:

user comments

AlexandraMoga avatar Jul 23 '18 12:07 AlexandraMoga

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDFRNT-135

KevinMind avatar May 03 '24 18:05 KevinMind