sync: make the add-account flow's own messages translatable
Fourteen English sentences were built in the ViewModel and rendered verbatim as fatal, Working.message and both error fields, so they shipped untranslated to every locale. Three more sites passed through whatever text the server, the repository or a Throwable produced. Seventeen in all, and three of the fourteen were added by fixes earlier on this branch -- which is the argument for a type rather than a rule. This is the defect Outcome.Cause was introduced to fix, and it only ever covered the address step. AddAccountMessage does the same for the rest: a plain Kotlin sealed type in the app, with the resource mapping beside Cause's in the screen. The state fields carry it, so a literal is now a compile error rather than something review has to catch. Nothing lints for this -- HardcodedText reads XML layout attributes and this app has none -- so the type is the only guard there is. The passthroughs get causes of their own, following the rule Outcome.Cause already states: PollResult.Failed carries RATE_LIMITED, MAINTENANCE or SERVER_ERROR, keeping the 429/503 distinction that flattening to one message would lose, and CredentialFailed carries KEYSTORE_REFUSED or NOT_SAVED. Their reason and detail stay for logs and are never shown. A server's words are untranslatable and often a bare status line; a Throwable's are worse. Twenty keys, base locale only -- Weblate owns the rest and picks them up. The four tests that asserted on English prose now assert on the message, which for the cross-domain one is stricter: it pins the host into the argument instead of anywhere in a sentence.
This commit is contained in:
@@ -333,6 +333,26 @@
|
||||
<string name="add_account_error_insecure">That address is unencrypted. Agendula only sends your password over https.</string>
|
||||
<string name="add_account_error_no_calendars">Signed in, but this account has no task lists.</string>
|
||||
<string name="add_account_error_server">The server ran into a problem. Try again in a moment.</string>
|
||||
<string name="add_account_working_discovering">Looking for a CalDAV server</string>
|
||||
<string name="add_account_working_signing_in">Signing in</string>
|
||||
<string name="add_account_working_reading_lists">Reading your task lists</string>
|
||||
<string name="add_account_working_saving">Adding the account</string>
|
||||
<string name="add_account_error_google_unsupported">Google Calendar does not support tasks over CalDAV \u2014 its own documentation says so \u2014 so Agendula cannot sync with it.</string>
|
||||
<string name="add_account_error_cross_domain">This server keeps some task lists on %1$s, which Agendula can\u2019t sign in to yet.</string>
|
||||
<string name="add_account_error_already_exists">That account is already set up.</string>
|
||||
<string name="add_account_error_no_usable_lists">Signed in, but this account has no task lists Agendula can use.</string>
|
||||
<string name="add_account_error_not_saved">The account couldn\u2019t be saved.</string>
|
||||
<string name="add_account_error_keystore">This device wouldn\u2019t store the password.</string>
|
||||
<string name="add_account_error_credentials_rejected">That username or password was not accepted.</string>
|
||||
<string name="add_account_browser_error_expired">The approval window closed before the server answered.</string>
|
||||
<string name="add_account_browser_error_rate_limited">The server is turning away repeated attempts. Wait a few minutes and try again.</string>
|
||||
<string name="add_account_browser_error_maintenance">The server is in maintenance mode. Try again once it is back.</string>
|
||||
<string name="add_account_browser_error_failed">The server didn\u2019t finish signing you in. Try again in a moment.</string>
|
||||
<string name="add_account_quirk_hint_fastmail">Fastmail needs an app password, not your account password \u2014 and CalDAV is not on the Basic plan.</string>
|
||||
<string name="add_account_quirk_hint_icloud">iCloud needs an app-specific password, which you create at appleid.apple.com with two-factor on.</string>
|
||||
<string name="add_account_quirk_fastmail">Fastmail needs an app password, and CalDAV is not available on the Basic plan.</string>
|
||||
<string name="add_account_quirk_icloud">iCloud needs an app-specific password, created at appleid.apple.com with two-factor on. Tasks stored there will not appear in Reminders.</string>
|
||||
<string name="add_account_quirk_google">Google Calendar does not support tasks over CalDAV.</string>
|
||||
<string name="accounts_needs_sign_in">Sign in again to keep syncing</string>
|
||||
<string name="accounts_sign_in_again">Sign in again</string>
|
||||
<string name="accounts_summary">%1$s \u00b7 %2$s</string>
|
||||
|
||||
Reference in New Issue
Block a user