Skip to content

Commit df4420d

Browse files
committed
improve
1 parent a1ac770 commit df4420d

File tree

6 files changed

+138
-86
lines changed

6 files changed

+138
-86
lines changed

.github/workflows/translate.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ jobs:
1818
ref: ${{ github.head_ref }}
1919
repository: ${{ github.event.pull_request.head.repo.full_name }}
2020

21+
- name: Prepare po4a configuration
22+
run: _translations/prepare-config.sh
23+
2124
- name: Use po4a
2225
uses: addnab/docker-run-action@v3
2326
with:
2427
image: arduanovdanil/po4a-fork:v0.73
25-
options: -v ${{ github.workspace }}:/src
26-
run: |
27-
cd _translations
28-
po4a po4a.cfg
28+
options: -v ${{ github.workspace }}:/src -w /src/_translations
29+
run: po4a.conf
30+
2931
- name: Commit changed files
3032
uses: stefanzweifel/git-auto-commit-action@v5
3133
with:

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ init:
33

44
up:
55
npm run dev
6+
7+
po4a:
8+
./_translations/prepare-config.sh && \
9+
docker run --rm \
10+
--user $(shell id -u):$(shell id -g) \
11+
-v $(PWD):/src \
12+
-w /src/_translations \
13+
arduanovdanil/po4a-fork:v0.73 \
14+
po4a.conf

_translations/po4a-base.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[po4a_langs] ru id es
2+
3+
[po4a_paths] pot/$master.pot $lang:po/$lang/$master.po
4+
[options] opt:"--verbose" opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--master-language=en_US" opt:"--porefs=file" opt:"--msgmerge-opt='--no-wrap'" opt:"--wrap-po=newlines"
5+
[po4a_alias:markdown] text opt:"--option markdown" opt:"--option keyvalue" opt:"--option yfm_keys=title,description,menu_title" opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--keep=0"

_translations/po4a.cfg

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)