Skip to content

Commit

Permalink
feat(ios): handling max dimension of -1
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaranski committed Feb 13, 2023
1 parent 8c8f3b0 commit 464f0bf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
18 changes: 15 additions & 3 deletions ios/wheretopark/DetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,25 @@ struct DetailsAdditionalInfo: View {
if let dimensions = metadata.maxDimensions {
DetailsAdditionalInfoField(name: "maxDimensions") {
if let width = dimensions.width {
Text("dimensions.width \(width)")
if width == -1 {
Text("dimensions.width no limit")
} else {
Text("dimensions.width \(width)")
}
}
if let height = dimensions.height {
Text("dimensions.height \(height)")
if height == -1 {
Text("dimensions.height no limit")
} else {
Text("dimensions.height \(height)")
}
}
if let length = dimensions.length {
Text("dimensions.length \(length)")
if length == -1 {
Text("dimensions.length no limit")
} else {
Text("dimensions.length \(length)")
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions ios/wheretopark/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ url.emailAddress = "E-Mail Address";

maxDimensions = "Maximum dimensions";
"dimensions.width %lld" = "Width: %lld cm";
"dimensions.width no limit" = "Width: unlimited";
"dimensions.height %lld" = "Height: %lld cm";
"dimensions.height no limit" = "Height: unlimited";
"dimensions.length %lld" = "Length: %lld cm";
"dimensions.length no limit" = "Length: unlimited";
3 changes: 3 additions & 0 deletions ios/wheretopark/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ url.emailAddress = "Adres E-Mail";

maxDimensions = "Maksymalne wymiary";
"dimensions.width %lld" = "Szerokość: %lld cm";
"dimensions.width no limit" = "Szerokość: bez limitu";
"dimensions.height %lld" = "Wysokość: %lld cm";
"dimensions.height no limit" = "Wysokość: bez limitu";
"dimensions.length %lld" = "Długość: %lld cm";
"dimensions.length no limit" = "Długość: bez limitu";

0 comments on commit 464f0bf

Please sign in to comment.