Skip to content

Commit

Permalink
Added french and german locales, the theme is set to Fusion (since ot…
Browse files Browse the repository at this point in the history
…her themes, for example Kvantum, distort the UI), improved packaging
  • Loading branch information
limafresh committed Nov 24, 2024
1 parent c3ece76 commit fb83d7c
Show file tree
Hide file tree
Showing 11 changed files with 172 additions and 13 deletions.
6 changes: 3 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
math-trainer (1.0.3.post1-noble) noble; urgency=medium
math-trainer (1.1.0-noble) noble; urgency=medium

* Initial release
* Added french and german locales, the theme is set to Fusion (since other themes, for example Kvantum, distort the UI), improved packaging

-- limafresh <[email protected]> Tue, 05 Nov 2024 16:37:13 +0200
-- limafresh <[email protected]> Sun, 24 Nov 2024 17:16:59 +0200
29 changes: 29 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: math-trainer
Upstream-Contact: limafresh <[email protected]>
Source: http://github.com/limafresh/MathTrainer

Files: *
Copyright: 2024 limafresh <[email protected]>
License: GPL-3+

License: GPL-3+
Math trainer, practice addition skills within 100 and multiplication within 10
Copyright (C) 2024 limafresh

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.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/.

On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file
'/usr/share/common-licenses/GPL-3'.
11 changes: 3 additions & 8 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ override_dh_auto_install:
mkdir -p debian/math-trainer/usr/bin
cp -a math-trainer debian/math-trainer/usr/bin/
mkdir -p debian/math-trainer/usr/lib/python3/dist-packages/math_trainer
mkdir -p debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/sounds
mkdir -p debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/locales
cp -a math_trainer/main.py debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/
cp -a math_trainer/ui.ui debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/
cp -a math_trainer/sounds/* debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/sounds/
cp -a math_trainer/locales/*.qm debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/locales/
cp -a math_trainer/* debian/math-trainer/usr/lib/python3/dist-packages/math_trainer/
mkdir -p debian/math-trainer/usr/share/applications
cp -a math-trainer.desktop debian/math-trainer/usr/share/applications/
mkdir -p debian/math-trainer/usr/share/doc/math_trainer
cp -a LICENSE debian/math-trainer/usr/share/doc/math_trainer/
mkdir -p debian/math-trainer/usr/share/doc/math-trainer
cp -a LICENSE debian/math-trainer/usr/share/doc/math-trainer/
Binary file added math_trainer/locales/ui_de.qm
Binary file not shown.
Binary file added math_trainer/locales/ui_fr.qm
Binary file not shown.
1 change: 1 addition & 0 deletions math_trainer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def play_sound(self, sound):

def main():
app = QApplication([])
app.setStyle("Fusion")

# Translate app
locale = QLocale.system().name()
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"

[project]
name = "math-trainer"
version = "1.0.3.post1"
version = "1.1.0"
dependencies = [
"PyQt6>=6.4.2",
]
requires-python = ">= 3.8"
authors = [
{name = "limafresh"},
{name = "limafresh", email = "[email protected]"},
]
description = "A math trainer for kids written in Python and PyQt 6."
readme = {file = "README.md", content-type = "text/markdown"}
Expand Down
67 changes: 67 additions & 0 deletions translations/ui_de.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>StackedWidget</name>
<message>
<location filename="ui.ui" line="14"/>
<source>Math trainer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="ui.ui" line="61"/>
<source>Addition within 100</source>
<translation type="unfinished">Addition innerhalb von 100</translation>
</message>
<message>
<location filename="ui.ui" line="66"/>
<source>Multiplication within 10</source>
<translation type="unfinished">Multiplikation innerhalb von 10</translation>
</message>
<message>
<location filename="ui.ui" line="83"/>
<source>5+5=</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="ui.ui" line="107"/>
<source>Enter the answer...</source>
<translation type="unfinished">Geben Sie hier ein, wie viel...</translation>
</message>
<message>
<location filename="ui.ui" line="133"/>
<source>CHECK</source>
<translation type="unfinished">ÜBERPRÜFEN</translation>
</message>
<message>
<location filename="ui.ui" line="162"/>
<source>Skip this example</source>
<translation type="unfinished">Überspringen Sie dieses Beispiel</translation>
</message>
<message>
<location filename="ui.ui" line="194"/>
<source>Skipped examples:</source>
<translation type="unfinished">Übersprungene Beispiele:</translation>
</message>
<message>
<location filename="ui.ui" line="210"/>
<source>Solved examples:</source>
<translation type="unfinished">Gelöste Beispiele:</translation>
</message>
<message>
<location filename="ui.ui" line="226"/>
<source>Mistakes:</source>
<translation type="unfinished">Fehler:</translation>
</message>
<message>
<location filename="ui.ui" line="257"/>
<source>Correctly</source>
<translation type="unfinished">Korrekt</translation>
</message>
<message>
<location filename="ui.ui" line="284"/>
<source>Wrongly</source>
<translation type="unfinished">Falsch</translation>
</message>
</context>
</TS>
67 changes: 67 additions & 0 deletions translations/ui_fr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr_FR">
<context>
<name>StackedWidget</name>
<message>
<location filename="ui.ui" line="14"/>
<source>Math trainer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="ui.ui" line="61"/>
<source>Addition within 100</source>
<translation type="unfinished">Addition dans les 100</translation>
</message>
<message>
<location filename="ui.ui" line="66"/>
<source>Multiplication within 10</source>
<translation type="unfinished">Multiplication dans les 10</translation>
</message>
<message>
<location filename="ui.ui" line="83"/>
<source>5+5=</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="ui.ui" line="107"/>
<source>Enter the answer...</source>
<translation type="unfinished">Entrez la réponse...</translation>
</message>
<message>
<location filename="ui.ui" line="133"/>
<source>CHECK</source>
<translation type="unfinished">CHÈQUE</translation>
</message>
<message>
<location filename="ui.ui" line="162"/>
<source>Skip this example</source>
<translation type="unfinished">Passer cet exemple</translation>
</message>
<message>
<location filename="ui.ui" line="194"/>
<source>Skipped examples:</source>
<translation type="unfinished">Exemples sautés:</translation>
</message>
<message>
<location filename="ui.ui" line="210"/>
<source>Solved examples:</source>
<translation type="unfinished">Exemples résolus:</translation>
</message>
<message>
<location filename="ui.ui" line="226"/>
<source>Mistakes:</source>
<translation type="unfinished">Erreurs:</translation>
</message>
<message>
<location filename="ui.ui" line="257"/>
<source>Correctly</source>
<translation type="unfinished">Correctement</translation>
</message>
<message>
<location filename="ui.ui" line="284"/>
<source>Wrongly</source>
<translation type="unfinished">À tort</translation>
</message>
</context>
</TS>
File renamed without changes.
File renamed without changes.

0 comments on commit fb83d7c

Please sign in to comment.