fix(lint): mark new outbound_api strings as translatable=false - #39
Conversation
…olve 14 MissingTranslation errors
|
| Filename | Overview |
|---|---|
| Common/src/main/res/values/strings.xml | Adds translatable="false" to 14 user-visible UI strings to suppress MissingTranslation lint; permanently excludes them from the 13-locale translation pipeline instead of using a reversible suppression. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[New string in values/strings.xml] --> B{translatable attribute?}
B -->|translatable=false| C[Excluded from extraction tooling]
B -->|no attribute - default true| D[MissingTranslation lint fires]
B -->|tools:ignore=MissingTranslation| E[Lint suppressed - reversible]
C --> F[String NEVER appears in locale builds]
D --> G[Add translations to values-x/strings.xml]
G --> H[String translated across 13 locales]
E --> G
Reviews (3): Last reviewed commit: "chore: trigger greptile re-review" | Re-trigger Greptile
| <string name="outbound_api_bubble_title" translatable="false">Telegram bubble</string> | ||
| <string name="outbound_api_bubble_refresh_title" translatable="false">Refresh in place</string> | ||
| <string name="outbound_api_bubble_refresh_desc" translatable="false">Within the refresh window, edit the same bubble instead of posting a new one.</string> | ||
| <string name="outbound_api_bubble_refresh_window" translatable="false">Refresh window (minutes)</string> | ||
| <string name="outbound_api_bubble_suppress_title" translatable="false">Skip if value unchanged</string> | ||
| <string name="outbound_api_bubble_suppress_desc" translatable="false">Don\'t edit the bubble if the new reading is within 1 mg/dL of the last.</string> | ||
| <string name="outbound_api_bubble_stale_title" translatable="false">Show "Missed reading." when silent</string> | ||
| <string name="outbound_api_bubble_stale_desc" translatable="false">Edit the bubble to a stale or missed state if no new reading arrives in time.</string> | ||
| <string name="outbound_api_bubble_stale_threshold" translatable="false">Stale threshold (minutes)</string> | ||
| <string name="outbound_api_bubble_missed_threshold" translatable="false">Missed threshold (minutes)</string> |
There was a problem hiding this comment.
translatable="false" permanently removes these strings from the translation pipeline
This approach silences the MissingTranslation lint check by declaring the strings will never be translated, but these are user-visible UI labels ("Refresh in place", "Skip if value unchanged", "Stale threshold (minutes)", etc.) for an app that actively supports 13 locales (de, fr, ru, zh, and 9 more). Marking them non-translatable means Android's extraction tooling will skip them permanently, so translator submissions for these fields will never appear in locale builds. Neighboring strings with the same purpose — outbound_api_preset_custom_json_desc, outbound_api_preset_telegram_desc, outbound_api_send_test — all carry translations in the German file today.
The correct path is to add the translations to each values-*/strings.xml file. If translations are not yet ready, use tools:ignore="MissingTranslation" as a temporary suppression instead — it quiets the lint check without removing the strings from future extraction.
| <string name="outbound_api_preset_glucodroid_cloud_desc" translatable="false">Stream readings to your glucodroid.cloud account.</string> | ||
| <string name="outbound_api_glucodroid_subdomain" translatable="false">Subdomain</string> | ||
| <string name="outbound_api_glucodroid_ingest_token" translatable="false">Ingest token</string> |
There was a problem hiding this comment.
Generic UI terms marked non-translatable alongside brand name
outbound_api_preset_glucodroid_cloud ("glucodroid.cloud") is a brand/domain name and is reasonable to keep untranslated. However, outbound_api_glucodroid_subdomain ("Subdomain") and outbound_api_glucodroid_ingest_token ("Ingest token") are generic technical labels that translators would normally render in the target language. Bundling them with the brand-name string under translatable="false" means they'll always appear in English regardless of locale.
|
Thanks for the thorough review, @greptileai. You’re right that the 14 strings fall into two buckets, not one, and Current state: this PR uses Why not just add 182 translations right now?
Why not Proposed follow-up (tracked separately, not blocking this PR):
In the meantime, keeping the current PR as-is:
Would you (or the maintainers) prefer I amend this PR to use the split approach now, or keep it minimal and file a follow-up issue for the localization pass? |
robster7674
left a comment
There was a problem hiding this comment.
Re-triggering review for merge readiness.
|
@greptileai re-trigger review for PR 39 |
|
Acknowledged both greptile discussion points on this PR:
Tracked for follow-up in a separate PR/issue so this lint fix can land now without blocking CI. |
Marks 14 new outbound_api_* strings as translatable=false to suppress MissingTranslation lint errors.