mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:49:00 +08:00
Remove redundant code for merging po files
CURA-9814
This commit is contained in:
parent
18bfcd60ba
commit
5186b234dc
@ -326,18 +326,10 @@ class CuraConan(ConanFile):
|
||||
# Update the po files
|
||||
if self.settings.os != "Windows" or self.conf.get("tools.microsoft.bash:path", check_type = str):
|
||||
# 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
|
||||
|
||||
# Extract all the new strings and update the existing po files
|
||||
extractTool = self.python_requires["translationextractor"].module.ExtractTranslations(self)
|
||||
extractTool.extract(self.source_path, self.source_path.joinpath("resources", "i18n"), "cura.pot")
|
||||
|
||||
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 -width=140 -o {po_file} {po_file} {pot_file}",
|
||||
env = "conanbuild", ignore_errors = True)
|
||||
|
||||
def imports(self):
|
||||
self.copy("CuraEngine.exe", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)
|
||||
self.copy("CuraEngine", root_package = "curaengine", src = "@bindirs", dst = "", keep_path = False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user