Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NativeAppTemplate/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down
2 changes: 1 addition & 1 deletion NativeAppTemplate/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
22 changes: 22 additions & 0 deletions NativeAppTemplateTests/App/LocalizationTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading