mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Only update po on Windows
This commit is contained in:
parent
53eda4f1cc
commit
04f5aa04b8
1 changed files with 11 additions and 10 deletions
21
conanfile.py
21
conanfile.py
|
@ -328,17 +328,18 @@ class CuraConan(ConanFile):
|
||||||
entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
|
entitlements_file = entitlements_file if self.settings.os == "Macos" else "None")
|
||||||
|
|
||||||
# Update the po files
|
# Update the po files
|
||||||
vb = VirtualBuildEnv(self)
|
if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type=str):
|
||||||
vb.generate()
|
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
|
# 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
|
cpp_info = self.dependencies["gettext"].cpp_info
|
||||||
for po_file in self.source_path.joinpath("resources", "i18n").glob("**/*.po"):
|
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)
|
pot_file = self.source_path.joinpath("resources", "i18n", po_file.with_suffix('.pot').name)
|
||||||
mkdir(self, str(unix_path(self, pot_file.parent)))
|
mkdir(self, str(unix_path(self, pot_file.parent)))
|
||||||
self.run(
|
self.run(
|
||||||
f"{cpp_info.bindirs[0]}/msgmerge --no-wrap --no-fuzzy-matching -width=140 -o {po_file} {po_file} {pot_file}",
|
f"{cpp_info.bindirs[0]}/msgmerge --no-wrap --no-fuzzy-matching -width=140 -o {po_file} {po_file} {pot_file}",
|
||||||
env="conanbuild", ignore_errors=True)
|
env="conanbuild", ignore_errors=True)
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
if self.options.devtools:
|
if self.options.devtools:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue