Skip to content

Commit

Permalink
Add translation capability for speed / pace units
Browse files Browse the repository at this point in the history
  • Loading branch information
wwarby committed Jun 22, 2022
1 parent 103e65d commit 83dcdf1
Show file tree
Hide file tree
Showing 40 changed files with 116 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ Code and ideas borrowed from [RunnersField by kpaumann](https://github.com/kopa/

<a name="changelog"></a>
## Changelog
- 1.5.1
- Add translation capability for speed / pace units with Hebrew translation included
- 1.5.0
- Add support for D2 Mach 1, Forerunner 55, 255, 255S and 955
- Internal work to lock code for older lower memory devices such as Forerunner 235, enabling future new feature development for newer devices
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="WalkerApp" id="2a2fa5b83ffa4f499ba73d57e4ed09b0" launcherIcon="@Drawables.il" minSdkVersion="1.3.0" name="@Strings.appName" type="datafield" version="1.5.0">
<iq:application entry="WalkerApp" id="2a2fa5b83ffa4f499ba73d57e4ed09b0" launcherIcon="@Drawables.il" minSdkVersion="1.3.0" name="@Strings.appName" type="datafield" version="1.5.1">
<iq:products>
<iq:product id="approachs60"/>
<iq:product id="approachs62"/>
Expand Down
3 changes: 3 additions & 0 deletions resources-ara/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">خطوات / كيلومتر</string>
<string id="stepsPerMile">خطوات / ميل</string>
<string id="stepsPerHour">خطوات / ساعة</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-bul/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Стъпки / Километър</string>
<string id="stepsPerMile">Стъпки / Миля</string>
<string id="stepsPerHour">Стъпки / Час</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-ces/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Kroky / KM</string>
<string id="stepsPerMile">Kroky / Míle</string>
<string id="stepsPerHour">Kroky / Hodina</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-dan/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Trin / KM</string>
<string id="stepsPerMile">Trin / Mil</string>
<string id="stepsPerHour">Trin / Time</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-deu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Schritte / KM</string>
<string id="stepsPerMile">Schritte / Meile</string>
<string id="stepsPerHour">Schritte / Stunde</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-dut/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Stappen / KM</string>
<string id="stepsPerMile">Stappen / Mijl</string>
<string id="stepsPerHour">Stappen / Uur</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-eng/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Steps / KM</string>
<string id="stepsPerMile">Steps / Mile</string>
<string id="stepsPerHour">Steps / Hour</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-est/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Samm / KM</string>
<string id="stepsPerMile">Samm / Miil</string>
<string id="stepsPerHour">Samm / Tund</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-fin/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Vaiheet / KM</string>
<string id="stepsPerMile">Vaiheet / Maili</string>
<string id="stepsPerHour">Vaiheet / Tunti</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-fre/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Pas / KM</string>
<string id="stepsPerMile">Pas / Mile</string>
<string id="stepsPerHour">Pas / Heure</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-gre/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Βήματα / Χιλιόμετρο</string>
<string id="stepsPerMile">Βήματα / Μίλι</string>
<string id="stepsPerHour">Βήματα / Ωρα</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-heb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">צעדים לק"מ</string>
<string id="stepsPerMile">צעדים למייל</string>
<string id="stepsPerHour">צעדים לשעה</string>
<string id="km">ק"מ</string>
<string id="mi">מיל</string>
<string id="h">שעה</string>
</strings>
3 changes: 3 additions & 0 deletions resources-hrv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Koraci / KM</string>
<string id="stepsPerMile">Koraci / Milja</string>
<string id="stepsPerHour">Koraci / Sat</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-hun/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Lépésszám / km</string>
<string id="stepsPerMile">Lépésszám / mérföld</string>
<string id="stepsPerHour">Lépésszám / óra</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-ind/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Langkah / Mil</string>
<string id="stepsPerMile">Langkah / Mérföld</string>
<string id="stepsPerHour">Langkah / Jam</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-ita/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Passi / Chilometri</string>
<string id="stepsPerMile">Passi / Miglio</string>
<string id="stepsPerHour">Passi / Ora</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-jpn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">歩数/キロメートル</string>
<string id="stepsPerMile">ステップ/マイル</string>
<string id="stepsPerHour">ステップ/時間</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-kor/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">킬로미터 당 단계</string>
<string id="stepsPerMile">마일 당 단계</string>
<string id="stepsPerHour">시간당 단계</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-lav/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Soļi / KM</string>
<string id="stepsPerMile">Soļi / Jūdze</string>
<string id="stepsPerHour">Soļi / Stunda</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-lit/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Žingsniai / KM</string>
<string id="stepsPerMile">Žingsniai / Mylios</string>
<string id="stepsPerHour">Žingsniai / Val</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-nob/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Trinn / KM</string>
<string id="stepsPerMile">Trinn / Mil</string>
<string id="stepsPerHour">Trinn / Time</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-pol/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Kroki / KM</string>
<string id="stepsPerMile">Kroki / Mila</string>
<string id="stepsPerHour">Kroki / Godz</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-por/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Passos / Quilômetro</string>
<string id="stepsPerMile">Passos / Milha</string>
<string id="stepsPerHour">Passos / Hora</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-ron/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Pași / KM</string>
<string id="stepsPerMile">Pași / Mile</string>
<string id="stepsPerHour">Pași / Oră</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-rus/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Шагов / Километр</string>
<string id="stepsPerMile">Шагов / Миля</string>
<string id="stepsPerHour">Шагов / Час</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-slo/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Kroky / KM</string>
<string id="stepsPerMile">Kroky / Míľu</string>
<string id="stepsPerHour">Kroky / Hodinu</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-slv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Koraki / KM</string>
<string id="stepsPerMile">Koraki / Milja</string>
<string id="stepsPerHour">Koraki / Uro</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-spa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Pasos / KM</string>
<string id="stepsPerMile">Pasos / Milla</string>
<string id="stepsPerHour">Pasos / Hora</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-swe/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Steg / KM</string>
<string id="stepsPerMile">Steg / Mil</string>
<string id="stepsPerHour">Steg / Timme</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-tha/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">ขั้นตอนต่อกิโลเมตร</string>
<string id="stepsPerMile">ขั้นตอนต่อไมล์</string>
<string id="stepsPerHour">ขั้นตอนต่อชั่วโมง</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-tur/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Adım / KM</string>
<string id="stepsPerMile">Adım / Mil</string>
<string id="stepsPerHour">Adım / Saat</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-ukr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Кроки / Кілометр</string>
<string id="stepsPerMile">Кроки / Миля</string>
<string id="stepsPerHour">Кроки / Годину</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-vie/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Bước / KM</string>
<string id="stepsPerMile">Bước / Dặm</string>
<string id="stepsPerHour">Bước / Giờ</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-zhs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">步数/公里</string>
<string id="stepsPerMile">步数/英里</string>
<string id="stepsPerHour">步数/小时</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-zht/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">步數/公里</string>
<string id="stepsPerMile">步數/英里</string>
<string id="stepsPerHour">步數/小時</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources-zsm/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Langkah / KM</string>
<string id="stepsPerMile">Langkah / Batu</string>
<string id="stepsPerHour">Langkah / Jam</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
3 changes: 3 additions & 0 deletions resources/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
<string id="stepsPerKm">Steps / KM</string>
<string id="stepsPerMile">Steps / Mile</string>
<string id="stepsPerHour">Steps / Hour</string>
<string id="km">km</string>
<string id="mi">mi</string>
<string id="h">h</string>
</strings>
4 changes: 2 additions & 2 deletions source-memoryGTE32K/WalkerView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ class WalkerView extends Ui.DataField {

kmOrMileInMetersDistance = deviceSettings.distanceUnits == System.UNIT_METRIC ? 1000.0f : 1609.34f;
kmOrMileInKmPace = deviceSettings.paceUnits == System.UNIT_METRIC ? 1.0f : 1.60934f;
distanceUnitsLabel = deviceSettings.distanceUnits == System.UNIT_METRIC ? "km" : "mi";
averagePaceOrSpeedUnitsLabel = showSpeedInsteadOfPace ? "/hr" : "/" + (deviceSettings.paceUnits == System.UNIT_METRIC ? "km" : "mi");
distanceUnitsLabel = Ui.loadResource(deviceSettings.distanceUnits == System.UNIT_METRIC ? Rez.Strings.km : Rez.Strings.mi);
averagePaceOrSpeedUnitsLabel = "/" + Ui.loadResource(showSpeedInsteadOfPace ? Rez.Strings.h : deviceSettings.paceUnits == System.UNIT_METRIC ? Rez.Strings.km : Rez.Strings.mi);

// Short circuit if we have already created our FIT contributor fields and the distance unit setting hasn't changed
if (deviceSettings.distanceUnits == previousDistanceUnits) { return; }
Expand Down

0 comments on commit 83dcdf1

Please sign in to comment.