Problem/Motivation
After configuring the module and save config, some translation strings are created for config items that should not be translated. (of course the config labels should be translated, but the values of the config should not be translatable)
* "Start URL" config item (as far as I know, all PWA versions of the site will use the same URL, so it doesn't make sense to mark it as translatable)
* "Lang": The default language of the manifest is a setting to specify the language; it doesn't make sense to translate the value of this
Steps to reproduce
1. Install the module on a Drupal site where the default language is not English. (On my site, only Japanese is enabled.)
2. Configure all the settings and save.
3. Go to "/admin/config/regional/translate" and search for the following strings:
"/": This is the translation for the "Start URL" config item
"en": This is the translation for the "Lang" config item
Because these strings are hard to search for, you can make them easier to find by saving the config value as some nonsense like "fdasfafd" and then searching for that on the UI translation page instead.
Proposed resolution
Do not allow the "Start URL" and "Lang" config items to be translated.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork pwa-3179988
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
ptmkenny commentedComment #3
anybodyAt least until there's a solution for #3345421: Is scope missing the language path prefix (and base_url)? translating the prefix might be a viable workaround. Still I agree that finally it better shouldn#t be translatable.
Comment #4
anybodyAnyway it's incorrect to use
textfor all the stuff here. I'll prepare a MR.https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-...
Comment #5
anybodyComment #6
anybodyComment #8
anybodyComment #10
grevil commentedTiny addition, otherwise LGTM!
Comment #11
grevil commentedComment #12
anybody@Grevil: Text is translatable and this is multiline, so I think
textwas correct?See https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-...
Comment #13
grevil commentedYea sorry... Thought it was "string".
Comment #15
anybodyMerged and cherry-picked into 2.x