Skip to content

Commit 3bd750a

Browse files
authored
Merge pull request #1 from IB-Tool/eng_translation
Add German translation support for Data Wizard plugin
2 parents 6c577d6 + 9ac3c64 commit 3bd750a

181 files changed

Lines changed: 3242 additions & 56 deletions

File tree

Some content is hidden

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

.claude/commands/write-tests.md

Lines changed: 164 additions & 0 deletions

.coveragerc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# .coveragerc
2+
[run]
3+
source =
4+
data_wizard
5+
scripts
6+
omit =
7+
*/test/*
8+
*/tests/*
9+
*/__pycache__/*
10+
*/build/*
11+
*/dist/*
12+
*/venv/*
13+
*/.venv/*
14+
*/resources.py
15+
*/ui_*.py

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,24 @@ jobs:
3737
echo "ERROR: coverage.xml not found after test run"
3838
exit 1
3939
fi
40-
# Fix absolute container paths → relative repo paths for Codecov
40+
# Fix absolute container paths → relative repo paths
4141
sed -i 's|/plugins/data_wizard/||g' coverage.xml
4242
echo "coverage.xml found and paths fixed"
4343
head -5 coverage.xml
4444
45-
- name: Upload coverage reports to Codecov
46-
uses: codecov/codecov-action@v5
45+
# No Codecov project exists for this repository (see
46+
# docs/test-strategy.md → Justified Exclusions and
47+
# docs/contributing.md → Coverage Reporting). Coverage is produced
48+
# locally and in the container but not uploaded to an external
49+
# service — the report is kept as a downloadable CI artifact instead.
50+
- name: Upload coverage report as CI artifact
51+
uses: actions/upload-artifact@v4
4752
with:
48-
token: ${{ secrets.CODECOV_TOKEN }}
49-
files: ./coverage.xml
50-
fail_ci_if_error: true
53+
name: coverage-report
54+
path: |
55+
coverage.xml
56+
htmlcov/
57+
retention-days: 30
5158

5259
- name: Fail job if tests failed
5360
if: steps.run_tests.outcome == 'failure'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ test/logs/
4040
test/*.gpkg
4141
.pytest_cache/
4242
.coverage
43+
coverage.xml
4344
htmlcov/
4445

4546
# === QGIS Plugin generierte Dateien ===

Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ WORKDIR /plugins/data_wizard
3636
# 7. Test-spezifische Python-Abhängigkeiten installieren
3737
RUN if [ -f requirements-test.txt ]; then pip3 install --break-system-packages -r requirements-test.txt; fi
3838

39+
# 7b. Übersetzungen kompilieren (i18n/*.ts -> *.qm) als Fallback für Aufrufe
40+
# ohne Volume-Mount (z.B. "docker run -it ... /bin/bash"). Wirkungslos
41+
# für den eigentlichen Testlauf in ci.yml: dessen
42+
# "-v $(pwd):/plugins/data_wizard" überschreibt den kompletten
43+
# /plugins/data_wizard-Baum aus dem Image mit dem (ungebauten) Host-
44+
# Checkout, bevor CMD läuft - deshalb kompiliert CMD unten zusätzlich
45+
# und maßgeblich bei jedem Containerstart neu. lrelease kommt mit
46+
# qttools5-dev-tools, das im Basis-Image bereits installiert ist.
47+
RUN for ts in i18n/*.ts; do lrelease "$ts"; done
48+
3949
# 8. QGIS Processing Provider explizit initialisieren
4050
RUN python3 -c "\
4151
import sys; \
@@ -51,5 +61,10 @@ Processing.initialize(); \
5161
print('Processing erfolgreich initialisiert'); \
5262
app.exitQgis()"
5363

54-
# 9. Finale Test-Ausführung
55-
CMD ["python3", "-m", "pytest", "test/", "-v", "--tb=short", "--cov", "--cov-report=xml", "--cov-report=html"]
64+
# 9. Finale Test-Ausführung. Übersetzungen werden hier (erneut) kompiliert,
65+
# weil ci.yml den Container mit "-v $(pwd):/plugins/data_wizard" startet -
66+
# das ersetzt den kompletten Verzeichnisinhalt aus dem Image durch den
67+
# Host-Checkout (der .qm bewusst nicht enthält, siehe .gitignore) BEVOR
68+
# dieser CMD läuft. Ohne diesen Schritt hier würde test_translations.py
69+
# trotz Schritt 7b im Build immer fehlschlagen.
70+
CMD ["sh", "-c", "for ts in i18n/*.ts; do lrelease \"$ts\"; done && python3 -m pytest test/ -v --tb=short --cov --cov-report=xml --cov-report=html"]

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
#Add iso code for any locales you want to support here (space separated)
2727
# default is no locales
2828
# LOCALES = af
29-
LOCALES =
29+
# NOTE: scripts/compile-strings.sh and update-strings.sh build the path as
30+
# i18n/$(LOCALE).ts, so this must be the .ts file's basename, not just the
31+
# ISO code (the plugin's translator loads i18n/Data_Wizard_<locale>.qm).
32+
LOCALES = Data_Wizard_de
3033

3134
# If locales are enabled, set the name of the lrelease binary on your system. If
3235
# you have trouble compiling the translations, you may have to specify the full path to
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UTF-8
16.7 MB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["ETRS_1989_UTM_Zone_33N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
1.79 MB
Binary file not shown.

0 commit comments

Comments
 (0)