diff options
| author | oy <Tom_Adams@web.de> | 2010-08-09 00:35:37 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-08-09 00:35:37 +0200 |
| commit | d471663913390c5243ab946ecd6ee8849af484e1 (patch) | |
| tree | 5d80fbbea05c041870ce5e5207fe1d9c393d9f77 | |
| parent | 866f76727b985a1999d059c61049f3bbeaf35557 (diff) | |
| download | zcatch-d471663913390c5243ab946ecd6ee8849af484e1.tar.gz zcatch-d471663913390c5243ab946ecd6ee8849af484e1.zip | |
added localisation fixes by fujnky
| -rw-r--r-- | src/game/client/components/menus_browser.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/components/menus_demo.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/components/menus_settings.cpp | 7 | ||||
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 10 |
4 files changed, 14 insertions, 7 deletions
diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 7d9c9d7e..c1ad18f2 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -63,6 +63,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View) {-1, -1, " ", 1, 10.0f, 0, {0}, {0}}, {COL_PING, IServerBrowser::SORT_PING, "Ping", 1, 40.0f, FIXED, {0}, {0}}, }; + // This is just for scripts/update_localization.py to work correctly (all other strings are already Localize()'d somewhere else). Don't remove! + // Localize("Type"); int NumCols = sizeof(s_aCols)/sizeof(CColumn); diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index f8cf8e4f..231cd83a 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -490,7 +490,7 @@ void CMenus::RenderDemoList(CUIRect MainView) { const char *pError = Client()->DemoPlayer_Play(m_lDemos[s_SelectedItem].m_aFilename); if(pError) - PopupMessage(Localize("Error"), Localize(pError), Localize("Ok")); + PopupMessage(Localize("Error"), str_comp(pError, "error loading demo") ? pError : Localize("error loading demo"), Localize("Ok")); } } } diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index ace86266..364d0b82 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -288,7 +288,6 @@ typedef struct static CKeyInfo gs_aKeys[] = { - // we need to do localize so the scripts can pickup the string { "Move left", "+left", 0}, // Localize - these strings are localized within CLocConstString { "Move right", "+right", 0 }, { "Jump", "+jump", 0 }, @@ -312,6 +311,12 @@ static CKeyInfo gs_aKeys[] = { "Screenshot", "screenshot", 0 }, { "Scoreboard", "+scoreboard", 0 }, }; +/* This is for scripts/update_localization.py to work, don't remove! + Localize("Move left");Localize("Move right");Localize("Jump");Localize("Fire");Localize("Hook");Localize("Hammer"); + Localize("Pistol");Localize("Shotgun");Localize("Grenade");Localize("Rifle");Localize("Next weapon");Localize("Prev. weapon"); + Localize("Vote yes");Localize("Vote no");Localize("Chat");Localize("Team chat");Localize("Show chat");Localize("Emoticon"); + Localize("Console");Localize("Remote console");Localize("Screenshot");Localize("Scoreboard"); +*/ const int g_KeyCount = sizeof(gs_aKeys) / sizeof(CKeyInfo); diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index c75ff238..3b1a01e0 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -626,7 +626,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // animation button TB_Top.VSplitLeft(40.0f, &Button, &TB_Top); static int s_AnimateButton = 0; - if(DoButton_Editor(&s_AnimateButton, Localize("Anim"), m_Animate, &Button, 0, ("[ctrl+m] Toggle animation")) || + if(DoButton_Editor(&s_AnimateButton, Localize("Anim"), m_Animate, &Button, 0, Localize("[ctrl+m] Toggle animation")) || (Input()->KeyDown('m') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))) { m_AnimateStart = time_get(); @@ -1718,12 +1718,12 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) { LayersBox.HSplitTop(12.0f, &Slot, &LayersBox); Slot.VSplitLeft(12, &VisibleToggle, &Slot); - if(DoButton_Ex(&m_Map.m_lGroups[g]->m_Visible, m_Map.m_lGroups[g]->m_Visible?"V":"H", 0, &VisibleToggle, 0, "Toggle group visibility", CUI::CORNER_L)) + if(DoButton_Ex(&m_Map.m_lGroups[g]->m_Visible, m_Map.m_lGroups[g]->m_Visible?"V":"H", 0, &VisibleToggle, 0, Localize("Toggle group visibility"), CUI::CORNER_L)) m_Map.m_lGroups[g]->m_Visible = !m_Map.m_lGroups[g]->m_Visible; str_format(aBuf, sizeof(aBuf),"#%d %s", g, m_Map.m_lGroups[g]->m_pName); if(int Result = DoButton_Ex(&m_Map.m_lGroups[g], aBuf, g==m_SelectedGroup, &Slot, - BUTTON_CONTEXT, "Select group. Right click for properties.", CUI::CORNER_R)) + BUTTON_CONTEXT, Localize("Select group. Right click for properties."), CUI::CORNER_R)) { m_SelectedGroup = g; m_SelectedLayer = 0; @@ -2705,7 +2705,7 @@ int CEditor::PopupMenuFile(CEditor *pEditor, CUIRect View) if(pEditor->m_aFileName[0]) CallbackSaveMap(pEditor->m_aFileName, pEditor); else - pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, Localize("Save Map"), Localize("Save"), "maps/", "", CallbackSaveMap, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, Localize("Save map"), Localize("Save"), "maps/", "", CallbackSaveMap, pEditor); return 1; } @@ -2713,7 +2713,7 @@ int CEditor::PopupMenuFile(CEditor *pEditor, CUIRect View) View.HSplitTop(12.0f, &Slot, &View); if(pEditor->DoButton_MenuItem(&s_SaveAsButton, Localize("Save As"), 0, &Slot, 0, Localize("Saves the current map under a new name"))) { - pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, Localize("Save Map"), Localize("Save"), "maps/", "", CallbackSaveMap, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, Localize("Save map"), Localize("Save"), "maps/", "", CallbackSaveMap, pEditor); return 1; } |