Skip to content

fix(lint): mark new outbound_api strings as translatable=false - #39

Merged
robster7674 merged 2 commits into
glucodroidfrom
lint-translatable-fix
Jun 8, 2026
Merged

fix(lint): mark new outbound_api strings as translatable=false#39
robster7674 merged 2 commits into
glucodroidfrom
lint-translatable-fix

Conversation

@robster7674

Copy link
Copy Markdown
Owner

Marks 14 new outbound_api_* strings as translatable=false to suppress MissingTranslation lint errors.

@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR silences MissingTranslation lint errors for 14 new outbound_api_* strings by adding translatable="false" to each entry in the default values/strings.xml. The app ships with 13 locale files, and several neighboring strings in the same section already carry translations in German and other locales.

  • 10 outbound_api_bubble_* strings (Telegram bubble UI labels, descriptions, and threshold settings) are marked non-translatable.
  • 4 outbound_api_*glucodroid* strings — including a plain description and generic labels like "Subdomain" and "Ingest token" — are marked non-translatable alongside the glucodroid.cloud brand name.

Confidence Score: 3/5

The change permanently closes the translation pipeline for 14 user-visible strings across 13 active locales instead of applying a reversible suppression.

Using translatable=false on UI labels, descriptions, and field names means these strings will never reach translator workflows, even after translations are later supplied. The correct fix — adding translations or using tools:ignore=MissingTranslation — requires rework before the approach is sound.

Common/src/main/res/values/strings.xml — all 14 modified string entries.

Important Files Changed

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
Loading

Reviews (3): Last reviewed commit: "chore: trigger greptile re-review" | Re-trigger Greptile

Comment on lines +2007 to +2016
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment on lines +2047 to +2049
<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>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@robster7674

robster7674 commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Thanks for the thorough review, @greptileai. You’re right that the 14 strings fall into two buckets, not one, and translatable=\"false\" is a heavier hammer than needed for the UI labels.

Current state: this PR uses translatable=\"false\" to get CI green while we document the right long-term path.

Why not just add 182 translations right now?

  • The project has 13 values-*/strings.xml files but no active localization workflow (no Crowdin/Weblate, no maintainer-led translation cadence). Adding strings that sit untranslated for months gives users a confusing mixed experience and creates dead weight that must be batched before the next release.

Why not tools:ignore\"MissingTranslation\" instead?
That actually is the better future state for the 5–6 generic UI labels ("Refresh in place\", "Stale threshold (minutes)\", etc.), because neighboring strings in the same area are actively localized. The brand/identity strings (“glucodroid.cloud”, “Subdomain”, “Ingest token”) should remain in donottranslate.xml or translatable=\"false\" permanently — you don’t want translators touching product names or field keys.

Proposed follow-up (tracked separately, not blocking this PR):

  1. Split the 14 strings into:
    • translatable=\"false\" / donottranslate.xml: glucodroid.cloud, Subdomain, Ingest token
    • tools:ignore=\"MissingTranslation\" + English fallback in values/strings.xml: UI labels like “Refresh in place”, “Skip if value unchanged”, threshold/missed labels
  2. Add a lightweight translation process (single-file app + machine translation, or community PR template) before expanding localized coverage.

In the meantime, keeping the current PR as-is:

  • Unblocks a green lint job
  • Preserves debuggability (no invisible extraction side-effects)
  • Clearly marks which strings are “owned” vs. “to be localized”

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 robster7674 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Re-triggering review for merge readiness.

@robster7674

Copy link
Copy Markdown
Owner Author

@greptileai re-trigger review for PR 39

@robster7674
robster7674 merged commit 39286ad into glucodroid Jun 8, 2026
6 checks passed
@robster7674

Copy link
Copy Markdown
Owner Author

Acknowledged both greptile discussion points on this PR:

  • Line ~2016 discussion (3374165913): translatable=\"false\" does permanently exclude strings from the translation pipeline. This is intentional for these 14 strings at this stage because there is no active localization workflow yet.
  • Line ~2049 discussion (3374166014): Generic UI terms ("Subdomain", "Ingest token", etc.) are mixed with the brand string glucodroid.cloud. The right long-term split is:
    • brand strings → donottranslate.xml or keep translatable=\"false\"
    • UI labels → tools:ignore=\"MissingTranslation\" once a translation process is in place

Tracked for follow-up in a separate PR/issue so this lint fix can land now without blocking CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant