Test sample for context-sensitive translations

This commit is contained in:
RickS
2016-09-20 20:03:50 +02:00
committed by Vadim Zeitlin
parent 9c6befef3a
commit 205841d6c4
3 changed files with 59 additions and 6 deletions

Binary file not shown.

View File

@@ -2,17 +2,47 @@
# Copyright (C) 1999 wxWindows development team # Copyright (C) 1999 wxWindows development team
# Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> # Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
# #
#: internat.cpp:146
#, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: wxWindows 2.0 i18n sample\n" "Project-Id-Version: wxWindows 2.0 i18n sample\n"
"POT-Creation-Date: 1999-01-13 18:19+0100\n" "POT-Creation-Date: 1999-01-13 18:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2016-09-20 19:38+0200\n"
"Last-Translator: Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>\n" "Last-Translator: Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language-Team: \n"
"Language: fr\n"
"X-Generator: Poedit 1.8.7\n"
msgid "item"
msgstr "item0"
msgctxt "cont1"
msgid "item"
msgstr "item1"
msgctxt "cont2"
msgid "item"
msgstr "item2"
msgid "sing"
msgid_plural "plur"
msgstr[0] "sing0"
msgstr[1] "plur0"
msgctxt "cont1"
msgid "sing"
msgid_plural "plur"
msgstr[0] "sing1"
msgstr[1] "plur1"
msgctxt "cont2"
msgid "sing"
msgid_plural "plur"
msgstr[0] "sing2"
msgstr[1] "plur2"
#: internat.cpp:98 #: internat.cpp:98
msgid "International wxWindows App" msgid "International wxWindows App"
@@ -43,9 +73,11 @@ msgid "&Test"
msgstr "&Test" msgstr "&Test"
#: internat.cpp:138 #: internat.cpp:138
msgid "I18n sample\n" msgid ""
"I18n sample\n"
"© 1998, 1999 Vadim Zeitlin and Julian Smart" "© 1998, 1999 Vadim Zeitlin and Julian Smart"
msgstr "Exemple d'i18n\n" msgstr ""
"Exemple d'i18n\n"
"© 1998, 1999 Vadim Zeitlin et Julian Smart" "© 1998, 1999 Vadim Zeitlin et Julian Smart"
#: internat.cpp:139 #: internat.cpp:139

View File

@@ -94,7 +94,16 @@ enum
INTERNAT_TEST_1, INTERNAT_TEST_1,
INTERNAT_TEST_2, INTERNAT_TEST_2,
INTERNAT_TEST_3, INTERNAT_TEST_3,
INTERNAT_TEST_MSGBOX INTERNAT_TEST_MSGBOX,
INTERNAT_MACRO_1,
INTERNAT_MACRO_2,
INTERNAT_MACRO_3,
INTERNAT_MACRO_4,
INTERNAT_MACRO_5,
INTERNAT_MACRO_6,
INTERNAT_MACRO_7,
INTERNAT_MACRO_8,
INTERNAT_MACRO_9
}; };
// language data // language data
@@ -308,9 +317,21 @@ MyFrame::MyFrame(wxLocale& locale)
test_menu->Append(INTERNAT_TEST_MSGBOX, _("&Message box test"), test_menu->Append(INTERNAT_TEST_MSGBOX, _("&Message box test"),
_("Tests message box buttons labels translation")); _("Tests message box buttons labels translation"));
wxMenu *macro_menu = new wxMenu;
macro_menu->Append(INTERNAT_MACRO_1, _("item"));
macro_menu->Append(INTERNAT_MACRO_2, wxCONTEXT("cont1", "item"));
macro_menu->Append(INTERNAT_MACRO_3, wxCONTEXT("cont2", "item"));
macro_menu->Append(INTERNAT_MACRO_4, wxPLURAL("sing", "plur", 1));
macro_menu->Append(INTERNAT_MACRO_5, wxPLURAL("sing", "plur", 2));
macro_menu->Append(INTERNAT_MACRO_6, wxCONTEXTPLURAL("cont1", "sing", "plur", 1));
macro_menu->Append(INTERNAT_MACRO_7, wxCONTEXTPLURAL("cont1", "sing", "plur", 2));
macro_menu->Append(INTERNAT_MACRO_8, wxCONTEXTPLURAL("cont2", "sing", "plur", 1));
macro_menu->Append(INTERNAT_MACRO_9, wxCONTEXTPLURAL("cont2", "sing", "plur", 2));
wxMenuBar *menu_bar = new wxMenuBar; wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, _("&File")); menu_bar->Append(file_menu, _("&File"));
menu_bar->Append(test_menu, _("&Test")); menu_bar->Append(test_menu, _("&Test"));
menu_bar->Append(macro_menu, _("&Macro"));
SetMenuBar(menu_bar); SetMenuBar(menu_bar);
// this demonstrates RTL support in wxStatusBar: // this demonstrates RTL support in wxStatusBar: