ENH: compile *.po files when building the package#7079
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7079 +/- ##
==========================================
- Coverage 50.00% 49.99% -0.01%
==========================================
Files 347 347
Lines 64057 64062 +5
==========================================
- Hits 32031 32028 -3
- Misses 32026 32034 +8
|
|
Apologies for the delayed response to the issue previously @hsogo You were right that I had missed the step of rebuilding the mo files in the devops script though and that has now been added in For the commit you add here, I don't actually use |
Because recent Standalone Installers for Windows didn't include compiled translation files (messages.mo), label strings in the applications are not translated. I guess that
buildWinDistributions.ps1is intended to compile *.po files when building the Standalone Installer, but it doesn't seem to work.In this pull request, I tried to compile *.po files when building the package. This is achieved by putting
pdm_build.pyin the root directory of the project. The content of this script is almost the same asbuilding/compile_po.py. The pdm backend automaticall run this script when building the package (i.e. runningpython -m build .).I also tried to add
custom-hook = "building/compile_po.py"to[build-system]ofpyproject.tomlto runbuilding/compile_po.pydirectly, but in this casebuilding/compile_po.pyis included in the built package even thoughexcludes = ["building/"]is in[build-system]ofpyproject.toml.