gimp r27562 - in trunk: . app/base app/core app/display app/paint app/plug-in app/text app/tools app/widgets libgimp libgimpbase libgimpconfig libgimpwidgets po po-libgimp tools



Author: neo
Date: Thu Nov  6 08:28:28 2008
New Revision: 27562
URL: http://svn.gnome.org/viewvc/gimp?rev=27562&view=rev

Log:
2008-11-06  Sven Neumann  <sven gimp org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.



Modified:
   trunk/ChangeLog
   trunk/app/base/Makefile.am
   trunk/app/base/base-enums.c
   trunk/app/core/Makefile.am
   trunk/app/core/core-enums.c
   trunk/app/display/Makefile.am
   trunk/app/display/display-enums.c
   trunk/app/display/display-enums.h
   trunk/app/paint/Makefile.am
   trunk/app/paint/paint-enums.c
   trunk/app/plug-in/Makefile.am
   trunk/app/plug-in/plug-in-enums.c
   trunk/app/text/Makefile.am
   trunk/app/text/text-enums.c
   trunk/app/tools/Makefile.am
   trunk/app/tools/tools-enums.c
   trunk/app/widgets/Makefile.am
   trunk/app/widgets/widgets-enums.c
   trunk/libgimp/Makefile.am
   trunk/libgimp/libgimp-intl.h
   trunk/libgimpbase/Makefile.am
   trunk/libgimpbase/gimpbase.def
   trunk/libgimpbase/gimpbaseenums.c
   trunk/libgimpbase/gimpbaseenums.h
   trunk/libgimpbase/gimpbasetypes.c
   trunk/libgimpbase/gimpbasetypes.h
   trunk/libgimpbase/gimputils.c
   trunk/libgimpconfig/Makefile.am
   trunk/libgimpconfig/gimpcolorconfig-enums.c
   trunk/libgimpconfig/gimpcolorconfig-enums.h
   trunk/libgimpwidgets/Makefile.am
   trunk/libgimpwidgets/gimpwidgetsenums.c
   trunk/po-libgimp/ChangeLog
   trunk/po-libgimp/de.po
   trunk/po/ChangeLog
   trunk/po/de.po
   trunk/tools/gimp-mkenums

Modified: trunk/app/base/Makefile.am
==============================================================================
--- trunk/app/base/Makefile.am	(original)
+++ trunk/app/base/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -92,7 +92,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/base-enums.h > xgen-bec \
 	&& cp xgen-bec $(@F) \
 	&& rm -f xgen-bec

Modified: trunk/app/base/base-enums.c
==============================================================================
--- trunk/app/base/base-enums.c	(original)
+++ trunk/app/base/base-enums.c	Thu Nov  6 08:28:28 2008
@@ -20,8 +20,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CURVE_SMOOTH, N_("Smooth"), NULL },
-    { GIMP_CURVE_FREE, N_("Freehand"), NULL },
+    { GIMP_CURVE_SMOOTH, NC_("curve-type", "Smooth"), NULL },
+    { GIMP_CURVE_FREE, NC_("curve-type", "Freehand"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -30,6 +30,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpCurveType", values);
+      gimp_type_set_translation_context (type, "curve-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -52,12 +53,12 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_HISTOGRAM_VALUE, N_("Value"), NULL },
-    { GIMP_HISTOGRAM_RED, N_("Red"), NULL },
-    { GIMP_HISTOGRAM_GREEN, N_("Green"), NULL },
-    { GIMP_HISTOGRAM_BLUE, N_("Blue"), NULL },
-    { GIMP_HISTOGRAM_ALPHA, N_("Alpha"), NULL },
-    { GIMP_HISTOGRAM_RGB, N_("RGB"), NULL },
+    { GIMP_HISTOGRAM_VALUE, NC_("histogram-channel", "Value"), NULL },
+    { GIMP_HISTOGRAM_RED, NC_("histogram-channel", "Red"), NULL },
+    { GIMP_HISTOGRAM_GREEN, NC_("histogram-channel", "Green"), NULL },
+    { GIMP_HISTOGRAM_BLUE, NC_("histogram-channel", "Blue"), NULL },
+    { GIMP_HISTOGRAM_ALPHA, NC_("histogram-channel", "Alpha"), NULL },
+    { GIMP_HISTOGRAM_RGB, NC_("histogram-channel", "RGB"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -66,6 +67,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpHistogramChannel", values);
+      gimp_type_set_translation_context (type, "histogram-channel");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -108,32 +110,32 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_NORMAL_MODE, N_("Normal"), NULL },
-    { GIMP_DISSOLVE_MODE, N_("Dissolve"), NULL },
-    { GIMP_BEHIND_MODE, N_("Behind"), NULL },
-    { GIMP_MULTIPLY_MODE, N_("Multiply"), NULL },
-    { GIMP_SCREEN_MODE, N_("Screen"), NULL },
-    { GIMP_OVERLAY_MODE, N_("Overlay"), NULL },
-    { GIMP_DIFFERENCE_MODE, N_("Difference"), NULL },
-    { GIMP_ADDITION_MODE, N_("Addition"), NULL },
-    { GIMP_SUBTRACT_MODE, N_("Subtract"), NULL },
-    { GIMP_DARKEN_ONLY_MODE, N_("Darken only"), NULL },
-    { GIMP_LIGHTEN_ONLY_MODE, N_("Lighten only"), NULL },
-    { GIMP_HUE_MODE, N_("Hue"), NULL },
-    { GIMP_SATURATION_MODE, N_("Saturation"), NULL },
-    { GIMP_COLOR_MODE, N_("Color"), NULL },
-    { GIMP_VALUE_MODE, N_("Value"), NULL },
-    { GIMP_DIVIDE_MODE, N_("Divide"), NULL },
-    { GIMP_DODGE_MODE, N_("Dodge"), NULL },
-    { GIMP_BURN_MODE, N_("Burn"), NULL },
-    { GIMP_HARDLIGHT_MODE, N_("Hard light"), NULL },
-    { GIMP_SOFTLIGHT_MODE, N_("Soft light"), NULL },
-    { GIMP_GRAIN_EXTRACT_MODE, N_("Grain extract"), NULL },
-    { GIMP_GRAIN_MERGE_MODE, N_("Grain merge"), NULL },
-    { GIMP_COLOR_ERASE_MODE, N_("Color erase"), NULL },
-    { GIMP_ERASE_MODE, N_("Erase"), NULL },
-    { GIMP_REPLACE_MODE, N_("Replace"), NULL },
-    { GIMP_ANTI_ERASE_MODE, N_("Anti erase"), NULL },
+    { GIMP_NORMAL_MODE, NC_("layer-mode-effects", "Normal"), NULL },
+    { GIMP_DISSOLVE_MODE, NC_("layer-mode-effects", "Dissolve"), NULL },
+    { GIMP_BEHIND_MODE, NC_("layer-mode-effects", "Behind"), NULL },
+    { GIMP_MULTIPLY_MODE, NC_("layer-mode-effects", "Multiply"), NULL },
+    { GIMP_SCREEN_MODE, NC_("layer-mode-effects", "Screen"), NULL },
+    { GIMP_OVERLAY_MODE, NC_("layer-mode-effects", "Overlay"), NULL },
+    { GIMP_DIFFERENCE_MODE, NC_("layer-mode-effects", "Difference"), NULL },
+    { GIMP_ADDITION_MODE, NC_("layer-mode-effects", "Addition"), NULL },
+    { GIMP_SUBTRACT_MODE, NC_("layer-mode-effects", "Subtract"), NULL },
+    { GIMP_DARKEN_ONLY_MODE, NC_("layer-mode-effects", "Darken only"), NULL },
+    { GIMP_LIGHTEN_ONLY_MODE, NC_("layer-mode-effects", "Lighten only"), NULL },
+    { GIMP_HUE_MODE, NC_("layer-mode-effects", "Hue"), NULL },
+    { GIMP_SATURATION_MODE, NC_("layer-mode-effects", "Saturation"), NULL },
+    { GIMP_COLOR_MODE, NC_("layer-mode-effects", "Color"), NULL },
+    { GIMP_VALUE_MODE, NC_("layer-mode-effects", "Value"), NULL },
+    { GIMP_DIVIDE_MODE, NC_("layer-mode-effects", "Divide"), NULL },
+    { GIMP_DODGE_MODE, NC_("layer-mode-effects", "Dodge"), NULL },
+    { GIMP_BURN_MODE, NC_("layer-mode-effects", "Burn"), NULL },
+    { GIMP_HARDLIGHT_MODE, NC_("layer-mode-effects", "Hard light"), NULL },
+    { GIMP_SOFTLIGHT_MODE, NC_("layer-mode-effects", "Soft light"), NULL },
+    { GIMP_GRAIN_EXTRACT_MODE, NC_("layer-mode-effects", "Grain extract"), NULL },
+    { GIMP_GRAIN_MERGE_MODE, NC_("layer-mode-effects", "Grain merge"), NULL },
+    { GIMP_COLOR_ERASE_MODE, NC_("layer-mode-effects", "Color erase"), NULL },
+    { GIMP_ERASE_MODE, NC_("layer-mode-effects", "Erase"), NULL },
+    { GIMP_REPLACE_MODE, NC_("layer-mode-effects", "Replace"), NULL },
+    { GIMP_ANTI_ERASE_MODE, NC_("layer-mode-effects", "Anti erase"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -142,6 +144,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpLayerModeEffects", values);
+      gimp_type_set_translation_context (type, "layer-mode-effects");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -180,6 +183,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpHueRange", values);
+      gimp_type_set_translation_context (type, "hue-range");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/core/Makefile.am
==============================================================================
--- trunk/app/core/Makefile.am	(original)
+++ trunk/app/core/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -375,7 +375,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/core-enums.h > xgen-cec \
 	&& cp xgen-cec $(@F) \
 	&& rm -f xgen-cec

Modified: trunk/app/core/core-enums.c
==============================================================================
--- trunk/app/core/core-enums.c	(original)
+++ trunk/app/core/core-enums.c	Thu Nov  6 08:28:28 2008
@@ -30,6 +30,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpContainerPolicy", values);
+      gimp_type_set_translation_context (type, "container-policy");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -50,10 +51,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_NO_DITHER, N_("None"), NULL },
-    { GIMP_FS_DITHER, N_("Floyd-Steinberg (normal)"), NULL },
-    { GIMP_FSLOWBLEED_DITHER, N_("Floyd-Steinberg (reduced color bleeding)"), NULL },
-    { GIMP_FIXED_DITHER, N_("Positioned"), NULL },
+    { GIMP_NO_DITHER, NC_("convert-dither-type", "None"), NULL },
+    { GIMP_FS_DITHER, NC_("convert-dither-type", "Floyd-Steinberg (normal)"), NULL },
+    { GIMP_FSLOWBLEED_DITHER, NC_("convert-dither-type", "Floyd-Steinberg (reduced color bleeding)"), NULL },
+    { GIMP_FIXED_DITHER, NC_("convert-dither-type", "Positioned"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -62,6 +63,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpConvertDitherType", values);
+      gimp_type_set_translation_context (type, "convert-dither-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -82,10 +84,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_MAKE_PALETTE, N_("Generate optimum palette"), NULL },
-    { GIMP_WEB_PALETTE, N_("Use web-optimized palette"), NULL },
-    { GIMP_MONO_PALETTE, N_("Use black and white (1-bit) palette"), NULL },
-    { GIMP_CUSTOM_PALETTE, N_("Use custom palette"), NULL },
+    { GIMP_MAKE_PALETTE, NC_("convert-palette-type", "Generate optimum palette"), NULL },
+    { GIMP_WEB_PALETTE, NC_("convert-palette-type", "Use web-optimized palette"), NULL },
+    { GIMP_MONO_PALETTE, NC_("convert-palette-type", "Use black and white (1-bit) palette"), NULL },
+    { GIMP_CUSTOM_PALETTE, NC_("convert-palette-type", "Use custom palette"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -94,6 +96,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpConvertPaletteType", values);
+      gimp_type_set_translation_context (type, "convert-palette-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -138,6 +141,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpGravityType", values);
+      gimp_type_set_translation_context (type, "gravity-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -186,6 +190,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpAlignmentType", values);
+      gimp_type_set_translation_context (type, "alignment-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -208,12 +213,12 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ALIGN_REFERENCE_FIRST, N_("First item"), NULL },
-    { GIMP_ALIGN_REFERENCE_IMAGE, N_("Image"), NULL },
-    { GIMP_ALIGN_REFERENCE_SELECTION, N_("Selection"), NULL },
-    { GIMP_ALIGN_REFERENCE_ACTIVE_LAYER, N_("Active layer"), NULL },
-    { GIMP_ALIGN_REFERENCE_ACTIVE_CHANNEL, N_("Active channel"), NULL },
-    { GIMP_ALIGN_REFERENCE_ACTIVE_PATH, N_("Active path"), NULL },
+    { GIMP_ALIGN_REFERENCE_FIRST, NC_("align-reference-type", "First item"), NULL },
+    { GIMP_ALIGN_REFERENCE_IMAGE, NC_("align-reference-type", "Image"), NULL },
+    { GIMP_ALIGN_REFERENCE_SELECTION, NC_("align-reference-type", "Selection"), NULL },
+    { GIMP_ALIGN_REFERENCE_ACTIVE_LAYER, NC_("align-reference-type", "Active layer"), NULL },
+    { GIMP_ALIGN_REFERENCE_ACTIVE_CHANNEL, NC_("align-reference-type", "Active channel"), NULL },
+    { GIMP_ALIGN_REFERENCE_ACTIVE_PATH, NC_("align-reference-type", "Active path"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -222,6 +227,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpAlignReferenceType", values);
+      gimp_type_set_translation_context (type, "align-reference-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -244,12 +250,12 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_FOREGROUND_FILL, N_("Foreground color"), NULL },
-    { GIMP_BACKGROUND_FILL, N_("Background color"), NULL },
-    { GIMP_WHITE_FILL, N_("White"), NULL },
-    { GIMP_TRANSPARENT_FILL, N_("Transparency"), NULL },
-    { GIMP_PATTERN_FILL, N_("Pattern"), NULL },
-    { GIMP_NO_FILL, N_("None"), NULL },
+    { GIMP_FOREGROUND_FILL, NC_("fill-type", "Foreground color"), NULL },
+    { GIMP_BACKGROUND_FILL, NC_("fill-type", "Background color"), NULL },
+    { GIMP_WHITE_FILL, NC_("fill-type", "White"), NULL },
+    { GIMP_TRANSPARENT_FILL, NC_("fill-type", "Transparency"), NULL },
+    { GIMP_PATTERN_FILL, NC_("fill-type", "Pattern"), NULL },
+    { GIMP_NO_FILL, NC_("fill-type", "None"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -258,6 +264,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpFillType", values);
+      gimp_type_set_translation_context (type, "fill-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -276,8 +283,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_FILL_STYLE_SOLID, N_("Solid color"), NULL },
-    { GIMP_FILL_STYLE_PATTERN, N_("Pattern"), NULL },
+    { GIMP_FILL_STYLE_SOLID, NC_("fill-style", "Solid color"), NULL },
+    { GIMP_FILL_STYLE_PATTERN, NC_("fill-style", "Pattern"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -286,6 +293,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpFillStyle", values);
+      gimp_type_set_translation_context (type, "fill-style");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -304,8 +312,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_STROKE_METHOD_LIBART, N_("Stroke line"), NULL },
-    { GIMP_STROKE_METHOD_PAINT_CORE, N_("Stroke with a paint tool"), NULL },
+    { GIMP_STROKE_METHOD_LIBART, NC_("stroke-method", "Stroke line"), NULL },
+    { GIMP_STROKE_METHOD_PAINT_CORE, NC_("stroke-method", "Stroke with a paint tool"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -314,6 +322,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpStrokeMethod", values);
+      gimp_type_set_translation_context (type, "stroke-method");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -333,9 +342,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_JOIN_MITER, N_("Miter"), NULL },
-    { GIMP_JOIN_ROUND, N_("Round"), NULL },
-    { GIMP_JOIN_BEVEL, N_("Bevel"), NULL },
+    { GIMP_JOIN_MITER, NC_("join-style", "Miter"), NULL },
+    { GIMP_JOIN_ROUND, NC_("join-style", "Round"), NULL },
+    { GIMP_JOIN_BEVEL, NC_("join-style", "Bevel"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -344,6 +353,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpJoinStyle", values);
+      gimp_type_set_translation_context (type, "join-style");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -363,9 +373,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CAP_BUTT, N_("Butt"), NULL },
-    { GIMP_CAP_ROUND, N_("Round"), NULL },
-    { GIMP_CAP_SQUARE, N_("Square"), NULL },
+    { GIMP_CAP_BUTT, NC_("cap-style", "Butt"), NULL },
+    { GIMP_CAP_ROUND, NC_("cap-style", "Round"), NULL },
+    { GIMP_CAP_SQUARE, NC_("cap-style", "Square"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -374,6 +384,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpCapStyle", values);
+      gimp_type_set_translation_context (type, "cap-style");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -401,17 +412,17 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_DASH_CUSTOM, N_("Custom"), NULL },
-    { GIMP_DASH_LINE, N_("Line"), NULL },
-    { GIMP_DASH_LONG_DASH, N_("Long dashes"), NULL },
-    { GIMP_DASH_MEDIUM_DASH, N_("Medium dashes"), NULL },
-    { GIMP_DASH_SHORT_DASH, N_("Short dashes"), NULL },
-    { GIMP_DASH_SPARSE_DOTS, N_("Sparse dots"), NULL },
-    { GIMP_DASH_NORMAL_DOTS, N_("Normal dots"), NULL },
-    { GIMP_DASH_DENSE_DOTS, N_("Dense dots"), NULL },
-    { GIMP_DASH_STIPPLES, N_("Stipples"), NULL },
-    { GIMP_DASH_DASH_DOT, N_("Dash, dot"), NULL },
-    { GIMP_DASH_DASH_DOT_DOT, N_("Dash, dot, dot"), NULL },
+    { GIMP_DASH_CUSTOM, NC_("dash-preset", "Custom"), NULL },
+    { GIMP_DASH_LINE, NC_("dash-preset", "Line"), NULL },
+    { GIMP_DASH_LONG_DASH, NC_("dash-preset", "Long dashes"), NULL },
+    { GIMP_DASH_MEDIUM_DASH, NC_("dash-preset", "Medium dashes"), NULL },
+    { GIMP_DASH_SHORT_DASH, NC_("dash-preset", "Short dashes"), NULL },
+    { GIMP_DASH_SPARSE_DOTS, NC_("dash-preset", "Sparse dots"), NULL },
+    { GIMP_DASH_NORMAL_DOTS, NC_("dash-preset", "Normal dots"), NULL },
+    { GIMP_DASH_DENSE_DOTS, NC_("dash-preset", "Dense dots"), NULL },
+    { GIMP_DASH_STIPPLES, NC_("dash-preset", "Stipples"), NULL },
+    { GIMP_DASH_DASH_DOT, NC_("dash-preset", "Dash, dot"), NULL },
+    { GIMP_DASH_DASH_DOT_DOT, NC_("dash-preset", "Dash, dot, dot"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -420,6 +431,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpDashPreset", values);
+      gimp_type_set_translation_context (type, "dash-preset");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -439,9 +451,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_BRUSH_GENERATED_CIRCLE, N_("Circle"), NULL },
-    { GIMP_BRUSH_GENERATED_SQUARE, N_("Square"), NULL },
-    { GIMP_BRUSH_GENERATED_DIAMOND, N_("Diamond"), NULL },
+    { GIMP_BRUSH_GENERATED_CIRCLE, NC_("brush-generated-shape", "Circle"), NULL },
+    { GIMP_BRUSH_GENERATED_SQUARE, NC_("brush-generated-shape", "Square"), NULL },
+    { GIMP_BRUSH_GENERATED_DIAMOND, NC_("brush-generated-shape", "Diamond"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -450,6 +462,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpBrushGeneratedShape", values);
+      gimp_type_set_translation_context (type, "brush-generated-shape");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -469,9 +482,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ORIENTATION_HORIZONTAL, N_("Horizontal"), NULL },
-    { GIMP_ORIENTATION_VERTICAL, N_("Vertical"), NULL },
-    { GIMP_ORIENTATION_UNKNOWN, N_("Unknown"), NULL },
+    { GIMP_ORIENTATION_HORIZONTAL, NC_("orientation-type", "Horizontal"), NULL },
+    { GIMP_ORIENTATION_VERTICAL, NC_("orientation-type", "Vertical"), NULL },
+    { GIMP_ORIENTATION_UNKNOWN, NC_("orientation-type", "Unknown"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -480,6 +493,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpOrientationType", values);
+      gimp_type_set_translation_context (type, "orientation-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -501,11 +515,11 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ITEM_SET_NONE, N_("None"), NULL },
-    { GIMP_ITEM_SET_ALL, N_("All layers"), NULL },
-    { GIMP_ITEM_SET_IMAGE_SIZED, N_("Image-sized layers"), NULL },
-    { GIMP_ITEM_SET_VISIBLE, N_("All visible layers"), NULL },
-    { GIMP_ITEM_SET_LINKED, N_("All linked layers"), NULL },
+    { GIMP_ITEM_SET_NONE, NC_("item-set", "None"), NULL },
+    { GIMP_ITEM_SET_ALL, NC_("item-set", "All layers"), NULL },
+    { GIMP_ITEM_SET_IMAGE_SIZED, NC_("item-set", "Image-sized layers"), NULL },
+    { GIMP_ITEM_SET_VISIBLE, NC_("item-set", "All visible layers"), NULL },
+    { GIMP_ITEM_SET_LINKED, NC_("item-set", "All linked layers"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -514,6 +528,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpItemSet", values);
+      gimp_type_set_translation_context (type, "item-set");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -544,6 +559,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpRotationType", values);
+      gimp_type_set_translation_context (type, "rotation-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -569,15 +585,15 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_VIEW_SIZE_TINY, N_("Tiny"), NULL },
-    { GIMP_VIEW_SIZE_EXTRA_SMALL, N_("Very small"), NULL },
-    { GIMP_VIEW_SIZE_SMALL, N_("Small"), NULL },
-    { GIMP_VIEW_SIZE_MEDIUM, N_("Medium"), NULL },
-    { GIMP_VIEW_SIZE_LARGE, N_("Large"), NULL },
-    { GIMP_VIEW_SIZE_EXTRA_LARGE, N_("Very large"), NULL },
-    { GIMP_VIEW_SIZE_HUGE, N_("Huge"), NULL },
-    { GIMP_VIEW_SIZE_ENORMOUS, N_("Enormous"), NULL },
-    { GIMP_VIEW_SIZE_GIGANTIC, N_("Gigantic"), NULL },
+    { GIMP_VIEW_SIZE_TINY, NC_("view-size", "Tiny"), NULL },
+    { GIMP_VIEW_SIZE_EXTRA_SMALL, NC_("view-size", "Very small"), NULL },
+    { GIMP_VIEW_SIZE_SMALL, NC_("view-size", "Small"), NULL },
+    { GIMP_VIEW_SIZE_MEDIUM, NC_("view-size", "Medium"), NULL },
+    { GIMP_VIEW_SIZE_LARGE, NC_("view-size", "Large"), NULL },
+    { GIMP_VIEW_SIZE_EXTRA_LARGE, NC_("view-size", "Very large"), NULL },
+    { GIMP_VIEW_SIZE_HUGE, NC_("view-size", "Huge"), NULL },
+    { GIMP_VIEW_SIZE_ENORMOUS, NC_("view-size", "Enormous"), NULL },
+    { GIMP_VIEW_SIZE_GIGANTIC, NC_("view-size", "Gigantic"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -586,6 +602,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpViewSize", values);
+      gimp_type_set_translation_context (type, "view-size");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -604,8 +621,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_VIEW_TYPE_LIST, N_("View as list"), NULL },
-    { GIMP_VIEW_TYPE_GRID, N_("View as grid"), NULL },
+    { GIMP_VIEW_TYPE_LIST, NC_("view-type", "View as list"), NULL },
+    { GIMP_VIEW_TYPE_GRID, NC_("view-type", "View as grid"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -614,6 +631,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpViewType", values);
+      gimp_type_set_translation_context (type, "view-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -650,6 +668,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpSelectionControl", values);
+      gimp_type_set_translation_context (type, "selection-control");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -669,9 +688,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_THUMBNAIL_SIZE_NONE, N_("No thumbnails"), NULL },
-    { GIMP_THUMBNAIL_SIZE_NORMAL, N_("Normal (128x128)"), NULL },
-    { GIMP_THUMBNAIL_SIZE_LARGE, N_("Large (256x256)"), NULL },
+    { GIMP_THUMBNAIL_SIZE_NONE, NC_("thumbnail-size", "No thumbnails"), NULL },
+    { GIMP_THUMBNAIL_SIZE_NORMAL, NC_("thumbnail-size", "Normal (128x128)"), NULL },
+    { GIMP_THUMBNAIL_SIZE_LARGE, NC_("thumbnail-size", "Large (256x256)"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -680,6 +699,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpThumbnailSize", values);
+      gimp_type_set_translation_context (type, "thumbnail-size");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -708,6 +728,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpUndoMode", values);
+      gimp_type_set_translation_context (type, "undo-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -748,6 +769,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpUndoEvent", values);
+      gimp_type_set_translation_context (type, "undo-event");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -847,89 +869,89 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_UNDO_GROUP_NONE, N_("<<invalid>>"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_SCALE, N_("Scale image"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_RESIZE, N_("Resize image"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_FLIP, N_("Flip image"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_ROTATE, N_("Rotate image"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_CROP, N_("Crop image"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_CONVERT, N_("Convert image"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, N_("Remove item"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, N_("Merge layers"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, N_("Merge paths"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, N_("Quick Mask"), NULL },
-    { GIMP_UNDO_GROUP_IMAGE_GRID, N_("Grid"), NULL },
-    { GIMP_UNDO_GROUP_GUIDE, N_("Guide"), NULL },
-    { GIMP_UNDO_GROUP_SAMPLE_POINT, N_("Sample Point"), NULL },
-    { GIMP_UNDO_GROUP_DRAWABLE, N_("Layer/Channel"), NULL },
-    { GIMP_UNDO_GROUP_DRAWABLE_MOD, N_("Layer/Channel modification"), NULL },
-    { GIMP_UNDO_GROUP_MASK, N_("Selection mask"), NULL },
-    { GIMP_UNDO_GROUP_ITEM_VISIBILITY, N_("Item visibility"), NULL },
-    { GIMP_UNDO_GROUP_ITEM_LINKED, N_("Link/Unlink item"), NULL },
-    { GIMP_UNDO_GROUP_ITEM_PROPERTIES, N_("Item properties"), NULL },
-    { GIMP_UNDO_GROUP_ITEM_DISPLACE, N_("Move item"), NULL },
-    { GIMP_UNDO_GROUP_ITEM_SCALE, N_("Scale item"), NULL },
-    { GIMP_UNDO_GROUP_ITEM_RESIZE, N_("Resize item"), NULL },
-    { GIMP_UNDO_GROUP_LAYER_ADD, N_("Add layer"), NULL },
-    { GIMP_UNDO_GROUP_LAYER_ADD_MASK, N_("Add layer mask"), NULL },
-    { GIMP_UNDO_GROUP_LAYER_APPLY_MASK, N_("Apply layer mask"), NULL },
-    { GIMP_UNDO_GROUP_FS_TO_LAYER, N_("Floating selection to layer"), NULL },
-    { GIMP_UNDO_GROUP_FS_FLOAT, N_("Float selection"), NULL },
-    { GIMP_UNDO_GROUP_FS_ANCHOR, N_("Anchor floating selection"), NULL },
-    { GIMP_UNDO_GROUP_FS_REMOVE, N_("Remove floating selection"), NULL },
-    { GIMP_UNDO_GROUP_EDIT_PASTE, N_("Paste"), NULL },
-    { GIMP_UNDO_GROUP_EDIT_CUT, N_("Cut"), NULL },
-    { GIMP_UNDO_GROUP_TEXT, N_("Text"), NULL },
-    { GIMP_UNDO_GROUP_TRANSFORM, N_("Transform"), NULL },
-    { GIMP_UNDO_GROUP_PAINT, N_("Paint"), NULL },
-    { GIMP_UNDO_GROUP_PARASITE_ATTACH, N_("Attach parasite"), NULL },
-    { GIMP_UNDO_GROUP_PARASITE_REMOVE, N_("Remove parasite"), NULL },
-    { GIMP_UNDO_GROUP_VECTORS_IMPORT, N_("Import paths"), NULL },
-    { GIMP_UNDO_GROUP_MISC, N_("Plug-In"), NULL },
-    { GIMP_UNDO_IMAGE_TYPE, N_("Image type"), NULL },
-    { GIMP_UNDO_IMAGE_SIZE, N_("Image size"), NULL },
-    { GIMP_UNDO_IMAGE_RESOLUTION, N_("Image resolution change"), NULL },
-    { GIMP_UNDO_IMAGE_GRID, N_("Grid"), NULL },
-    { GIMP_UNDO_IMAGE_COLORMAP, N_("Change indexed palette"), NULL },
-    { GIMP_UNDO_GUIDE, N_("Guide"), NULL },
-    { GIMP_UNDO_SAMPLE_POINT, N_("Sample Point"), NULL },
-    { GIMP_UNDO_DRAWABLE, N_("Layer/Channel"), NULL },
-    { GIMP_UNDO_DRAWABLE_MOD, N_("Layer/Channel modification"), NULL },
-    { GIMP_UNDO_MASK, N_("Selection mask"), NULL },
-    { GIMP_UNDO_ITEM_RENAME, N_("Rename item"), NULL },
-    { GIMP_UNDO_ITEM_DISPLACE, N_("Move item"), NULL },
-    { GIMP_UNDO_ITEM_VISIBILITY, N_("Item visibility"), NULL },
-    { GIMP_UNDO_ITEM_LINKED, N_("Link/Unlink item"), NULL },
-    { GIMP_UNDO_LAYER_ADD, N_("New layer"), NULL },
-    { GIMP_UNDO_LAYER_REMOVE, N_("Delete layer"), NULL },
-    { GIMP_UNDO_LAYER_REPOSITION, N_("Reposition layer"), NULL },
-    { GIMP_UNDO_LAYER_MODE, N_("Set layer mode"), NULL },
-    { GIMP_UNDO_LAYER_OPACITY, N_("Set layer opacity"), NULL },
-    { GIMP_UNDO_LAYER_LOCK_ALPHA, N_("Lock/Unlock alpha channel"), NULL },
-    { GIMP_UNDO_TEXT_LAYER, N_("Text layer"), NULL },
-    { GIMP_UNDO_TEXT_LAYER_MODIFIED, N_("Text layer modification"), NULL },
-    { GIMP_UNDO_LAYER_MASK_ADD, N_("Add layer mask"), NULL },
-    { GIMP_UNDO_LAYER_MASK_REMOVE, N_("Delete layer mask"), NULL },
-    { GIMP_UNDO_LAYER_MASK_APPLY, N_("Apply layer mask"), NULL },
-    { GIMP_UNDO_LAYER_MASK_SHOW, N_("Show layer mask"), NULL },
-    { GIMP_UNDO_CHANNEL_ADD, N_("New channel"), NULL },
-    { GIMP_UNDO_CHANNEL_REMOVE, N_("Delete channel"), NULL },
-    { GIMP_UNDO_CHANNEL_REPOSITION, N_("Reposition channel"), NULL },
-    { GIMP_UNDO_CHANNEL_COLOR, N_("Channel color"), NULL },
-    { GIMP_UNDO_VECTORS_ADD, N_("New path"), NULL },
-    { GIMP_UNDO_VECTORS_REMOVE, N_("Delete path"), NULL },
-    { GIMP_UNDO_VECTORS_MOD, N_("Path modification"), NULL },
-    { GIMP_UNDO_VECTORS_REPOSITION, N_("Reposition path"), NULL },
-    { GIMP_UNDO_FS_TO_LAYER, N_("Floating selection to layer"), NULL },
-    { GIMP_UNDO_FS_RIGOR, N_("Rigor floating selection"), NULL },
-    { GIMP_UNDO_FS_RELAX, N_("Relax floating selection"), NULL },
-    { GIMP_UNDO_TRANSFORM, N_("Transform"), NULL },
-    { GIMP_UNDO_PAINT, N_("Paint"), NULL },
-    { GIMP_UNDO_INK, N_("Ink"), NULL },
-    { GIMP_UNDO_FOREGROUND_SELECT, N_("Select foreground"), NULL },
-    { GIMP_UNDO_PARASITE_ATTACH, N_("Attach parasite"), NULL },
-    { GIMP_UNDO_PARASITE_REMOVE, N_("Remove parasite"), NULL },
-    { GIMP_UNDO_CANT, N_("Not undoable"), NULL },
+    { GIMP_UNDO_GROUP_NONE, NC_("undo-type", "<<invalid>>"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_SCALE, NC_("undo-type", "Scale image"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_RESIZE, NC_("undo-type", "Resize image"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_FLIP, NC_("undo-type", "Flip image"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_ROTATE, NC_("undo-type", "Rotate image"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_CROP, NC_("undo-type", "Crop image"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_CONVERT, NC_("undo-type", "Convert image"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, NC_("undo-type", "Remove item"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, NC_("undo-type", "Merge layers"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, NC_("undo-type", "Merge paths"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, NC_("undo-type", "Quick Mask"), NULL },
+    { GIMP_UNDO_GROUP_IMAGE_GRID, NC_("undo-type", "Grid"), NULL },
+    { GIMP_UNDO_GROUP_GUIDE, NC_("undo-type", "Guide"), NULL },
+    { GIMP_UNDO_GROUP_SAMPLE_POINT, NC_("undo-type", "Sample Point"), NULL },
+    { GIMP_UNDO_GROUP_DRAWABLE, NC_("undo-type", "Layer/Channel"), NULL },
+    { GIMP_UNDO_GROUP_DRAWABLE_MOD, NC_("undo-type", "Layer/Channel modification"), NULL },
+    { GIMP_UNDO_GROUP_MASK, NC_("undo-type", "Selection mask"), NULL },
+    { GIMP_UNDO_GROUP_ITEM_VISIBILITY, NC_("undo-type", "Item visibility"), NULL },
+    { GIMP_UNDO_GROUP_ITEM_LINKED, NC_("undo-type", "Link/Unlink item"), NULL },
+    { GIMP_UNDO_GROUP_ITEM_PROPERTIES, NC_("undo-type", "Item properties"), NULL },
+    { GIMP_UNDO_GROUP_ITEM_DISPLACE, NC_("undo-type", "Move item"), NULL },
+    { GIMP_UNDO_GROUP_ITEM_SCALE, NC_("undo-type", "Scale item"), NULL },
+    { GIMP_UNDO_GROUP_ITEM_RESIZE, NC_("undo-type", "Resize item"), NULL },
+    { GIMP_UNDO_GROUP_LAYER_ADD, NC_("undo-type", "Add layer"), NULL },
+    { GIMP_UNDO_GROUP_LAYER_ADD_MASK, NC_("undo-type", "Add layer mask"), NULL },
+    { GIMP_UNDO_GROUP_LAYER_APPLY_MASK, NC_("undo-type", "Apply layer mask"), NULL },
+    { GIMP_UNDO_GROUP_FS_TO_LAYER, NC_("undo-type", "Floating selection to layer"), NULL },
+    { GIMP_UNDO_GROUP_FS_FLOAT, NC_("undo-type", "Float selection"), NULL },
+    { GIMP_UNDO_GROUP_FS_ANCHOR, NC_("undo-type", "Anchor floating selection"), NULL },
+    { GIMP_UNDO_GROUP_FS_REMOVE, NC_("undo-type", "Remove floating selection"), NULL },
+    { GIMP_UNDO_GROUP_EDIT_PASTE, NC_("undo-type", "Paste"), NULL },
+    { GIMP_UNDO_GROUP_EDIT_CUT, NC_("undo-type", "Cut"), NULL },
+    { GIMP_UNDO_GROUP_TEXT, NC_("undo-type", "Text"), NULL },
+    { GIMP_UNDO_GROUP_TRANSFORM, NC_("undo-type", "Transform"), NULL },
+    { GIMP_UNDO_GROUP_PAINT, NC_("undo-type", "Paint"), NULL },
+    { GIMP_UNDO_GROUP_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },
+    { GIMP_UNDO_GROUP_PARASITE_REMOVE, NC_("undo-type", "Remove parasite"), NULL },
+    { GIMP_UNDO_GROUP_VECTORS_IMPORT, NC_("undo-type", "Import paths"), NULL },
+    { GIMP_UNDO_GROUP_MISC, NC_("undo-type", "Plug-In"), NULL },
+    { GIMP_UNDO_IMAGE_TYPE, NC_("undo-type", "Image type"), NULL },
+    { GIMP_UNDO_IMAGE_SIZE, NC_("undo-type", "Image size"), NULL },
+    { GIMP_UNDO_IMAGE_RESOLUTION, NC_("undo-type", "Image resolution change"), NULL },
+    { GIMP_UNDO_IMAGE_GRID, NC_("undo-type", "Grid"), NULL },
+    { GIMP_UNDO_IMAGE_COLORMAP, NC_("undo-type", "Change indexed palette"), NULL },
+    { GIMP_UNDO_GUIDE, NC_("undo-type", "Guide"), NULL },
+    { GIMP_UNDO_SAMPLE_POINT, NC_("undo-type", "Sample Point"), NULL },
+    { GIMP_UNDO_DRAWABLE, NC_("undo-type", "Layer/Channel"), NULL },
+    { GIMP_UNDO_DRAWABLE_MOD, NC_("undo-type", "Layer/Channel modification"), NULL },
+    { GIMP_UNDO_MASK, NC_("undo-type", "Selection mask"), NULL },
+    { GIMP_UNDO_ITEM_RENAME, NC_("undo-type", "Rename item"), NULL },
+    { GIMP_UNDO_ITEM_DISPLACE, NC_("undo-type", "Move item"), NULL },
+    { GIMP_UNDO_ITEM_VISIBILITY, NC_("undo-type", "Item visibility"), NULL },
+    { GIMP_UNDO_ITEM_LINKED, NC_("undo-type", "Link/Unlink item"), NULL },
+    { GIMP_UNDO_LAYER_ADD, NC_("undo-type", "New layer"), NULL },
+    { GIMP_UNDO_LAYER_REMOVE, NC_("undo-type", "Delete layer"), NULL },
+    { GIMP_UNDO_LAYER_REPOSITION, NC_("undo-type", "Reposition layer"), NULL },
+    { GIMP_UNDO_LAYER_MODE, NC_("undo-type", "Set layer mode"), NULL },
+    { GIMP_UNDO_LAYER_OPACITY, NC_("undo-type", "Set layer opacity"), NULL },
+    { GIMP_UNDO_LAYER_LOCK_ALPHA, NC_("undo-type", "Lock/Unlock alpha channel"), NULL },
+    { GIMP_UNDO_TEXT_LAYER, NC_("undo-type", "Text layer"), NULL },
+    { GIMP_UNDO_TEXT_LAYER_MODIFIED, NC_("undo-type", "Text layer modification"), NULL },
+    { GIMP_UNDO_LAYER_MASK_ADD, NC_("undo-type", "Add layer mask"), NULL },
+    { GIMP_UNDO_LAYER_MASK_REMOVE, NC_("undo-type", "Delete layer mask"), NULL },
+    { GIMP_UNDO_LAYER_MASK_APPLY, NC_("undo-type", "Apply layer mask"), NULL },
+    { GIMP_UNDO_LAYER_MASK_SHOW, NC_("undo-type", "Show layer mask"), NULL },
+    { GIMP_UNDO_CHANNEL_ADD, NC_("undo-type", "New channel"), NULL },
+    { GIMP_UNDO_CHANNEL_REMOVE, NC_("undo-type", "Delete channel"), NULL },
+    { GIMP_UNDO_CHANNEL_REPOSITION, NC_("undo-type", "Reposition channel"), NULL },
+    { GIMP_UNDO_CHANNEL_COLOR, NC_("undo-type", "Channel color"), NULL },
+    { GIMP_UNDO_VECTORS_ADD, NC_("undo-type", "New path"), NULL },
+    { GIMP_UNDO_VECTORS_REMOVE, NC_("undo-type", "Delete path"), NULL },
+    { GIMP_UNDO_VECTORS_MOD, NC_("undo-type", "Path modification"), NULL },
+    { GIMP_UNDO_VECTORS_REPOSITION, NC_("undo-type", "Reposition path"), NULL },
+    { GIMP_UNDO_FS_TO_LAYER, NC_("undo-type", "Floating selection to layer"), NULL },
+    { GIMP_UNDO_FS_RIGOR, NC_("undo-type", "Rigor floating selection"), NULL },
+    { GIMP_UNDO_FS_RELAX, NC_("undo-type", "Relax floating selection"), NULL },
+    { GIMP_UNDO_TRANSFORM, NC_("undo-type", "Transform"), NULL },
+    { GIMP_UNDO_PAINT, NC_("undo-type", "Paint"), NULL },
+    { GIMP_UNDO_INK, NC_("undo-type", "Ink"), NULL },
+    { GIMP_UNDO_FOREGROUND_SELECT, NC_("undo-type", "Select foreground"), NULL },
+    { GIMP_UNDO_PARASITE_ATTACH, NC_("undo-type", "Attach parasite"), NULL },
+    { GIMP_UNDO_PARASITE_REMOVE, NC_("undo-type", "Remove parasite"), NULL },
+    { GIMP_UNDO_CANT, NC_("undo-type", "Not undoable"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -938,6 +960,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpUndoType", values);
+      gimp_type_set_translation_context (type, "undo-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -984,6 +1007,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_flags_register_static ("GimpDirtyMask", values);
+      gimp_type_set_translation_context (type, "dirty-mask");
       gimp_flags_set_value_descriptions (type, descs);
     }
 
@@ -1012,6 +1036,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpOffsetType", values);
+      gimp_type_set_translation_context (type, "offset-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1046,6 +1071,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpGradientColor", values);
+      gimp_type_set_translation_context (type, "gradient-color");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1080,6 +1106,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpGradientSegmentType", values);
+      gimp_type_set_translation_context (type, "gradient-segment-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1110,6 +1137,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpGradientSegmentColor", values);
+      gimp_type_set_translation_context (type, "gradient-segment-color");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1138,6 +1166,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpMaskApplyMode", values);
+      gimp_type_set_translation_context (type, "mask-apply-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1170,6 +1199,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpMergeType", values);
+      gimp_type_set_translation_context (type, "merge-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1193,13 +1223,13 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_SELECT_CRITERION_COMPOSITE, N_("Composite"), NULL },
-    { GIMP_SELECT_CRITERION_R, N_("Red"), NULL },
-    { GIMP_SELECT_CRITERION_G, N_("Green"), NULL },
-    { GIMP_SELECT_CRITERION_B, N_("Blue"), NULL },
-    { GIMP_SELECT_CRITERION_H, N_("Hue"), NULL },
-    { GIMP_SELECT_CRITERION_S, N_("Saturation"), NULL },
-    { GIMP_SELECT_CRITERION_V, N_("Value"), NULL },
+    { GIMP_SELECT_CRITERION_COMPOSITE, NC_("select-criterion", "Composite"), NULL },
+    { GIMP_SELECT_CRITERION_R, NC_("select-criterion", "Red"), NULL },
+    { GIMP_SELECT_CRITERION_G, NC_("select-criterion", "Green"), NULL },
+    { GIMP_SELECT_CRITERION_B, NC_("select-criterion", "Blue"), NULL },
+    { GIMP_SELECT_CRITERION_H, NC_("select-criterion", "Hue"), NULL },
+    { GIMP_SELECT_CRITERION_S, NC_("select-criterion", "Saturation"), NULL },
+    { GIMP_SELECT_CRITERION_V, NC_("select-criterion", "Value"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -1208,6 +1238,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpSelectCriterion", values);
+      gimp_type_set_translation_context (type, "select-criterion");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1227,9 +1258,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_MESSAGE_INFO, N_("Message"), NULL },
-    { GIMP_MESSAGE_WARNING, N_("Warning"), NULL },
-    { GIMP_MESSAGE_ERROR, N_("Error"), NULL },
+    { GIMP_MESSAGE_INFO, NC_("message-severity", "Message"), NULL },
+    { GIMP_MESSAGE_WARNING, NC_("message-severity", "Warning"), NULL },
+    { GIMP_MESSAGE_ERROR, NC_("message-severity", "Error"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -1238,6 +1269,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpMessageSeverity", values);
+      gimp_type_set_translation_context (type, "message-severity");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1257,9 +1289,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_COLOR_PROFILE_POLICY_ASK, N_("Ask what to do"), NULL },
-    { GIMP_COLOR_PROFILE_POLICY_KEEP, N_("Keep embedded profile"), NULL },
-    { GIMP_COLOR_PROFILE_POLICY_CONVERT, N_("Convert to RGB workspace"), NULL },
+    { GIMP_COLOR_PROFILE_POLICY_ASK, NC_("color-profile-policy", "Ask what to do"), NULL },
+    { GIMP_COLOR_PROFILE_POLICY_KEEP, NC_("color-profile-policy", "Keep embedded profile"), NULL },
+    { GIMP_COLOR_PROFILE_POLICY_CONVERT, NC_("color-profile-policy", "Convert to RGB workspace"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -1268,6 +1300,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpColorProfilePolicy", values);
+      gimp_type_set_translation_context (type, "color-profile-policy");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/display/Makefile.am
==============================================================================
--- trunk/app/display/Makefile.am	(original)
+++ trunk/app/display/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -104,7 +104,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/display-enums.h > xgen-dec \
 	&& cp xgen-dec $(@F) \
 	&& rm -f xgen-dec

Modified: trunk/app/display/display-enums.c
==============================================================================
--- trunk/app/display/display-enums.c	(original)
+++ trunk/app/display/display-enums.c	Thu Nov  6 08:28:28 2008
@@ -21,9 +21,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CURSOR_MODE_TOOL_ICON, N_("Tool icon"), NULL },
-    { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, N_("Tool icon with crosshair"), NULL },
-    { GIMP_CURSOR_MODE_CROSSHAIR, N_("Crosshair only"), NULL },
+    { GIMP_CURSOR_MODE_TOOL_ICON, NC_("cursor-mode", "Tool icon"), NULL },
+    { GIMP_CURSOR_MODE_TOOL_CROSSHAIR, NC_("cursor-mode", "Tool icon with crosshair"), NULL },
+    { GIMP_CURSOR_MODE_CROSSHAIR, NC_("cursor-mode", "Crosshair only"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -32,6 +32,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpCursorMode", values);
+      gimp_type_set_translation_context (type, "cursor-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -62,6 +63,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpCursorPrecision", values);
+      gimp_type_set_translation_context (type, "cursor-precision");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -82,10 +84,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CANVAS_PADDING_MODE_DEFAULT, N_("From theme"), NULL },
-    { GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, N_("Light check color"), NULL },
-    { GIMP_CANVAS_PADDING_MODE_DARK_CHECK, N_("Dark check color"), NULL },
-    { GIMP_CANVAS_PADDING_MODE_CUSTOM, N_("Custom color"), NULL },
+    { GIMP_CANVAS_PADDING_MODE_DEFAULT, NC_("canvas-padding-mode", "From theme"), NULL },
+    { GIMP_CANVAS_PADDING_MODE_LIGHT_CHECK, NC_("canvas-padding-mode", "Light check color"), NULL },
+    { GIMP_CANVAS_PADDING_MODE_DARK_CHECK, NC_("canvas-padding-mode", "Dark check color"), NULL },
+    { GIMP_CANVAS_PADDING_MODE_CUSTOM, NC_("canvas-padding-mode", "Custom color"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -94,6 +96,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpCanvasPaddingMode", values);
+      gimp_type_set_translation_context (type, "canvas-padding-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -113,9 +116,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_SPACE_BAR_ACTION_NONE, N_("No action"), NULL },
-    { GIMP_SPACE_BAR_ACTION_PAN, N_("Pan view"), NULL },
-    { GIMP_SPACE_BAR_ACTION_MOVE, N_("Switch to Move tool"), NULL },
+    { GIMP_SPACE_BAR_ACTION_NONE, NC_("space-bar-action", "No action"), NULL },
+    { GIMP_SPACE_BAR_ACTION_PAN, NC_("space-bar-action", "Pan view"), NULL },
+    { GIMP_SPACE_BAR_ACTION_MOVE, NC_("space-bar-action", "Switch to Move tool"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -124,6 +127,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpSpaceBarAction", values);
+      gimp_type_set_translation_context (type, "space-bar-action");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -142,8 +146,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ZOOM_QUALITY_LOW, N_("quality|Low"), NULL },
-    { GIMP_ZOOM_QUALITY_HIGH, N_("quality|High"), NULL },
+    { GIMP_ZOOM_QUALITY_LOW, NC_("zoom-quality", "Low"), NULL },
+    { GIMP_ZOOM_QUALITY_HIGH, NC_("zoom-quality", "High"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -152,6 +156,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpZoomQuality", values);
+      gimp_type_set_translation_context (type, "zoom-quality");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -182,6 +187,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpZoomFocus", values);
+      gimp_type_set_translation_context (type, "zoom-focus");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/display/display-enums.h
==============================================================================
--- trunk/app/display/display-enums.h	(original)
+++ trunk/app/display/display-enums.h	Thu Nov  6 08:28:28 2008
@@ -76,8 +76,8 @@
 
 typedef enum
 {
-  GIMP_ZOOM_QUALITY_LOW,   /*< desc="quality|Low"  >*/
-  GIMP_ZOOM_QUALITY_HIGH   /*< desc="quality|High" >*/
+  GIMP_ZOOM_QUALITY_LOW,   /*< desc="Low"  >*/
+  GIMP_ZOOM_QUALITY_HIGH   /*< desc="High" >*/
 } GimpZoomQuality;
 
 

Modified: trunk/app/paint/Makefile.am
==============================================================================
--- trunk/app/paint/Makefile.am	(original)
+++ trunk/app/paint/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -101,7 +101,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/paint-enums.h > xgen-pec \
 	&& cp xgen-pec $(@F) \
 	&& rm -f xgen-pec

Modified: trunk/app/paint/paint-enums.c
==============================================================================
--- trunk/app/paint/paint-enums.c	(original)
+++ trunk/app/paint/paint-enums.c	Thu Nov  6 08:28:28 2008
@@ -30,6 +30,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpBrushApplicationMode", values);
+      gimp_type_set_translation_context (type, "brush-application-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -48,8 +49,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_PERSPECTIVE_CLONE_MODE_ADJUST, N_("Modify Perspective"), NULL },
-    { GIMP_PERSPECTIVE_CLONE_MODE_PAINT, N_("Perspective Clone"), NULL },
+    { GIMP_PERSPECTIVE_CLONE_MODE_ADJUST, NC_("perspective-clone-mode", "Modify Perspective"), NULL },
+    { GIMP_PERSPECTIVE_CLONE_MODE_PAINT, NC_("perspective-clone-mode", "Perspective Clone"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -58,6 +59,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpPerspectiveCloneMode", values);
+      gimp_type_set_translation_context (type, "perspective-clone-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -78,10 +80,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_SOURCE_ALIGN_NO, N_("None"), NULL },
-    { GIMP_SOURCE_ALIGN_YES, N_("Aligned"), NULL },
-    { GIMP_SOURCE_ALIGN_REGISTERED, N_("Registered"), NULL },
-    { GIMP_SOURCE_ALIGN_FIXED, N_("Fixed"), NULL },
+    { GIMP_SOURCE_ALIGN_NO, NC_("source-align-mode", "None"), NULL },
+    { GIMP_SOURCE_ALIGN_YES, NC_("source-align-mode", "Aligned"), NULL },
+    { GIMP_SOURCE_ALIGN_REGISTERED, NC_("source-align-mode", "Registered"), NULL },
+    { GIMP_SOURCE_ALIGN_FIXED, NC_("source-align-mode", "Fixed"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -90,6 +92,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpSourceAlignMode", values);
+      gimp_type_set_translation_context (type, "source-align-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -108,8 +111,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_BLUR_CONVOLVE, N_("Blur"), NULL },
-    { GIMP_SHARPEN_CONVOLVE, N_("Sharpen"), NULL },
+    { GIMP_BLUR_CONVOLVE, NC_("convolve-type", "Blur"), NULL },
+    { GIMP_SHARPEN_CONVOLVE, NC_("convolve-type", "Sharpen"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -118,6 +121,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpConvolveType", values);
+      gimp_type_set_translation_context (type, "convolve-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -148,6 +152,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpInkBlobType", values);
+      gimp_type_set_translation_context (type, "ink-blob-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/plug-in/Makefile.am
==============================================================================
--- trunk/app/plug-in/Makefile.am	(original)
+++ trunk/app/plug-in/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -96,7 +96,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/plug-in-enums.h > xgen-bec \
 	&& cp xgen-bec $(@F) \
 	&& rm -f xgen-bec

Modified: trunk/app/plug-in/plug-in-enums.c
==============================================================================
--- trunk/app/plug-in/plug-in-enums.c	(original)
+++ trunk/app/plug-in/plug-in-enums.c	Thu Nov  6 08:28:28 2008
@@ -38,6 +38,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_flags_register_static ("GimpPlugInImageType", values);
+      gimp_type_set_translation_context (type, "plug-in-image-type");
       gimp_flags_set_value_descriptions (type, descs);
     }
 
@@ -70,6 +71,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpPlugInCallMode", values);
+      gimp_type_set_translation_context (type, "plug-in-call-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/text/Makefile.am
==============================================================================
--- trunk/app/text/Makefile.am	(original)
+++ trunk/app/text/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -71,7 +71,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/text-enums.h > xgen-tec \
 	&& cp xgen-tec $(@F) \
 	&& rm -f xgen-tec

Modified: trunk/app/text/text-enums.c
==============================================================================
--- trunk/app/text/text-enums.c	(original)
+++ trunk/app/text/text-enums.c	Thu Nov  6 08:28:28 2008
@@ -30,6 +30,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpTextBoxMode", values);
+      gimp_type_set_translation_context (type, "text-box-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -60,6 +61,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpTextOutline", values);
+      gimp_type_set_translation_context (type, "text-outline");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/tools/Makefile.am
==============================================================================
--- trunk/app/tools/Makefile.am	(original)
+++ trunk/app/tools/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -213,7 +213,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/tools-enums.h > xgen-tec \
 	&& cp xgen-tec $(@F) \
 	&& rm -f xgen-tec

Modified: trunk/app/tools/tools-enums.c
==============================================================================
--- trunk/app/tools/tools-enums.c	(original)
+++ trunk/app/tools/tools-enums.c	Thu Nov  6 08:28:28 2008
@@ -35,6 +35,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpButtonReleaseType", values);
+      gimp_type_set_translation_context (type, "button-release-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -55,10 +56,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RECTANGLE_GUIDE_NONE, N_("No guides"), NULL },
-    { GIMP_RECTANGLE_GUIDE_CENTER_LINES, N_("Center lines"), NULL },
-    { GIMP_RECTANGLE_GUIDE_THIRDS, N_("Rule of thirds"), NULL },
-    { GIMP_RECTANGLE_GUIDE_GOLDEN, N_("Golden sections"), NULL },
+    { GIMP_RECTANGLE_GUIDE_NONE, NC_("rectangle-guide", "No guides"), NULL },
+    { GIMP_RECTANGLE_GUIDE_CENTER_LINES, NC_("rectangle-guide", "Center lines"), NULL },
+    { GIMP_RECTANGLE_GUIDE_THIRDS, NC_("rectangle-guide", "Rule of thirds"), NULL },
+    { GIMP_RECTANGLE_GUIDE_GOLDEN, NC_("rectangle-guide", "Golden sections"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -67,6 +68,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpRectangleGuide", values);
+      gimp_type_set_translation_context (type, "rectangle-guide");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -97,6 +99,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpRectangleConstraint", values);
+      gimp_type_set_translation_context (type, "rectangle-constraint");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -125,6 +128,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpRectanglePrecision", values);
+      gimp_type_set_translation_context (type, "rectangle-precision");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -145,10 +149,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RECTANGLE_TOOL_FIXED_ASPECT, N_("Aspect ratio"), NULL },
-    { GIMP_RECTANGLE_TOOL_FIXED_WIDTH, N_("Width"), NULL },
-    { GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, N_("Height"), NULL },
-    { GIMP_RECTANGLE_TOOL_FIXED_SIZE, N_("Size"), NULL },
+    { GIMP_RECTANGLE_TOOL_FIXED_ASPECT, NC_("rectangle-tool-fixed-rule", "Aspect ratio"), NULL },
+    { GIMP_RECTANGLE_TOOL_FIXED_WIDTH, NC_("rectangle-tool-fixed-rule", "Width"), NULL },
+    { GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, NC_("rectangle-tool-fixed-rule", "Height"), NULL },
+    { GIMP_RECTANGLE_TOOL_FIXED_SIZE, NC_("rectangle-tool-fixed-rule", "Size"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -157,6 +161,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpRectangleToolFixedRule", values);
+      gimp_type_set_translation_context (type, "rectangle-tool-fixed-rule");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -176,9 +181,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RECT_SELECT_MODE_FREE, N_("Free select"), NULL },
-    { GIMP_RECT_SELECT_MODE_FIXED_SIZE, N_("Fixed size"), NULL },
-    { GIMP_RECT_SELECT_MODE_FIXED_RATIO, N_("Fixed aspect ratio"), NULL },
+    { GIMP_RECT_SELECT_MODE_FREE, NC_("rect-select-mode", "Free select"), NULL },
+    { GIMP_RECT_SELECT_MODE_FIXED_SIZE, NC_("rect-select-mode", "Fixed size"), NULL },
+    { GIMP_RECT_SELECT_MODE_FIXED_RATIO, NC_("rect-select-mode", "Fixed aspect ratio"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -187,6 +192,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpRectSelectMode", values);
+      gimp_type_set_translation_context (type, "rect-select-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -206,9 +212,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TRANSFORM_TYPE_LAYER, N_("Layer"), NULL },
-    { GIMP_TRANSFORM_TYPE_SELECTION, N_("Selection"), NULL },
-    { GIMP_TRANSFORM_TYPE_PATH, N_("Path"), NULL },
+    { GIMP_TRANSFORM_TYPE_LAYER, NC_("transform-type", "Layer"), NULL },
+    { GIMP_TRANSFORM_TYPE_SELECTION, NC_("transform-type", "Selection"), NULL },
+    { GIMP_TRANSFORM_TYPE_PATH, NC_("transform-type", "Path"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -217,6 +223,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpTransformType", values);
+      gimp_type_set_translation_context (type, "transform-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -237,10 +244,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TRANSFORM_PREVIEW_TYPE_OUTLINE, N_("Outline"), NULL },
-    { GIMP_TRANSFORM_PREVIEW_TYPE_GRID, N_("Grid"), NULL },
-    { GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE, N_("Image"), NULL },
-    { GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE_GRID, N_("Image + Grid"), NULL },
+    { GIMP_TRANSFORM_PREVIEW_TYPE_OUTLINE, NC_("transform-preview-type", "Outline"), NULL },
+    { GIMP_TRANSFORM_PREVIEW_TYPE_GRID, NC_("transform-preview-type", "Grid"), NULL },
+    { GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE, NC_("transform-preview-type", "Image"), NULL },
+    { GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE_GRID, NC_("transform-preview-type", "Image + Grid"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -249,6 +256,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpTransformPreviewType", values);
+      gimp_type_set_translation_context (type, "transform-preview-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -267,8 +275,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TRANSFORM_GRID_TYPE_N_LINES, N_("Number of grid lines"), NULL },
-    { GIMP_TRANSFORM_GRID_TYPE_SPACING, N_("Grid line spacing"), NULL },
+    { GIMP_TRANSFORM_GRID_TYPE_N_LINES, NC_("transform-grid-type", "Number of grid lines"), NULL },
+    { GIMP_TRANSFORM_GRID_TYPE_SPACING, NC_("transform-grid-type", "Grid line spacing"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -277,6 +285,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpTransformGridType", values);
+      gimp_type_set_translation_context (type, "transform-grid-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -296,9 +305,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_VECTOR_MODE_DESIGN, N_("Design"), NULL },
-    { GIMP_VECTOR_MODE_EDIT, N_("Edit"), NULL },
-    { GIMP_VECTOR_MODE_MOVE, N_("Move"), NULL },
+    { GIMP_VECTOR_MODE_DESIGN, NC_("vector-mode", "Design"), NULL },
+    { GIMP_VECTOR_MODE_EDIT, NC_("vector-mode", "Edit"), NULL },
+    { GIMP_VECTOR_MODE_MOVE, NC_("vector-mode", "Move"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -307,6 +316,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpVectorMode", values);
+      gimp_type_set_translation_context (type, "vector-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/app/widgets/Makefile.am
==============================================================================
--- trunk/app/widgets/Makefile.am	(original)
+++ trunk/app/widgets/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -375,7 +375,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/widgets-enums.h > xgen-wec \
 	&& cp xgen-wec $(@F) \
 	&& rm -f xgen-wec

Modified: trunk/app/widgets/widgets-enums.c
==============================================================================
--- trunk/app/widgets/widgets-enums.c	(original)
+++ trunk/app/widgets/widgets-enums.c	Thu Nov  6 08:28:28 2008
@@ -20,8 +20,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ACTIVE_COLOR_FOREGROUND, N_("Foreground"), NULL },
-    { GIMP_ACTIVE_COLOR_BACKGROUND, N_("Background"), NULL },
+    { GIMP_ACTIVE_COLOR_FOREGROUND, NC_("active-color", "Foreground"), NULL },
+    { GIMP_ACTIVE_COLOR_BACKGROUND, NC_("active-color", "Background"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -30,6 +30,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpActiveColor", values);
+      gimp_type_set_translation_context (type, "active-color");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -60,6 +61,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpColorDialogState", values);
+      gimp_type_set_translation_context (type, "color-dialog-state");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -80,10 +82,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_COLOR_FRAME_MODE_PIXEL, N_("Pixel"), NULL },
-    { GIMP_COLOR_FRAME_MODE_RGB, N_("RGB"), NULL },
-    { GIMP_COLOR_FRAME_MODE_HSV, N_("HSV"), NULL },
-    { GIMP_COLOR_FRAME_MODE_CMYK, N_("CMYK"), NULL },
+    { GIMP_COLOR_FRAME_MODE_PIXEL, NC_("color-frame-mode", "Pixel"), NULL },
+    { GIMP_COLOR_FRAME_MODE_RGB, NC_("color-frame-mode", "RGB"), NULL },
+    { GIMP_COLOR_FRAME_MODE_HSV, NC_("color-frame-mode", "HSV"), NULL },
+    { GIMP_COLOR_FRAME_MODE_CMYK, NC_("color-frame-mode", "CMYK"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -92,6 +94,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpColorFrameMode", values);
+      gimp_type_set_translation_context (type, "color-frame-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -112,10 +115,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_COLOR_PICK_MODE_NONE, N_("Pick only"), NULL },
-    { GIMP_COLOR_PICK_MODE_FOREGROUND, N_("Set foreground color"), NULL },
-    { GIMP_COLOR_PICK_MODE_BACKGROUND, N_("Set background color"), NULL },
-    { GIMP_COLOR_PICK_MODE_PALETTE, N_("Add to palette"), NULL },
+    { GIMP_COLOR_PICK_MODE_NONE, NC_("color-pick-mode", "Pick only"), NULL },
+    { GIMP_COLOR_PICK_MODE_FOREGROUND, NC_("color-pick-mode", "Set foreground color"), NULL },
+    { GIMP_COLOR_PICK_MODE_BACKGROUND, NC_("color-pick-mode", "Set background color"), NULL },
+    { GIMP_COLOR_PICK_MODE_PALETTE, NC_("color-pick-mode", "Add to palette"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -124,6 +127,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpColorPickMode", values);
+      gimp_type_set_translation_context (type, "color-pick-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -152,6 +156,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpColorPickState", values);
+      gimp_type_set_translation_context (type, "color-pick-state");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -170,8 +175,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CURSOR_FORMAT_BITMAP, N_("Black & white"), NULL },
-    { GIMP_CURSOR_FORMAT_PIXBUF, N_("Fancy"), NULL },
+    { GIMP_CURSOR_FORMAT_BITMAP, NC_("cursor-format", "Black & white"), NULL },
+    { GIMP_CURSOR_FORMAT_PIXBUF, NC_("cursor-format", "Fancy"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -180,6 +185,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpCursorFormat", values);
+      gimp_type_set_translation_context (type, "cursor-format");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -198,8 +204,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_HELP_BROWSER_GIMP, N_("GIMP help browser"), NULL },
-    { GIMP_HELP_BROWSER_WEB_BROWSER, N_("Web browser"), NULL },
+    { GIMP_HELP_BROWSER_GIMP, NC_("help-browser-type", "GIMP help browser"), NULL },
+    { GIMP_HELP_BROWSER_WEB_BROWSER, NC_("help-browser-type", "Web browser"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -208,6 +214,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpHelpBrowserType", values);
+      gimp_type_set_translation_context (type, "help-browser-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -226,8 +233,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_HISTOGRAM_SCALE_LINEAR, N_("Linear histogram"), NULL },
-    { GIMP_HISTOGRAM_SCALE_LOGARITHMIC, N_("Logarithmic histogram"), NULL },
+    { GIMP_HISTOGRAM_SCALE_LINEAR, NC_("histogram-scale", "Linear histogram"), NULL },
+    { GIMP_HISTOGRAM_SCALE_LOGARITHMIC, NC_("histogram-scale", "Logarithmic histogram"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -236,6 +243,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpHistogramScale", values);
+      gimp_type_set_translation_context (type, "histogram-scale");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -260,14 +268,14 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TAB_STYLE_ICON, N_("Icon"), NULL },
-    { GIMP_TAB_STYLE_PREVIEW, N_("Current status"), NULL },
-    { GIMP_TAB_STYLE_NAME, N_("Text"), NULL },
-    { GIMP_TAB_STYLE_BLURB, N_("Description"), NULL },
-    { GIMP_TAB_STYLE_ICON_NAME, N_("Icon & text"), NULL },
-    { GIMP_TAB_STYLE_ICON_BLURB, N_("Icon & desc"), NULL },
-    { GIMP_TAB_STYLE_PREVIEW_NAME, N_("Status & text"), NULL },
-    { GIMP_TAB_STYLE_PREVIEW_BLURB, N_("Status & desc"), NULL },
+    { GIMP_TAB_STYLE_ICON, NC_("tab-style", "Icon"), NULL },
+    { GIMP_TAB_STYLE_PREVIEW, NC_("tab-style", "Current status"), NULL },
+    { GIMP_TAB_STYLE_NAME, NC_("tab-style", "Text"), NULL },
+    { GIMP_TAB_STYLE_BLURB, NC_("tab-style", "Description"), NULL },
+    { GIMP_TAB_STYLE_ICON_NAME, NC_("tab-style", "Icon & text"), NULL },
+    { GIMP_TAB_STYLE_ICON_BLURB, NC_("tab-style", "Icon & desc"), NULL },
+    { GIMP_TAB_STYLE_PREVIEW_NAME, NC_("tab-style", "Status & text"), NULL },
+    { GIMP_TAB_STYLE_PREVIEW_BLURB, NC_("tab-style", "Status & desc"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -276,6 +284,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpTabStyle", values);
+      gimp_type_set_translation_context (type, "tab-style");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -295,9 +304,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_WINDOW_HINT_NORMAL, N_("Normal window"), NULL },
-    { GIMP_WINDOW_HINT_UTILITY, N_("Utility window"), NULL },
-    { GIMP_WINDOW_HINT_KEEP_ABOVE, N_("Keep above"), NULL },
+    { GIMP_WINDOW_HINT_NORMAL, NC_("window-hint", "Normal window"), NULL },
+    { GIMP_WINDOW_HINT_UTILITY, NC_("window-hint", "Utility window"), NULL },
+    { GIMP_WINDOW_HINT_KEEP_ABOVE, NC_("window-hint", "Keep above"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -306,6 +315,7 @@
   if (G_UNLIKELY (! type))
     {
       type = g_enum_register_static ("GimpWindowHint", values);
+      gimp_type_set_translation_context (type, "window-hint");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/libgimp/Makefile.am
==============================================================================
--- trunk/libgimp/Makefile.am	(original)
+++ trunk/libgimp/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -395,7 +395,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/gimpenums.h > xgen-cec \
 	&& cat $(srcdir)/gimpenums.c.tail >> xgen-cec \
 	&& cp xgen-cec $(@F) \

Modified: trunk/libgimp/libgimp-intl.h
==============================================================================
--- trunk/libgimp/libgimp-intl.h	(original)
+++ trunk/libgimp/libgimp-intl.h	Thu Nov  6 08:28:28 2008
@@ -39,11 +39,8 @@
 #undef ngettext
 #define ngettext(String1, String2, number) dngettext (GETTEXT_PACKAGE "-libgimp", String1, String2, number)
 
-#ifdef gettext_noop
-#    define N_(String) gettext_noop (String)
-#else
-#    define N_(String) (String)
-#endif
+#define N_(String) (String)
+#define NC_(Context,String) (String)
 
 
 #endif /* __LIBGIMP_INTL_H__ */

Modified: trunk/libgimpbase/Makefile.am
==============================================================================
--- trunk/libgimpbase/Makefile.am	(original)
+++ trunk/libgimpbase/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -193,7 +193,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/gimpbaseenums.h > xgen-bec \
 	&& cp xgen-bec $(@F) \
 	&& rm -f xgen-bec

Modified: trunk/libgimpbase/gimpbase.def
==============================================================================
--- trunk/libgimpbase/gimpbase.def	(original)
+++ trunk/libgimpbase/gimpbase.def	Thu Nov  6 08:28:28 2008
@@ -99,6 +99,8 @@
 	gimp_transfer_mode_get_type
 	gimp_transform_direction_get_type
 	gimp_transform_resize_get_type
+	gimp_type_get_translation_context
+	gimp_type_set_translation_context
 	gimp_type_get_translation_domain
 	gimp_type_set_translation_domain
 	gimp_unit_get_abbreviation

Modified: trunk/libgimpbase/gimpbaseenums.c
==============================================================================
--- trunk/libgimpbase/gimpbaseenums.c	(original)
+++ trunk/libgimpbase/gimpbaseenums.c	Thu Nov  6 08:28:28 2008
@@ -25,13 +25,13 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ADD_WHITE_MASK, N_("_White (full opacity)"), NULL },
-    { GIMP_ADD_BLACK_MASK, N_("_Black (full transparency)"), NULL },
-    { GIMP_ADD_ALPHA_MASK, N_("Layer's _alpha channel"), NULL },
-    { GIMP_ADD_ALPHA_TRANSFER_MASK, N_("_Transfer layer's alpha channel"), NULL },
-    { GIMP_ADD_SELECTION_MASK, N_("_Selection"), NULL },
-    { GIMP_ADD_COPY_MASK, N_("_Grayscale copy of layer"), NULL },
-    { GIMP_ADD_CHANNEL_MASK, N_("C_hannel"), NULL },
+    { GIMP_ADD_WHITE_MASK, NC_("add-mask-type", "_White (full opacity)"), NULL },
+    { GIMP_ADD_BLACK_MASK, NC_("add-mask-type", "_Black (full transparency)"), NULL },
+    { GIMP_ADD_ALPHA_MASK, NC_("add-mask-type", "Layer's _alpha channel"), NULL },
+    { GIMP_ADD_ALPHA_TRANSFER_MASK, NC_("add-mask-type", "_Transfer layer's alpha channel"), NULL },
+    { GIMP_ADD_SELECTION_MASK, NC_("add-mask-type", "_Selection"), NULL },
+    { GIMP_ADD_COPY_MASK, NC_("add-mask-type", "_Grayscale copy of layer"), NULL },
+    { GIMP_ADD_CHANNEL_MASK, NC_("add-mask-type", "C_hannel"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -41,6 +41,7 @@
     {
       type = g_enum_register_static ("GimpAddMaskType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "add-mask-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -61,10 +62,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_FG_BG_RGB_MODE, N_("FG to BG (RGB)"), NULL },
-    { GIMP_FG_BG_HSV_MODE, N_("FG to BG (HSV)"), NULL },
-    { GIMP_FG_TRANSPARENT_MODE, N_("FG to transparent"), NULL },
-    { GIMP_CUSTOM_MODE, N_("Custom gradient"), NULL },
+    { GIMP_FG_BG_RGB_MODE, NC_("blend-mode", "FG to BG (RGB)"), NULL },
+    { GIMP_FG_BG_HSV_MODE, NC_("blend-mode", "FG to BG (HSV)"), NULL },
+    { GIMP_FG_TRANSPARENT_MODE, NC_("blend-mode", "FG to transparent"), NULL },
+    { GIMP_CUSTOM_MODE, NC_("blend-mode", "Custom gradient"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -74,6 +75,7 @@
     {
       type = g_enum_register_static ("GimpBlendMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "blend-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -93,9 +95,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_FG_BUCKET_FILL, N_("FG color fill"), NULL },
-    { GIMP_BG_BUCKET_FILL, N_("BG color fill"), NULL },
-    { GIMP_PATTERN_BUCKET_FILL, N_("Pattern fill"), NULL },
+    { GIMP_FG_BUCKET_FILL, NC_("bucket-fill-mode", "FG color fill"), NULL },
+    { GIMP_BG_BUCKET_FILL, NC_("bucket-fill-mode", "BG color fill"), NULL },
+    { GIMP_PATTERN_BUCKET_FILL, NC_("bucket-fill-mode", "Pattern fill"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -105,6 +107,7 @@
     {
       type = g_enum_register_static ("GimpBucketFillMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "bucket-fill-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -125,10 +128,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CHANNEL_OP_ADD, N_("Add to the current selection"), NULL },
-    { GIMP_CHANNEL_OP_SUBTRACT, N_("Subtract from the current selection"), NULL },
-    { GIMP_CHANNEL_OP_REPLACE, N_("Replace the current selection"), NULL },
-    { GIMP_CHANNEL_OP_INTERSECT, N_("Intersect with the current selection"), NULL },
+    { GIMP_CHANNEL_OP_ADD, NC_("channel-ops", "Add to the current selection"), NULL },
+    { GIMP_CHANNEL_OP_SUBTRACT, NC_("channel-ops", "Subtract from the current selection"), NULL },
+    { GIMP_CHANNEL_OP_REPLACE, NC_("channel-ops", "Replace the current selection"), NULL },
+    { GIMP_CHANNEL_OP_INTERSECT, NC_("channel-ops", "Intersect with the current selection"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -138,6 +141,7 @@
     {
       type = g_enum_register_static ("GimpChannelOps", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "channel-ops");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -160,12 +164,12 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RED_CHANNEL, N_("Red"), NULL },
-    { GIMP_GREEN_CHANNEL, N_("Green"), NULL },
-    { GIMP_BLUE_CHANNEL, N_("Blue"), NULL },
-    { GIMP_GRAY_CHANNEL, N_("Gray"), NULL },
-    { GIMP_INDEXED_CHANNEL, N_("Indexed"), NULL },
-    { GIMP_ALPHA_CHANNEL, N_("Alpha"), NULL },
+    { GIMP_RED_CHANNEL, NC_("channel-type", "Red"), NULL },
+    { GIMP_GREEN_CHANNEL, NC_("channel-type", "Green"), NULL },
+    { GIMP_BLUE_CHANNEL, NC_("channel-type", "Blue"), NULL },
+    { GIMP_GRAY_CHANNEL, NC_("channel-type", "Gray"), NULL },
+    { GIMP_INDEXED_CHANNEL, NC_("channel-type", "Indexed"), NULL },
+    { GIMP_ALPHA_CHANNEL, NC_("channel-type", "Alpha"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -175,6 +179,7 @@
     {
       type = g_enum_register_static ("GimpChannelType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "channel-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -194,9 +199,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CHECK_SIZE_SMALL_CHECKS, N_("Small"), NULL },
-    { GIMP_CHECK_SIZE_MEDIUM_CHECKS, N_("Medium"), NULL },
-    { GIMP_CHECK_SIZE_LARGE_CHECKS, N_("Large"), NULL },
+    { GIMP_CHECK_SIZE_SMALL_CHECKS, NC_("check-size", "Small"), NULL },
+    { GIMP_CHECK_SIZE_MEDIUM_CHECKS, NC_("check-size", "Medium"), NULL },
+    { GIMP_CHECK_SIZE_LARGE_CHECKS, NC_("check-size", "Large"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -206,6 +211,7 @@
     {
       type = g_enum_register_static ("GimpCheckSize", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "check-size");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -228,12 +234,12 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_CHECK_TYPE_LIGHT_CHECKS, N_("Light checks"), NULL },
-    { GIMP_CHECK_TYPE_GRAY_CHECKS, N_("Mid-tone checks"), NULL },
-    { GIMP_CHECK_TYPE_DARK_CHECKS, N_("Dark checks"), NULL },
-    { GIMP_CHECK_TYPE_WHITE_ONLY, N_("White only"), NULL },
-    { GIMP_CHECK_TYPE_GRAY_ONLY, N_("Gray only"), NULL },
-    { GIMP_CHECK_TYPE_BLACK_ONLY, N_("Black only"), NULL },
+    { GIMP_CHECK_TYPE_LIGHT_CHECKS, NC_("check-type", "Light checks"), NULL },
+    { GIMP_CHECK_TYPE_GRAY_CHECKS, NC_("check-type", "Mid-tone checks"), NULL },
+    { GIMP_CHECK_TYPE_DARK_CHECKS, NC_("check-type", "Dark checks"), NULL },
+    { GIMP_CHECK_TYPE_WHITE_ONLY, NC_("check-type", "White only"), NULL },
+    { GIMP_CHECK_TYPE_GRAY_ONLY, NC_("check-type", "Gray only"), NULL },
+    { GIMP_CHECK_TYPE_BLACK_ONLY, NC_("check-type", "Black only"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -243,6 +249,7 @@
     {
       type = g_enum_register_static ("GimpCheckType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "check-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -261,8 +268,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_IMAGE_CLONE, N_("Image"), NULL },
-    { GIMP_PATTERN_CLONE, N_("Pattern"), NULL },
+    { GIMP_IMAGE_CLONE, NC_("clone-type", "Image"), NULL },
+    { GIMP_PATTERN_CLONE, NC_("clone-type", "Pattern"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -272,6 +279,7 @@
     {
       type = g_enum_register_static ("GimpCloneType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "clone-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -291,9 +299,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_DESATURATE_LIGHTNESS, N_("Lightness"), NULL },
-    { GIMP_DESATURATE_LUMINOSITY, N_("Luminosity"), NULL },
-    { GIMP_DESATURATE_AVERAGE, N_("Average"), NULL },
+    { GIMP_DESATURATE_LIGHTNESS, NC_("desaturate-mode", "Lightness"), NULL },
+    { GIMP_DESATURATE_LUMINOSITY, NC_("desaturate-mode", "Luminosity"), NULL },
+    { GIMP_DESATURATE_AVERAGE, NC_("desaturate-mode", "Average"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -303,6 +311,7 @@
     {
       type = g_enum_register_static ("GimpDesaturateMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "desaturate-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -321,8 +330,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_DODGE, N_("Dodge"), NULL },
-    { GIMP_BURN, N_("Burn"), NULL },
+    { GIMP_DODGE, NC_("dodge-burn-type", "Dodge"), NULL },
+    { GIMP_BURN, NC_("dodge-burn-type", "Burn"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -332,6 +341,7 @@
     {
       type = g_enum_register_static ("GimpDodgeBurnType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "dodge-burn-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -359,6 +369,7 @@
     {
       type = g_enum_register_static ("GimpForegroundExtractMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "foreground-extract-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -386,17 +397,17 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_GRADIENT_LINEAR, N_("gradient|Linear"), NULL },
-    { GIMP_GRADIENT_BILINEAR, N_("Bi-linear"), NULL },
-    { GIMP_GRADIENT_RADIAL, N_("Radial"), NULL },
-    { GIMP_GRADIENT_SQUARE, N_("Square"), NULL },
-    { GIMP_GRADIENT_CONICAL_SYMMETRIC, N_("Conical (sym)"), NULL },
-    { GIMP_GRADIENT_CONICAL_ASYMMETRIC, N_("Conical (asym)"), NULL },
-    { GIMP_GRADIENT_SHAPEBURST_ANGULAR, N_("Shaped (angular)"), NULL },
-    { GIMP_GRADIENT_SHAPEBURST_SPHERICAL, N_("Shaped (spherical)"), NULL },
-    { GIMP_GRADIENT_SHAPEBURST_DIMPLED, N_("Shaped (dimpled)"), NULL },
-    { GIMP_GRADIENT_SPIRAL_CLOCKWISE, N_("Spiral (cw)"), NULL },
-    { GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE, N_("Spiral (ccw)"), NULL },
+    { GIMP_GRADIENT_LINEAR, NC_("gradient-type", "Linear"), NULL },
+    { GIMP_GRADIENT_BILINEAR, NC_("gradient-type", "Bi-linear"), NULL },
+    { GIMP_GRADIENT_RADIAL, NC_("gradient-type", "Radial"), NULL },
+    { GIMP_GRADIENT_SQUARE, NC_("gradient-type", "Square"), NULL },
+    { GIMP_GRADIENT_CONICAL_SYMMETRIC, NC_("gradient-type", "Conical (sym)"), NULL },
+    { GIMP_GRADIENT_CONICAL_ASYMMETRIC, NC_("gradient-type", "Conical (asym)"), NULL },
+    { GIMP_GRADIENT_SHAPEBURST_ANGULAR, NC_("gradient-type", "Shaped (angular)"), NULL },
+    { GIMP_GRADIENT_SHAPEBURST_SPHERICAL, NC_("gradient-type", "Shaped (spherical)"), NULL },
+    { GIMP_GRADIENT_SHAPEBURST_DIMPLED, NC_("gradient-type", "Shaped (dimpled)"), NULL },
+    { GIMP_GRADIENT_SPIRAL_CLOCKWISE, NC_("gradient-type", "Spiral (cw)"), NULL },
+    { GIMP_GRADIENT_SPIRAL_ANTICLOCKWISE, NC_("gradient-type", "Spiral (ccw)"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -406,6 +417,7 @@
     {
       type = g_enum_register_static ("GimpGradientType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "gradient-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -427,11 +439,11 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_GRID_DOTS, N_("Intersections (dots)"), NULL },
-    { GIMP_GRID_INTERSECTIONS, N_("Intersections (crosshairs)"), NULL },
-    { GIMP_GRID_ON_OFF_DASH, N_("Dashed"), NULL },
-    { GIMP_GRID_DOUBLE_DASH, N_("Double dashed"), NULL },
-    { GIMP_GRID_SOLID, N_("Solid"), NULL },
+    { GIMP_GRID_DOTS, NC_("grid-style", "Intersections (dots)"), NULL },
+    { GIMP_GRID_INTERSECTIONS, NC_("grid-style", "Intersections (crosshairs)"), NULL },
+    { GIMP_GRID_ON_OFF_DASH, NC_("grid-style", "Dashed"), NULL },
+    { GIMP_GRID_DOUBLE_DASH, NC_("grid-style", "Double dashed"), NULL },
+    { GIMP_GRID_SOLID, NC_("grid-style", "Solid"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -441,6 +453,7 @@
     {
       type = g_enum_register_static ("GimpGridStyle", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "grid-style");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -460,9 +473,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ICON_TYPE_STOCK_ID, N_("Stock ID"), NULL },
-    { GIMP_ICON_TYPE_INLINE_PIXBUF, N_("Inline pixbuf"), NULL },
-    { GIMP_ICON_TYPE_IMAGE_FILE, N_("Image file"), NULL },
+    { GIMP_ICON_TYPE_STOCK_ID, NC_("icon-type", "Stock ID"), NULL },
+    { GIMP_ICON_TYPE_INLINE_PIXBUF, NC_("icon-type", "Inline pixbuf"), NULL },
+    { GIMP_ICON_TYPE_IMAGE_FILE, NC_("icon-type", "Image file"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -472,6 +485,7 @@
     {
       type = g_enum_register_static ("GimpIconType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "icon-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -491,9 +505,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RGB, N_("RGB color"), NULL },
-    { GIMP_GRAY, N_("Grayscale"), NULL },
-    { GIMP_INDEXED, N_("Indexed color"), NULL },
+    { GIMP_RGB, NC_("image-base-type", "RGB color"), NULL },
+    { GIMP_GRAY, NC_("image-base-type", "Grayscale"), NULL },
+    { GIMP_INDEXED, NC_("image-base-type", "Indexed color"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -503,6 +517,7 @@
     {
       type = g_enum_register_static ("GimpImageBaseType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "image-base-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -525,12 +540,12 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RGB_IMAGE, N_("RGB"), NULL },
-    { GIMP_RGBA_IMAGE, N_("RGB-alpha"), NULL },
-    { GIMP_GRAY_IMAGE, N_("Grayscale"), NULL },
-    { GIMP_GRAYA_IMAGE, N_("Grayscale-alpha"), NULL },
-    { GIMP_INDEXED_IMAGE, N_("Indexed"), NULL },
-    { GIMP_INDEXEDA_IMAGE, N_("Indexed-alpha"), NULL },
+    { GIMP_RGB_IMAGE, NC_("image-type", "RGB"), NULL },
+    { GIMP_RGBA_IMAGE, NC_("image-type", "RGB-alpha"), NULL },
+    { GIMP_GRAY_IMAGE, NC_("image-type", "Grayscale"), NULL },
+    { GIMP_GRAYA_IMAGE, NC_("image-type", "Grayscale-alpha"), NULL },
+    { GIMP_INDEXED_IMAGE, NC_("image-type", "Indexed"), NULL },
+    { GIMP_INDEXEDA_IMAGE, NC_("image-type", "Indexed-alpha"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -540,6 +555,7 @@
     {
       type = g_enum_register_static ("GimpImageType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "image-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -560,10 +576,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_INTERPOLATION_NONE, N_("interpolation|None"), NULL },
-    { GIMP_INTERPOLATION_LINEAR, N_("interpolation|Linear"), NULL },
-    { GIMP_INTERPOLATION_CUBIC, N_("Cubic"), NULL },
-    { GIMP_INTERPOLATION_LANCZOS, N_("Sinc (Lanczos3)"), NULL },
+    { GIMP_INTERPOLATION_NONE, NC_("interpolation-type", "None"), NULL },
+    { GIMP_INTERPOLATION_LINEAR, NC_("interpolation-type", "Linear"), NULL },
+    { GIMP_INTERPOLATION_CUBIC, NC_("interpolation-type", "Cubic"), NULL },
+    { GIMP_INTERPOLATION_LANCZOS, NC_("interpolation-type", "Sinc (Lanczos3)"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -573,6 +589,7 @@
     {
       type = g_enum_register_static ("GimpInterpolationType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "interpolation-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -591,8 +608,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_PAINT_CONSTANT, N_("Constant"), NULL },
-    { GIMP_PAINT_INCREMENTAL, N_("Incremental"), NULL },
+    { GIMP_PAINT_CONSTANT, NC_("paint-application-mode", "Constant"), NULL },
+    { GIMP_PAINT_INCREMENTAL, NC_("paint-application-mode", "Incremental"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -602,6 +619,7 @@
     {
       type = g_enum_register_static ("GimpPaintApplicationMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "paint-application-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -621,9 +639,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_REPEAT_NONE, N_("repeat|None"), NULL },
-    { GIMP_REPEAT_SAWTOOTH, N_("Sawtooth wave"), NULL },
-    { GIMP_REPEAT_TRIANGULAR, N_("Triangular wave"), NULL },
+    { GIMP_REPEAT_NONE, NC_("repeat-mode", "None"), NULL },
+    { GIMP_REPEAT_SAWTOOTH, NC_("repeat-mode", "Sawtooth wave"), NULL },
+    { GIMP_REPEAT_TRIANGULAR, NC_("repeat-mode", "Triangular wave"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -633,6 +651,7 @@
     {
       type = g_enum_register_static ("GimpRepeatMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "repeat-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -652,9 +671,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_RUN_INTERACTIVE, N_("Run interactively"), NULL },
-    { GIMP_RUN_NONINTERACTIVE, N_("Run non-interactively"), NULL },
-    { GIMP_RUN_WITH_LAST_VALS, N_("Run with last used values"), NULL },
+    { GIMP_RUN_INTERACTIVE, NC_("run-mode", "Run interactively"), NULL },
+    { GIMP_RUN_NONINTERACTIVE, NC_("run-mode", "Run non-interactively"), NULL },
+    { GIMP_RUN_WITH_LAST_VALS, NC_("run-mode", "Run with last used values"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -664,6 +683,7 @@
     {
       type = g_enum_register_static ("GimpRunMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "run-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -682,8 +702,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_PIXELS, N_("Pixels"), NULL },
-    { GIMP_POINTS, N_("Points"), NULL },
+    { GIMP_PIXELS, NC_("size-type", "Pixels"), NULL },
+    { GIMP_POINTS, NC_("size-type", "Points"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -693,6 +713,7 @@
     {
       type = g_enum_register_static ("GimpSizeType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "size-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -712,9 +733,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_SHADOWS, N_("Shadows"), NULL },
-    { GIMP_MIDTONES, N_("Midtones"), NULL },
-    { GIMP_HIGHLIGHTS, N_("Highlights"), NULL },
+    { GIMP_SHADOWS, NC_("transfer-mode", "Shadows"), NULL },
+    { GIMP_MIDTONES, NC_("transfer-mode", "Midtones"), NULL },
+    { GIMP_HIGHLIGHTS, NC_("transfer-mode", "Highlights"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -724,6 +745,7 @@
     {
       type = g_enum_register_static ("GimpTransferMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "transfer-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -742,8 +764,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TRANSFORM_FORWARD, N_("Normal (Forward)"), NULL },
-    { GIMP_TRANSFORM_BACKWARD, N_("Corrective (Backward)"), NULL },
+    { GIMP_TRANSFORM_FORWARD, NC_("transform-direction", "Normal (Forward)"), NULL },
+    { GIMP_TRANSFORM_BACKWARD, NC_("transform-direction", "Corrective (Backward)"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -753,6 +775,7 @@
     {
       type = g_enum_register_static ("GimpTransformDirection", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "transform-direction");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -773,10 +796,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TRANSFORM_RESIZE_ADJUST, N_("Adjust"), NULL },
-    { GIMP_TRANSFORM_RESIZE_CLIP, N_("Clip"), NULL },
-    { GIMP_TRANSFORM_RESIZE_CROP, N_("Crop to result"), NULL },
-    { GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT, N_("Crop with aspect"), NULL },
+    { GIMP_TRANSFORM_RESIZE_ADJUST, NC_("transform-resize", "Adjust"), NULL },
+    { GIMP_TRANSFORM_RESIZE_CLIP, NC_("transform-resize", "Clip"), NULL },
+    { GIMP_TRANSFORM_RESIZE_CROP, NC_("transform-resize", "Crop to result"), NULL },
+    { GIMP_TRANSFORM_RESIZE_CROP_WITH_ASPECT, NC_("transform-resize", "Crop with aspect"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -786,6 +809,7 @@
     {
       type = g_enum_register_static ("GimpTransformResize", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "transform-resize");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -857,6 +881,7 @@
     {
       type = g_enum_register_static ("GimpPDBArgType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "pdb-arg-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -886,6 +911,7 @@
     {
       type = g_enum_register_static ("GimpPDBErrorHandler", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "pdb-error-handler");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -906,10 +932,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_INTERNAL, N_("Internal GIMP procedure"), NULL },
-    { GIMP_PLUGIN, N_("GIMP Plug-In"), NULL },
-    { GIMP_EXTENSION, N_("GIMP Extension"), NULL },
-    { GIMP_TEMPORARY, N_("Temporary Procedure"), NULL },
+    { GIMP_INTERNAL, NC_("pdb-proc-type", "Internal GIMP procedure"), NULL },
+    { GIMP_PLUGIN, NC_("pdb-proc-type", "GIMP Plug-In"), NULL },
+    { GIMP_EXTENSION, NC_("pdb-proc-type", "GIMP Extension"), NULL },
+    { GIMP_TEMPORARY, NC_("pdb-proc-type", "Temporary Procedure"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -919,6 +945,7 @@
     {
       type = g_enum_register_static ("GimpPDBProcType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "pdb-proc-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -954,6 +981,7 @@
     {
       type = g_enum_register_static ("GimpPDBStatusType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "pdb-status-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -985,6 +1013,7 @@
     {
       type = g_enum_register_static ("GimpMessageHandlerType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "message-handler-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1016,6 +1045,7 @@
     {
       type = g_enum_register_static ("GimpStackTraceMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "stack-trace-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1053,6 +1083,7 @@
     {
       type = g_enum_register_static ("GimpProgressCommand", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "progress-command");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1071,8 +1102,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TEXT_DIRECTION_LTR, N_("From left to right"), NULL },
-    { GIMP_TEXT_DIRECTION_RTL, N_("From right to left"), NULL },
+    { GIMP_TEXT_DIRECTION_LTR, NC_("text-direction", "From left to right"), NULL },
+    { GIMP_TEXT_DIRECTION_RTL, NC_("text-direction", "From right to left"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -1082,6 +1113,7 @@
     {
       type = g_enum_register_static ("GimpTextDirection", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "text-direction");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1102,10 +1134,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TEXT_HINT_STYLE_NONE, N_("hinting|None"), NULL },
-    { GIMP_TEXT_HINT_STYLE_SLIGHT, N_("hinting|Slight"), NULL },
-    { GIMP_TEXT_HINT_STYLE_MEDIUM, N_("hinting|Medium"), NULL },
-    { GIMP_TEXT_HINT_STYLE_FULL, N_("hinting|Full"), NULL },
+    { GIMP_TEXT_HINT_STYLE_NONE, NC_("text-hint-style", "None"), NULL },
+    { GIMP_TEXT_HINT_STYLE_SLIGHT, NC_("text-hint-style", "Slight"), NULL },
+    { GIMP_TEXT_HINT_STYLE_MEDIUM, NC_("text-hint-style", "Medium"), NULL },
+    { GIMP_TEXT_HINT_STYLE_FULL, NC_("text-hint-style", "Full"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -1115,6 +1147,7 @@
     {
       type = g_enum_register_static ("GimpTextHintStyle", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "text-hint-style");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1135,10 +1168,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_TEXT_JUSTIFY_LEFT, N_("Left justified"), NULL },
-    { GIMP_TEXT_JUSTIFY_RIGHT, N_("Right justified"), NULL },
-    { GIMP_TEXT_JUSTIFY_CENTER, N_("Centered"), NULL },
-    { GIMP_TEXT_JUSTIFY_FILL, N_("Filled"), NULL },
+    { GIMP_TEXT_JUSTIFY_LEFT, NC_("text-justification", "Left justified"), NULL },
+    { GIMP_TEXT_JUSTIFY_RIGHT, NC_("text-justification", "Right justified"), NULL },
+    { GIMP_TEXT_JUSTIFY_CENTER, NC_("text-justification", "Centered"), NULL },
+    { GIMP_TEXT_JUSTIFY_FILL, NC_("text-justification", "Filled"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -1148,6 +1181,7 @@
     {
       type = g_enum_register_static ("GimpTextJustification", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "text-justification");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1189,6 +1223,7 @@
     {
       type = g_enum_register_static ("GimpUserDirectory", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "user-directory");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -1216,6 +1251,7 @@
     {
       type = g_enum_register_static ("GimpVectorsStrokeType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "vectors-stroke-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/libgimpbase/gimpbaseenums.h
==============================================================================
--- trunk/libgimpbase/gimpbaseenums.h	(original)
+++ trunk/libgimpbase/gimpbaseenums.h	Thu Nov  6 08:28:28 2008
@@ -172,7 +172,7 @@
 
 typedef enum
 {
-  GIMP_GRADIENT_LINEAR,                /*< desc="gradient|Linear"   >*/
+  GIMP_GRADIENT_LINEAR,                /*< desc="Linear"            >*/
   GIMP_GRADIENT_BILINEAR,              /*< desc="Bi-linear"         >*/
   GIMP_GRADIENT_RADIAL,                /*< desc="Radial"            >*/
   GIMP_GRADIENT_SQUARE,                /*< desc="Square"            >*/
@@ -245,10 +245,10 @@
 
 typedef enum
 {
-  GIMP_INTERPOLATION_NONE,   /*< desc="interpolation|None"   >*/
-  GIMP_INTERPOLATION_LINEAR, /*< desc="interpolation|Linear" >*/
-  GIMP_INTERPOLATION_CUBIC,  /*< desc="Cubic"                >*/
-  GIMP_INTERPOLATION_LANCZOS /*< desc="Sinc (Lanczos3)"      >*/
+  GIMP_INTERPOLATION_NONE,   /*< desc="None"            >*/
+  GIMP_INTERPOLATION_LINEAR, /*< desc="Linear"          >*/
+  GIMP_INTERPOLATION_CUBIC,  /*< desc="Cubic"           >*/
+  GIMP_INTERPOLATION_LANCZOS /*< desc="Sinc (Lanczos3)" >*/
 } GimpInterpolationType;
 
 
@@ -269,7 +269,7 @@
 
 typedef enum
 {
-  GIMP_REPEAT_NONE,       /*< desc="repeat|None"     >*/
+  GIMP_REPEAT_NONE,       /*< desc="None"            >*/
   GIMP_REPEAT_SAWTOOTH,   /*< desc="Sawtooth wave"   >*/
   GIMP_REPEAT_TRIANGULAR  /*< desc="Triangular wave" >*/
 } GimpRepeatMode;
@@ -479,10 +479,10 @@
 
 typedef enum
 {
-  GIMP_TEXT_HINT_STYLE_NONE,     /*< desc="hinting|None"   >*/
-  GIMP_TEXT_HINT_STYLE_SLIGHT,   /*< desc="hinting|Slight" >*/
-  GIMP_TEXT_HINT_STYLE_MEDIUM,   /*< desc="hinting|Medium" >*/
-  GIMP_TEXT_HINT_STYLE_FULL,     /*< desc="hinting|Full"   >*/
+  GIMP_TEXT_HINT_STYLE_NONE,     /*< desc="None"   >*/
+  GIMP_TEXT_HINT_STYLE_SLIGHT,   /*< desc="Slight" >*/
+  GIMP_TEXT_HINT_STYLE_MEDIUM,   /*< desc="Medium" >*/
+  GIMP_TEXT_HINT_STYLE_FULL,     /*< desc="Full"   >*/
 } GimpTextHintStyle;
 
 

Modified: trunk/libgimpbase/gimpbasetypes.c
==============================================================================
--- trunk/libgimpbase/gimpbasetypes.c	(original)
+++ trunk/libgimpbase/gimpbasetypes.c	Thu Nov  6 08:28:28 2008
@@ -27,8 +27,9 @@
 #include "gimpbasetypes.h"
 
 
-static GQuark        gimp_translation_domain_quark (void) G_GNUC_CONST;
-static GQuark        gimp_value_descriptions_quark (void) G_GNUC_CONST;
+static GQuark  gimp_translation_domain_quark  (void) G_GNUC_CONST;
+static GQuark  gimp_translation_context_quark (void) G_GNUC_CONST;
+static GQuark  gimp_value_descriptions_quark  (void) G_GNUC_CONST;
 
 
 /**
@@ -73,6 +74,46 @@
 }
 
 /**
+ * gimp_type_set_translation_context:
+ * @type:   a #GType
+ * @domain: a constant string that identifies a translation context or %NULL
+ *
+ * This function attaches a constant string as a translation context
+ * to a #GType. The only purpose of this function is to use it when
+ * registering a #GTypeEnum with translatable value names.
+ *
+ * Since: GIMP 2.8
+ **/
+void
+gimp_type_set_translation_context (GType        type,
+                                   const gchar *context)
+{
+  g_type_set_qdata (type,
+                    gimp_translation_context_quark (), (gpointer) context);
+}
+
+/**
+ * gimp_type_get_translation_context:
+ * @type: a #GType
+ *
+ * Retrieves the translation context that has been previously set
+ * using gimp_type_set_translation_context(). You should not need to
+ * use this function directly, use gimp_enum_get_value() or
+ * gimp_enum_value_get_name() instead.
+ *
+ * Return value: the translation context associated with @type
+ *               or %NULL if no context was set
+ *
+ * Since: GIMP 2.8
+ **/
+const gchar *
+gimp_type_get_translation_context (GType type)
+{
+  return (const gchar *) g_type_get_qdata (type,
+                                           gimp_translation_context_quark ());
+}
+
+/**
  * gimp_enum_set_value_descriptions:
  * @enum_type:    a #GType
  * @descriptions: a %NULL terminated constant static array of #GimpEnumDesc
@@ -171,6 +212,17 @@
 }
 
 static GQuark
+gimp_translation_context_quark (void)
+{
+  static GQuark quark = 0;
+
+  if (! quark)
+    quark = g_quark_from_static_string ("gimp-translation-context-quark");
+
+  return quark;
+}
+
+static GQuark
 gimp_value_descriptions_quark (void)
 {
   static GQuark quark = 0;

Modified: trunk/libgimpbase/gimpbasetypes.h
==============================================================================
--- trunk/libgimpbase/gimpbasetypes.h	(original)
+++ trunk/libgimpbase/gimpbasetypes.h	Thu Nov  6 08:28:28 2008
@@ -62,6 +62,10 @@
                                                          const gchar         *domain);
 const gchar         * gimp_type_get_translation_domain  (GType                type);
 
+void                  gimp_type_set_translation_context (GType                type,
+                                                         const gchar         *context);
+const gchar         * gimp_type_get_translation_context (GType                type);
+
 void                  gimp_enum_set_value_descriptions  (GType                enum_type,
                                                          const GimpEnumDesc  *descriptions);
 const GimpEnumDesc  * gimp_enum_get_value_descriptions  (GType                enum_type);

Modified: trunk/libgimpbase/gimputils.c
==============================================================================
--- trunk/libgimpbase/gimputils.c	(original)
+++ trunk/libgimpbase/gimputils.c	Thu Nov  6 08:28:28 2008
@@ -461,19 +461,36 @@
 
           enum_desc = gimp_enum_get_desc (enum_class, value);
 
-          if (value_desc) {
-            *value_desc = ((enum_desc && enum_desc->value_desc) ?
-                           g_strip_context (enum_desc->value_desc,
-                                            dgettext (gimp_type_get_translation_domain (enum_type),
-                                                      enum_desc->value_desc)) :
-                           NULL);
-          }
+          if (value_desc)
+            {
+              if (enum_desc && enum_desc->value_desc)
+                {
+                  const gchar *context;
+
+                  context = gimp_type_get_translation_context (enum_type);
+
+                  if (context)  /*  the new way, using NC_()    */
+                    *value_desc = g_dpgettext2 (gimp_type_get_translation_domain (enum_type),
+                                                context,
+                                                enum_desc->value_desc);
+                  else          /*  for backward compatibility  */
+                    *value_desc = g_strip_context (enum_desc->value_desc,
+                                                   dgettext (gimp_type_get_translation_domain (enum_type),
+                                                             enum_desc->value_desc));
+                }
+              else
+                {
+                  *value_desc = NULL;
+                }
+            }
 
           if (value_help)
-            *value_help = ((enum_desc && enum_desc->value_desc) ?
-                           dgettext (gimp_type_get_translation_domain (enum_type),
-                                     enum_desc->value_help) :
-                           NULL);
+            {
+              *value_help = ((enum_desc && enum_desc->value_help) ?
+                             dgettext (gimp_type_get_translation_domain (enum_type),
+                                       enum_desc->value_help) :
+                             NULL);
+            }
         }
 
       success = TRUE;
@@ -489,9 +506,9 @@
  * @enum_class: a #GEnumClass
  * @enum_value: a #GEnumValue from @enum_class
  *
- * Retrieves the translated desc for a given @enum_value.
+ * Retrieves the translated description for a given @enum_value.
  *
- * Return value: the translated desc of the enum value
+ * Return value: the translated description of the enum value
  *
  * Since: GIMP 2.2
  **/
@@ -505,9 +522,20 @@
   enum_desc = gimp_enum_get_desc (enum_class, enum_value->value);
 
   if (enum_desc && enum_desc->value_desc)
-    return g_strip_context (enum_desc->value_desc,
-                            dgettext (gimp_type_get_translation_domain (type),
-                                      enum_desc->value_desc));
+    {
+      const gchar *context;
+
+      context = gimp_type_get_translation_context (type);
+
+      if (context)  /*  the new way, using NC_()    */
+        return g_dpgettext2 (gimp_type_get_translation_domain (type),
+                             context,
+                             enum_desc->value_desc);
+      else          /*  for backward compatibility  */
+        return g_strip_context (enum_desc->value_desc,
+                                dgettext (gimp_type_get_translation_domain (type),
+                                          enum_desc->value_desc));
+    }
 
   return enum_value->value_name;
 }
@@ -648,9 +676,9 @@
  * @flags_class: a #GFlagsClass
  * @flags_value: a #GFlagsValue from @flags_class
  *
- * Retrieves the translated desc for a given @flags_value.
+ * Retrieves the translated description for a given @flags_value.
  *
- * Return value: the translated desc of the flags value
+ * Return value: the translated description of the flags value
  *
  * Since: GIMP 2.2
  **/

Modified: trunk/libgimpconfig/Makefile.am
==============================================================================
--- trunk/libgimpconfig/Makefile.am	(original)
+++ trunk/libgimpconfig/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -139,7 +139,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/gimpcolorconfig-enums.h > xgen-cec \
 	&& cp xgen-cec $(@F) \
 	&& rm -f xgen-cec

Modified: trunk/libgimpconfig/gimpcolorconfig-enums.c
==============================================================================
--- trunk/libgimpconfig/gimpcolorconfig-enums.c	(original)
+++ trunk/libgimpconfig/gimpcolorconfig-enums.c	Thu Nov  6 08:28:28 2008
@@ -21,9 +21,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_COLOR_MANAGEMENT_OFF, N_("No color management"), NULL },
-    { GIMP_COLOR_MANAGEMENT_DISPLAY, N_("Color managed display"), NULL },
-    { GIMP_COLOR_MANAGEMENT_SOFTPROOF, N_("Print simulation"), NULL },
+    { GIMP_COLOR_MANAGEMENT_OFF, NC_("color-management-mode", "No color management"), NULL },
+    { GIMP_COLOR_MANAGEMENT_DISPLAY, NC_("color-management-mode", "Color managed display"), NULL },
+    { GIMP_COLOR_MANAGEMENT_SOFTPROOF, NC_("color-management-mode", "Print simulation"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -33,6 +33,7 @@
     {
       type = g_enum_register_static ("GimpColorManagementMode", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "color-management-mode");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -53,10 +54,10 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL, N_("Perceptual"), NULL },
-    { GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, N_("Relative colorimetric"), NULL },
-    { GIMP_COLOR_RENDERING_INTENT_SATURATION, N_("intent|Saturation"), NULL },
-    { GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, N_("Absolute colorimetric"), NULL },
+    { GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL, NC_("color-rendering-intent", "Perceptual"), NULL },
+    { GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, NC_("color-rendering-intent", "Relative colorimetric"), NULL },
+    { GIMP_COLOR_RENDERING_INTENT_SATURATION, NC_("color-rendering-intent", "Saturation"), NULL },
+    { GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC, NC_("color-rendering-intent", "Absolute colorimetric"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -66,6 +67,7 @@
     {
       type = g_enum_register_static ("GimpColorRenderingIntent", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "color-rendering-intent");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/libgimpconfig/gimpcolorconfig-enums.h
==============================================================================
--- trunk/libgimpconfig/gimpcolorconfig-enums.h	(original)
+++ trunk/libgimpconfig/gimpcolorconfig-enums.h	Thu Nov  6 08:28:28 2008
@@ -45,7 +45,7 @@
 {
   GIMP_COLOR_RENDERING_INTENT_PERCEPTUAL,            /*< desc="Perceptual"            >*/
   GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC, /*< desc="Relative colorimetric" >*/
-  GIMP_COLOR_RENDERING_INTENT_SATURATION,            /*< desc="intent|Saturation"            >*/
+  GIMP_COLOR_RENDERING_INTENT_SATURATION,            /*< desc="Saturation"            >*/
   GIMP_COLOR_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC  /*< desc="Absolute colorimetric" >*/
 } GimpColorRenderingIntent;
 

Modified: trunk/libgimpwidgets/Makefile.am
==============================================================================
--- trunk/libgimpwidgets/Makefile.am	(original)
+++ trunk/libgimpwidgets/Makefile.am	Thu Nov  6 08:28:28 2008
@@ -293,7 +293,7 @@
 		--vtail "    { 0, NULL, NULL }\n  };\n" \
 		--dhead "  static const Gimp Type@Desc descs[] =\n  {" \
 		--dprod "    { @VALUENAME@, @valuedesc@, @valuehelp@ }," \
-		--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_value_descriptions (type, descs);\n    }\n\n  return type;\n}\n" \
+		--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" \
 		$(srcdir)/gimpwidgetsenums.h > xgen-wec \
 	&& cp xgen-wec $(@F) \
 	&& rm -f xgen-wec

Modified: trunk/libgimpwidgets/gimpwidgetsenums.c
==============================================================================
--- trunk/libgimpwidgets/gimpwidgetsenums.c	(original)
+++ trunk/libgimpwidgets/gimpwidgetsenums.c	Thu Nov  6 08:28:28 2008
@@ -21,9 +21,9 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ASPECT_SQUARE, N_("Square"), NULL },
-    { GIMP_ASPECT_PORTRAIT, N_("Portrait"), NULL },
-    { GIMP_ASPECT_LANDSCAPE, N_("Landscape"), NULL },
+    { GIMP_ASPECT_SQUARE, NC_("aspect-type", "Square"), NULL },
+    { GIMP_ASPECT_PORTRAIT, NC_("aspect-type", "Portrait"), NULL },
+    { GIMP_ASPECT_LANDSCAPE, NC_("aspect-type", "Landscape"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -33,6 +33,7 @@
     {
       type = g_enum_register_static ("GimpAspectType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "aspect-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -66,6 +67,7 @@
     {
       type = g_enum_register_static ("GimpChainPosition", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "chain-position");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -97,6 +99,7 @@
     {
       type = g_enum_register_static ("GimpColorAreaType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "color-area-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -120,13 +123,13 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_COLOR_SELECTOR_HUE, N_("_H"), N_("Hue") },
-    { GIMP_COLOR_SELECTOR_SATURATION, N_("_S"), N_("Saturation") },
-    { GIMP_COLOR_SELECTOR_VALUE, N_("_V"), N_("Value") },
-    { GIMP_COLOR_SELECTOR_RED, N_("_R"), N_("Red") },
-    { GIMP_COLOR_SELECTOR_GREEN, N_("_G"), N_("Green") },
-    { GIMP_COLOR_SELECTOR_BLUE, N_("_B"), N_("Blue") },
-    { GIMP_COLOR_SELECTOR_ALPHA, N_("_A"), N_("Alpha") },
+    { GIMP_COLOR_SELECTOR_HUE, NC_("color-selector-channel", "_H"), N_("Hue") },
+    { GIMP_COLOR_SELECTOR_SATURATION, NC_("color-selector-channel", "_S"), N_("Saturation") },
+    { GIMP_COLOR_SELECTOR_VALUE, NC_("color-selector-channel", "_V"), N_("Value") },
+    { GIMP_COLOR_SELECTOR_RED, NC_("color-selector-channel", "_R"), N_("Red") },
+    { GIMP_COLOR_SELECTOR_GREEN, NC_("color-selector-channel", "_G"), N_("Green") },
+    { GIMP_COLOR_SELECTOR_BLUE, NC_("color-selector-channel", "_B"), N_("Blue") },
+    { GIMP_COLOR_SELECTOR_ALPHA, NC_("color-selector-channel", "_A"), N_("Alpha") },
     { 0, NULL, NULL }
   };
 
@@ -136,6 +139,7 @@
     {
       type = g_enum_register_static ("GimpColorSelectorChannel", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "color-selector-channel");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -154,8 +158,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_PAGE_SELECTOR_TARGET_LAYERS, N_("Layers"), NULL },
-    { GIMP_PAGE_SELECTOR_TARGET_IMAGES, N_("Images"), NULL },
+    { GIMP_PAGE_SELECTOR_TARGET_LAYERS, NC_("page-selector-target", "Layers"), NULL },
+    { GIMP_PAGE_SELECTOR_TARGET_IMAGES, NC_("page-selector-target", "Images"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -165,6 +169,7 @@
     {
       type = g_enum_register_static ("GimpPageSelectorTarget", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "page-selector-target");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -196,6 +201,7 @@
     {
       type = g_enum_register_static ("GimpSizeEntryUpdatePolicy", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "size-entry-update-policy");
       gimp_enum_set_value_descriptions (type, descs);
     }
 
@@ -214,8 +220,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_ZOOM_IN, N_("Zoom in"), NULL },
-    { GIMP_ZOOM_OUT, N_("Zoom out"), NULL },
+    { GIMP_ZOOM_IN, NC_("zoom-type", "Zoom in"), NULL },
+    { GIMP_ZOOM_OUT, NC_("zoom-type", "Zoom out"), NULL },
     { 0, NULL, NULL }
   };
 
@@ -225,6 +231,7 @@
     {
       type = g_enum_register_static ("GimpZoomType", values);
       gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");
+      gimp_type_set_translation_context (type, "zoom-type");
       gimp_enum_set_value_descriptions (type, descs);
     }
 

Modified: trunk/tools/gimp-mkenums
==============================================================================
--- trunk/tools/gimp-mkenums	(original)
+++ trunk/tools/gimp-mkenums	Thu Nov  6 08:28:28 2008
@@ -19,6 +19,7 @@
 my $enum_prefix;		# Prefix for this enumeration
 my $enumname;			# Name for this enumeration
 my $enumshort;			# $enumname without prefix
+my $enumnick;	    	        # lower case version of $enumshort
 my $enumindex = 0;		# Global enum counter
 my $firstenum = 1;		# Is this the first enumeration per file?
 my @entries;			# [ $name, $val ] for each entry
@@ -156,6 +157,7 @@
     print STDERR "  \ enum_name\@                prefix_the_xenum\n";
     print STDERR "  \ ENUMNAME\@                 PREFIX_THE_XENUM\n";
     print STDERR "  \ ENUMSHORT\@                THE_XENUM\n";
+    print STDERR "  \ enumnick\@                 the_xenum\n";
     print STDERR "  \ VALUENAME\@                PREFIX_THE_XVALUE\n";
     print STDERR "  \ valuenick\@                the-xvalue\n";
     print STDERR "  \ valuedesc\@                descriptions as defined in the header\n";
@@ -264,6 +266,7 @@
 	}
 
 	$seenbitshift = 0;
+
 	@entries = ();
 
 	# Now parse the entries
@@ -302,6 +305,23 @@
 	    $enum_prefix =~ s/(.*)([^_])$/$1$2_/;
 	}
 	
+	
+	# enumname is e.g. GMatchType
+	$enspace = $enumname;
+	$enspace =~ s/^([A-Z][a-z]*).*$/$1/;
+	
+	$enumshort = $enumname;
+	$enumshort =~ s/^[A-Z][a-z]*//;
+	$enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g;
+	$enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
+	$enumshort = uc($enumshort);
+
+	$enumlong = uc($enspace) . "_" . $enumshort;
+	$enumsym = lc($enspace) . "_" . lc($enumshort);
+
+	$enumnick = lc($enumshort);
+	$enumnick =~ tr/_/-/;
+
 	for $entry (@entries) {
 	    my ($name,$nick,$desc,$help) = @{$entry};
             if (!defined $nick) {
@@ -312,7 +332,7 @@
 	    if (!defined $desc) {
 		$desc = "\"$name\"";
 	    } else {
-		$desc = "N_($desc)";
+		$desc = "NC_(\"$enumnick\", $desc)";
 	    }
 	    if (!defined $help) {
 		$help = "NULL";
@@ -324,24 +344,12 @@
 	
 
 	# Spit out the output
-	
-	# enumname is e.g. GMatchType
-	$enspace = $enumname;
-	$enspace =~ s/^([A-Z][a-z]*).*$/$1/;
-	
-	$enumshort = $enumname;
-	$enumshort =~ s/^[A-Z][a-z]*//;
-	$enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g;
-	$enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
-	$enumshort = uc($enumshort);
 
-	$enumlong = uc($enspace) . "_" . $enumshort;
-	$enumsym = lc($enspace) . "_" . lc($enumshort);
-
-  #The options might override the lower case name if it could not be generated correctly:
-  if (defined($option_lowercase_name)) {
-      $enumsym = $option_lowercase_name;
-  }
+	# The options might override the lower case name if it could
+	# not be generated correctly:
+	if (defined($option_lowercase_name)) {
+	    $enumsym = $option_lowercase_name;
+	}
 
 	if ($firstenum) {
 	    $firstenum = 0;
@@ -363,6 +371,7 @@
 	    $prod =~ s/\ enum_name\@/$enumsym/g;
 	    $prod =~ s/\ EnumName\@/$enumname/g;
 	    $prod =~ s/\ ENUMSHORT\@/$enumshort/g;
+	    $prod =~ s/\ enumnick\@/$enumnick/g;
 	    $prod =~ s/\ ENUMNAME\@/$enumlong/g;
 	    if ($flags) { $prod =~ s/\ type\@/flags/g; } else { $prod =~ s/\ type\@/enum/g; }
 	    if ($flags) { $prod =~ s/\ Type\@/Flags/g; } else { $prod =~ s/\ Type\@/Enum/g; }
@@ -379,6 +388,7 @@
 	    $prod =~ s/\ enum_name\@/$enumsym/g;
             $prod =~ s/\ EnumName\@/$enumname/g;
             $prod =~ s/\ ENUMSHORT\@/$enumshort/g;
+	    $prod =~ s/\ enumnick\@/$enumnick/g;
             $prod =~ s/\ ENUMNAME\@/$enumlong/g;
 	    if ($flags) { $prod =~ s/\ type\@/flags/g; } else { $prod =~ s/\ type\@/enum/g; }
 	    if ($flags) { $prod =~ s/\ Type\@/Flags/g; } else { $prod =~ s/\ Type\@/Enum/g; }
@@ -416,6 +426,7 @@
 	    $prod =~ s/\ enum_name\@/$enumsym/g;
             $prod =~ s/\ EnumName\@/$enumname/g;
             $prod =~ s/\ ENUMSHORT\@/$enumshort/g;
+	    $prod =~ s/\ enumnick\@/$enumnick/g;
             $prod =~ s/\ ENUMNAME\@/$enumlong/g;
 	    if ($flags) { $prod =~ s/\ type\@/flags/g; } else { $prod =~ s/\ type\@/enum/g; }
 	    if ($flags) { $prod =~ s/\ Type\@/Flags/g; } else { $prod =~ s/\ Type\@/Enum/g; }
@@ -432,6 +443,7 @@
 	    $prod =~ s/\ enum_name\@/$enumsym/g;
             $prod =~ s/\ EnumName\@/$enumname/g;
             $prod =~ s/\ ENUMSHORT\@/$enumshort/g;
+	    $prod =~ s/\ enumnick\@/$enumnick/g;
             $prod =~ s/\ ENUMNAME\@/$enumlong/g;
 	    if ($flags) { $prod =~ s/\ type\@/flags/g; } else { $prod =~ s/\ type\@/enum/g; }
 	    if ($flags) { $prod =~ s/\ Type\@/Flags/g; } else { $prod =~ s/\ Type\@/Enum/g; }
@@ -469,6 +481,7 @@
 	    $prod =~ s/\ enum_name\@/$enumsym/g;
             $prod =~ s/\ EnumName\@/$enumname/g;
             $prod =~ s/\ ENUMSHORT\@/$enumshort/g;
+	    $prod =~ s/\ enumnick\@/$enumnick/g;
             $prod =~ s/\ ENUMNAME\@/$enumlong/g;
 	    if ($flags) { $prod =~ s/\ type\@/flags/g; } else { $prod =~ s/\ type\@/enum/g; }
 	    if ($flags) { $prod =~ s/\ Type\@/Flags/g; } else { $prod =~ s/\ Type\@/Enum/g; }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]