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

Add German Localization #68 #92

Merged
merged 22 commits into from
May 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
43 changes: 41 additions & 2 deletions ACHNBrowserUI/ACHNBrowserUI/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Copyright © 2020 Thomas Ricouard. All rights reserved.
*/

"Make an Offer" = "Angebot abgeben";
"Need Materials" = "Need Materials";
"Tap here to preview a notification" = "Tippe hier für eine Vorschau";
"Upgrade to +" = "Upgrade auf +";
"You're subscribed to AC Helper+" = "You're subscribed to AC Helper+";
Expand Down Expand Up @@ -287,6 +285,47 @@ Du kannst das Abonnement jederzeit in deinen iTunes Kontoeinstellungen beenden.
"Unknown" = "Unbekannt";
"Villager items" = "Gegenstände des Bewohners";

// ListingRow
"Make an Offer" = "Angebot abgeben";
"Need Materials" = "Benötigt Materialien";
"No Raiting" = "Keine Bewertungen";
"Raiting" = "Bewertung";

// CategoryRow
"housewares" = "Haushaltswaren";
"miscellaneous" = "Sonstiges";
"wall-mounted" = "Wand Dekoration";
"wallpapers" = "Tapeten";
"floors" = "Fußböden";
"rugs" = "Teppiche";
"photos" = "Fotos";
"posters" = "Poster";
"fencing" = "Zäune";
"tools" = "Werkzeuge";
"tops" = "Oberteile";
"bottoms" = "Unterteile";
"dresses" = "Kleider";
"headwear" = "Kopfbedeckungen";
"accessories" = "Accessoires";
"socks" = "Socken";
"shoes" = "Schuhe";
"bags" = "Taschen";
"umbrellas" = "Regenschirme";
"music" = "Musik";
"recipes" = "Anleitungen";
"construction" = "Bau";
"nookmiles" = "Nook Miles";
"other" = "Anderes";
"art" = "Kunst";
"bugs" = "Insekten";
"fish" = "Fische";
"fossils" = "Fossilien";
// CategoriesView
"Nature" = "Natur";
"Wardrobe" = "Kleidung";
"No results for %@" = "Kein Ergebnis für %@";


// Shared
// SearchField
"Search..." = "Suchen...";
Expand Down
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 @@ -17,17 +17,8 @@ public enum Category: String, CaseIterable {
case umbrellas, music, recipes, construction, nookmiles, other
case art, bugs, fish, fossils

public func label() -> String {
switch self {
case .fish:
return "Fishes"
case .wallMounted:
return "Wall mounted"
case .nookmiles:
return "Nook Miles"
default:
return self.rawValue.capitalized
}
public func label() -> LocalizedStringKey {
return LocalizedStringKey(self.rawValue)
Comment on lines -20 to +21
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced label() function because using rawValue as LocalizedStringKey makes this obsolet to transform value to readable label.

}

public func iconName() -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extension CategoriesView {
.renderingMode(.original)
.resizable()
.frame(width: 46, height: 46)
Text(name)
Text(LocalizedStringKey(name))
.style(appStyle: .rowTitle)
Spacer()
Text("\(items.itemsCount(for: categories))")
Expand Down
2 changes: 1 addition & 1 deletion ACHNBrowserUI/ACHNBrowserUI/views/listing/ListingRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct ListingRow: View {
}
}
if !hideDetail {
Text("\(listing.username)\(listing.discord.map { $0.isEmpty ? "" : " · \($0)" } ?? "")\(listing.rating.map { $0.isEmpty ? " · No Rating" : " · \($0[..<$0.index($0.startIndex, offsetBy: 4)]) Rating" } ?? " · No Rating")")
Text("\(listing.username)\(listing.discord.map { $0.isEmpty ? "" : " · \($0)" } ?? "")\(listing.rating.map { $0.isEmpty ? " · "+NSLocalizedString("No Rating", comment: "") : " · \($0[..<$0.index($0.startIndex, offsetBy: 4)]) "+NSLocalizedString("Rating", comment: "") } ?? " · "+NSLocalizedString("No Rating", comment: ""))")
.font(.subheadline)
.foregroundColor(.acSecondaryText)
}
Expand Down