Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark some string references untranslatable #11601

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

maxme
Copy link
Contributor

@maxme maxme commented Apr 7, 2020

We missed to mark some string references untranslatable. Translators were getting asked to translate them in GlotPress.

@maxme maxme requested review from khaykov and malinajirka April 7, 2020 16:23
@peril-wordpress-mobile
Copy link

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@maxme maxme added this to the 14.7 milestone Apr 7, 2020
@peril-wordpress-mobile
Copy link

You can test the changes on this Pull Request by downloading the APK here.

@khaykov
Copy link
Member

khaykov commented Apr 7, 2020

Hey @maxme 👋 Regarding app_theme_entries, it contains translatable strings in it it as a reference. I assume this doesn't work well with GlotPress? If so, there is another version of this array in v28.

@maxme
Copy link
Contributor Author

maxme commented Apr 8, 2020

Hi @khaykov - we should mark all the references as untranslatable, but the referenced strings themselves should be translatable. In that case, the string array is using references only, it should be marked untranslatable (we don't want the references to land as a string to be translated) but the referenced strings should be translated (and obviously not marked untranslatable).

This looks good to me (and this what we're doing in other places with other string-array that are displayed to the users).

<string name="app_theme_light">Light</string>
<string name="app_theme_dark">Dark</string>

[...]

<string-array name="app_theme_entries" translatable="false" tools:ignore="InconsistentArrays">
  <item>@string/app_theme_light</item>
  <item>@string/app_theme_dark</item>
</string-array>

Everything in v28/strings.xml should also be marked untranslatable, but since it's not imported in GlotPress, there is no impact.

Copy link
Member

@khaykov khaykov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and explanation, @maxme ! Looks good to me 👍

@khaykov khaykov merged commit 2f2518f into develop Apr 8, 2020
@maxme maxme deleted the issue/mark-some-strings-untranslatable branch April 9, 2020 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants