mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Use translationextractor 1.1.0
Contribute to CURA-10208
This commit is contained in:
parent
c3b6cf8862
commit
f2dd3154e4
1 changed files with 4 additions and 9 deletions
13
conanfile.py
13
conanfile.py
|
@ -27,7 +27,7 @@ class CuraConan(ConanFile):
|
|||
|
||||
# FIXME: Remove specific branch once merged to main
|
||||
# Extending the conanfile with the UMBaseConanfile https://github.com/Ultimaker/conan-ultimaker-index/tree/CURA-9177_Fix_CI_CD/recipes/umbase
|
||||
python_requires = "umbase/[>=0.1.7]@ultimaker/stable"
|
||||
python_requires = "umbase/[>=0.1.7]@ultimaker/stable", "translationextractor/[>=1.1.0]@ultimaker/stable"
|
||||
python_requires_extend = "umbase.UMBaseConanfile"
|
||||
|
||||
options = {
|
||||
|
@ -327,19 +327,14 @@ class CuraConan(ConanFile):
|
|||
icon_path = "'{}'".format(os.path.join(self.source_folder, "packaging", self.conan_data["pyinstaller"]["icon"][str(self.settings.os)])).replace("\\", "\\\\"),
|
||||
entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
|
||||
|
||||
# Update the po files
|
||||
# Update the po and pot files
|
||||
if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type=str):
|
||||
vb = VirtualBuildEnv(self)
|
||||
vb.generate()
|
||||
|
||||
# FIXME: once m4, autoconf, automake are Conan V2 ready use self.win_bash and add gettext as base tool_requirement
|
||||
cpp_info = self.dependencies["gettext"].cpp_info
|
||||
for po_file in self.source_path.joinpath("resources", "i18n").glob("**/*.po"):
|
||||
pot_file = self.source_path.joinpath("resources", "i18n", po_file.with_suffix('.pot').name)
|
||||
mkdir(self, str(unix_path(self, pot_file.parent)))
|
||||
self.run(
|
||||
f"{cpp_info.bindirs[0]}/msgmerge --no-wrap --no-fuzzy-matching --sort-by-file -o {po_file} {po_file} {pot_file}",
|
||||
env="conanbuild", ignore_errors=True)
|
||||
pot = self.python_requires["translationextractor"].module.ExtractTranslations(self, os.path.join(self.source_folder, "resources", "i18n"), "cura.pot")
|
||||
pot.generate()
|
||||
|
||||
def build(self):
|
||||
if self.options.devtools:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue