integrations keyed, and the Google guide's foreign labels marked (163 -> 96)

Applies the rule added to docs/localization.md in 91b9bec9: a label quoted from
another product's interface is an identifier, so the prose around it is translated
and the label itself is left in English and NOT keyed.

Gives that decision a name in the code. <Untranslated reason="foreign-ui-label">
states it at each of the ~30 call sites, where whoever next edits the sentence will
see it, and gives the scanner something exact to skip -- without which labels that
MUST stay English count as debt forever and the area can never be held at zero. That
is the same trap as counting new Error() messages. `reason` is a closed union so a
second excuse has to be argued for rather than smuggled in as free text.

The sentences needed rephrasing, not just splitting. "Go to the [New Project] page."
decomposes into "Go to the" + link + "page." -- and the Portuguese value of that
second key is "." A key that holds a full stop is the fragmentation smell, so the
English now puts the label at a clause boundary ("Open the project creation page:"
then the link), which reads naturally in both languages and needs no node-level
interpolation. Worth knowing for phase 3: sentences with an inline link are the one
shape this catalog format cannot express, and rephrasing is the cheap way out.

Scanner: the existing SCREAMING_CONSTANT rule now allows . and - so Google's
client-secret prefix example GOCSPX-... falls under it. Same rule, wider class.
This commit is contained in:
2026-08-23 05:24:32 +00:00
parent 91b9bec926
commit 5e032898f8
7 changed files with 298 additions and 127 deletions
+74
View File
@@ -375,6 +375,80 @@
"deleteFailed": "Could not delete",
"copyField": "Copy {{field}}",
"copied": "{{what}} copied"
},
"google": {
"guideToggle": "Step-by-step setup guide",
"step1": {
"title": "Create a Google Cloud project",
"body": "Open the project creation page, give it a name (for example “Officer”), and click:",
"link": "New Project"
},
"step2": {
"title": "Enable the APIs",
"body": "Open the API library and search for each of these, then click:",
"link": "API Library"
},
"step3": {
"title": "Configure the OAuth consent screen",
"link": "OAuth Branding",
"appName": "Set your organization name, or “Officer”, as:",
"supportEmail": "Set your admin email as:",
"devContact": "Add your admin email under:",
"save": "Then click:"
},
"step4": {
"title": "Set the audience",
"link": "OAuth Audience",
"internal": "If your team uses Google Workspace, choose — no verification needed:",
"external": "Otherwise choose, and add your team’s emails under Test users (required while the app is unverified; limit of 100 test users):"
},
"step5": {
"title": "Add scopes",
"link": "Data Access",
"body": "Open data access and search for and add the scopes below, then click:",
"note": "Google classifies the calendar scope as sensitive and the Gmail scope as restricted. That is fine for Internal apps (Google Workspace) and for External apps in testing mode; publishing to production with restricted scopes requires Google verification."
},
"step6": {
"title": "Create OAuth credentials",
"link": "Clients",
"body": "Open the clients page and click:",
"appType": "Application type:",
"nameAnything": "Name: anything (for example “Officer”)",
"redirectUris": "Authorized redirect URIs — add:",
"thenClick": "Then click:"
},
"step7": {
"title": "Copy the credentials",
"body": "A dialog shows your client ID and client secret. Copy both and paste them into the fields below."
},
"scopeGmail": "Read emails",
"scopeCalendar": "Read calendar events",
"verifying": "Verifying credentials…",
"valid": "Credentials valid",
"invalid": "Invalid credentials",
"verifyFailed": "Verification request failed",
"clientId": "Client ID",
"clientSecret": "Client Secret",
"redirectUri": "Redirect URI",
"redirectUriHint": "Add this URI to your Google OAuth client’s authorized redirect URIs",
"saved": "Google OAuth configuration saved",
"saveFailed": "Failed to save Google OAuth configuration"
},
"googleAccount": {
"title": "Google Account",
"hint": "Connect your Google account for Calendar, Contacts, and other Google services.",
"connected": "Connected",
"disconnect": "Disconnect",
"connect": "Connect Google Account",
"connectedToast": "Google account connected",
"connectFailed": "Failed to connect Google account",
"disconnectedToast": "Google account disconnected",
"disconnectFailed": "Failed to disconnect Google account"
},
"apify": {
"token": "API Token",
"saved": "Apify API token saved",
"saveFailed": "Failed to save Apify API token"
}
},
"header": {