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
|
@ -63,6 +63,27 @@ CTriggerActionsDlg::CTriggerActionsDlg(CWnd* pParent /*=NULL*/)
|
|||
}
|
||||
|
||||
|
||||
BOOL CTriggerActionsDlg::OnInitDialog()
|
||||
{
|
||||
auto const ret = CDialog::OnInitDialog();
|
||||
|
||||
TranslateUI();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CTriggerActionsDlg::TranslateUI()
|
||||
{
|
||||
TranslateDlgItem(*this, IDC_ACTION_CUR_TXT, "TriggerActionCurrent");
|
||||
TranslateDlgItem(*this, IDC_NEWACTION, "TriggerActionNew");
|
||||
TranslateDlgItem(*this, IDC_DELETEACTION, "TriggerActionDelete");
|
||||
TranslateDlgItem(*this, IDC_ACTION_OPT_TXT, "TriggerActionOptions");
|
||||
TranslateDlgItem(*this, IDC_ACTION_TYPE_TXT, "TriggerActionType");
|
||||
TranslateDlgItem(*this, IDC_ACTION_PARAM_TXT, "TriggerActionParams");
|
||||
TranslateDlgItem(*this, IDC_ACTION_VAL_TXT, "TriggerActionValue");
|
||||
TranslateDlgItem(*this, IDC_ACTION_DESC, "TriggerActionDesc");
|
||||
}
|
||||
|
||||
void CTriggerActionsDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
|
@ -243,10 +264,11 @@ void CTriggerActionsDlg::OnEditchangeActiontype()
|
|||
|
||||
|
||||
if (atoi(GetParam(eventdata, 7)) == 1) {
|
||||
if (bNoWP)
|
||||
if (bNoWP) {
|
||||
m_Parameter.SetItemData(m_Parameter.AddString(TranslateStringACP("Number")), -1);
|
||||
else
|
||||
} else {
|
||||
m_Parameter.SetItemData(m_Parameter.AddString(TranslateStringACP("Waypoint")), -1);
|
||||
}
|
||||
}
|
||||
|
||||
m_ParamValue.SetWindowText("");
|
||||
|
@ -360,9 +382,13 @@ void CTriggerActionsDlg::OnEditchangeParamvalue()
|
|||
{
|
||||
CIniFile& ini = Map->GetIniFile();
|
||||
|
||||
if (m_currentTrigger.GetLength() == 0) return;
|
||||
if (m_currentTrigger.GetLength() == 0) {
|
||||
return;
|
||||
}
|
||||
int selev = m_Action.GetCurSel();
|
||||
if (selev < 0) return;
|
||||
if (selev < 0) {
|
||||
return;
|
||||
}
|
||||
int curev = m_Action.GetItemData(selev);
|
||||
|
||||
int curselparam = m_Parameter.GetCurSel();
|
||||
|
@ -437,14 +463,24 @@ void CTriggerActionsDlg::OnNewaction()
|
|||
void CTriggerActionsDlg::OnDeleteaction()
|
||||
{
|
||||
CIniFile& ini = Map->GetIniFile();
|
||||
if (m_currentTrigger.GetLength() == 0) return;
|
||||
if (m_currentTrigger.GetLength() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int sel2 = m_Action.GetCurSel();
|
||||
if (sel2 < 0) return;
|
||||
int curev = m_Action.GetItemData(sel2);
|
||||
if (MessageBox("Do you really want to delete this action?", "Delete action", MB_YESNO) == IDNO) return;
|
||||
if (sel2 < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int curev = m_Action.GetItemData(sel2);
|
||||
auto const title = TranslateStringACP("Delete action");
|
||||
auto const content = TranslateStringACP("Do you really want to delete this action?");
|
||||
|
||||
if (MessageBox(content, title, MB_YESNO) == IDNO) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto sec = ini.TryGetSection("Actions");
|
||||
ASSERT(sec != nullptr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue