Skip to content

Commit

Permalink
Continue localization (#503)
Browse files Browse the repository at this point in the history
* Comments in agent.

* Fix copyable view
  • Loading branch information
maxgoedjen authored Jan 5, 2024
1 parent 5af8458 commit 5718ae6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Sources/SecretAgent/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"sourceLanguage" : "en",
"strings" : {
"persist_authentication_accept_button" : {
"comment" : "When the user authorizes an action using a secret that requires unlock, they're shown a notification offering to leave the secret unlocked for a set period of time. This is the title for the notification.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -13,6 +14,7 @@
}
},
"persist_authentication_decline_button" : {
"comment" : "When the user authorizes an action using a secret that requires unlock, they're shown a notification offering to leave the secret unlocked for a set period of time. This is the decline button for the notification.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -24,6 +26,7 @@
}
},
"signed_notification_description_%@" : {
"comment" : "When the user performs an action using a secret, they're shown a notification describing what happened. This is the description, showing which secret was used. The placeholder is the name of the secret.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -35,6 +38,7 @@
}
},
"signed_notification_title_%@" : {
"comment" : "When the user performs an action using a secret, they're shown a notification describing what happened. This is the title, showing which app requested the action. The placeholder is the name of the app.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -46,6 +50,7 @@
}
},
"update_notification_ignore_button" : {
"comment" : "When an update is available, a notification is shown. This is the button to decline an update.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -57,6 +62,7 @@
}
},
"update_notification_update_button" : {
"comment" : "When an update is available, a notification is shown. This is the button to download an update.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -68,6 +74,7 @@
}
},
"update_notification_update_critical_title_%@" : {
"comment" : "When an update is available, a notification is shown. This is the title for a very high priority update with security fixes. The placeholder is for the application version, eg \"Critical Security Update - 2.0\"",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -79,6 +86,7 @@
}
},
"update_notification_update_description" : {
"comment" : "When an update is available, a notification is shown. This is the description to download an update.",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand All @@ -90,6 +98,7 @@
}
},
"update_notification_update_normal_title_%@" : {
"comment" : "When an update is available, a notification is shown. This is the title for a normal priority update. The placeholder is for the application version, eg \"Update Available - 2.0\"",
"extractionState" : "manual",
"localizations" : {
"en" : {
Expand Down
20 changes: 20 additions & 0 deletions Sources/Secretive/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,26 @@
}
}
},
"copyable_click_to_copy_button" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Click to Copy"
}
}
}
},
"copyable_copied" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Copied"
}
}
}
},
"create_secret_cancel_button" : {
"localizations" : {
"en" : {
Expand Down
6 changes: 3 additions & 3 deletions Sources/Secretive/Views/CopyableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ struct CopyableView: View {
)
}

var hoverText: String {
var hoverText: LocalizedStringKey {
switch interactionState {
case .hovering:
return "Click to Copy"
return "copyable_click_to_copy_button"
case .clicking:
return "Copied"
return "copyable_copied"
case .normal:
fatalError()
}
Expand Down

0 comments on commit 5718ae6

Please sign in to comment.