diff --git a/CHANGELOG.md b/CHANGELOG.md index a8049aa..d801f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Error messages are localized (English and Japanese). A request that fails without the API's `error_message` shows "Something went wrong while communicating with the server. Please try again later." (`NATIVEAPPTEMPLATE-2001`); developer-only errors (`NATIVEAPPTEMPLATE-1001`, `2002`–`2008`, `4001`–`4004`) show "An unexpected error occurred." The API's `error_message` is shown without the " [Status: nnn]" suffix. Error codes are unchanged; status codes, field names and underlying errors go to the log (`CodedError.debugDescription`) ### Fixed +- The alert after resending confirmation instructions read "An email has been sent the email containing instructions for confirming your email address." It now reads "An email with instructions for confirming your email address has been sent.", as in NativeAppTemplate-Free-Android; the Japanese is unchanged - The message bar no longer covers the tab bar and blocks tab taps until it is closed: with the tabs showing, it sits above the tab bar. Its close button is a labeled "Close" button (new string, Japanese 閉じる) with a 32 pt target (the symbol stays 16 pt); the tabs' accessibility label no longer replaces the message's labels - VoiceOver read validation messages that weren't shown, e.g. "Name is required." under a filled-in name: a valid form keeps the message's space with a clear color, which still left it an accessibility element. The message is now also hidden from accessibility until it is shown (`validationMessage(isShown:)`, used by every form that hid its message this way: sign-up, profile, password, shop create/basic settings, item tag create/edit) - A failed sign-in's error message stayed on screen after the next attempt signed in; a new attempt now dismisses it diff --git a/NativeAppTemplate/Constants.swift b/NativeAppTemplate/Constants.swift index 008f03a..d5dcf1f 100644 --- a/NativeAppTemplate/Constants.swift +++ b/NativeAppTemplate/Constants.swift @@ -271,7 +271,7 @@ enum Strings { static let sentResetPasswordInstructionError = String(localized: "Unable to find user with the email.") static let sentConfirmationInstruction = String( - localized: "An email has been sent the email containing instructions for confirming your email address." + localized: "An email with instructions for confirming your email address has been sent." ) static let sentConfirmationInstructionError = String(localized: "Unable to find user with the email.") diff --git a/NativeAppTemplate/Localizable.xcstrings b/NativeAppTemplate/Localizable.xcstrings index 489ebb2..4659fb5 100644 --- a/NativeAppTemplate/Localizable.xcstrings +++ b/NativeAppTemplate/Localizable.xcstrings @@ -121,7 +121,7 @@ } } }, - "An email has been sent the email containing instructions for confirming your email address." : { + "An email with instructions for confirming your email address has been sent." : { "localizations" : { "ja" : { "stringUnit" : { diff --git a/NativeAppTemplateTests/App/LocalizationTest.swift b/NativeAppTemplateTests/App/LocalizationTest.swift index aeda173..9c11775 100644 --- a/NativeAppTemplateTests/App/LocalizationTest.swift +++ b/NativeAppTemplateTests/App/LocalizationTest.swift @@ -126,6 +126,28 @@ struct LocalizationTest { #expect(Strings.appLanguage == "App Language") } + // MARK: - English copy matches Android + + /// The alert read "An email has been sent the email containing instructions ...". + /// Expected English is NativeAppTemplate-Free-Android's sent_confirmation_instruction + /// (values/strings.xml, fixed in 2a3e764); the Japanese is its values-ja text, which + /// is also the translation the old key had here. + @Test + func confirmationInstructionSentMessage() throws { + let english = "An email with instructions for confirming your email address has been sent." + #expect(Strings.sentConfirmationInstruction == english) + #expect(try Self.japaneseBundle().localizedString(forKey: english, value: nil, table: nil) + == "メールアドレスの確認方法を記載したメールを送信しました。") + } + + /// The ungrammatical wording is gone from the catalog, so no view still uses it. + @Test(.enabled(if: canReadSourceCatalogs, "Reads the .xcstrings sources on the Mac")) + func noUngrammaticalEnglishKeys() throws { + let catalog = try StringCatalog(named: "Localizable.xcstrings") + let ungrammatical = catalog.strings.keys.filter { $0.contains("sent the email") || $0.contains("must be a 2-") } + #expect(ungrammatical.isEmpty, "Ungrammatical: \(ungrammatical)") + } + // MARK: - Helpers private static func japaneseBundle() throws -> Bundle {