From 32a03dedaaef64fffdb562a14e6f4299260a68d9 Mon Sep 17 00:00:00 2001 From: Ryan Holmes Date: Sun, 2 Aug 2020 18:52:55 -0400 Subject: [PATCH] I18n - Fixes for translations during build (#2251) --- .appveyor.yml | 4 ++++ .travis.yml | 5 +++-- scripts/{package-osx.sh => osx-package.sh} | 0 scripts/{setup-osx.sh => osx-setup.sh} | 0 scripts/osx-translations.sh | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) rename scripts/{package-osx.sh => osx-package.sh} (100%) rename scripts/{setup-osx.sh => osx-setup.sh} (100%) create mode 100644 scripts/osx-translations.sh diff --git a/.appveyor.yml b/.appveyor.yml index 929aa6429..7b7612211 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,6 +27,9 @@ install: # done from inside the powershell script as it would require to restart # the parent CMD process). - cmd: "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - cmd: "appveyor DownloadFile https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.20.2-v1.16/gettext0.20.2-iconv1.16-shared-64.zip" + - cmd: "7z x gettext0.20.2-iconv1.16-shared-64.zip -ogettext" + - cmd: "SET PATH=gettext;%PATH%" - cmd: "python --version" - cmd: "python -c \"import struct; print(struct.calcsize('P') * 8)\"" @@ -53,6 +56,7 @@ before_build: build_script: - ps: echo("Build pyfa:") + - ps: Get-ChildItem locale/*.po -Recurse -File| Foreach {msgen $_.fullname -o $_.fullname} # Build language files - cmd: "python scripts/compile_lang.py" # Dump language progress diff --git a/.travis.yml b/.travis.yml index c113c90c6..0ee640b87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,13 +10,14 @@ matrix: osx_image: xcode11.3 language: generic before_install: - - bash scripts/setup-osx.sh + - bash scripts/osx-translations.sh + - bash scripts/osx-setup.sh install: - python3 scripts/compile_lang.py - python3 scripts/dump_crowdin_progress.py - python3 db_update.py - export PYFA_VERSION="$(python3 scripts/dump_version.py)" - - bash scripts/package-osx.sh + - bash scripts/osx-package.sh before_deploy: - export RELEASE_PKG_FILE=$(ls *.deb) - echo "deploying $RELEASE_PKG_FILE to GitHub releases" diff --git a/scripts/package-osx.sh b/scripts/osx-package.sh similarity index 100% rename from scripts/package-osx.sh rename to scripts/osx-package.sh diff --git a/scripts/setup-osx.sh b/scripts/osx-setup.sh similarity index 100% rename from scripts/setup-osx.sh rename to scripts/osx-setup.sh diff --git a/scripts/osx-translations.sh b/scripts/osx-translations.sh new file mode 100644 index 000000000..e6d16130a --- /dev/null +++ b/scripts/osx-translations.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +brew link --force gettext +find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \; \ No newline at end of file