Skip to content

Commit

Permalink
Use compile-po2mo-action
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong committed Jan 21, 2022
1 parent b53ea94 commit 1cabd00
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,11 @@ jobs:
restore-keys: |
ccache-master-${{ runner.os }}-${{ matrix.compiler }}--
- uses: ammaraskar/gcc-problem-matcher@master
- name: compile translations (Linux)
if: runner.os == 'Linux'
run: make localization -j$((`nproc`+0))
- name: compile translations (macOS)
if: runner.os == 'macOS'
run: make localization -j$((`sysctl -n hw.logicalcpu`+0))
- name: Compile translations
uses: BrettDong/compile-po2mo-action@v1
with:
input-path: 'lang/po/<lang>.po'
output-path: 'lang/mo/<lang>/LC_MESSAGES/cataclysm-dda.mo'
- name: build
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/gha_compile_only.sh
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ jobs:
}
}
- name: Compile .mo files for localization
run: |
& "C:\msys64\mingw64\bin\mingw32-make" -C lang -j2
mkdir -p ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES -ErrorAction SilentlyContinue
msgfmt -f -o ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo ./data/mods/TEST_DATA/lang/po/ru.po
- name: Compile translations
uses: BrettDong/compile-po2mo-action@v1
with:
input-path: 'lang/po/<lang>.po'
output-path: 'lang/mo/<lang>/LC_MESSAGES/cataclysm-dda.mo'
- run: |
ms gfmt -f -o ./data/mods/TEST_DATA/lang/mo/ru/LC_MESSAGES/TEST_DATA.mo ./data/mods/TEST_DATA/lang/po/ru.po
- name: Enable GitHub Actions problem matchers
run: |
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,11 @@ jobs:
commit sha: ${{ github.sha }}
commit url: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
EOL
- name: Compile translations (windows)
if: runner.os == 'Windows'
shell: bash
run: |
lang/compile_mo.sh all
- name: Compile translations (UNIX)
if: runner.os != 'Windows'
run: make localization -j$((`nproc`+0))
- name: Compile translations
uses: BrettDong/compile-po2mo-action@v1
with:
input-path: 'lang/po/<lang>.po'
output-path: 'lang/mo/<lang>/LC_MESSAGES/cataclysm-dda.mo'
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none'
run: |
Expand Down

0 comments on commit 1cabd00

Please sign in to comment.