From 7a1c0b888a58518a277a09069d0148c6c5e3fc5e Mon Sep 17 00:00:00 2001 From: Danfro Date: Sun, 31 Oct 2021 22:48:39 +0100 Subject: [PATCH 1/7] make gender types translatable --- qml/Setting.qml | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/qml/Setting.qml b/qml/Setting.qml index ed07db8..46f17f3 100644 --- a/qml/Setting.qml +++ b/qml/Setting.qml @@ -89,24 +89,17 @@ Page { top: parent.top; topMargin: mSpacing } } - ComboButton { - id: sexValue - expandedHeight: -1 - width: parent.width - anchors { - top: sexLabel.bottom; topMargin: mSpacing - } - Column { - Repeater { - model: ["Male", "Female"] - Button { - text: modelData - width: parent.width - onClicked: { - sexValue.text = text; - sexValue.expanded = false; - calStride() - } + + Column { + Repeater { + model: [i18n.tr("Male"), i18n.tr("Female")] + Button { + text: modelData + width: parent.width + onClicked: { + sexValue.text = text; + sexValue.expanded = false; + calStride() } } } From 95a78b2f81a4eed7ec81fbd0f3dc4a1af0429240 Mon Sep 17 00:00:00 2001 From: Danfro Date: Sun, 31 Oct 2021 22:53:22 +0100 Subject: [PATCH 2/7] use translated value for if check --- qml/Setting.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qml/Setting.qml b/qml/Setting.qml index 46f17f3..91f314d 100644 --- a/qml/Setting.qml +++ b/qml/Setting.qml @@ -286,7 +286,7 @@ Page { //Calculate stride in cm based on demoraphic information function calStride() { - if (sexValue.text == "Male") { + if (sexValue.text == i18n.tr("Male")) { strideText.text = Math.round(heightText.text * 0.3937008 * 0.415 * 100) / 100 } else { strideText.text = Math.round(heightText.text * 0.3937008 * 0.413 * 100) / 100 From 38dec3e11c984436934ad5119f7a6f1e9beba1aa Mon Sep 17 00:00:00 2001 From: Danfro Date: Sun, 31 Oct 2021 23:09:37 +0100 Subject: [PATCH 3/7] include third gender as suggested in #15 --- qml/Setting.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qml/Setting.qml b/qml/Setting.qml index 91f314d..dbf5e58 100644 --- a/qml/Setting.qml +++ b/qml/Setting.qml @@ -92,7 +92,7 @@ Page { Column { Repeater { - model: [i18n.tr("Male"), i18n.tr("Female")] + model: [i18n.tr("Male"), i18n.tr("Female"), i18n.tr("Other")] Button { text: modelData width: parent.width @@ -288,6 +288,8 @@ Page { function calStride() { if (sexValue.text == i18n.tr("Male")) { strideText.text = Math.round(heightText.text * 0.3937008 * 0.415 * 100) / 100 + } else if (sexValue.text == i18n.tr("Other")) { + strideText.text = Math.round(heightText.text * 0.3937008 * 0.414 * 100) / 100 } else { strideText.text = Math.round(heightText.text * 0.3937008 * 0.413 * 100) / 100 } From c1c1fd91b22c8bc701eb0ce4b2b42edbf1e088b2 Mon Sep 17 00:00:00 2001 From: Danfro Date: Sun, 31 Oct 2021 22:50:44 +0100 Subject: [PATCH 4/7] updated pot file and add German translation --- po/de.po | 135 +++++++++++++++++++++++++++++++++++++++++ po/steps.jranaraki.pot | 38 ++++++++---- 2 files changed, 162 insertions(+), 11 deletions(-) create mode 100644 po/de.po diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..8e60631 --- /dev/null +++ b/po/de.po @@ -0,0 +1,135 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the steps.jranaraki package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: steps.jranaraki\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-31 21:49+0000\n" +"PO-Revision-Date: 2021-10-31 22:49+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../qml/About.qml:24 ../qml/MainPage.qml:50 +msgid "About" +msgstr "Über" + +#: ../qml/About.qml:48 ../qml/MainPage.qml:41 steps.desktop.in.h:1 +msgid "Steps" +msgstr "Schrittzähler" + +#: ../qml/About.qml:66 +msgid "Version %1" +msgstr "Version %1" + +#: ../qml/About.qml:74 +msgid "" +"This application counts your steps based on accelerometer data and " +"calculates travelled distance based on computed stride using the user's " +"demographic information." +msgstr "" +"Diese App zählt die Schritte basierend auf Daten des Beschleunigungsmessers. " +"Sie berechnet die zurückgelegte Strecke auf Grundlage der Schrittlänge, " +"welche aus demographischen Daten des Nutzers berechnet wird." + +#. TRANSLATORS: Please make sure the URLs are correct +#: ../qml/About.qml:83 +msgid "" +"This program is free software: you can redistribute it and/or modify it " +"under the terms of the GNU General Public License as published by the Free " +"Software Foundation, either version 3 of the License, or (at your option) " +"any later version. This program is distributed in the hope that it will be " +"useful, but WITHOUT ANY WARRANTY; without even the implied warranty of " +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public " +"License for more details." +msgstr "" +"Dieses Programm ist freie Software: du kannst sie verteilen und/oder " +"verändern unter den Bedingungen der GNU General Public License so wie von " +"der Free Software Foundation veröffentlicht, entweder in Version 3 der " +"Lizenz, oder (nach deiner Entscheidung) einer neueres Version. Das Programm " +"wird verteilt in der Hoffnung, dass es nützlich ist, aber OHNE JEDWEDE " +"GARANTIE, ohne auch nur eine implizierte Garantie der VERKÄUFLICHKEIT oder " +"DER GEEIGNETHEIT FÜR EINEN BESTIMMTEN ZWECK. Schaue hier GNU General Public License für " +"weitere Details." + +#: ../qml/About.qml:92 +msgid "DONATE" +msgstr "SPENDEN" + +#: ../qml/About.qml:92 +msgid "ISSUES" +msgstr "FEHLER" + +#: ../qml/About.qml:92 +msgid "SOURCE" +msgstr "QUELLCODE" + +#: ../qml/About.qml:102 +msgid "Copyright" +msgstr "Copyright" + +#: ../qml/MainPage.qml:45 ../qml/Setting.qml:36 +msgid "Settings" +msgstr "Einstellungen" + +#: ../qml/MainPage.qml:173 +msgid "Distance: %1 m" +msgstr "Entfernung: %1 m" + +#: ../qml/MainPage.qml:173 +msgid "Steps: %1" +msgstr "Schritte: %1" + +#: ../qml/Setting.qml:39 +msgid "Cancel" +msgstr "Abbrechen" + +#: ../qml/Setting.qml:48 +msgid "Apply" +msgstr "Anwenden" + +#: ../qml/Setting.qml:71 +msgid "Sex" +msgstr "Geschlecht" + +#: ../qml/Setting.qml:88 +msgid "Female" +msgstr "Weiblich" + +#: ../qml/Setting.qml:88 +msgid "Male" +msgstr "Männlich" + +#: ../qml/Setting.qml:108 +msgid "Age" +msgstr "Alter" + +#: ../qml/Setting.qml:130 +msgid "Height (cm)" +msgstr "Größe (cm)" + +#: ../qml/Setting.qml:153 +msgid "Weight (kg)" +msgstr "Gewicht (kg)" + +#: ../qml/Setting.qml:175 +msgid "Stride (cm)" +msgstr "Schrittlänge (cm)" + +#: ../qml/Setting.qml:195 +msgid "Sensitivity" +msgstr "Empfindlichkeit" + +#: ../qml/Setting.qml:221 +msgid "Goal (steps)" +msgstr "Tagesziel (Schritte)" diff --git a/po/steps.jranaraki.pot b/po/steps.jranaraki.pot index 83ef458..f916ff2 100644 --- a/po/steps.jranaraki.pot +++ b/po/steps.jranaraki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: steps.jranaraki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-29 02:56+0000\n" +"POT-Creation-Date: 2021-10-31 21:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,16 +17,16 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../qml/About.qml:24 ../qml/MainPage.qml:52 +#: ../qml/About.qml:24 ../qml/MainPage.qml:50 msgid "About" msgstr "" -#: ../qml/About.qml:48 ../qml/MainPage.qml:43 steps.desktop.in.h:1 +#: ../qml/About.qml:48 ../qml/MainPage.qml:41 steps.desktop.in.h:1 msgid "Steps" msgstr "" #: ../qml/About.qml:66 -msgid "Version: " +msgid "Version %1" msgstr "" #: ../qml/About.qml:74 @@ -65,31 +65,47 @@ msgstr "" msgid "Copyright" msgstr "" -#: ../qml/MainPage.qml:47 ../qml/Setting.qml:33 +#: ../qml/MainPage.qml:45 ../qml/Setting.qml:36 msgid "Settings" msgstr "" -#: ../qml/Setting.qml:36 +#: ../qml/MainPage.qml:173 +msgid "Distance: %1 m" +msgstr "" + +#: ../qml/MainPage.qml:173 +msgid "Steps: %1" +msgstr "" + +#: ../qml/Setting.qml:39 msgid "Cancel" msgstr "" -#: ../qml/Setting.qml:45 +#: ../qml/Setting.qml:48 msgid "Apply" msgstr "" -#: ../qml/Setting.qml:67 +#: ../qml/Setting.qml:71 msgid "Sex" msgstr "" -#: ../qml/Setting.qml:103 +#: ../qml/Setting.qml:88 +msgid "Female" +msgstr "" + +#: ../qml/Setting.qml:88 +msgid "Male" +msgstr "" + +#: ../qml/Setting.qml:108 msgid "Age" msgstr "" -#: ../qml/Setting.qml:122 +#: ../qml/Setting.qml:130 msgid "Height (cm)" msgstr "" -#: ../qml/Setting.qml:141 +#: ../qml/Setting.qml:153 msgid "Weight (kg)" msgstr "" #: ../qml/Setting.qml:196 From edde5d22c6179dcdc11bc9492450029700dcf546 Mon Sep 17 00:00:00 2001 From: Danfro Date: Sun, 31 Oct 2021 23:13:38 +0100 Subject: [PATCH 5/7] apply changes as suggested in #15 --- po/de.po | 10 +++++++--- po/steps.jranaraki.pot | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/po/de.po b/po/de.po index 8e60631..7e365d8 100644 --- a/po/de.po +++ b/po/de.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: steps.jranaraki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-31 21:49+0000\n" -"PO-Revision-Date: 2021-10-31 22:49+0100\n" +"POT-Creation-Date: 2021-10-31 22:11+0000\n" +"PO-Revision-Date: 2021-10-31 23:12+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -106,10 +106,14 @@ msgstr "Geschlecht" msgid "Female" msgstr "Weiblich" -#: ../qml/Setting.qml:88 +#: ../qml/Setting.qml:88 ../qml/Setting.qml:241 msgid "Male" msgstr "Männlich" +#: ../qml/Setting.qml:88 ../qml/Setting.qml:243 +msgid "Other" +msgstr "Anderes" + #: ../qml/Setting.qml:108 msgid "Age" msgstr "Alter" diff --git a/po/steps.jranaraki.pot b/po/steps.jranaraki.pot index f916ff2..116408e 100644 --- a/po/steps.jranaraki.pot +++ b/po/steps.jranaraki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: steps.jranaraki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-31 21:50+0000\n" +"POT-Creation-Date: 2021-10-31 22:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -93,10 +93,14 @@ msgstr "" msgid "Female" msgstr "" -#: ../qml/Setting.qml:88 +#: ../qml/Setting.qml:88 ../qml/Setting.qml:241 msgid "Male" msgstr "" +#: ../qml/Setting.qml:88 ../qml/Setting.qml:243 +msgid "Other" +msgstr "" + #: ../qml/Setting.qml:108 msgid "Age" msgstr "" From a3c76a1402ebd45191cc9c2d52fac9358cf7a121 Mon Sep 17 00:00:00 2001 From: Danfro Date: Sat, 20 Nov 2021 22:33:42 +0100 Subject: [PATCH 6/7] remove third gender since discussions are not fully resolved --- po/de.po | 11 +++++------ po/steps.jranaraki.pot | 6 +----- qml/Setting.qml | 4 +--- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/po/de.po b/po/de.po index 7e365d8..3052b3d 100644 --- a/po/de.po +++ b/po/de.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: steps.jranaraki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-31 22:11+0000\n" -"PO-Revision-Date: 2021-10-31 23:12+0100\n" +"POT-Creation-Date: 2021-11-20 21:31+0000\n" +"PO-Revision-Date: 2021-11-20 22:32+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -110,10 +110,6 @@ msgstr "Weiblich" msgid "Male" msgstr "Männlich" -#: ../qml/Setting.qml:88 ../qml/Setting.qml:243 -msgid "Other" -msgstr "Anderes" - #: ../qml/Setting.qml:108 msgid "Age" msgstr "Alter" @@ -137,3 +133,6 @@ msgstr "Empfindlichkeit" #: ../qml/Setting.qml:221 msgid "Goal (steps)" msgstr "Tagesziel (Schritte)" + +#~ msgid "Other" +#~ msgstr "Anderes" diff --git a/po/steps.jranaraki.pot b/po/steps.jranaraki.pot index 116408e..5399cf0 100644 --- a/po/steps.jranaraki.pot +++ b/po/steps.jranaraki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: steps.jranaraki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-31 22:12+0000\n" +"POT-Creation-Date: 2021-11-20 21:31+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -97,10 +97,6 @@ msgstr "" msgid "Male" msgstr "" -#: ../qml/Setting.qml:88 ../qml/Setting.qml:243 -msgid "Other" -msgstr "" - #: ../qml/Setting.qml:108 msgid "Age" msgstr "" diff --git a/qml/Setting.qml b/qml/Setting.qml index dbf5e58..91f314d 100644 --- a/qml/Setting.qml +++ b/qml/Setting.qml @@ -92,7 +92,7 @@ Page { Column { Repeater { - model: [i18n.tr("Male"), i18n.tr("Female"), i18n.tr("Other")] + model: [i18n.tr("Male"), i18n.tr("Female")] Button { text: modelData width: parent.width @@ -288,8 +288,6 @@ Page { function calStride() { if (sexValue.text == i18n.tr("Male")) { strideText.text = Math.round(heightText.text * 0.3937008 * 0.415 * 100) / 100 - } else if (sexValue.text == i18n.tr("Other")) { - strideText.text = Math.round(heightText.text * 0.3937008 * 0.414 * 100) / 100 } else { strideText.text = Math.round(heightText.text * 0.3937008 * 0.413 * 100) / 100 } From a489d31438deab7f00268f5bb074d48ea105bb56 Mon Sep 17 00:00:00 2001 From: Danfro Date: Sat, 20 Nov 2021 22:40:16 +0100 Subject: [PATCH 7/7] fix German translation for sensitivity label after rebase --- po/de.po | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/po/de.po b/po/de.po index 3052b3d..84503ce 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: steps.jranaraki\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-20 21:31+0000\n" -"PO-Revision-Date: 2021-11-20 22:32+0100\n" +"PO-Revision-Date: 2021-11-20 22:39+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" @@ -122,17 +122,15 @@ msgstr "Größe (cm)" msgid "Weight (kg)" msgstr "Gewicht (kg)" -#: ../qml/Setting.qml:175 -msgid "Stride (cm)" -msgstr "Schrittlänge (cm)" +#: ../qml/Setting.qml:196 +msgid "Sensitivity (7-12)" +msgstr "Empfindlichkeit (7-12)" -#: ../qml/Setting.qml:195 -msgid "Sensitivity" -msgstr "Empfindlichkeit" +#~ msgid "Stride (cm)" +#~ msgstr "Schrittlänge (cm)" -#: ../qml/Setting.qml:221 -msgid "Goal (steps)" -msgstr "Tagesziel (Schritte)" +#~ msgid "Goal (steps)" +#~ msgstr "Tagesziel (Schritte)" #~ msgid "Other" #~ msgstr "Anderes"