Skip to content

Commit

Permalink
i18n: change %d-formatted singular/plural to {}-format
Browse files Browse the repository at this point in the history
Whether or not it ever makes sense to include the parameter
to the singular form, switching to brace-formatting means that
the parameter can be omitted in the translations, replacing
e.g. "%d brush" with "One brush".
  • Loading branch information
jplloyd committed Apr 17, 2021
1 parent 4aff962 commit b6c6eb7
Show file tree
Hide file tree
Showing 87 changed files with 1,643 additions and 1,641 deletions.
3 changes: 2 additions & 1 deletion gui/brushselectionwindow.py
Expand Up @@ -378,7 +378,8 @@ def tool_widget_description(self):
return None
nbrushes = len(self._app.brushmanager.groups[self._group])
# TRANSLATORS: number of brushes in a brush group, for tooltips
return ngettext("%d brush", "%d brushes", nbrushes) % (nbrushes,)
return ngettext("{count} brush", "{count} brushes", nbrushes).format(
count=nbrushes)

@property
def tool_widget_icon_name(self):
Expand Down
36 changes: 18 additions & 18 deletions po/af.po
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mypaint v2.0.0-alpha.8-1-g4490f06\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-23 21:20+0100\n"
"POT-Creation-Date: 2021-04-17 23:27+0200\n"
"PO-Revision-Date: 2019-02-27 14:18+0000\n"
"Last-Translator: glixx <roman_romul@mail.ru>\n"
"Language-Team: Afrikaans <https://hosted.weblate.org/projects/mypaint/"
Expand Down Expand Up @@ -495,84 +495,84 @@ msgstr ""

#. TRANSLATORS: number of brushes in a brush group, for tooltips
#: ../gui/brushselectionwindow.py:381
#, python-format
msgid "%d brush"
msgid_plural "%d brushes"
#, python-brace-format
msgid "{count} brush"
msgid_plural "{count} brushes"
msgstr[0] ""
msgstr[1] ""

#. TRANSLATORS: properties dialog for the current brush group
#: ../gui/brushselectionwindow.py:405
#: ../gui/brushselectionwindow.py:406
#, python-brace-format
msgctxt "brush group properties dialog: title"
msgid "Group “{group_name}”"
msgstr ""

#: ../gui/brushselectionwindow.py:418
#: ../gui/brushselectionwindow.py:419
msgctxt "brush group properties dialog: action buttons"
msgid "Rename Group"
msgstr ""

#: ../gui/brushselectionwindow.py:424
#: ../gui/brushselectionwindow.py:425
msgctxt "brush group properties dialog: action buttons"
msgid "Export as Zipped Brushset"
msgstr ""

#: ../gui/brushselectionwindow.py:430
#: ../gui/brushselectionwindow.py:431
msgctxt "brush group properties dialog: action buttons"
msgid "Delete Group"
msgstr ""

#: ../gui/brushselectionwindow.py:450
#: ../gui/brushselectionwindow.py:451
msgctxt "brush group rename dialog: title"
msgid "Rename Group"
msgstr ""

#: ../gui/brushselectionwindow.py:468
#: ../gui/brushselectionwindow.py:469
msgctxt "brush group rename"
msgid "A group with this name already exists!"
msgstr ""

#: ../gui/brushselectionwindow.py:477
#: ../gui/brushselectionwindow.py:478
#, python-brace-format
msgctxt "brush group delete"
msgid "Really delete group “{group_name}”?"
msgstr ""

#: ../gui/brushselectionwindow.py:495
#: ../gui/brushselectionwindow.py:496
#, python-brace-format
msgctxt "brush group delete"
msgid ""
"Could not delete group “{group_name}”.\n"
"Some special groups cannot be deleted."
msgstr ""

#: ../gui/brushselectionwindow.py:510
#: ../gui/brushselectionwindow.py:511
msgctxt "brush group export dialog: title"
msgid "Export Brushes"
msgstr ""

#: ../gui/brushselectionwindow.py:515
#: ../gui/brushselectionwindow.py:516
msgctxt "brush group export dialog"
msgid "MyPaint brush package (*.zip)"
msgstr ""

#: ../gui/brushselectionwindow.py:535
#: ../gui/brushselectionwindow.py:536
msgctxt "brush groups menu"
msgid "New Group…"
msgstr ""

#: ../gui/brushselectionwindow.py:538
#: ../gui/brushselectionwindow.py:539
msgctxt "brush groups menu"
msgid "Import Brushes…"
msgstr ""

#: ../gui/brushselectionwindow.py:542
#: ../gui/brushselectionwindow.py:543
msgctxt "brush groups menu"
msgid "Get More Brushes…"
msgstr ""

#: ../gui/brushselectionwindow.py:557
#: ../gui/brushselectionwindow.py:558
msgctxt "new brush group dialog: title"
msgid "Create Group"
msgstr ""
Expand Down
48 changes: 24 additions & 24 deletions po/ar.po
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mypaint v2.0.0-alpha.12-327-ga332f03\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-23 21:20+0100\n"
"POT-Creation-Date: 2021-04-17 23:27+0200\n"
"PO-Revision-Date: 2020-08-07 09:32+0000\n"
"Last-Translator: tamer dab <dabsantamer@yahoo.com>\n"
"Language-Team: Arabic <https://hosted.weblate.org/projects/mypaint/mypaint/"
Expand Down Expand Up @@ -513,55 +513,55 @@ msgstr ""

#. TRANSLATORS: number of brushes in a brush group, for tooltips
#: ../gui/brushselectionwindow.py:381
#, python-format
msgid "%d brush"
msgid_plural "%d brushes"
msgstr[0] "%d فرشاة"
msgstr[1] "%d فرشاة"
msgstr[2] "%d فرشتان"
msgstr[3] "%d فرش"
msgstr[4] "%d فرش"
msgstr[5] "%d فرش"
#, python-brace-format
msgid "{count} brush"
msgid_plural "{count} brushes"
msgstr[0] "{count} فرشاة"
msgstr[1] "{count} فرشاة"
msgstr[2] "{count} فرشتان"
msgstr[3] "{count} فرش"
msgstr[4] "{count} فرش"
msgstr[5] "{count} فرش"

#. TRANSLATORS: properties dialog for the current brush group
#: ../gui/brushselectionwindow.py:405
#: ../gui/brushselectionwindow.py:406
#, python-brace-format
msgctxt "brush group properties dialog: title"
msgid "Group “{group_name}”"
msgstr "مجموعة \"{group_name}\""

#: ../gui/brushselectionwindow.py:418
#: ../gui/brushselectionwindow.py:419
msgctxt "brush group properties dialog: action buttons"
msgid "Rename Group"
msgstr "إعادة تسمية المجموعة"

#: ../gui/brushselectionwindow.py:424
#: ../gui/brushselectionwindow.py:425
msgctxt "brush group properties dialog: action buttons"
msgid "Export as Zipped Brushset"
msgstr "تصدير كملف مضغوط"

#: ../gui/brushselectionwindow.py:430
#: ../gui/brushselectionwindow.py:431
msgctxt "brush group properties dialog: action buttons"
msgid "Delete Group"
msgstr "حذف المجموعة"

#: ../gui/brushselectionwindow.py:450
#: ../gui/brushselectionwindow.py:451
msgctxt "brush group rename dialog: title"
msgid "Rename Group"
msgstr "إعادة تسمية المجموعة"

#: ../gui/brushselectionwindow.py:468
#: ../gui/brushselectionwindow.py:469
msgctxt "brush group rename"
msgid "A group with this name already exists!"
msgstr "توجد بالفعل مجموعة بهذا الاسم!"

#: ../gui/brushselectionwindow.py:477
#: ../gui/brushselectionwindow.py:478
#, python-brace-format
msgctxt "brush group delete"
msgid "Really delete group “{group_name}”?"
msgstr "هل ترغب حقًا في حذف المجموعة \"{group_name}\"؟"

#: ../gui/brushselectionwindow.py:495
#: ../gui/brushselectionwindow.py:496
#, python-brace-format
msgctxt "brush group delete"
msgid ""
Expand All @@ -571,32 +571,32 @@ msgstr ""
"تعذر حذف المجموعة \"{group_name}\".\n"
"لا يمكن حذف بعض المجموعات الخاصة."

#: ../gui/brushselectionwindow.py:510
#: ../gui/brushselectionwindow.py:511
msgctxt "brush group export dialog: title"
msgid "Export Brushes"
msgstr "تصدير الفرش"

#: ../gui/brushselectionwindow.py:515
#: ../gui/brushselectionwindow.py:516
msgctxt "brush group export dialog"
msgid "MyPaint brush package (*.zip)"
msgstr "MyPaint حزمة فرشاة (*.zip)"

#: ../gui/brushselectionwindow.py:535
#: ../gui/brushselectionwindow.py:536
msgctxt "brush groups menu"
msgid "New Group…"
msgstr "مجموعة جديدة…"

#: ../gui/brushselectionwindow.py:538
#: ../gui/brushselectionwindow.py:539
msgctxt "brush groups menu"
msgid "Import Brushes…"
msgstr "استيراد الفرش …"

#: ../gui/brushselectionwindow.py:542
#: ../gui/brushselectionwindow.py:543
msgctxt "brush groups menu"
msgid "Get More Brushes…"
msgstr "احصل على المزيد من الفرش …"

#: ../gui/brushselectionwindow.py:557
#: ../gui/brushselectionwindow.py:558
msgctxt "new brush group dialog: title"
msgid "Create Group"
msgstr "إنشاء مجموعة"
Expand Down
36 changes: 18 additions & 18 deletions po/as.po
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mypaint v2.0.0-alpha.8-1-g4490f06\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-03-23 21:20+0100\n"
"POT-Creation-Date: 2021-04-17 23:27+0200\n"
"PO-Revision-Date: 2019-02-27 14:18+0000\n"
"Last-Translator: glixx <roman_romul@mail.ru>\n"
"Language-Team: Assamese <https://hosted.weblate.org/projects/mypaint/mypaint/"
Expand Down Expand Up @@ -495,84 +495,84 @@ msgstr ""

#. TRANSLATORS: number of brushes in a brush group, for tooltips
#: ../gui/brushselectionwindow.py:381
#, python-format
msgid "%d brush"
msgid_plural "%d brushes"
#, python-brace-format
msgid "{count} brush"
msgid_plural "{count} brushes"
msgstr[0] ""
msgstr[1] ""

#. TRANSLATORS: properties dialog for the current brush group
#: ../gui/brushselectionwindow.py:405
#: ../gui/brushselectionwindow.py:406
#, python-brace-format
msgctxt "brush group properties dialog: title"
msgid "Group “{group_name}”"
msgstr ""

#: ../gui/brushselectionwindow.py:418
#: ../gui/brushselectionwindow.py:419
msgctxt "brush group properties dialog: action buttons"
msgid "Rename Group"
msgstr ""

#: ../gui/brushselectionwindow.py:424
#: ../gui/brushselectionwindow.py:425
msgctxt "brush group properties dialog: action buttons"
msgid "Export as Zipped Brushset"
msgstr ""

#: ../gui/brushselectionwindow.py:430
#: ../gui/brushselectionwindow.py:431
msgctxt "brush group properties dialog: action buttons"
msgid "Delete Group"
msgstr ""

#: ../gui/brushselectionwindow.py:450
#: ../gui/brushselectionwindow.py:451
msgctxt "brush group rename dialog: title"
msgid "Rename Group"
msgstr ""

#: ../gui/brushselectionwindow.py:468
#: ../gui/brushselectionwindow.py:469
msgctxt "brush group rename"
msgid "A group with this name already exists!"
msgstr ""

#: ../gui/brushselectionwindow.py:477
#: ../gui/brushselectionwindow.py:478
#, python-brace-format
msgctxt "brush group delete"
msgid "Really delete group “{group_name}”?"
msgstr ""

#: ../gui/brushselectionwindow.py:495
#: ../gui/brushselectionwindow.py:496
#, python-brace-format
msgctxt "brush group delete"
msgid ""
"Could not delete group “{group_name}”.\n"
"Some special groups cannot be deleted."
msgstr ""

#: ../gui/brushselectionwindow.py:510
#: ../gui/brushselectionwindow.py:511
msgctxt "brush group export dialog: title"
msgid "Export Brushes"
msgstr ""

#: ../gui/brushselectionwindow.py:515
#: ../gui/brushselectionwindow.py:516
msgctxt "brush group export dialog"
msgid "MyPaint brush package (*.zip)"
msgstr ""

#: ../gui/brushselectionwindow.py:535
#: ../gui/brushselectionwindow.py:536
msgctxt "brush groups menu"
msgid "New Group…"
msgstr ""

#: ../gui/brushselectionwindow.py:538
#: ../gui/brushselectionwindow.py:539
msgctxt "brush groups menu"
msgid "Import Brushes…"
msgstr ""

#: ../gui/brushselectionwindow.py:542
#: ../gui/brushselectionwindow.py:543
msgctxt "brush groups menu"
msgid "Get More Brushes…"
msgstr ""

#: ../gui/brushselectionwindow.py:557
#: ../gui/brushselectionwindow.py:558
msgctxt "new brush group dialog: title"
msgid "Create Group"
msgstr ""
Expand Down

0 comments on commit b6c6eb7

Please sign in to comment.