Commit 02817081 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

use NC_() to mark enum values for translation. Use a lower-case short form

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.


svn path=/trunk/; revision=27562
parent f31a5399
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.
2008-11-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c: some minor cleanups.
......
......@@ -92,7 +92,7 @@ base-enums.c: $(srcdir)/base-enums.h $(GIMP_MKENUMS)
--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
......@@ -20,8 +20,8 @@ gimp_curve_type_get_type (void)
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 @@ gimp_curve_type_get_type (void)
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 @@ gimp_histogram_channel_get_type (void)
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 @@ gimp_histogram_channel_get_type (void)
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 @@ gimp_layer_mode_effects_get_type (void)
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 @@ gimp_layer_mode_effects_get_type (void)
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 @@ gimp_hue_range_get_type (void)
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);
}
......
......@@ -375,7 +375,7 @@ core-enums.c: $(srcdir)/core-enums.h $(GIMP_MKENUMS)
--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
This diff is collapsed.
......@@ -104,7 +104,7 @@ display-enums.c: $(srcdir)/display-enums.h $(GIMP_MKENUMS)
--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
......@@ -21,9 +21,9 @@ gimp_cursor_mode_get_type (void)
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 @@ gimp_cursor_mode_get_type (void)
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 @@ gimp_cursor_precision_get_type (void)
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 @@ gimp_canvas_padding_mode_get_type (void)
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 @@ gimp_canvas_padding_mode_get_type (void)
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 @@ gimp_space_bar_action_get_type (void)
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 @@ gimp_space_bar_action_get_type (void)
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 @@ gimp_zoom_quality_get_type (void)
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 @@ gimp_zoom_quality_get_type (void)
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 @@ gimp_zoom_focus_get_type (void)
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);
}
......
......@@ -76,8 +76,8 @@ GType gimp_zoom_quality_get_type (void) G_GNUC_CONST;
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;
......
......@@ -101,7 +101,7 @@ paint-enums.c: $(srcdir)/paint-enums.h $(GIMP_MKENUMS)
--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
......@@ -30,6 +30,7 @@ gimp_brush_application_mode_get_type (void)
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 @@ gimp_perspective_clone_mode_get_type (void)
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 @@ gimp_perspective_clone_mode_get_type (void)
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 @@ gimp_source_align_mode_get_type (void)
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 @@ gimp_source_align_mode_get_type (void)
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 @@ gimp_convolve_type_get_type (void)
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 @@ gimp_convolve_type_get_type (void)
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 @@ gimp_ink_blob_type_get_type (void)
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);
}
......
......@@ -96,7 +96,7 @@ plug-in-enums.c: $(srcdir)/plug-in-enums.h $(GIMP_MKENUMS)
--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
......@@ -38,6 +38,7 @@ gimp_plug_in_image_type_get_type (void)
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 @@ gimp_plug_in_call_mode_get_type (void)
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);
}
......
......@@ -71,7 +71,7 @@ text-enums.c: $(srcdir)/text-enums.h $(GIMP_MKENUMS)
--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
......@@ -30,6 +30,7 @@ gimp_text_box_mode_get_type (void)
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 @@ gimp_text_outline_get_type (void)
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);
}
......
......@@ -213,7 +213,7 @@ tools-enums.c: $(srcdir)/tools-enums.h $(GIMP_MKENUMS)
--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
......@@ -35,6 +35,7 @@ gimp_button_release_type_get_type (void)
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 @@ gimp_rectangle_guide_get_type (void)
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 @@ gimp_rectangle_guide_get_type (void)
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 @@ gimp_rectangle_constraint_get_type (void)
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 @@ gimp_rectangle_precision_get_type (void)
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 @@ gimp_rectangle_tool_fixed_rule_get_type (void)
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 @@ gimp_rectangle_tool_fixed_rule_get_type (void)
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 @@ gimp_rect_select_mode_get_type (void)
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 @@ gimp_rect_select_mode_get_type (void)
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 @@ gimp_transform_type_get_type (void)
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 @@ gimp_transform_type_get_type (void)
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 @@ gimp_transform_preview_type_get_type (void)
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 @@ gimp_transform_preview_type_get_type (void)
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 @@ gimp_transform_grid_type_get_type (void)
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 @@ gimp_transform_grid_type_get_type (void)
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);
}