Localize username-suggestion (#690)
Please be aware of the username-requirements, when changing the localized versions.
This commit is contained in:
parent
3e76f43637
commit
18e25aea30
|
@ -329,7 +329,8 @@
|
|||
},
|
||||
"username": {
|
||||
"placeholder": "username",
|
||||
"duplicate_prompt": "This username is taken."
|
||||
"duplicate_prompt": "This username is taken.",
|
||||
"suggestion": "amazing_%@"
|
||||
},
|
||||
"display_name": {
|
||||
"placeholder": "display name"
|
||||
|
|
|
@ -49,9 +49,9 @@ struct MastodonRegisterView: View {
|
|||
Button {
|
||||
viewModel.usernameErrorPrompt = nil
|
||||
viewModel.usernameValidateState = .empty
|
||||
viewModel.username = "amazing_\(viewModel.username)"
|
||||
viewModel.username = L10n.Scene.Register.Input.Username.suggestion(viewModel.username)
|
||||
} label: {
|
||||
Text("amazing_\(viewModel.username)")
|
||||
Text(L10n.Scene.Register.Input.Username.suggestion(viewModel.username))
|
||||
.foregroundColor(Asset.Colors.Brand.blurple.swiftUIColor)
|
||||
.font(Font(UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .bold))))
|
||||
|
||||
|
|
|
@ -1034,6 +1034,10 @@ public enum L10n {
|
|||
public static let duplicatePrompt = L10n.tr("Localizable", "Scene.Register.Input.Username.DuplicatePrompt", fallback: "This username is taken.")
|
||||
/// username
|
||||
public static let placeholder = L10n.tr("Localizable", "Scene.Register.Input.Username.Placeholder", fallback: "username")
|
||||
/// amazing_%@
|
||||
public static func suggestion(_ p1: Any) -> String {
|
||||
return L10n.tr("Localizable", "Scene.Register.Input.Username.Suggestion", String(describing: p1), fallback: "amazing_%@")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -351,6 +351,7 @@ uploaded to Mastodon.";
|
|||
"Scene.Register.Input.Password.Require" = "Your password needs at least:";
|
||||
"Scene.Register.Input.Username.DuplicatePrompt" = "This username is taken.";
|
||||
"Scene.Register.Input.Username.Placeholder" = "username";
|
||||
"Scene.Register.Input.Username.Suggestion" = "amazing_%@";
|
||||
"Scene.Register.Title" = "Create account";
|
||||
"Scene.Report.Content1" = "Are there any other posts you’d like to add to the report?";
|
||||
"Scene.Report.Content2" = "Is there anything the moderators should know about this report?";
|
||||
|
|
|
@ -342,6 +342,7 @@ uploaded to Mastodon.";
|
|||
"Scene.Register.Input.Password.Require" = "Your password needs at least:";
|
||||
"Scene.Register.Input.Username.DuplicatePrompt" = "This username is taken.";
|
||||
"Scene.Register.Input.Username.Placeholder" = "username";
|
||||
"Scene.Register.Input.Username.Suggestion" = "amazing_%@";
|
||||
"Scene.Register.Title" = "Create account";
|
||||
"Scene.Report.Content1" = "Are there any other posts you’d like to add to the report?";
|
||||
"Scene.Report.Content2" = "Is there anything the moderators should know about this report?";
|
||||
|
|
Loading…
Reference in New Issue