mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
L10n/chinese translation (#5)
* hotkey tips using \t . * simplified edit menu translation (ZH_CN) * refactored GetLanguageStringACP and implemented 'TranslateDlgItem' and 'TranslateWindowCaption' helper function . --------- Co-authored-by: shuiping233 <49360196+shuiping233@users.noreply.github.com>
This commit is contained in:
parent
1672fd8901
commit
f0d808a912
45 changed files with 1162 additions and 533 deletions
|
@ -437,7 +437,7 @@ const CString* getLanguageString(const CString& key)
|
|||
return language.GetSection("English-Strings").TryGetString(key);
|
||||
}
|
||||
|
||||
CString escapeString(const CString& input)
|
||||
CString EscapeString(const CString& input)
|
||||
{
|
||||
auto updated = input;
|
||||
if (updated.Find("\\n")) {
|
||||
|
@ -492,7 +492,7 @@ void TranslateDlgItem(CWnd& cwnd, int controlID, const CString& label)
|
|||
{
|
||||
auto const translated = getLanguageString(label);
|
||||
if (translated) {
|
||||
cwnd.SetDlgItemText(controlID, escapeString(*translated));
|
||||
cwnd.SetDlgItemText(controlID, EscapeString(*translated));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ void TranslateWindowCaption(CWnd& cwnd, const CString& label)
|
|||
{
|
||||
auto const translated = getLanguageString(label);
|
||||
if (translated) {
|
||||
cwnd.SetWindowText(escapeString(*translated));
|
||||
cwnd.SetWindowText(EscapeString(*translated));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue