From 655e093ccb1098e005c8b25ba9b75d10a6015275 Mon Sep 17 00:00:00 2001 From: guillaume Date: Thu, 11 Jun 2009 15:25:13 +0000 Subject: [PATCH] Plural patch, per Marek (after much much talk). git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7921 a7884b65-44f6-0310-8a51-81a127f17b15 --- i18n/da_DK/pgadmin3.po | 1 + i18n/de_CH/pgadmin3.po | 1 + i18n/de_DE/pgadmin3.po | 1 + i18n/el_GR/pgadmin3.po | 1 + i18n/es_ES/pgadmin3.po | 1 + i18n/fi_FI/pgadmin3.po | 1 + i18n/fr_FR/pgadmin3.po | 1 + i18n/hr_HR/pgadmin3.po | 2 + i18n/hu_HU/pgadmin3.po | 1 + i18n/it_IT/pgadmin3.po | 1 + i18n/ja_JP/pgadmin3.po | 1 + i18n/ko_KR/pgadmin3.po | 1 + i18n/lt_LT/pgadmin3.po | 2 + i18n/lv_LV/pgadmin3.po | 2 + i18n/nb_NO/pgadmin3.po | 1 + i18n/nl_NL/pgadmin3.po | 1 + i18n/pl_PL/pgadmin3.po | 2 + i18n/pt_BR/pgadmin3.po | 1 + i18n/pt_PT/pgadmin3.po | 1 + i18n/ro_RO/pgadmin3.po | 2 + i18n/ru_RU/pgadmin3.po | 2 + i18n/sk_SK/pgadmin3.po | 2 +- i18n/sl_SI/pgadmin3.po | 2 + i18n/sr_RS/pgadmin3.po | 2 + i18n/sv_SE/pgadmin3.po | 1 + i18n/tr_TR/pgadmin3.po | 1 + i18n/uk_UA/pgadmin3.po | 2 + i18n/vi_VN/pgadmin3.po | 1 + pgadmin/ctl/ctlSQLBox.cpp | 2 +- pgadmin/db/pgQueryThread.cpp | 8 ++-- pgadmin/frm/frmEditGrid.cpp | 22 +++++----- pgadmin/frm/frmExport.cpp | 5 ++- pgadmin/frm/frmQuery.cpp | 24 +++++++---- pgadmin/slony/slNode.cpp | 3 +- stringextract | 82 ++++++++++++++++++------------------ 35 files changed, 118 insertions(+), 66 deletions(-) diff --git a/i18n/da_DK/pgadmin3.po b/i18n/da_DK/pgadmin3.po index 2e64da15e..0e0a79cc8 100644 --- a/i18n/da_DK/pgadmin3.po +++ b/i18n/da_DK/pgadmin3.po @@ -13,6 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/de_CH/pgadmin3.po b/i18n/de_CH/pgadmin3.po index 36c0298a3..3277ccf40 100644 --- a/i18n/de_CH/pgadmin3.po +++ b/i18n/de_CH/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/de_DE/pgadmin3.po b/i18n/de_DE/pgadmin3.po index c91fac520..953afd085 100644 --- a/i18n/de_DE/pgadmin3.po +++ b/i18n/de_DE/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/el_GR/pgadmin3.po b/i18n/el_GR/pgadmin3.po index 0105d595f..1f643f92f 100644 --- a/i18n/el_GR/pgadmin3.po +++ b/i18n/el_GR/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/es_ES/pgadmin3.po b/i18n/es_ES/pgadmin3.po index 23343d9e2..e260fe0c7 100644 --- a/i18n/es_ES/pgadmin3.po +++ b/i18n/es_ES/pgadmin3.po @@ -15,6 +15,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Spanish\n" "X-Poedit-Basepath: /home/dags/desarrollo/pgadmin3/pgadmin3\n" diff --git a/i18n/fi_FI/pgadmin3.po b/i18n/fi_FI/pgadmin3.po index 46d7603a4..6fc933ca6 100644 --- a/i18n/fi_FI/pgadmin3.po +++ b/i18n/fi_FI/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Finnish\n" "X-Poedit-Country: FINLAND\n" "X-Poedit-Basepath: .\n" diff --git a/i18n/fr_FR/pgadmin3.po b/i18n/fr_FR/pgadmin3.po index 2f1a9d522..8ae94563d 100644 --- a/i18n/fr_FR/pgadmin3.po +++ b/i18n/fr_FR/pgadmin3.po @@ -18,6 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: KBabel 1.11.2\n" #: src/frm/frmQuery.cpp:1269 diff --git a/i18n/hr_HR/pgadmin3.po b/i18n/hr_HR/pgadmin3.po index 707a73d8f..0dadda658 100644 --- a/i18n/hr_HR/pgadmin3.po +++ b/i18n/hr_HR/pgadmin3.po @@ -12,6 +12,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/hu_HU/pgadmin3.po b/i18n/hu_HU/pgadmin3.po index 528d7c46d..9d832db8c 100644 --- a/i18n/hu_HU/pgadmin3.po +++ b/i18n/hu_HU/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/it_IT/pgadmin3.po b/i18n/it_IT/pgadmin3.po index f99e47585..81116d11e 100644 --- a/i18n/it_IT/pgadmin3.po +++ b/i18n/it_IT/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/ja_JP/pgadmin3.po b/i18n/ja_JP/pgadmin3.po index abca57bcb..1870c811d 100644 --- a/i18n/ja_JP/pgadmin3.po +++ b/i18n/ja_JP/pgadmin3.po @@ -9,6 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" "X-Poedit-Language: Japanese\n" "X-Poedit-Country: JAPAN\n" "X-Poedit-SourceCharset: utf-8\n" diff --git a/i18n/ko_KR/pgadmin3.po b/i18n/ko_KR/pgadmin3.po index c35f862d6..5ae107ac8 100644 --- a/i18n/ko_KR/pgadmin3.po +++ b/i18n/ko_KR/pgadmin3.po @@ -9,6 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" "X-Poedit-Language: Korean\n" "X-Poedit-Country: KOREA\n" "X-Poedit-SourceCharset: utf-8\n" diff --git a/i18n/lt_LT/pgadmin3.po b/i18n/lt_LT/pgadmin3.po index 8550fa6c1..9565a8541 100644 --- a/i18n/lt_LT/pgadmin3.po +++ b/i18n/lt_LT/pgadmin3.po @@ -14,6 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%" +"100<10 || n%100>=20) ? 1 : 2);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/lv_LV/pgadmin3.po b/i18n/lv_LV/pgadmin3.po index 486ac5a64..5d47ca47c 100644 --- a/i18n/lv_LV/pgadmin3.po +++ b/i18n/lv_LV/pgadmin3.po @@ -9,6 +9,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " +"2);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/nb_NO/pgadmin3.po b/i18n/nb_NO/pgadmin3.po index 86a953ac9..b867073a0 100644 --- a/i18n/nb_NO/pgadmin3.po +++ b/i18n/nb_NO/pgadmin3.po @@ -13,6 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/nl_NL/pgadmin3.po b/i18n/nl_NL/pgadmin3.po index 30641fdd6..65a1492a4 100644 --- a/i18n/nl_NL/pgadmin3.po +++ b/i18n/nl_NL/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Dutch\n" "X-Poedit-Country: NETHERLANDS\n" diff --git a/i18n/pl_PL/pgadmin3.po b/i18n/pl_PL/pgadmin3.po index 78c8c2b7a..9a31950ff 100644 --- a/i18n/pl_PL/pgadmin3.po +++ b/i18n/pl_PL/pgadmin3.po @@ -12,6 +12,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/pt_BR/pgadmin3.po b/i18n/pt_BR/pgadmin3.po index 26522ab67..a6b87e178 100644 --- a/i18n/pt_BR/pgadmin3.po +++ b/i18n/pt_BR/pgadmin3.po @@ -16,6 +16,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/pt_PT/pgadmin3.po b/i18n/pt_PT/pgadmin3.po index 821d59a16..9e422d153 100644 --- a/i18n/pt_PT/pgadmin3.po +++ b/i18n/pt_PT/pgadmin3.po @@ -13,6 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Portuguese\n" "X-Poedit-Country: PORTUGAL\n" diff --git a/i18n/ro_RO/pgadmin3.po b/i18n/ro_RO/pgadmin3.po index 664c8fe33..2c9f53d98 100644 --- a/i18n/ro_RO/pgadmin3.po +++ b/i18n/ro_RO/pgadmin3.po @@ -13,6 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/ru_RU/pgadmin3.po b/i18n/ru_RU/pgadmin3.po index f1e169900..18641d5b3 100644 --- a/i18n/ru_RU/pgadmin3.po +++ b/i18n/ru_RU/pgadmin3.po @@ -25,6 +25,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Poedit-Language: Russian\n" "X-Poedit-Country: RUSSIAN FEDERATION\n" "X-Poedit-SourceCharset: utf-8\n" diff --git a/i18n/sk_SK/pgadmin3.po b/i18n/sk_SK/pgadmin3.po index 874593b4c..6ef44853e 100644 --- a/i18n/sk_SK/pgadmin3.po +++ b/i18n/sk_SK/pgadmin3.po @@ -12,7 +12,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"org>\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Generator: KBabel 1.3.1\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 diff --git a/i18n/sl_SI/pgadmin3.po b/i18n/sl_SI/pgadmin3.po index 4f8430021..491bceeb7 100644 --- a/i18n/sl_SI/pgadmin3.po +++ b/i18n/sl_SI/pgadmin3.po @@ -14,6 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/sr_RS/pgadmin3.po b/i18n/sr_RS/pgadmin3.po index 90bfd6b57..0d43e9a65 100644 --- a/i18n/sr_RS/pgadmin3.po +++ b/i18n/sr_RS/pgadmin3.po @@ -11,6 +11,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Poedit-Language: Serbo-Croatian\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 diff --git a/i18n/sv_SE/pgadmin3.po b/i18n/sv_SE/pgadmin3.po index eaac0683d..529db0d1d 100644 --- a/i18n/sv_SE/pgadmin3.po +++ b/i18n/sv_SE/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/tr_TR/pgadmin3.po b/i18n/tr_TR/pgadmin3.po index 90e675039..5e060b700 100644 --- a/i18n/tr_TR/pgadmin3.po +++ b/i18n/tr_TR/pgadmin3.po @@ -15,6 +15,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/uk_UA/pgadmin3.po b/i18n/uk_UA/pgadmin3.po index 0664d7a54..c8dd36a4f 100644 --- a/i18n/uk_UA/pgadmin3.po +++ b/i18n/uk_UA/pgadmin3.po @@ -14,6 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/i18n/vi_VN/pgadmin3.po b/i18n/vi_VN/pgadmin3.po index 0664d7a54..ffd6fbe40 100644 --- a/i18n/vi_VN/pgadmin3.po +++ b/i18n/vi_VN/pgadmin3.po @@ -14,6 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" #: src/frm/frmQuery.cpp:1269 src/frm/frmQuery.cpp:1623 #: pgadmin/frm/frmQuery.cpp:1866 pgadmin/frm/frmQuery.cpp:2283 diff --git a/pgadmin/ctl/ctlSQLBox.cpp b/pgadmin/ctl/ctlSQLBox.cpp index c64814cb2..5284dff86 100644 --- a/pgadmin/ctl/ctlSQLBox.cpp +++ b/pgadmin/ctl/ctlSQLBox.cpp @@ -192,7 +192,7 @@ bool ctlSQLBox::ReplaceAll(const wxString &find, const wxString &replace, bool w GotoPos(initialPos); wxString msg; - msg.Printf(_("%d replacements made."), count); + msg.Printf(wxPLURAL("%d replacement made.", "%d replacements made.", count), count); wxMessageBox(msg, _("Replace all")); if (count) diff --git a/pgadmin/db/pgQueryThread.cpp b/pgadmin/db/pgQueryThread.cpp index 2901af108..274324451 100644 --- a/pgadmin/db/pgQueryThread.cpp +++ b/pgadmin/db/pgQueryThread.cpp @@ -145,14 +145,16 @@ int pgQueryThread::execute() insertedOid=PQoidValue(res); if (insertedOid && insertedOid != (OID)-1) appendMessage(wxString::Format(_("Query inserted one row with OID %d.\n"), insertedOid)); - else - appendMessage(wxString::Format(_("Query result with %d rows will be returned.\n"), PQntuples(result))); + else + appendMessage(wxString::Format(wxPLURAL("Query result with %d row will be returned.\n", "Query result with %d rows will be returned.\n", + PQntuples(result)), PQntuples(result))); continue; } if (lastResult) { if (PQntuples(lastResult)) - appendMessage(wxString::Format(_("Query result with %d rows discarded.\n"), PQntuples(lastResult))); + appendMessage(wxString::Format(wxPLURAL("Query result with %d row discarded.\n", "Query result with %d rows discarded.\n", + PQntuples(lastResult)), PQntuples(lastResult))); PQclear(lastResult); } lastResult=res; diff --git a/pgadmin/frm/frmEditGrid.cpp b/pgadmin/frm/frmEditGrid.cpp index 7a078b757..65c3930af 100644 --- a/pgadmin/frm/frmEditGrid.cpp +++ b/pgadmin/frm/frmEditGrid.cpp @@ -387,7 +387,7 @@ void frmEditGrid::SetLimit(const int rowlimit) if (limit <= 0) cbLimit->SetValue(_("No limit")); else - cbLimit->SetValue(wxString::Format(_("%i rows"), limit)); + cbLimit->SetValue(wxString::Format(wxPLURAL("%i row", "%i rows", limit), limit)); } } @@ -668,7 +668,9 @@ void frmEditGrid::OnCopy(wxCommandEvent &ev) { int copied; copied = sqlGrid->Copy(); - SetStatusText(wxString::Format(_("Data from %d rows copied to clipboard."), copied)); + SetStatusText(wxString::Format( + wxPLURAL("Data from %d row copied to clipboard.", "Data from %d rows copied to clipboard.", copied), + copied)); } } } @@ -1062,10 +1064,7 @@ void frmEditGrid::OnDelete(wxCommandEvent& event) return; wxString prompt; - if (i == 1) - prompt.Printf(_("Are you sure you wish to delete the selected row?")); - else - prompt.Printf(_("Are you sure you wish to delete the %d selected rows?"), i); + prompt.Printf(wxPLURAL("Are you sure you wish to delete the selected row?", "Are you sure you wish to delete the %d selected rows?", i)); wxMessageDialog msg(this, prompt, _("Delete rows?"), wxYES_NO | wxICON_QUESTION); if (msg.ShowModal() != wxID_YES) @@ -1088,7 +1087,10 @@ void frmEditGrid::OnDelete(wxCommandEvent& event) i > 0 && show_continue_message) { - wxMessageDialog msg(this, wxString::Format(_("There was an error deleting the previous record.\nAre you sure you wish to delete the remaining %d rows ?"), i), _("Delete more records ?"), wxYES_NO | wxICON_QUESTION); + wxMessageDialog msg(this, wxString::Format(wxPLURAL( + "There was an error deleting the previous record.\nAre you sure you wish to delete the remaining %d row?", + "There was an error deleting the previous record.\nAre you sure you wish to delete the remaining %d rows?", + i), i), _("Delete more records ?"), wxYES_NO | wxICON_QUESTION); if (msg.ShowModal() != wxID_YES) break; else @@ -1099,7 +1101,7 @@ void frmEditGrid::OnDelete(wxCommandEvent& event) sqlGrid->EndBatch(); - SetStatusText(wxString::Format(_("%d rows."), sqlGrid->GetTable()->GetNumberStoredRows()), 0); + SetStatusText(wxString::Format(wxPLURAL("%d row.", "%d rows.", sqlGrid->GetTable()->GetNumberStoredRows()), sqlGrid->GetTable()->GetNumberStoredRows()), 0); } @@ -1318,7 +1320,7 @@ void frmEditGrid::Go() toolsMenu->Enable(MNU_REMOVESORT, true); return; } - SetStatusText(wxString::Format(_("%d rows."), thread->DataSet()->NumRows()), 0); + SetStatusText(wxString::Format(wxPLURAL("%d row.", "%d rows.", thread->DataSet()->NumRows()), thread->DataSet()->NumRows()), 0); sqlGrid->BeginBatch(); @@ -3082,7 +3084,7 @@ wxWindow *editGridFilteredFactory::StartDialog(frmMain *form, pgObject *obj) editGridLimitedFactory::editGridLimitedFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar, int limit) : editGridFactoryBase(list) { - mnu->Append(id, wxString::Format(_("View Top %i Rows"), limit), _("View a limited number of rows in the selected object.")); + mnu->Append(id, wxString::Format(wxPLURAL("View Top %i Row", "View Top %i Rows", limit), limit), _("View a limited number of rows in the selected object.")); rowlimit = limit; context = false; } diff --git a/pgadmin/frm/frmExport.cpp b/pgadmin/frm/frmExport.cpp index f62e16913..acca68652 100644 --- a/pgadmin/frm/frmExport.cpp +++ b/pgadmin/frm/frmExport.cpp @@ -287,7 +287,10 @@ bool frmExport::Export(pgSet *set) file.Close(); if (skipped) - wxLogError(_("Data export incomplete.\n\n%d row(s) contained characters that could not be converted to the local charset.\n\nPlease correct the data or try using UTF8 instead."), skipped); + wxLogError(wxPLURAL( + "Data export incomplete.\n\n%d row contained characters that could not be converted to the local charset.\n\nPlease correct the data or try using UTF8 instead.", + "Data export incomplete.\n\n%d rows contained characters that could not be converted to the local charset.\n\nPlease correct the data or try using UTF8 instead.", + skipped), skipped); else wxMessageBox(_("Data export completed successfully."), _("Export data"), wxICON_INFORMATION | wxOK); diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp index c7d9be755..4a7badfb1 100644 --- a/pgadmin/frm/frmQuery.cpp +++ b/pgadmin/frm/frmQuery.cpp @@ -2106,9 +2106,13 @@ void frmQuery::OnQueryComplete(wxCommandEvent &ev) } else { - showMessage(wxString::Format(_("Query returned successfully: %d rows affected, %s ms execution time."), + showMessage(wxString::Format( + wxPLURAL( + "Query returned successfully: %d row affected, %s ms execution time.", + "Query returned successfully: %d rows affected, %s ms execution time.", + insertedCount), insertedCount, elapsedQuery.ToString().c_str()), - wxString::Format(_("%d rows affected."), insertedCount)); + wxString::Format(wxPLURAL("%d row affected.", "%d rows affected.", insertedCount), insertedCount)); } } else @@ -2167,7 +2171,7 @@ void frmQuery::OnQueryComplete(wxCommandEvent &ev) if (qi->toFile) { - SetStatusText(wxString::Format(_("%d rows."), rowsTotal), STATUSPOS_ROWS); + SetStatusText(wxString::Format(wxPLURAL("%d row.", "%d rows.", rowsTotal), rowsTotal), STATUSPOS_ROWS); if (rowsTotal) { @@ -2192,11 +2196,13 @@ void frmQuery::OnQueryComplete(wxCommandEvent &ev) { sqlResult->DisplayData(true); - showMessage(wxString::Format(_("%d rows retrieved."), sqlResult->NumRows()), _("OK.")); + showMessage(wxString::Format( + wxPLURAL("%d row retrieved.", "%d rows retrieved.", sqlResult->NumRows()), + sqlResult->NumRows()), _("OK.")); } else { - SetStatusText(wxString::Format(_("Retrieving data: %d rows."), rowsTotal), STATUSPOS_MSGS); + SetStatusText(wxString::Format(wxPLURAL("Retrieving data: %d row.", "Retrieving data: %d rows.", rowsTotal), rowsTotal), STATUSPOS_MSGS); wxTheApp->Yield(true); sqlResult->DisplayData(); @@ -2207,9 +2213,9 @@ void frmQuery::OnQueryComplete(wxCommandEvent &ev) msgResult->AppendText(str); msgHistory->AppendText(str); - showMessage(wxString::Format(_("%ld rows retrieved."), sqlResult->NumRows()), _("OK.")); + showMessage(wxString::Format(wxPLURAL("%ld row retrieved.", "%ld rows retrieved.", sqlResult->NumRows()), sqlResult->NumRows()), _("OK.")); } - SetStatusText(wxString::Format(_("%d rows."), rowsTotal), STATUSPOS_ROWS); + SetStatusText(wxString::Format(wxPLURAL("%d row.", "%d rows.", rowsTotal), rowsTotal), STATUSPOS_ROWS); } } @@ -2296,7 +2302,9 @@ void frmQuery::completeQuery(bool done, bool explain, bool verbose) if (statusMsg.Last() == '.') statusMsg = statusMsg.Left(statusMsg.Length() - 1); - SetStatusText(wxString::Format(_("%s (%d asynchronous notifications received)."), statusMsg.c_str(), notifies), STATUSPOS_MSGS); + SetStatusText(wxString::Format( + wxPLURAL("%s (%d asynchronous notification received).", "%s (%d asynchronous notifications received).", notifies), + statusMsg.c_str(), notifies), STATUSPOS_MSGS); } msgResult->AppendText(wxT("\n")); diff --git a/pgadmin/slony/slNode.cpp b/pgadmin/slony/slNode.cpp index 82d4e1435..018f8956e 100644 --- a/pgadmin/slony/slNode.cpp +++ b/pgadmin/slony/slNode.cpp @@ -108,7 +108,8 @@ bool slNode::CheckAcksAndContinue(wxFrame *frame) if (!l) return true; - wxMessageDialog dlg(frame, wxString::Format(_("There are %ld event acknowledgements outstanding.\nContinue anyway?"), l), + wxMessageDialog dlg(frame, wxString::Format(wxPLURAL("There are %ld event acknowledgement outstanding.\nContinue anyway?", + "There are %ld event acknowledgements outstanding.\nContinue anyway?", l), l), _("Events pending"), wxYES_NO | wxNO_DEFAULT); return dlg.ShowModal() == wxID_YES; diff --git a/stringextract b/stringextract index 4d91c184f..91a05be38 100755 --- a/stringextract +++ b/stringextract @@ -13,48 +13,48 @@ cp pgadmin3-release.pot pgadmin3.pot -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/ctl/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/frm/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/debugger/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/db/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/exceptions/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/expressions/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/statements/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/generators/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/objects/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/utilities/m_apm/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/utilities/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/pgscript/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/agent/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/schema/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/utils/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/slony/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/dlg/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/gqb/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/ui/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot xtra/pgscript/bin/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/ctl/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/frm/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/debugger/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/db/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/exceptions/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/expressions/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/statements/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/generators/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/objects/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/utilities/m_apm/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/utilities/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/pgscript/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/agent/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/schema/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/utils/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/slony/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/dlg/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/gqb/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/ui/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/*.cpp +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot xtra/pgscript/bin/*.cpp -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/ctl/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/frm/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/debugger/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/db/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/exceptions/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/expressions/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/statements/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/generators/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/objects/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/utilities/mapm-lib/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/utilities/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/pgscript/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/agent/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/schema/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/utils/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/slony/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/dlg/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/gqb/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/*.h -xgettext -k_ -k__ -j -s -o pgadmin3.pot pgadmin/include/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/ctl/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/frm/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/debugger/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/db/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/exceptions/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/expressions/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/statements/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/generators/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/objects/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/utilities/mapm-lib/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/utilities/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/pgscript/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/agent/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/schema/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/utils/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/slony/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/dlg/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/gqb/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/*.h +xgettext -k_ -k__ -kwxPLURAL:1,2 -j -s -o pgadmin3.pot pgadmin/include/*.h TMPDIR=`mktemp -d tmpwork` || exit 1 echo "$TMPDIR" -- 2.39.5