[gimp] app: better translatable text for "Indexed color" color space text…
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: better translatable text for "Indexed color" color space text…
- Date: Mon, 16 Nov 2020 00:05:51 +0000 (UTC)
commit 9c52af21ea20cb8bd52e5392eda5acb24e90dbde
Author: Jehan <jehan girinstud io>
Date: Mon Nov 16 00:55:37 2020 +0100
app: better translatable text for "Indexed color" color space text…
… in Image properties window.
Basically using non-translatable "%s (%d %s)" and filling it with
"Indexed color" base type name and translatable _("colors") is very bad
practice (localization-wise):
- First it assumes everyone uses round brackets.
- It also assumes the order of words (number before word it determines
but even the image type before detail brackets).
- And finally it doesn't handle plurals. Of course, we could say that
the 1 color case is a very edge impractical case, but plural is not
only about 1 vs other numbers. Some languages have more cases, and
using ngettext allows translators to handle these.
app/widgets/gimpimagepropview.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c
index c8622a70bb..584021e095 100644
--- a/app/widgets/gimpimagepropview.c
+++ b/app/widgets/gimpimagepropview.c
@@ -480,8 +480,10 @@ gimp_image_prop_view_update (GimpImagePropView *view)
break;
case GIMP_INDEXED:
g_snprintf (buf, sizeof (buf),
- "%s (%d %s)", desc, gimp_image_get_colormap_size (image),
- _("colors"));
+ ngettext ("Indexed color (monochrome)",
+ "Indexed color (%d colors)",
+ gimp_image_get_colormap_size (image)),
+ gimp_image_get_colormap_size (image));
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]