Skip to content

Commit

Permalink
Merge pull request #28 from vespinola/11-add-plurals-to-localization
Browse files Browse the repository at this point in the history
added plurals
  • Loading branch information
vespinola authored Jun 26, 2024
2 parents 7d6b701 + d79eb92 commit 9b04390
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct ShipmentDetailView: View {
@ViewBuilder
private func getHeader() -> some View {
HStack(alignment: .top) {
Text("Shipment \(groupedPackage.formattedId)")
Text("Shipment #\(groupedPackage.formattedId)")
.foregroundStyle(.accent)
.fontWeight(.bold)
Spacer()
Expand Down
40 changes: 35 additions & 5 deletions mobile-courier-app/Utilities/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,40 @@
},
"%lld packages" : {
"localizations" : {
"en" : {
"variations" : {
"plural" : {
"one" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld package"
}
},
"other" : {
"stringUnit" : {
"state" : "new",
"value" : "%lld packages"
}
}
}
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld paquetes"
"variations" : {
"plural" : {
"one" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld paquete"
}
},
"other" : {
"stringUnit" : {
"state" : "translated",
"value" : "%lld paquetes"
}
}
}
}
}
}
Expand Down Expand Up @@ -242,12 +272,12 @@
}
}
},
"Shipment %@" : {
"Shipment #%@" : {
"localizations" : {
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Embarque %@"
"value" : "Embarque #%@"
}
}
}
Expand Down

0 comments on commit 9b04390

Please sign in to comment.