Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Remove all uncertain plural forms from translatable strings
Dmitry Kazakova89867be92a6
diff --git a/HACKING b/HACKINGindex 3d895cbf20..ccca6137f8 100644--- a/HACKING+++ b/HACKING@@ -359,6 +359,35 @@ The usage of custom patches in Qtbe tracked on CI via `CMakeConfigureLog.yaml` file, which is available as anartifact of the build.+On menu action names: "Group layers" vs "Group layer(s)"++ tldr; use simple plural form "Group layers" instead of "Group layer(s)"+ when you don't know how many items the action is going to process++ Sometimes, the meaning of a user-facing action depends on the actual+ number of items the user selected, e.g. the number of selected layers+ or vector shapes. So we cannot prepare a precise wording for this+ action upfront. In this case, use the following rules to name the+ action:++ * if an action is defined in an `.action` file, i.e. present+ `Configure Shortcuts` dialog, just use a simple plural form+ "Group Layers".++ Do not use the form with "(s)" in the end (e.g. "Group layer(s)"),+ because it is impossible to translate that correctly into+ non-English languages.++ Also try to avoid adjusting the name of such action at runtime+ using `i18ncp` call, because it will also change the name of the+ action in `Configure Shortcuts` dialog.++ * if the action is created at runtime, and is not present+ in `Configure Shortcuts` dialog, just use `i18np` to handle+ plural forms correctly:++ i18ncp("@action:inmenu", "Group layer", "Group layers")+With Krita now supporting Python scripting, we need guidelines for these as well.These guidelines are preliminary and may be further refined in the future.diff --git a/krita/krita.action b/krita/krita.actionindex a4716de7d9..89685c0c69 100644--- a/krita/krita.action+++ b/krita/krita.action@@ -2911,10 +2911,10 @@</Action><Action name="create_quick_group"><icon>quick_group</icon>- <text>Group layer(s)</text>+ <text>Group layers</text><whatsThis/><toolTip>Create a group layer containing selected layers</toolTip>- <iconText>Group layer(s)</iconText>+ <iconText>Group layers</iconText><activationFlags>1000</activationFlags><activationConditions>0</activationConditions><shortcut>Ctrl+G</shortcut>@@ -2923,10 +2923,10 @@</Action><Action name="quick_ungroup"><icon>quick_ungroup</icon>- <text>Ungroup layer(s)</text>+ <text>Ungroup layers</text><whatsThis/><toolTip>Remove grouping of the layers or remove one layer out of the group</toolTip>- <iconText>Ungroup layer(s)</iconText>+ <iconText>Ungroup layers</iconText><activationFlags>100000</activationFlags><activationConditions>0</activationConditions><shortcut>Ctrl+Alt+G</shortcut>@@ -3629,7 +3629,7 @@<icon/><text>Set Copy F&rom...</text><whatsThis/>- <toolTip>Set the source for the selected clone layer(s).</toolTip>+ <toolTip>Set the source for the selected clone layers</toolTip><iconText>Set Copy From</iconText><activationFlags>1000</activationFlags><activationConditions>1</activationConditions>diff --git a/libs/ui/animation/KisDlgAnimationRenderer.cpp b/libs/ui/animation/KisDlgAnimationRenderer.cppindex fbeea4b582..e8e64ff620 100644--- a/libs/ui/animation/KisDlgAnimationRenderer.cpp+++ b/libs/ui/animation/KisDlgAnimationRenderer.cpp@@ -709,7 +709,7 @@ void KisDlgAnimationRenderer::updateWarnings()if (warnings.isEmpty()) {m_page->lblWarnings->hide();} else {- QString text = QString("<p><b>%1</b>").arg(i18n("Warning(s):"));+ QString text = QString("<p><b>%1</b>").arg(i18np("Warning:", "Warnings:", warnings.size()));text.append("<ul>");Q_FOREACH (const QString &warning, warnings) {text.append("<li>");diff --git a/libs/ui/dialogs/kis_dlg_preferences.cc b/libs/ui/dialogs/kis_dlg_preferences.ccindex 607cbf131a..a11dcaf275 100644--- a/libs/ui/dialogs/kis_dlg_preferences.cc+++ b/libs/ui/dialogs/kis_dlg_preferences.cc@@ -2418,7 +2418,7 @@ DisplaySettingsTab::DisplaySettingsTab(QWidget *parent, const char *name)if (openglWarnings.isEmpty()) {grpOpenGLWarnings->setVisible(false);} else {- QString text = QString("<p><b>%1</b>").arg(i18n("Warning(s):"));+ QString text = QString("<p><b>%1</b>").arg(i18np("Warning:", "Warnings:", openglWarnings.size()));text.append("<ul>");Q_FOREACH (const QString &warning, openglWarnings) {text.append("<li>");diff --git a/plugins/dockers/recorder/recorder_export.cpp b/plugins/dockers/recorder/recorder_export.cppindex 05cd554323..7613504315 100644--- a/plugins/dockers/recorder/recorder_export.cpp+++ b/plugins/dockers/recorder/recorder_export.cpp@@ -557,7 +557,7 @@ void RecorderExport::setup().arg(settings->imageSize.height()).arg(i18nc("Pixel dimension suffix", "px")).arg(settings->framesCount)- .arg(i18nc("The suffix after number of frames", "frame(s)"))+ .arg(i18ncp("The suffix after number of frames", "frame", "frames", settings->framesCount)));}