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

Command icon 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

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Issue summary: View changes
anybody’s picture

* "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)a

At 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.

anybody’s picture

Anyway it's incorrect to use text for all the stuff here. I'll prepare a MR.
https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-...

anybody’s picture

Title: Translation strings should not be created for some config » Schema uses type: text for nearly anything
anybody’s picture

anybody’s picture

Status: Active » Needs review

Grevil made their first commit to this issue’s fork.

grevil’s picture

Tiny addition, otherwise LGTM!

grevil’s picture

Status: Needs review » Reviewed & tested by the community
anybody’s picture

@Grevil: Text is translatable and this is multiline, so I think text was correct?

See https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-...

# Human readable string that can contain multiple lines of text or HTML.
text:
  type: string
  label: 'Text'
  translatable: true
grevil’s picture

Yea sorry... Thought it was "string".

  • Anybody committed e4e98849 on 8.x-1.x
    Issue #3179988 by Grevil: Schema uses type: text for nearly anything
    
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Merged and cherry-picked into 2.x

  • Anybody committed 2f017776 on 2.x
    Issue #3179988 by Grevil: Schema uses type: text for nearly anything
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.