Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize sources to German #107

Merged
merged 10 commits into from
May 11, 2020
303 changes: 301 additions & 2 deletions ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings

Large diffs are not rendered by default.

Binary file modified ACHNBrowserUI/ACHNBrowserUI/en.lproj/Localizable.strings
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public extension Item {
return nil
}
if startTime == 0 && endTime == 0 {
return "All day"
return NSLocalizedString("All day", comment: "")
}
return "\(startTime) - \(endTime)h"
}
Expand Down
2 changes: 1 addition & 1 deletion ACHNBrowserUI/ACHNBrowserUI/views/items/ItemRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct ItemRowView: View {
Group {
Text(item.localizedName.capitalized)
.style(appStyle: .rowTitle)
Text(item.obtainedFrom ?? item.obtainedFromNew?.first ?? "unknown source")
Text(LocalizedStringKey(item.obtainedFrom ?? item.obtainedFromNew?.first ?? "unknown source"))
.font(.subheadline)
.fontWeight(.semibold)
.foregroundColor(.acSecondaryText)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ struct ItemDetailInfoView: View {
Spacer()
}
if item.obtainedFrom != nil || item.obtainedFromNew?.isEmpty == false {
Text(item.obtainedFrom ?? item.obtainedFromNew?.first ?? "")
Text(LocalizedStringKey(item.obtainedFrom ?? item.obtainedFromNew?.first ?? ""))
.foregroundColor(.acSecondaryText)
.fontWeight(.semibold)
}
item.sourceNotes.map{
Text($0)
Text(LocalizedStringKey($0))
.foregroundColor(.acSecondaryText)
.font(.footnote)
}
if item.isCritter {
HStack(spacing: 8) {
VStack(spacing: 4) {
item.rarity.map { rarity in
HStack(spacing: 4) {
Text("Rarity:")
Text(rarity)
Text(LocalizedStringKey(rarity))
.foregroundColor(.acSecondaryText)
}
}
item.shadow.map { shadow in
HStack(spacing: 4) {
Text("Shadow size:")
Text(shadow)
Text(LocalizedStringKey(shadow))
.foregroundColor(.acSecondaryText)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct ItemsCrosslineSectionView: View {
VStack(alignment: .center, spacing: 4) {
ItemImage(path: item.filename,
size: 75)
Text(item.name)
Text(item.localizedName)
.font(.caption)
.foregroundColor(.acText)
}.onTapGesture {
Expand Down