From ca427796353e9dba3b6af1acc83755b891c1e2f3 Mon Sep 17 00:00:00 2001 From: Daniel Albers Date: Tue, 24 Jan 2012 00:50:54 +0100 Subject: [PATCH] stop lconvert from complaining about plurals MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Weird issue. lconvert of Qt 4.7.4 complains when: a) … there are msgstr[x] with x > nplurals=y, i. e. translations for more plural forms than the language actually has. Understandable, so we remove redundant plurals with black voodoo: for pofile in *.po; do IFS='=' read var plurals \ < <(egrep -o 'nplurals=[[:digit:]]+' $pofile); maxplural=$(egrep -o 'msgstr\[[[:digit:]]+\]' $pofile | egrep -o '[[:digit:]]+' | sort -rn | head -n 1); for ((i=$plurals; i<=$maxplural; i++)); do sed -i -re "/^msgstr\[$i\]/d;" $pofile; done; done b) … the .po path contains a '/'. Huh? Yeah. `lconvert -i xy.po …` is fine. `lconvert -i ./xy.po …` produces an error. So we're running lconvert from ${CMAKE_SOURCE_DIR}/po now. --- cmake/modules/QuasselMacros.cmake | 3 ++- po/cs.po | 6 ------ po/de.po | 4 ---- po/en_AU.po | 4 ---- po/en_GB.po | 4 ---- po/es.po | 4 ---- po/fr.po | 4 ---- po/gl.po | 4 ---- po/it.po | 4 ---- po/nb.po | 4 ---- po/nl.po | 4 ---- po/pt_BR.po | 4 ---- po/sl.po | 8 -------- po/uk.po | 6 ------ 14 files changed, 2 insertions(+), 61 deletions(-) diff --git a/cmake/modules/QuasselMacros.cmake b/cmake/modules/QuasselMacros.cmake index 738d49e9..2e2dfef3 100644 --- a/cmake/modules/QuasselMacros.cmake +++ b/cmake/modules/QuasselMacros.cmake @@ -19,13 +19,14 @@ endmacro(setup_qt4_variables) # This generates a .ts from a .po file macro(generate_ts outvar basename) - set(input ${CMAKE_SOURCE_DIR}/po/${basename}.po) + set(input ${basename}.po) set(output ${CMAKE_BINARY_DIR}/po/${basename}.ts) add_custom_command(OUTPUT ${output} COMMAND ${QT_LCONVERT_EXECUTABLE} ARGS -i ${input} -of ts -o ${output} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/po # This is a workaround to add (duplicate) strings that lconvert missed to the .ts COMMAND ${QT_LUPDATE_EXECUTABLE} ARGS -silent diff --git a/po/cs.po b/po/cs.po index 1f442aec..55beefe7 100644 --- a/po/cs.po +++ b/po/cs.po @@ -3937,9 +3937,6 @@ msgid_plural "%n pending highlights" msgstr[0] "%n zbývající zvýraznění" msgstr[1] "%n zbývající zvýraznění" msgstr[2] "%n zbývajících zvýraznění" -msgstr[3] "%n zbývající zvýraznění" -msgstr[4] "%n zbývající zvýraznění" -msgstr[5] "%n zbývajících zvýraznění" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5725,9 +5722,6 @@ msgid_plural "%n pending highlights" msgstr[0] "%n zbývající zvýraznění" msgstr[1] "%n zbývající zvýraznění" msgstr[2] "%n zbývajících zvýraznění" -msgstr[3] "%n zbývající zvýraznění" -msgstr[4] "%n zbývající zvýraznění" -msgstr[5] "%n zbývajících zvýraznění" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/de.po b/po/de.po index 34f48a79..89405487 100644 --- a/po/de.po +++ b/po/de.po @@ -3967,8 +3967,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n ausstehende Hervorhebungen" msgstr[1] "%n ausstehende Hervorhebungen" -msgstr[2] "%n ausstehende Hervorhebungen" -msgstr[3] "%n ausstehende Hervorhebungen" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5755,8 +5753,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n ausstehende Hervorhebungen" msgstr[1] "%n ausstehende Hervorhebungen" -msgstr[2] "%n ausstehende Hervorhebungen" -msgstr[3] "%n ausstehende Hervorhebungen" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/en_AU.po b/po/en_AU.po index e4a5f822..1df09468 100644 --- a/po/en_AU.po +++ b/po/en_AU.po @@ -3935,8 +3935,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n pending highlights" msgstr[1] "%n pending highlights" -msgstr[2] "%n pending highlights" -msgstr[3] "%n pending highlights" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5718,8 +5716,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n pending highlights" msgstr[1] "%n pending highlights" -msgstr[2] "%n pending highlights" -msgstr[3] "%n pending highlights" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/en_GB.po b/po/en_GB.po index 8744986b..73b85b42 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -3936,8 +3936,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n pending highlights" msgstr[1] "%n pending highlights" -msgstr[2] "%n pending highlights" -msgstr[3] "%n pending highlights" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5719,8 +5717,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n pending highlights" msgstr[1] "%n pending highlights" -msgstr[2] "%n pending highlights" -msgstr[3] "%n pending highlights" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/es.po b/po/es.po index dd99174d..ebadfe10 100644 --- a/po/es.po +++ b/po/es.po @@ -3971,8 +3971,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n resaltados pendientes" msgstr[1] "%n resaltados pendientes" -msgstr[2] "%n resaltados pendientes" -msgstr[3] "%n resaltados pendientes" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5763,8 +5761,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n resaltados pendientes" msgstr[1] "%n resaltados pendientes" -msgstr[2] "%n resaltados pendientes" -msgstr[3] "%n resaltados pendientes" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/fr.po b/po/fr.po index 64157a96..e46136a0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -3972,8 +3972,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n message surligné en attente" msgstr[1] "%n messages surlignés en attente" -msgstr[2] "%n message surligné en attente" -msgstr[3] "%n messages surlignés en attente" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5772,8 +5770,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n message surligné en attente" msgstr[1] "%n messages surlignés en attente" -msgstr[2] "%n message surligné en attente" -msgstr[3] "%n messages surlignés en attente" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/gl.po b/po/gl.po index 692b0020..720e8b17 100644 --- a/po/gl.po +++ b/po/gl.po @@ -3958,8 +3958,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n resaltado pendente" msgstr[1] "%n resaltados pendentes" -msgstr[2] "%n resaltado pendente" -msgstr[3] "%n resaltados pendentes" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5749,8 +5747,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n resaltado pendente" msgstr[1] "%n resaltados pendentes" -msgstr[2] "%n resaltado pendente" -msgstr[3] "%n resaltados pendentes" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/it.po b/po/it.po index 00d03915..ad67e557 100644 --- a/po/it.po +++ b/po/it.po @@ -3963,8 +3963,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n evento in attesa" msgstr[1] "%n eventi in attesa" -msgstr[2] "%n evento in attesa" -msgstr[3] "%n eventi in attesa" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5761,8 +5759,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n evento in attesa" msgstr[1] "%n eventi in attesa" -msgstr[2] "%n evento in attesa" -msgstr[3] "%n eventi in attesa" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/nb.po b/po/nb.po index 3c13a4e8..b33e6a69 100644 --- a/po/nb.po +++ b/po/nb.po @@ -3942,8 +3942,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n utheving(er) er ikke lest" msgstr[1] "%n utheving(er) er ikke lest" -msgstr[2] "%n utheving(er) er ikke lest" -msgstr[3] "%n utheving(er) er ikke lest" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5728,8 +5726,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n utheving(er) er ikke lest" msgstr[1] "%n utheving(er) er ikke lest" -msgstr[2] "%n utheving(er) er ikke lest" -msgstr[3] "%n utheving(er) er ikke lest" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/nl.po b/po/nl.po index 803c3985..5b63bef8 100644 --- a/po/nl.po +++ b/po/nl.po @@ -3945,8 +3945,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n markering in wachtrij" msgstr[1] "%n markeringen in wachtrij" -msgstr[2] "%n markering in wachtrij" -msgstr[3] "%n markeringen in wachtrij" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5740,8 +5738,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n markering in wachtrij" msgstr[1] "%n markeringen in wachtrij" -msgstr[2] "%n markering in wachtrij" -msgstr[3] "%n markeringen in wachtrij" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/pt_BR.po b/po/pt_BR.po index 086a1647..00514181 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -3959,8 +3959,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n destaque pendente" msgstr[1] "%n destaques pendentes" -msgstr[2] "%n destaque pendente" -msgstr[3] "%n destaques pendentes" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5751,8 +5749,6 @@ msgid "%n pending highlights" msgid_plural "%n pending highlights" msgstr[0] "%n destaque pendente" msgstr[1] "%n destaques pendentes" -msgstr[2] "%n destaque pendente" -msgstr[3] "%n destaques pendentes" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/sl.po b/po/sl.po index c1684dfc..09f4c0c7 100644 --- a/po/sl.po +++ b/po/sl.po @@ -3941,10 +3941,6 @@ msgstr[0] "%n čakajoč poudarek" msgstr[1] "%n čakajoča poudarka" msgstr[2] "%n čakajoči poudarki" msgstr[3] "%n čakajočih poudarkov" -msgstr[4] "%n čakajoč poudarek" -msgstr[5] "%n čakajoča poudarka" -msgstr[6] "%n čakajoči poudarki" -msgstr[7] "%n čakajočih poudarkov" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5730,10 +5726,6 @@ msgstr[0] "%n čakajoč poudarek" msgstr[1] "%n čakajoča poudarka" msgstr[2] "%n čakajoči poudarki" msgstr[3] "%n čakajočih poudarkov" -msgstr[4] "%n čakajoč poudarek" -msgstr[5] "%n čakajoča poudarka" -msgstr[6] "%n čakajoči poudarki" -msgstr[7] "%n čakajočih poudarkov" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" diff --git a/po/uk.po b/po/uk.po index f7a2dcee..ad80bca9 100644 --- a/po/uk.po +++ b/po/uk.po @@ -3969,9 +3969,6 @@ msgid_plural "%n pending highlights" msgstr[0] "%n підсвічування у черзі" msgstr[1] "%n підсвічування у черзі" msgstr[2] "%n підсвічувань у черзі" -msgstr[3] "%n підсвічування у черзі" -msgstr[4] "%n підсвічування у черзі" -msgstr[5] "%n підсвічувань у черзі" #: ../src/qtui/settingspages/keysequencewidget.cpp:77 msgctxt "KeySequenceButton|" @@ -5762,9 +5759,6 @@ msgid_plural "%n pending highlights" msgstr[0] "%n підсвічування у черзі" msgstr[1] "%n підсвічування у черзі" msgstr[2] "%n підсвічувань у черзі" -msgstr[3] "%n підсвічування у черзі" -msgstr[4] "%n підсвічування у черзі" -msgstr[5] "%n підсвічувань у черзі" #: ../src/qtui/systraynotificationbackend.cpp:135 msgctxt "SystrayNotificationBackend::ConfigWidget|" -- 2.20.1