Skip to content

Commit

Permalink
WIP - more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Nov 3, 2023
1 parent 5716c9f commit d68da0d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
23 changes: 20 additions & 3 deletions Apps/LekaUpdater/Resources/ll10n/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,23 @@
}
}
},
"information.robot.serial_number" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "nouveau serial number %@"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "ROBOT SERIAL %@"
}
}
}
},
"Installation de la mise à jour" : {
"localizations" : {
"en" : {
Expand Down Expand Up @@ -314,18 +331,18 @@
},
"main.app_name" : {
"comment" : "Name of the application",
"extractionState" : "stale",
"extractionState" : "translated",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Leka Updater"
"value" : "Leka Updater ENGLISH"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Leka Updater"
"value" : "Leka Updater FRANçAIS"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Apps/LekaUpdater/Sources/Localization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ enum l10n {
enum main {

// static let appName = "main.app_name".localized(value: "Leka Updater", comment: "Name of the application")
static let appName = String.localized("main.app_name", value: "Leka Updater", comment: "Name of the application")
static let appName = String.localized("main.app_name", value: "Leka Updater FROM swift", comment: "Name of the application")

Check failure on line 44 in Apps/LekaUpdater/Sources/Localization.swift

View workflow job for this annotation

GitHub Actions / lint

Code should be indented using one tab or 4 spaces (indentation_width)
static let appDescription = "main.app_description".localized(value: "The app to update your Leka robots!", comment: "Description of the application")

}
Expand Down Expand Up @@ -78,7 +78,7 @@ enum l10n {

enum robot {

static var serialNumber = "information.robot.serial_number".localized(interpolation: "Serial Number: %@", comment: "Connected robot serial number")
static var serialNumber = "information.robot.serial_number".localized(interpolation: "Serial Number blablabla: %@", comment: "Connected robot serial number")
static let battery = "information.robot.battery".localized(interpolation: "Battery: %@", comment: "Connected robot battery level")
static let version = "information.robot.version".localized(interpolation: "Version: %@", comment: "Connected robot version")
static let isCharging = "information.robot.charging_status".localized(interpolation: "Charging: %@", comment: "Connected robot charging status")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct ConnectionView: View {
var body: some View {
NavigationStack {
VStack {
Text(l10n.main.appName)
RobotConnectionView(robotConnectionViewModel: viewModel.robotConnectionViewModel)

continueButton
Expand Down
4 changes: 2 additions & 2 deletions Apps/LekaUpdater/Sources/View/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ struct ContentView: View {

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
.environment(\.locale, .init(identifier: "en"))
// ContentView()
// .environment(\.locale, .init(identifier: "en"))
ContentView()
.environment(\.locale, .init(identifier: "fr"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ struct RobotInformationView_Previews: PreviewProvider {
}
}
}
.environment(\.locale, .init(identifier: "fr"))
}
}

0 comments on commit d68da0d

Please sign in to comment.