File tree 5 files changed +34
-17
lines changed
5 files changed +34
-17
lines changed Original file line number Diff line number Diff line change 9
9
workflow_dispatch :
10
10
workflow_call :
11
11
12
- name : Update Translation
12
+ name : Update Translations
13
13
14
14
concurrency :
15
15
group : ${{ github.workflow }}-${{ github.ref }}
35
35
git config --local user.email "github-actions[bot]@users.noreply.github.com"
36
36
git config --local user.name "github-actions[bot]"
37
37
38
- - name : Generate zh_Hant from zh_Hans
38
+ - name : Update translations
39
39
run : |
40
- cat ./crates/rnote-ui/po/LINGUAS \
41
- | sed -e 's|zh_Hans|zh_Hans\nzh_CN\nzh_SG|' \
42
- -e 's|zh_Hant|zh_Hant\nzh_HK\nzh_TW|' \
43
- | sort -uo ./crates/rnote-ui/po/LINGUAS
44
-
45
- cat ./crates/rnote-ui/po/zh_Hans.po \
46
- | sed -e 's|Language: zh_Hans|Language: zh_Hant|' \
47
- -e 's|Last-Translator:|Last-Translator: openCC converted|' \
48
- | opencc -c /usr/share/opencc/s2twp.json \
49
- -o ./crates/rnote-ui/po/zh_Hant.po
40
+ bash ./build-aux/update-translations.sh
50
41
51
42
- name : Commit changes
52
43
id : commit-changes
Original file line number Diff line number Diff line change @@ -96,10 +96,12 @@ unlock the weblate repo to resynchronize with upstream.
96
96
97
97
## Update the "Chinese Traditional" Translation (zh_Hant.po) Manually
98
98
99
+ The package providing the ` opencc ` tool (` opencc-tools ` on Fedora) needs to be installed to regenerate the translation.
100
+
99
101
To autogenerate chinese traditional translation (` zh_Hant ` ) from chinese simplified (` zh_Hans ` ), use opencc:
100
102
101
103
``` bash
102
- opencc -i crates/rnote-ui/po/zh_Hans.po -o crates/rnote-ui/po/zh_Hant.po -c /usr/share/opencc/s2twp.json
104
+ ./build-aux/update-translations.sh
103
105
```
104
106
105
107
discussed in [ issue 220] ( https://github.com/flxzt/rnote/issues/220 )
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ script_dir=$( dirname " $0 " )
4
+
5
+ if ! command -v opencc & > /dev/null
6
+ then
7
+ echo " The 'opencc' tool needs to be installed and present in PATH"
8
+ exit 1
9
+ fi
10
+
11
+
12
+ # Regenerate 'zh_Hant' translation from 'zh_Hans'
13
+ sed \
14
+ -e ' s|zh_Hans|zh_Hans\nzh_CN\nzh_SG|' \
15
+ -e ' s|zh_Hant|zh_Hant\nzh_HK\nzh_TW|' \
16
+ " ${script_dir} /../crates/rnote-ui/po/LINGUAS" \
17
+ | sort -uo " ${script_dir} /../crates/rnote-ui/po/LINGUAS"
18
+
19
+ sed \
20
+ -e ' s|Language: zh_Hans|Language: zh_Hant|' \
21
+ -e ' s|Last-Translator:|Last-Translator: openCC converted|' \
22
+ " ${script_dir} /../crates/rnote-ui/po/zh_Hans.po" \
23
+ | opencc -c /usr/share/opencc/s2twp.json \
24
+ -o " ${script_dir} /../crates/rnote-ui/po/zh_Hant.po"
Original file line number Diff line number Diff line change 30
30
uk
31
31
vi
32
32
zh_CN
33
- zh_HK
34
33
zh_Hans
35
34
zh_Hant
35
+ zh_HK
36
36
zh_SG
37
37
zh_TW
Original file line number Diff line number Diff line change @@ -842,7 +842,7 @@ msgid ""
842
842
"when this switch is off/on"
843
843
msgstr ""
844
844
"按住Ctrl鍵可暫時\n"
845
- "啟用/禁用約束條件 \n"
845
+ "啟用/停用約束條件 \n"
846
846
"當此開關被關閉/開啟時"
847
847
848
848
#: crates/rnote-ui/data/ui/penssidebar/shaperpage.ui:327
@@ -1088,7 +1088,7 @@ msgstr "使用觸控繪製 [_T]"
1088
1088
1089
1089
#: crates/rnote-ui/data/ui/canvasmenu.ui:59
1090
1090
msgid "Block Pinch to _Zoom"
1091
- msgstr "禁用雙指縮放 [_Z]"
1091
+ msgstr "停用雙指縮放 [_Z]"
1092
1092
1093
1093
#: crates/rnote-ui/data/ui/canvasmenu.ui:90
1094
1094
#: crates/rnote-ui/data/ui/shortcuts.ui:132
@@ -1254,7 +1254,7 @@ msgid ""
1254
1254
"gets disabled."
1255
1255
msgstr ""
1256
1256
"設定畫布上的觸控滾動是否為慣性滾動。\n"
1257
- "當這個選項被禁用時 ,\n"
1257
+ "當這個選項被停用時 ,\n"
1258
1258
"應用程式需要重新啟動。"
1259
1259
1260
1260
#: crates/rnote-ui/data/ui/settingspanel.ui:72
You can’t perform that action at this time.
0 commit comments