Skip to content

Commit

Permalink
#161: Improve some Cantonese UI translations (#180)
Browse files Browse the repository at this point in the history
# Description

Got somebody to review some of the Canto translations and they suggested
changes. Also removed some simplified characters that somehow got into
the traditional Cantonese translation, and updated the README for
creating translation files.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Tested on macOS 14.3.1 with Qt 5.15.12.

# Checklist:

- [x] My code follows the style guidelines of this project (`black` for
Python
  code, `.clang-format` in the `src/jyut-dict` directory for C++)
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have translated my user-facing strings to all
currently-supported languages
- [x] I have made corresponding changes to the documentation
  • Loading branch information
aaronhktan authored Apr 17, 2024
1 parent 706f99e commit effee4f
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
Binary file modified src/jyut-dict/resources/translations/jyutdictionary-yue_Hans.qm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
<message>
<location filename="../../dialogs/downloadaudiodialog.cpp" line="+12"/>
<source>To use this option for text-to-speech, files must be downloaded. Would you like to download them now?</source>
<translation>你必须下载音频文件先可以拣呢个选项。你想唔想而家开始下载?</translation>
<translation>你一定要下载音频文件先可以拣呢个选项。你想唔想即刻下载?</translation>
</message>
<message>
<location line="+3"/>
Expand Down Expand Up @@ -955,7 +955,7 @@ Hang tight!</source>
<message>
<location line="+6"/>
<source>Start typing to search for words</source>
<translation>一开始打字就揾到嘢噶啦!</translation>
<translation>一打字就查到词典噶啦!</translation>
</message>
<message>
<location line="+11"/>
Expand Down
Binary file modified src/jyut-dict/resources/translations/jyutdictionary-yue_Hant.qm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
<message>
<location filename="../../dialogs/downloadaudiodialog.cpp" line="12"/>
<source>To use this option for text-to-speech, files must be downloaded. Would you like to download them now?</source>
<translation>你必須下載音訊檔案先可以揀呢個選項。你想唔想而家開始下載?</translation>
<translation>你一定要下載音訊檔案先可以揀呢個選項。你想唔想即刻下載?</translation>
</message>
<message>
<location filename="../../dialogs/downloadaudiodialog.cpp" line="15"/>
Expand Down Expand Up @@ -951,7 +951,7 @@ Hang tight!</source>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="92"/>
<source>Start typing to search for words</source>
<translation>一開始打字就搵到嘢㗎啦!</translation>
<translation>一打字就查到辭典㗎啦!</translation>
</message>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="103"/>
Expand All @@ -978,7 +978,7 @@ Hang tight!</source>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="125"/>
<source>Clicking the &quot;save&quot; button when viewing a word or phrase adds it to this list. Try adding a word that sounds cool!</source>
<translation>揿“儲存”掣嚟儲存词语。最好加個得意啲嘅!</translation>
<translation>揿“儲存”掣嚟儲存詞語。最好加個得意啲嘅!</translation>
</message>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="131"/>
Expand Down Expand Up @@ -1068,7 +1068,7 @@ Hang tight!</source>
<message>
<location filename="../../components/mainwindow/searchlineedit.cpp" line="139"/>
<source>Search</source>
<translation>查粤语辭典…</translation>
<translation>查粵語辭典…</translation>
</message>
</context>
<context>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
<message>
<location filename="../../dialogs/downloadaudiodialog.cpp" line="+12"/>
<source>To use this option for text-to-speech, files must be downloaded. Would you like to download them now?</source>
<translation>你必须下载音频文件先可以拣呢个选项。你想唔想而家开始下载?</translation>
<translation>你一定要下载音频文件先可以拣呢个选项。你想唔想即刻下载?</translation>
</message>
<message>
<location line="+3"/>
Expand Down Expand Up @@ -955,7 +955,7 @@ Hang tight!</source>
<message>
<location line="+6"/>
<source>Start typing to search for words</source>
<translation>一开始打字就揾到嘢噶啦!</translation>
<translation>一打字就查到词典噶啦!</translation>
</message>
<message>
<location line="+11"/>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
<message>
<location filename="../../dialogs/downloadaudiodialog.cpp" line="12"/>
<source>To use this option for text-to-speech, files must be downloaded. Would you like to download them now?</source>
<translation>你必須下載音訊檔案先可以揀呢個選項。你想唔想而家開始下載?</translation>
<translation>你一定要下載音訊檔案先可以揀呢個選項。你想唔想即刻下載?</translation>
</message>
<message>
<location filename="../../dialogs/downloadaudiodialog.cpp" line="15"/>
Expand Down Expand Up @@ -951,7 +951,7 @@ Hang tight!</source>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="92"/>
<source>Start typing to search for words</source>
<translation>一開始打字就搵到嘢㗎啦!</translation>
<translation>一打字就查到辭典㗎啦!</translation>
</message>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="103"/>
Expand All @@ -978,7 +978,7 @@ Hang tight!</source>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="125"/>
<source>Clicking the &quot;save&quot; button when viewing a word or phrase adds it to this list. Try adding a word that sounds cool!</source>
<translation>揿“儲存”掣嚟儲存词语。最好加個得意啲嘅!</translation>
<translation>揿“儲存”掣嚟儲存詞語。最好加個得意啲嘅!</translation>
</message>
<message>
<location filename="../../components/entrysearchresult/resultlistmodel.cpp" line="131"/>
Expand Down Expand Up @@ -1068,7 +1068,7 @@ Hang tight!</source>
<message>
<location filename="../../components/mainwindow/searchlineedit.cpp" line="139"/>
<source>Search</source>
<translation>查粤语辭典…</translation>
<translation>查粵語辭典…</translation>
</message>
</context>
<context>
Expand Down
2 changes: 2 additions & 0 deletions src/jyut-dict/resources/translations/readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## Notes on translations

- Before doing `lupdate`: Change yue_CN and yue_HK to zh_CN and zh_HK respectively, since lupdate does not recognize Cantonese and will not insert the new translations. The affected files are `yue_Hans.ts`, `yue_Hant.ts`, `zh_Hans_HK.ts`, and `zh_Hant_HK.ts`.
- To run `lupdate`: `lupdate ../../* -ts *.ts`
- After doing `lupdate`: lupdate will erase everything with MAC_APPLICATION_MENU and some other useful translations by marking them as "vanished". Do a find and replace ` type="vanished"` (with the space at the beginning) => empty to re-enable these translations.
- When pasting, remember to disable "Indent Using Spaces" in Sublime Text, since that will convert all tabs to spaces.
- To run `lrelease`: `lrelease *.ts`

- Useful resources:
- https://pontoon.mozilla.org/zh-TW/all-projects/all-resources/
Expand Down

0 comments on commit effee4f

Please sign in to comment.