From f7d6805ebb0b2a4fec50c33315235d4622e6e5fe Mon Sep 17 00:00:00 2001 From: Ell Date: Wed, 29 Nov 2017 16:27:59 -0500 Subject: [PATCH] */Makefile.am: add abbreviations to generated enum files Update the dprod production of generated enum files to include abbreviated value descriptions, as per the previous commits. Add a comment for translators above the abbreviated descriptions, specifying the full description they abbreviate. --- app/config/Makefile.am | 2 +- app/core/Makefile.am | 2 +- app/display/Makefile.am | 2 +- app/gegl/Makefile.am | 2 +- app/operations/Makefile.am | 2 +- app/paint/Makefile.am | 2 +- app/plug-in/Makefile.am | 2 +- app/text/Makefile.am | 2 +- app/tools/Makefile.am | 2 +- app/widgets/Makefile.am | 2 +- libgimp/Makefile.am | 2 +- libgimpbase/Makefile.am | 4 ++-- libgimpconfig/Makefile.am | 2 +- libgimpwidgets/Makefile.am | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/config/Makefile.am b/app/config/Makefile.am index daa949fbda..ecc9a20423 100644 --- a/app/config/Makefile.am +++ b/app/config/Makefile.am @@ -145,7 +145,7 @@ xgen-cec: $(srcdir)/config-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/core/Makefile.am b/app/core/Makefile.am index 8e8716936e..c3be33a7a0 100644 --- a/app/core/Makefile.am +++ b/app/core/Makefile.am @@ -461,7 +461,7 @@ xgen-cec: $(srcdir)/core-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/display/Makefile.am b/app/display/Makefile.am index 410e8b895f..2851dcb0c8 100644 --- a/app/display/Makefile.am +++ b/app/display/Makefile.am @@ -206,7 +206,7 @@ xgen-dec: $(srcdir)/display-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/gegl/Makefile.am b/app/gegl/Makefile.am index 1643c8cabe..b62cc96b33 100644 --- a/app/gegl/Makefile.am +++ b/app/gegl/Makefile.am @@ -82,7 +82,7 @@ xgen-ggec: $(srcdir)/gimp-gegl-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am index f76c73ea67..5c4ed020bf 100644 --- a/app/operations/Makefile.am +++ b/app/operations/Makefile.am @@ -117,7 +117,7 @@ xgen-oec: $(srcdir)/operations-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/paint/Makefile.am b/app/paint/Makefile.am index cf67fd1c2d..149edba289 100644 --- a/app/paint/Makefile.am +++ b/app/paint/Makefile.am @@ -106,7 +106,7 @@ xgen-pec: $(srcdir)/paint-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/plug-in/Makefile.am b/app/plug-in/Makefile.am index cde82609ba..852fdbb37e 100644 --- a/app/plug-in/Makefile.am +++ b/app/plug-in/Makefile.am @@ -89,7 +89,7 @@ xgen-pec: $(srcdir)/plug-in-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/text/Makefile.am b/app/text/Makefile.am index f2fdd3464b..20bbf71090 100644 --- a/app/text/Makefile.am +++ b/app/text/Makefile.am @@ -65,7 +65,7 @@ xgen-tec: $(srcdir)/text-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am index fbda7b8d91..dfe640e190 100644 --- a/app/tools/Makefile.am +++ b/app/tools/Makefile.am @@ -238,7 +238,7 @@ xgen-tec: $(srcdir)/tools-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am index c672a3c168..4ed2e7457d 100644 --- a/app/widgets/Makefile.am +++ b/app/widgets/Makefile.am @@ -464,7 +464,7 @@ xgen-wec: $(srcdir)/widgets-enums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/libgimp/Makefile.am b/libgimp/Makefile.am index 9049944990..2e71ba9abd 100644 --- a/libgimp/Makefile.am +++ b/libgimp/Makefile.am @@ -451,7 +451,7 @@ gimpenums.c: $(srcdir)/gimpenums.h $(srcdir)/gimpenums.c.tail $(GIMP_MKENUMS) Ma --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > xgen-cec \ && cat $(srcdir)/gimpenums.c.tail >> xgen-cec \ diff --git a/libgimpbase/Makefile.am b/libgimpbase/Makefile.am index a8364989c3..2f3ac24d7c 100644 --- a/libgimpbase/Makefile.am +++ b/libgimpbase/Makefile.am @@ -211,7 +211,7 @@ xgen-bec: $(srcdir)/gimpbaseenums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ @@ -235,7 +235,7 @@ xgen-cec: $(srcdir)/gimpcompatenums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/libgimpconfig/Makefile.am b/libgimpconfig/Makefile.am index 801b91a48d..40d30ca18d 100644 --- a/libgimpconfig/Makefile.am +++ b/libgimpconfig/Makefile.am @@ -146,7 +146,7 @@ xgen-cec: $(srcdir)/gimpconfigenums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@ diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am index 56cbb61bfd..f55ca4e48f 100644 --- a/libgimpwidgets/Makefile.am +++ b/libgimpwidgets/Makefile.am @@ -315,7 +315,7 @@ xgen-wec: $(srcdir)/gimpwidgetsenums.h $(GIMP_MKENUMS) Makefile.am --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n" \ --dhead " static const Gimp@Type@Desc descs[] =\n {" \ - --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ }," \ + --dprod " { @VALUENAME@, @valuedesc@, @valuehelp@ },@if ('@valueabbrev@' ne 'NULL')@\n /* Translators: this is an abbreviated version of @valueudesc@.\n Keep it short. */\n { @VALUENAME@, @valueabbrev@, NULL },@endif@" \ --dtail " { 0, NULL, NULL }\n };\n\n static GType type = 0;\n\n if (G_UNLIKELY (! type))\n {\n type = g_@type@_register_static (\"@EnumName@\", values);\n gimp_type_set_translation_domain (type, GETTEXT_PACKAGE \"-libgimp\");\n gimp_type_set_translation_context (type, \"@enumnick@\");\n gimp_@type@_set_value_descriptions (type, descs);\n }\n\n return type;\n}\n" \ $< > $@