Mark the debug options for translation

This adds the descriptions of the debug options to the list of
translatable strings.

https://bugzilla.gnome.org/show_bug.cgi?id=658700
This commit is contained in:
Neil Roberts 2011-09-10 09:52:48 +01:00
parent 7669fdc827
commit f628839771
4 changed files with 115 additions and 107 deletions

View File

@ -22,166 +22,166 @@
*/ */
OPT (HANDLE, OPT (HANDLE,
"Cogl Tracing", N_("Cogl Tracing"),
"ref-counts", "ref-counts",
"CoglObject references", N_("CoglObject references"),
"Debug ref counting issues for CoglObjects") N_("Debug ref counting issues for CoglObjects"))
OPT (SLICING, OPT (SLICING,
"Cogl Tracing", N_("Cogl Tracing"),
"slicing", "slicing",
"Trace Texture Slicing", N_("Trace Texture Slicing"),
"debug the creation of texture slices") N_("debug the creation of texture slices"))
OPT (ATLAS, OPT (ATLAS,
"Cogl Tracing", N_("Cogl Tracing"),
"atlas", "atlas",
"Trace Atlas Textures", N_("Trace Atlas Textures"),
"Debug texture atlas management") N_("Debug texture atlas management"))
OPT (BLEND_STRINGS, OPT (BLEND_STRINGS,
"Cogl Tracing", N_("Cogl Tracing"),
"blend-strings", "blend-strings",
"Trace Blend Strings", N_("Trace Blend Strings"),
"Debug CoglBlendString parsing") N_("Debug CoglBlendString parsing"))
OPT (JOURNAL, OPT (JOURNAL,
"Cogl Tracing", N_("Cogl Tracing"),
"journal", "journal",
"Trace Journal", N_("Trace Journal"),
"View all the geometry passing through the journal") N_("View all the geometry passing through the journal"))
OPT (BATCHING, OPT (BATCHING,
"Cogl Tracing", N_("Cogl Tracing"),
"batching", "batching",
"Trace Batching", N_("Trace Batching"),
"Show how geometry is being batched in the journal") N_("Show how geometry is being batched in the journal"))
OPT (MATRICES, OPT (MATRICES,
"Cogl Tracing", N_("Cogl Tracing"),
"matrices", "matrices",
"Trace matrices", N_("Trace matrices"),
"Trace all matrix manipulation") N_("Trace all matrix manipulation"))
/* XXX we should replace the "draw" option its very hand wavy... */ /* XXX we should replace the "draw" option its very hand wavy... */
OPT (DRAW, OPT (DRAW,
"Cogl Tracing", N_("Cogl Tracing"),
"draw", "draw",
"Trace Misc Drawing", N_("Trace Misc Drawing"),
"Trace some misc drawing operations") N_("Trace some misc drawing operations"))
OPT (PANGO, OPT (PANGO,
"Cogl Tracing", N_("Cogl Tracing"),
"pango", "pango",
"Trace Pango Renderer", N_("Trace Pango Renderer"),
"Trace the Cogl Pango renderer") N_("Trace the Cogl Pango renderer"))
OPT (TEXTURE_PIXMAP, OPT (TEXTURE_PIXMAP,
"Cogl Tracing", N_("Cogl Tracing"),
"texture-pixmap", "texture-pixmap",
"Trace CoglTexturePixmap backend", N_("Trace CoglTexturePixmap backend"),
"Trace the Cogl texture pixmap backend") N_("Trace the Cogl texture pixmap backend"))
OPT (RECTANGLES, OPT (RECTANGLES,
"Visualize", N_("Visualize"),
"rectangles", "rectangles",
"Outline rectangles", N_("Outline rectangles"),
"Add wire outlines for all rectangular geometry") N_("Add wire outlines for all rectangular geometry"))
OPT (WIREFRAME, OPT (WIREFRAME,
"Visualize", N_("Visualize"),
"wireframe", "wireframe",
"Show wireframes", N_("Show wireframes"),
"Add wire outlines for all geometry") N_("Add wire outlines for all geometry"))
OPT (DISABLE_BATCHING, OPT (DISABLE_BATCHING,
"Root Cause", N_("Root Cause"),
"disable-batching", "disable-batching",
"Disable Journal batching", N_("Disable Journal batching"),
"Disable batching of geometry in the Cogl Journal.") N_("Disable batching of geometry in the Cogl Journal."))
OPT (DISABLE_VBOS, OPT (DISABLE_VBOS,
"Root Cause", N_("Root Cause"),
"disable-vbos", "disable-vbos",
"Disable GL Vertex Buffers", N_("Disable GL Vertex Buffers"),
"Disable use of OpenGL vertex buffer objects") N_("Disable use of OpenGL vertex buffer objects"))
OPT (DISABLE_PBOS, OPT (DISABLE_PBOS,
"Root Cause", N_("Root Cause"),
"disable-pbos", "disable-pbos",
"Disable GL Pixel Buffers", N_("Disable GL Pixel Buffers"),
"Disable use of OpenGL pixel buffer objects") N_("Disable use of OpenGL pixel buffer objects"))
OPT (DISABLE_SOFTWARE_TRANSFORM, OPT (DISABLE_SOFTWARE_TRANSFORM,
"Root Cause", N_("Root Cause"),
"disable-software-transform", "disable-software-transform",
"Disable software rect transform", N_("Disable software rect transform"),
"Use the GPU to transform rectangular geometry") N_("Use the GPU to transform rectangular geometry"))
OPT (DUMP_ATLAS_IMAGE, OPT (DUMP_ATLAS_IMAGE,
"Cogl Specialist", N_("Cogl Specialist"),
"dump-atlas-image", "dump-atlas-image",
"Dump atlas images", N_("Dump atlas images"),
"Dump texture atlas changes to an image file") N_("Dump texture atlas changes to an image file"))
OPT (DISABLE_ATLAS, OPT (DISABLE_ATLAS,
"Root Cause", N_("Root Cause"),
"disable-atlas", "disable-atlas",
"Disable texture atlasing", N_("Disable texture atlasing"),
"Disable use of texture atlasing") N_("Disable use of texture atlasing"))
OPT (DISABLE_SHARED_ATLAS, OPT (DISABLE_SHARED_ATLAS,
"Root Cause", N_("Root Cause"),
"disable-shared-atlas", "disable-shared-atlas",
"Disable sharing the texture atlas between text and images", N_("Disable sharing the texture atlas between text and images"),
"When this is set the glyph cache will always use a separate texture " N_("When this is set the glyph cache will always use a separate texture "
"for its atlas. Otherwise it will try to share the atlas with images.") "for its atlas. Otherwise it will try to share the atlas with images."))
OPT (DISABLE_TEXTURING, OPT (DISABLE_TEXTURING,
"Root Cause", N_("Root Cause"),
"disable-texturing", "disable-texturing",
"Disable texturing", N_("Disable texturing"),
"Disable texturing any primitives") N_("Disable texturing any primitives"))
OPT (DISABLE_ARBFP, OPT (DISABLE_ARBFP,
"Root Cause", N_("Root Cause"),
"disable-arbfp", "disable-arbfp",
"Disable arbfp", N_("Disable arbfp"),
"Disable use of ARB fragment programs") N_("Disable use of ARB fragment programs"))
OPT (DISABLE_FIXED, OPT (DISABLE_FIXED,
"Root Cause", N_("Root Cause"),
"disable-fixed", "disable-fixed",
"Disable fixed", N_("Disable fixed"),
"Disable use of the fixed function pipeline backend") N_("Disable use of the fixed function pipeline backend"))
OPT (DISABLE_GLSL, OPT (DISABLE_GLSL,
"Root Cause", N_("Root Cause"),
"disable-glsl", "disable-glsl",
"Disable GLSL", N_("Disable GLSL"),
"Disable use of GLSL") N_("Disable use of GLSL"))
OPT (DISABLE_BLENDING, OPT (DISABLE_BLENDING,
"Root Cause", N_("Root Cause"),
"disable-blending", "disable-blending",
"Disable blending", N_("Disable blending"),
"Disable use of blending") N_("Disable use of blending"))
OPT (DISABLE_NPOT_TEXTURES, OPT (DISABLE_NPOT_TEXTURES,
"Root Cause", N_("Root Cause"),
"disable-npot-textures", "disable-npot-textures",
"Disable non-power-of-two textures", N_("Disable non-power-of-two textures"),
"Makes Cogl think that the GL driver doesn't support NPOT textures " N_("Makes Cogl think that the GL driver doesn't support NPOT textures "
"so that it will create sliced textures or textures with waste instead.") "so that it will create sliced textures or textures with waste instead."))
OPT (DISABLE_SOFTWARE_CLIP, OPT (DISABLE_SOFTWARE_CLIP,
"Root Cause", N_("Root Cause"),
"disable-software-clip", "disable-software-clip",
"Disable software clipping", N_("Disable software clipping"),
"Disables Cogl's attempts to clip some rectangles in software.") N_("Disables Cogl's attempts to clip some rectangles in software."))
OPT (SHOW_SOURCE, OPT (SHOW_SOURCE,
"Cogl Tracing", N_("Cogl Tracing"),
"show-source", "show-source",
"Show source", N_("Show source"),
"Show generated ARBfp/GLSL source code") N_("Show generated ARBfp/GLSL source code"))
OPT (OPENGL, OPT (OPENGL,
"Cogl Tracing", N_("Cogl Tracing"),
"opengl", "opengl",
"Trace some OpenGL", N_("Trace some OpenGL"),
"Traces some select OpenGL calls") N_("Traces some select OpenGL calls"))
OPT (OFFSCREEN, OPT (OFFSCREEN,
"Cogl Tracing", N_("Cogl Tracing"),
"offscreen", "offscreen",
"Trace offscreen support", N_("Trace offscreen support"),
"Debug offscreen support") N_("Debug offscreen support"))
OPT (DISABLE_BLENDING, OPT (DISABLE_BLENDING,
"Root Cause", N_("Root Cause"),
"disable-program-caches", "disable-program-caches",
"Disable program caches", N_("Disable program caches"),
"Disable fallback caches for arbfp and glsl programs") N_("Disable fallback caches for arbfp and glsl programs"))
OPT (DISABLE_FAST_READ_PIXEL, OPT (DISABLE_FAST_READ_PIXEL,
"Root Cause", N_("Root Cause"),
"disable-fast-read-pixel", "disable-fast-read-pixel",
"Disable read pixel optimization", N_("Disable read pixel optimization"),
"Disable optimization for reading 1px for simple " N_("Disable optimization for reading 1px for simple "
"scenes of opaque rectangles") "scenes of opaque rectangles"))
OPT (CLIPPING, OPT (CLIPPING,
"Cogl Tracing", N_("Cogl Tracing"),
"clipping", "clipping",
"Trace clipping", N_("Trace clipping"),
"Logs information about how Cogl is implementing clipping") N_("Logs information about how Cogl is implementing clipping"))

View File

@ -151,15 +151,16 @@ _cogl_parse_debug_string (const char *value,
} }
else if (strcmp (value, "help") == 0) else if (strcmp (value, "help") == 0)
{ {
g_printerr ("\n\n%28s\n", "Supported debug values:"); g_printerr ("\n\n%28s\n", _("Supported debug values:"));
#define OPT(MASK_NAME, GROUP, NAME, NAME_FORMATTED, DESCRIPTION) \ #define OPT(MASK_NAME, GROUP, NAME, NAME_FORMATTED, DESCRIPTION) \
g_printerr ("%28s %s\n", NAME ":", DESCRIPTION); g_printerr ("%28s %s\n", NAME ":", g_dgettext (GETTEXT_PACKAGE, \
DESCRIPTION));
#include "cogl-debug-options.h" #include "cogl-debug-options.h"
g_printerr ("\n%28s\n", "Special debug values:"); g_printerr ("\n%28s\n", _("Special debug values:"));
OPT (IGNORED, "ignored", "all", "ignored", \ OPT (IGNORED, "ignored", "all", "ignored", \
"Enables all non-behavioural debug options"); N_("Enables all non-behavioural debug options"));
OPT (IGNORED, "ignored", "verbose", "ignored", \ OPT (IGNORED, "ignored", "verbose", "ignored", \
"Enables all non-behavioural debug options"); N_("Enables all non-behavioural debug options"));
#undef OPT #undef OPT
exit (1); exit (1);
} }

View File

@ -1,9 +1,13 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef COGL_ENABLE_PROFILE #ifdef COGL_ENABLE_PROFILE
#include "cogl-profile.h" #include "cogl-profile.h"
#include "cogl-debug.h" #include "cogl-debug.h"
#include <glib/gi18n-lib.h>
#include <stdlib.h> #include <stdlib.h>
UProfContext *_cogl_uprof_context; UProfContext *_cogl_uprof_context;
@ -47,10 +51,12 @@ _cogl_uprof_init (void)
G_STMT_START { \ G_STMT_START { \
int shift = COGL_DEBUG_ ## MASK_NAME; \ int shift = COGL_DEBUG_ ## MASK_NAME; \
uprof_context_add_boolean_option (_cogl_uprof_context, \ uprof_context_add_boolean_option (_cogl_uprof_context, \
GROUP, \ g_dgettext (GETTEXT_PACKAGE, GROUP), \
NAME, \ NAME, \
NAME_FORMATTED, \ g_dgettext (GETTEXT_PACKAGE, \
DESCRIPTION, \ NAME_FORMATTED), \
g_dgettext (GETTEXT_PACKAGE, \
DESCRIPTION), \
debug_option_getter, \ debug_option_getter, \
debug_option_setter, \ debug_option_setter, \
GUINT_TO_POINTER (shift)); \ GUINT_TO_POINTER (shift)); \

View File

@ -1,2 +1,3 @@
# List of source files which contain translatable strings. # List of source files which contain translatable strings.
cogl/cogl-debug.c cogl/cogl-debug.c
cogl/cogl-debug-options.h