Closed Bug 1621970 Opened 6 years ago Closed 4 years ago

[android] Add warning/error for mismatch in placeables

Categories

(Localization Infrastructure and Tools :: compare-locales, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Unassigned)

Details

When there's a mismatch between the placeables in the source string and in the translation, Fenix CI throws.

/builds/worker/checkouts/src/components/browser/engine-system/src/main/res/values/strings.xml:7: Error: Inconsistent number of arguments in formatting string mozac_browser_engine_system_alert_title; found both 0 and 1 [StringFormatCount]
    <string name="mozac_browser_engine_system_alert_title">The page at %1$s says:</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /builds/worker/checkouts/src/components/browser/engine-system/src/main/res/values-my/strings.xml:4: Conflicting number of arguments here
/builds/worker/checkouts/src/components/browser/engine-system/src/main/res/values/strings.xml:10: Error: Inconsistent number of arguments in formatting string mozac_browser_engine_system_auth_message; found both 0 and 2 [StringFormatCount]
    <string name="mozac_browser_engine_system_auth_message">%2$s is requesting your username and password. The site says: “%1$s”</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /builds/worker/checkouts/src/components/browser/engine-system/src/main/res/values-my/strings.xml:7: Conflicting number of arguments here
/builds/worker/checkouts/src/components/browser/engine-system/src/main/res/values/strings.xml:12: Error: Inconsistent number of arguments in formatting string mozac_browser_engine_system_auth_no_realm_message; found both 0 and 1 [StringFormatCount]
    <string name="mozac_browser_engine_system_auth_no_realm_message">%1$s is requesting your username and password.</string>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /builds/worker/checkouts/src/components/browser/engine-system/src/main/res/values-my/strings.xml:9: Conflicting number of arguments here

This was the fix requested on the localization
https://github.com/mozilla-l10n/android-l10n/commit/86a6123c0c903bf9536b6a4214d6b502d8a0b613

I think there should be at least a warning for this.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.