Skip to content

Commit

Permalink
Minor string and UI updates
Browse files Browse the repository at this point in the history
- Implemented anonaddy/addy-android#15
- Fixed add domain view
- Copy aa-verify record upon adding domain
  • Loading branch information
Stjin committed Jan 27, 2025
1 parent f03dda2 commit 0047f52
Show file tree
Hide file tree
Showing 24 changed files with 351 additions and 101 deletions.
8 changes: 4 additions & 4 deletions AddyStatisticWidget/AddyStatisticWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ struct AliasWidgetRowView: View {
aliasDescription = String(format: String(localized: "s_s_s"),
description,
String(format: NSLocalizedString("created_at_s", comment: ""),
DateTimeUtils.turnStringIntoLocalString(alias.created_at)),
DateTimeUtils.convertStringToLocalTimeZoneString(alias.created_at)),
String(format: String(localized: "updated_at_s"),
DateTimeUtils.turnStringIntoLocalString(alias.updated_at)))
DateTimeUtils.convertStringToLocalTimeZoneString(alias.updated_at)))
} else {
aliasDescription = String(format: String(localized: "s_s"),
String(format: NSLocalizedString("created_at_s", comment: ""),
DateTimeUtils.turnStringIntoLocalString(alias.created_at)),
DateTimeUtils.convertStringToLocalTimeZoneString(alias.created_at)),
String(format: String(localized: "updated_at_s"),
DateTimeUtils.turnStringIntoLocalString(alias.updated_at)))
DateTimeUtils.convertStringToLocalTimeZoneString(alias.updated_at)))
}
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -468,22 +468,6 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "515D06DC-487A-4167-AF60-625F3127FD20"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "addy/extensions/PrettyTime.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "44"
endingLineNumber = "44"
landmarkName = "futureDateDisplay()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
Expand Down Expand Up @@ -4818,22 +4802,6 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "68BC7002-6A8A-4F00-ACA8-614D1AFF9A7E"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "addy/View/aliases/AliasesView.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "610"
endingLineNumber = "610"
landmarkName = "onPressSend(client:sendToRecipients:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>Periphery.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>8</integer>
</dict>
<key>Playground (Playground) 1.xcscheme</key>
<dict>
Expand All @@ -45,7 +45,7 @@
<key>Privacy Manifest.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
<integer>7</integer>
</dict>
<key>ShareExtension.xcscheme_^#shared#^_</key>
<dict>
Expand Down
140 changes: 139 additions & 1 deletion addy/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@
},
"0" : {

},
"1_day_ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "1 day ago"
}
}
}
},
"1_hour_ago" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "1 hour ago"
}
}
}
},
"1_month_ago" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "1 month ago"
}
}
}
},
"about_this_app" : {
"extractionState" : "manual",
Expand Down Expand Up @@ -1705,6 +1737,16 @@
}
}
},
"d_days_ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d days ago"
}
}
}
},
"d_days_from_now_on" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -1727,6 +1769,17 @@
}
}
},
"d_hours_ago" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d hours ago"
}
}
}
},
"d_hrs_from_now_on" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -1738,6 +1791,17 @@
}
}
},
"d_min_ago" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d minutes ago"
}
}
}
},
"d_min_from_now_on" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -1749,6 +1813,16 @@
}
}
},
"d_months_ago" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d months ago"
}
}
}
},
"d_months_from_now_on" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -1771,6 +1845,17 @@
}
}
},
"d_sec_ago" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d seconds ago"
}
}
}
},
"d_sec_from_now_on" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -1804,6 +1889,17 @@
}
}
},
"d_years_from_now_on" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "%d year(s) from now on"
}
}
}
},
"deactivate" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -3762,6 +3858,16 @@
}
}
},
"just_now" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Just now"
}
}
}
},
"last_blocked" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -3773,6 +3879,16 @@
}
}
},
"last_d_at" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "last %@ at %@"
}
}
}
},
"last_forwarded" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -7087,6 +7203,17 @@
}
}
},
"verification_record_copied_to_clipboard" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Verification record has been copied to the clipboard"
}
}
}
},
"version_channel_info" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -7225,7 +7352,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Keep track of emails being forwarded through a specific alias. Open the management page of an alias and enable \"Watch alias\" to be notified of a new forwarded message.\n\nYou can watch a maximum of 25 aliases."
"value" : "Keep track of emails being forwarded through a specific alias. Open the management page of an alias and enable \"Watch alias\" to be notified of a new forwarded message.\n\nYou can watch a maximum of 25 aliases."
}
}
}
Expand Down Expand Up @@ -7556,6 +7683,17 @@
}
}
},
"yesterday_at" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "yesterday at %@"
}
}
}
},
"you_do_not_own_this_domain" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
12 changes: 8 additions & 4 deletions addy/View/aliases/AddAliasBottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,15 @@ struct AddAliasBottomSheet: View {

} header: {
VStack(alignment: .leading){
Text(String(format: String(localized: "add_alias_desc"), self.mainViewState.userResource!.username)).multilineTextAlignment(.center)
Spacer(minLength: 25)
Text(String(localized: "alias"))
VStack(alignment: .leading){
Text(String(format: String(localized: "add_alias_desc"), self.mainViewState.userResource!.username)).multilineTextAlignment(.center)
Spacer(minLength: 25)
}.textCase(nil)

}.textCase(nil).frame(maxWidth: .infinity, alignment: .center)
VStack(alignment: .leading){
Text(String(localized: "alias"))
}
}.frame(maxWidth: .infinity, alignment: .center)
} footer: {
if let error = aliasError {
if (!error.isEmpty){
Expand Down
44 changes: 33 additions & 11 deletions addy/View/aliases/AliasRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,40 @@ struct AliasRowView: View {


if let description = alias.description {
self.aliasDescription = String(format: String(localized: "s_s_s"),
description,
String(format: NSLocalizedString("created_at_s", comment: ""),
DateTimeUtils.turnStringIntoLocalString(alias.created_at)),
String(format: String(localized: "updated_at_s"),
DateTimeUtils.turnStringIntoLocalString(alias.updated_at)))

do {
self.aliasDescription = String(format: String(localized: "s_s_s"),
description,
String(format: NSLocalizedString("created_at_s", comment: ""),
try DateTimeUtils.convertStringToLocalTimeZoneDate(alias.created_at).aliasRowDateDisplay()),
String(format: String(localized: "updated_at_s"),
try DateTimeUtils.convertStringToLocalTimeZoneDate(alias.updated_at).aliasRowDateDisplay()))
}
catch {
self.aliasDescription = String(format: String(localized: "s_s_s"),
description,
String(format: NSLocalizedString("created_at_s", comment: ""),
DateTimeUtils.convertStringToLocalTimeZoneString(alias.created_at)),
String(format: String(localized: "updated_at_s"),
DateTimeUtils.convertStringToLocalTimeZoneString(alias.updated_at)))
}

} else {
self.aliasDescription = String(format: String(localized: "s_s"),
String(format: NSLocalizedString("created_at_s", comment: ""),
DateTimeUtils.turnStringIntoLocalString(alias.created_at)),
String(format: String(localized: "updated_at_s"),
DateTimeUtils.turnStringIntoLocalString(alias.updated_at)))

do {
self.aliasDescription = String(format: String(localized: "s_s"),
String(format: NSLocalizedString("created_at_s", comment: ""),
try DateTimeUtils.convertStringToLocalTimeZoneDate(alias.created_at).aliasRowDateDisplay()),
String(format: String(localized: "updated_at_s"),
try DateTimeUtils.convertStringToLocalTimeZoneDate(alias.updated_at).aliasRowDateDisplay()))
}
catch {
self.aliasDescription = String(format: String(localized: "s_s"),
String(format: NSLocalizedString("created_at_s", comment: ""),
DateTimeUtils.convertStringToLocalTimeZoneString(alias.created_at)),
String(format: String(localized: "updated_at_s"),
DateTimeUtils.convertStringToLocalTimeZoneString(alias.updated_at)))
}
}
}

Expand Down
Loading

0 comments on commit 0047f52

Please sign in to comment.