backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

[UX] Locale and interface translation oddness #6610

Open klonos opened 2 months ago

klonos commented 2 months ago

I'm tempted to start this as a bug, however, I want to get a better understanding first. So here goes...

  1. On a vanilla Backdrop site installed using English as the language, enable the Locale module.
  2. Do NOT add another language yet - you'll do that later.
  3. Navigate to the "User interface translation" page at admin/config/regional/translate/translate
  4. Notice the following:
    • there's only very few strings available in the table (there's not even a pager, so less than 50 items) πŸ€”
    • the "Languages" column is empty for all rows πŸ€”
  5. Search for a string that you know should be available (something that appears on this page for instance) -> no results πŸ€”
  6. Click "Edit" for any of the available strings -> the original text is shown, along with the context if there was one specified for the specific string.
  7. There is a "Save translations" submit button, but there is nothing to translate πŸ‘ŽπŸΌ
  8. There is no cancel button πŸ‘ŽπŸΌ
  9. Go to the language listing page at admin/config/regional/language
  10. Notice how the "Interface translation" column says "not applicable". OK, so that, along with points 6 and 7 above, makes me think that if there's only one language available, then there is no point of UI translation, so the table at admin/config/regional/translate/translate should not be listing any strings - it should instead have an empty string, saying something along the lines of "only one language enabled - to see things here, there must be at least two languages enabled on the site". Am I right in thinking that, or am I missing something here?
  11. With the same thinking, if there is a reason to be listing strings in the table even when a single language is enabled, then when it comes to the "Save translations" submit button mentioned in point 7 above, it should not be shown - only a "cancel" button to take people back to the table. Perhaps the "Edit" operation should not be available for strings in the first place. Right?
  12. The "Edit" operation should really be "Translate" anyway. Right?
  13. There is a "Delete" operation available for these strings. What does that mean? I know that English is the default language, so it doesn't make any sense to be deleting these strings. ...what am I missing here? ...should this option not be available for the English strings? ...what happens if you do delete an English string? πŸ€”
  14. Anyway, back to the languages list at admin/config/regional/language, click "Configure" for the English language.
  15. Scroll to the bottom of the page, and notice the "Enable interface translation to English" checkbox, which is disabled by default. Enable that and save the settings.
  16. You get redirected back to the list of languages, where the "Interface translation" column now indicates a portion and a percentage instead of "not applicable". Aha! Now we're getting somewhere...
  17. Notice how the percentage is 0/94 (0%) (that number may differ in the future, but it is very small - I'm sure there are many more translatable UI strings in the English language πŸ€” )
  18. Go back to admin/config/regional/translate/translate by clicking on the percentage link -> Aha again! Now the table is filled with strings ...several pages in fact. Good! Things start making sense now πŸ‘πŸΌ
  19. Click "Edit" for any of the strings in the table -> aha again! Now there is a text field for the English language string. Yup πŸ‘πŸΌ
  20. So should the table be empty, and only be showing strings in the following scenarios?:
    • more than one language is enabled
    • only the English language is enabled AND the "Enable interface translation to English" option has been enabled
  21. Go back to admin/config/regional/translate/translate and filter for image or library (any combination of these words - use upper- lower-case, search individually or as a single image library string) -> you either get "No strings available." or get various strings but not the label of the image_library view πŸ‘ŽπŸΌ (I'm trying to make a point for #6608 here)
  22. Navigate back to the languages list at admin/config/regional/language -> notice that the percentage now indicates a much larger number of strings: 0/1185 (0%) πŸ€” ...did it need me to visit the "User interface translation" page to refresh that? ...perhaps we should be clearing caches and/or running cron or something when changing the configuration of a language, to make sure that that number reflects the reality.
  23. Anyway, back to admin/config/regional/translate/translate -> What?! ...the list is empty again!? ("No strings available." is shown now) ...scratch your head for a moment ...then notice that the last search string from the search testing in step 21 above is still there πŸ‘ŽπŸΌ ...it's fine and desired for the search string to be remembered when working on that page, but it should not be the case when you navigate away from the page to do other, irrelevant tasks. Right? ...for example:
    • go to the content listing at admin/content -> filter for "post" -> only one piece of content is shown πŸ‘πŸΌ -> navigate away from that page -> navigate back to the page from the admin bar (NOT by clicking the "back" button on your browser) -> the previous filter has been reset, so that all content is shown ...that's what I expected πŸ‘πŸΌ (since I went away doing other tasks)
    • go to the modules listing page at admin/modules -> filter by "contact" -> enable the Contact module -> you get redirected back to the module listing page, and it is still filtered by "contact" ...that's what I expect, since I'm still working on this page, and I might want to click the "Configure" or "Permissions" operation for the module I just enabled πŸ‘πŸΌ -> navigate away from that page -> navigate back to the page from the admin bar (NOT by clicking the "back" button on your browser) -> filtering has been reset ...again, that's what I expect, since I went away doing other tasks πŸ‘πŸΌ
  24. Navigate back to the languages list at admin/config/regional/language and add another language.

Lets do some more testing...

  1. Disable the Locale and Language modules.
  2. Fully uninstall the Locale and Language modules.
  3. Clear caches.
  4. Enable the Locale module again.
  5. This time go straight to admin/config/regional/language -> configure the English language -> enable the "Enable interface translation to English" option -> Save
  6. Notice the 0/94 (0%) percentage.
  7. Click on the percentage link to go to admin/config/regional/translate/translate -> several pages of strings πŸ‘πŸΌ
  8. Go back to admin/config/regional/language -> the percentage now is 0/898 (0%) πŸ€” ...what happened to 0/1185 (0%)??? (refer to step 22 from the previous step) πŸ€” πŸ€” πŸ€”
  9. Click "Configure" again -> Save -> the percentage now is 0/909 (0%)??? ...what the heck is happening?? πŸ€” πŸ€” πŸ€”
olafgrabienski commented 2 months ago

@klonos I followed the steps, and I agree, the interface translation could be improved under various aspects. The list is however very comprehensive, so I'd suggest to file separate issues where it makes sense.

Now to the steps. I don't have answers to all the questions, just my first thoughts to some of them:

4. Only very few strings available in the table => Not sure, maybe those are only strings related to the installation of Backdrop?

10. If there's only one language available, then there is no point of UI translation. The table should not be listing any strings and say "only one language enabled - to see things here, there must be at least two languages enabled on the site". Am I right, or am I missing something? => Probably right (exception: English is translatable)

11. Don't show "Save translations" but "Cancel", right? => Probably yes

12. "Edit" should be "Translate" => Not sure

13. Why 'delete' English strings? => Not sure. It seems to remove all translations in all languages and the English string.

18. Now the table is filled with strings => Indeed, already increased from 94 to 887 in my case.

20. Should the table be empty, and only be showing strings if more than one language is enabled or only English and "Enable interface translation to English" => Sounds good.

21. "Image library" not available => Visit the library (Card > Image > Remove > Select existing file). Result: "Select from Image Library" is available.

22. admin/config/regional/language: percentage indicates a much larger number of strings, why? => Visited more pages.

23. String list empty again! Filter should be reset when navigation away. => Probably good.