Skip to content

Commit 95393e9

Browse files
author
Emilio Pavia
committed
Localize Nano 33 sensors info
1 parent ff3b2bf commit 95393e9

File tree

82 files changed

+708
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+708
-30
lines changed

ScienceJournal/BLEArduino/Nano33BLE/Sensors/Nano33BLESenseBarometricPressureSensor.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,20 @@ import CoreBluetooth
2222
struct Nano33BLESenseBarometricPressureSensor: BLEArduinoSensor {
2323
static var uuid: CBUUID { CBUUID(string: "555a0002-0015-467a-9538-01f0652c74e8") }
2424

25-
var name: String { "barometer".localized }
25+
var name: String { String.barometer }
2626

2727
var iconName: String { "ic_sensor_barometer" }
2828

2929
var animatingIconName: String { "sensor_barometer" }
3030

31-
var unitDescription: String? { "barometer_units".localized }
31+
var unitDescription: String? { String.barometerUnits }
3232

33-
var textDescription: String {
34-
"An instrument used to measure " +
35-
"the barometric pressure" }
33+
var textDescription: String { String.sensorDescShortBarometer }
3634

3735
var learnMoreInformation: Sensor.LearnMore {
38-
Sensor.LearnMore(firstParagraph: "",
39-
secondParagraph: "",
40-
imageName: "")
36+
Sensor.LearnMore(firstParagraph: String.sensorDescFirstParagraphBarometer,
37+
secondParagraph: String.sensorDescSecondParagraphBarometer,
38+
imageName: "learn_more_barometer")
4139
}
4240

4341
var config: BLEArduinoSensorConfig?

ScienceJournal/BLEArduino/Nano33BLE/Sensors/Nano33BLESenseColorIlluminanceSensor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ struct Nano33BLESenseColorIlluminanceSensor: BLEArduinoSensor {
2323
static var uuid: CBUUID { CBUUID(string: "555a0002-0018-467a-9538-01f0652c74e8") }
2424
static var identifier: String { "\(uuid.uuidString)_1" }
2525

26-
var name: String { "ambient_light".localized }
26+
var name: String { String.ambientLight }
2727

2828
var iconName: String { "ic_sensor_light" }
2929

3030
var animatingIconName: String { "mkrsci_light" }
3131

32-
var unitDescription: String? { "ambient_light_units".localized }
32+
var unitDescription: String? { String.ambientLightUnits }
3333

34-
var textDescription: String { "sensor_desc_short_mkrsci_color_illuminance".localized }
34+
var textDescription: String { String.sensorDescShortMkrsciColorIlluminance }
3535

3636
var learnMoreInformation: Sensor.LearnMore {
3737
Sensor.LearnMore(firstParagraph: "",

ScienceJournal/BLEArduino/Nano33BLE/Sensors/Nano33BLESenseColorTemperatureSensor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ struct Nano33BLESenseColorTemperatureSensor: BLEArduinoSensor {
2323
static var uuid: CBUUID { CBUUID(string: "555a0002-0018-467a-9538-01f0652c74e8") }
2424
static var identifier: String { "\(uuid.uuidString)_2" }
2525

26-
var name: String { "Color Temperature" } //"color_temperature".localized
26+
var name: String { String.colorTemperature }
2727

2828
var iconName: String { "sensor_color" }
2929

3030
var animatingIconName: String { "sensor_color" }
3131

32-
var unitDescription: String? { "K" } //"color_temperature_units".localized
32+
var unitDescription: String? { String.colorTemperatureUnits }
3333

34-
var textDescription: String { "sensor_desc_short_mkrsci_color_temperature".localized }
34+
var textDescription: String { String.sensorDescShortMkrsciColorTemperature }
3535

3636
var learnMoreInformation: Sensor.LearnMore {
3737
Sensor.LearnMore(firstParagraph: "",

ScienceJournal/BLEArduino/Nano33BLE/Sensors/Nano33BLESenseHumiditySensor.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ import CoreBluetooth
2222
struct Nano33BLESenseHumiditySensor: BLEArduinoSensor {
2323
static var uuid: CBUUID { CBUUID(string: "555a0002-0016-467a-9538-01f0652c74e8") }
2424

25-
var name: String { "humidity".localized }
25+
var name: String { String.humidity }
2626

2727
var iconName: String { "sensor_humidity" }
2828

2929
var animatingIconName: String { "sensor_humidity" }
3030

31-
var unitDescription: String? { "raw_units".localized }
31+
var unitDescription: String? { String.humidityUnits }
3232

33-
var textDescription: String {
34-
"An instrument used to measure " +
35-
"the humidity of the envirionment" }
33+
var textDescription: String { String.sensorDescShortMkrsciHumidity }
3634

3735
var learnMoreInformation: Sensor.LearnMore {
3836
Sensor.LearnMore(firstParagraph: "",

ScienceJournal/BLEArduino/Nano33BLE/Sensors/Nano33BLESenseMagnetometerSensor.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ import CoreBluetooth
2222
struct Nano33BLESenseMagnetometerSensor: BLEArduinoSensor {
2323
static var uuid: CBUUID { CBUUID(string: "555a0002-0013-467a-9538-01f0652c74e8") }
2424

25-
var name: String { "magnetic_field_strength".localized }
25+
var name: String { String.magneticFieldStrength }
2626

2727
var iconName: String { "mkrsci_magnetometer" }
2828

2929
var animatingIconName: String { "mkrsci_magnetometer" }
3030

31-
var unitDescription: String? { "magnetic_strength_units".localized }
31+
var unitDescription: String? { String.magneticStrengthUnits }
3232

33-
var textDescription: String { "sensor_desc_short_mkrsci_magnetometer".localized }
33+
var textDescription: String { String.sensorDescShortMagneticStrength }
3434

3535
var learnMoreInformation: Sensor.LearnMore {
36-
Sensor.LearnMore(firstParagraph: "",
37-
secondParagraph: "",
38-
imageName: "")
36+
Sensor.LearnMore(firstParagraph: String.sensorDescFirstParagraphMagneticStrength,
37+
secondParagraph: String.sensorDescSecondParagraphMagneticStrength,
38+
imageName: "learn_more_magnet")
3939
}
4040

4141
var config: BLEArduinoSensorConfig?

ScienceJournal/BLEArduino/Nano33BLE/Sensors/Nano33BLESenseProximitySensor.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ import CoreBluetooth
2222
struct Nano33BLESenseProximitySensor: BLEArduinoSensor {
2323
static var uuid: CBUUID { CBUUID(string: "555a0002-0017-467a-9538-01f0652c74e8") }
2424

25-
var name: String { "proximity".localized }
25+
var name: String { String.proximity }
2626

2727
var iconName: String { "sensor_proximity" }
2828

2929
var animatingIconName: String { "nano33_ble_sense_proximity" }
3030

31-
var unitDescription: String? { "raw_units".localized }
31+
var unitDescription: String? { String.proximityUnits }
3232

33-
var textDescription: String {
34-
"An instrument used to measure " +
35-
"the proximity to an object" }
33+
var textDescription: String { String.sensorDescShortMkrsciProximity }
3634

3735
var learnMoreInformation: Sensor.LearnMore {
3836
Sensor.LearnMore(firstParagraph: "",

ScienceJournal/Resources/Strings.bundle/ar.lproj/Localizable.strings

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@
320320
"close_btn_content_description" = "إغلاق";
321321
/* Accessibility details for the close button on a view [CHAR_LIMIT=NONE] */
322322
"close_btn_content_details" = "عودة إلى العرض السابق";
323+
"color_temperature" = "Color Temperature";
324+
"color_temperature_units" = "K";
323325
/* Displayed name of a sensor that shows a compass orientation [CHAR_LIMIT=25] */
324326
"compass" = "بُوصلة";
325327
/* Units for a compass sensor [CHAR_LIMIT=10] */
@@ -550,6 +552,8 @@
550552
"heading_info_section" = "ما هذا؟";
551553
/* Displayed units for a pitch sensor, hertz [CHAR_LIMIT=10] */
552554
"hertz_units" = "هرتز";
555+
"humidity" = "Humidity";
556+
"humidity_units" = "%";
553557
/* Generic Error for attempting to import [CHAR_LIMIT=NONE] */
554558
"import_failed" = "حدث خطأ غير معروف.";
555559
/* Error for attempting to import a corrupted file [CHAR_LIMIT=NONE] */
@@ -743,6 +747,8 @@
743747
"play_content_description" = "تشغيل";
744748
/* Snackbar message when preferences are migrated from root to account users. [CHAR_LIMIT=100] */
745749
"preference_migration_message" = "تمّ تطبيق إعدادات الجهاز الحالية على هذا الحساب.";
750+
"proximity" = "Proximity";
751+
"proximity_units" = "%";
746752
/* Accessibility announcement indicating pull to refresh has been initiated. [CHAR_LIMIT=NONE] */
747753
"pull_to_refresh_content_description" = "جارٍ تحديث الصفحة";
748754
/* Displayed units for a raw sensor, a percentage [CHAR_LIMIT=10] */
@@ -904,9 +910,12 @@
904910
"sensor_desc_short_magnetic_strength" = "قوّة الحقل المغناطيسي المحيط للأرض، بوحدة القياس ميكروتسلا.";
905911
"sensor_desc_short_mkrsci_acc" = "A device that measures acceleration";
906912
"sensor_desc_short_mkrsci_color_illuminance" = "The ambient light sensor measures light in lux, a measure of illumination that depends on the amount of incoming light and the area over which it is spread. The amount of light is measured in lux.";
913+
"sensor_desc_short_mkrsci_color_temperature" = "Color temperature is a characteristic of visible light that has important applications in many industries, such as: lighting, photography, astrophysics, manufacturing, and other fields. Color temperature is expressed in Kelvins (K), a unit of measurement for absolute temperature.";
907914
"sensor_desc_short_mkrsci_current" = "The amount of flow of charged particles between two places";
908915
"sensor_desc_short_mkrsci_gyr" = "A device that measures orientation and angular velocity (rotation).";
916+
"sensor_desc_short_mkrsci_humidity" = "A humidity sensor is an electronic device that measures the humidity in its environment and converts it into an electrical signal. Relative humidity is measured in %.";
909917
"sensor_desc_short_mkrsci_magnetometer" = "An instrument used to measure the intensity and direction of a magnetic field";
918+
"sensor_desc_short_mkrsci_proximity" = "A proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target. Proximity here is measured in millimeters or mm.";
910919
"sensor_desc_short_mkrsci_resistance" = "The measure of the difficulty of current flow through an object or material";
911920
"sensor_desc_short_mkrsci_temperature" = "Ambient temperature in C or F";
912921
"sensor_desc_short_mkrsci_voltage" = "The difference in electric potential between two places that allows a current to flow";

ScienceJournal/Resources/Strings.bundle/bg.lproj/Localizable.strings

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@
320320
"close_btn_content_description" = "Затваряне";
321321
/* Accessibility details for the close button on a view [CHAR_LIMIT=NONE] */
322322
"close_btn_content_details" = "Назад към предходния изглед";
323+
"color_temperature" = "Color Temperature";
324+
"color_temperature_units" = "K";
323325
/* Displayed name of a sensor that shows a compass orientation [CHAR_LIMIT=25] */
324326
"compass" = "Компас";
325327
/* Units for a compass sensor [CHAR_LIMIT=10] */
@@ -550,6 +552,8 @@
550552
"heading_info_section" = "Какво се случва?";
551553
/* Displayed units for a pitch sensor, hertz [CHAR_LIMIT=10] */
552554
"hertz_units" = "Hz";
555+
"humidity" = "Humidity";
556+
"humidity_units" = "%";
553557
/* Generic Error for attempting to import [CHAR_LIMIT=NONE] */
554558
"import_failed" = "За съжаление, възникна неизвестна грешка.";
555559
/* Error for attempting to import a corrupted file [CHAR_LIMIT=NONE] */
@@ -743,6 +747,8 @@
743747
"play_content_description" = "Старт";
744748
/* Snackbar message when preferences are migrated from root to account users. [CHAR_LIMIT=100] */
745749
"preference_migration_message" = "Текущите настройки на устройството са приложени към този профил";
750+
"proximity" = "Proximity";
751+
"proximity_units" = "%";
746752
/* Accessibility announcement indicating pull to refresh has been initiated. [CHAR_LIMIT=NONE] */
747753
"pull_to_refresh_content_description" = "Опресняване";
748754
/* Displayed units for a raw sensor, a percentage [CHAR_LIMIT=10] */
@@ -904,9 +910,12 @@
904910
"sensor_desc_short_magnetic_strength" = "Силата на околното геомагнитно поле в микротесли.";
905911
"sensor_desc_short_mkrsci_acc" = "A device that measures acceleration";
906912
"sensor_desc_short_mkrsci_color_illuminance" = "The ambient light sensor measures light in lux, a measure of illumination that depends on the amount of incoming light and the area over which it is spread. The amount of light is measured in lux.";
913+
"sensor_desc_short_mkrsci_color_temperature" = "Color temperature is a characteristic of visible light that has important applications in many industries, such as: lighting, photography, astrophysics, manufacturing, and other fields. Color temperature is expressed in Kelvins (K), a unit of measurement for absolute temperature.";
907914
"sensor_desc_short_mkrsci_current" = "The amount of flow of charged particles between two places";
908915
"sensor_desc_short_mkrsci_gyr" = "A device that measures orientation and angular velocity (rotation).";
916+
"sensor_desc_short_mkrsci_humidity" = "A humidity sensor is an electronic device that measures the humidity in its environment and converts it into an electrical signal. Relative humidity is measured in %.";
909917
"sensor_desc_short_mkrsci_magnetometer" = "An instrument used to measure the intensity and direction of a magnetic field";
918+
"sensor_desc_short_mkrsci_proximity" = "A proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target. Proximity here is measured in millimeters or mm.";
910919
"sensor_desc_short_mkrsci_resistance" = "The measure of the difficulty of current flow through an object or material";
911920
"sensor_desc_short_mkrsci_temperature" = "Ambient temperature in C or F";
912921
"sensor_desc_short_mkrsci_voltage" = "The difference in electric potential between two places that allows a current to flow";

ScienceJournal/Resources/Strings.bundle/bs-BA.lproj/Localizable.strings

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@
320320
"close_btn_content_description" = "Zatvori";
321321
/* Accessibility details for the close button on a view [CHAR_LIMIT=NONE] */
322322
"close_btn_content_details" = "Natrag na prethodni prikaz";
323+
"color_temperature" = "Color Temperature";
324+
"color_temperature_units" = "K";
323325
/* Displayed name of a sensor that shows a compass orientation [CHAR_LIMIT=25] */
324326
"compass" = "Kompas";
325327
/* Units for a compass sensor [CHAR_LIMIT=10] */
@@ -550,6 +552,8 @@
550552
"heading_info_section" = "Što se događa?";
551553
/* Displayed units for a pitch sensor, hertz [CHAR_LIMIT=10] */
552554
"hertz_units" = "Hz";
555+
"humidity" = "Humidity";
556+
"humidity_units" = "%";
553557
/* Generic Error for attempting to import [CHAR_LIMIT=NONE] */
554558
"import_failed" = "Nažalost, došlo je do nepoznate pogreške.";
555559
/* Error for attempting to import a corrupted file [CHAR_LIMIT=NONE] */
@@ -743,6 +747,8 @@
743747
"play_content_description" = "Reproduciraj";
744748
/* Snackbar message when preferences are migrated from root to account users. [CHAR_LIMIT=100] */
745749
"preference_migration_message" = "Na taj su račun primijenjene postojeće postavke uređaja";
750+
"proximity" = "Proximity";
751+
"proximity_units" = "%";
746752
/* Accessibility announcement indicating pull to refresh has been initiated. [CHAR_LIMIT=NONE] */
747753
"pull_to_refresh_content_description" = "Osvježavanje";
748754
/* Displayed units for a raw sensor, a percentage [CHAR_LIMIT=10] */
@@ -904,9 +910,12 @@
904910
"sensor_desc_short_magnetic_strength" = "Jakost prostornog geomagnetskog polja u mikroteslama";
905911
"sensor_desc_short_mkrsci_acc" = "A device that measures acceleration";
906912
"sensor_desc_short_mkrsci_color_illuminance" = "The ambient light sensor measures light in lux, a measure of illumination that depends on the amount of incoming light and the area over which it is spread. The amount of light is measured in lux.";
913+
"sensor_desc_short_mkrsci_color_temperature" = "Color temperature is a characteristic of visible light that has important applications in many industries, such as: lighting, photography, astrophysics, manufacturing, and other fields. Color temperature is expressed in Kelvins (K), a unit of measurement for absolute temperature.";
907914
"sensor_desc_short_mkrsci_current" = "The amount of flow of charged particles between two places";
908915
"sensor_desc_short_mkrsci_gyr" = "A device that measures orientation and angular velocity (rotation).";
916+
"sensor_desc_short_mkrsci_humidity" = "A humidity sensor is an electronic device that measures the humidity in its environment and converts it into an electrical signal. Relative humidity is measured in %.";
909917
"sensor_desc_short_mkrsci_magnetometer" = "An instrument used to measure the intensity and direction of a magnetic field";
918+
"sensor_desc_short_mkrsci_proximity" = "A proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target. Proximity here is measured in millimeters or mm.";
910919
"sensor_desc_short_mkrsci_resistance" = "The measure of the difficulty of current flow through an object or material";
911920
"sensor_desc_short_mkrsci_temperature" = "Ambient temperature in C or F";
912921
"sensor_desc_short_mkrsci_voltage" = "The difference in electric potential between two places that allows a current to flow";

ScienceJournal/Resources/Strings.bundle/ca.lproj/Localizable.strings

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@
320320
"close_btn_content_description" = "Tanca";
321321
/* Accessibility details for the close button on a view [CHAR_LIMIT=NONE] */
322322
"close_btn_content_details" = "Torna a la visualització anterior";
323+
"color_temperature" = "Color Temperature";
324+
"color_temperature_units" = "K";
323325
/* Displayed name of a sensor that shows a compass orientation [CHAR_LIMIT=25] */
324326
"compass" = "Brúixola";
325327
/* Units for a compass sensor [CHAR_LIMIT=10] */
@@ -550,6 +552,8 @@
550552
"heading_info_section" = "Què és això?";
551553
/* Displayed units for a pitch sensor, hertz [CHAR_LIMIT=10] */
552554
"hertz_units" = "Hz";
555+
"humidity" = "Humidity";
556+
"humidity_units" = "%";
553557
/* Generic Error for attempting to import [CHAR_LIMIT=NONE] */
554558
"import_failed" = "S'ha produït un error desconegut.";
555559
/* Error for attempting to import a corrupted file [CHAR_LIMIT=NONE] */
@@ -743,6 +747,8 @@
743747
"play_content_description" = "Reprodueix";
744748
/* Snackbar message when preferences are migrated from root to account users. [CHAR_LIMIT=100] */
745749
"preference_migration_message" = "La configuració actual del dispositiu s'ha aplicat a aquest compte";
750+
"proximity" = "Proximity";
751+
"proximity_units" = "%";
746752
/* Accessibility announcement indicating pull to refresh has been initiated. [CHAR_LIMIT=NONE] */
747753
"pull_to_refresh_content_description" = "S'està actualitzant";
748754
/* Displayed units for a raw sensor, a percentage [CHAR_LIMIT=10] */
@@ -904,9 +910,12 @@
904910
"sensor_desc_short_magnetic_strength" = "La força del camp geomagnètic ambiental en microtesles.";
905911
"sensor_desc_short_mkrsci_acc" = "A device that measures acceleration";
906912
"sensor_desc_short_mkrsci_color_illuminance" = "The ambient light sensor measures light in lux, a measure of illumination that depends on the amount of incoming light and the area over which it is spread. The amount of light is measured in lux.";
913+
"sensor_desc_short_mkrsci_color_temperature" = "Color temperature is a characteristic of visible light that has important applications in many industries, such as: lighting, photography, astrophysics, manufacturing, and other fields. Color temperature is expressed in Kelvins (K), a unit of measurement for absolute temperature.";
907914
"sensor_desc_short_mkrsci_current" = "The amount of flow of charged particles between two places";
908915
"sensor_desc_short_mkrsci_gyr" = "A device that measures orientation and angular velocity (rotation).";
916+
"sensor_desc_short_mkrsci_humidity" = "A humidity sensor is an electronic device that measures the humidity in its environment and converts it into an electrical signal. Relative humidity is measured in %.";
909917
"sensor_desc_short_mkrsci_magnetometer" = "An instrument used to measure the intensity and direction of a magnetic field";
918+
"sensor_desc_short_mkrsci_proximity" = "A proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target. Proximity here is measured in millimeters or mm.";
910919
"sensor_desc_short_mkrsci_resistance" = "The measure of the difficulty of current flow through an object or material";
911920
"sensor_desc_short_mkrsci_temperature" = "Ambient temperature in C or F";
912921
"sensor_desc_short_mkrsci_voltage" = "The difference in electric potential between two places that allows a current to flow";

0 commit comments

Comments
 (0)