1
0
Fork 0

Don't translate debug logs and warnings

Warnings that are going to the journal should be not translated:
they're not user visible, and translating them would just make
bug reporting harder (as now the developers need to understand
what the warning is saying)

https://bugzilla.gnome.org/show_bug.cgi?id=707897
This commit is contained in:
Giovanni Campagna 2013-09-11 10:37:36 +02:00
parent 7b537d6b8f
commit 5ae52473c9
10 changed files with 42 additions and 44 deletions

View file

@ -155,7 +155,7 @@ meta_core_get (Display *xdisplay,
break; break;
default: default:
meta_warning(_("Unknown window information request: %d"), request); meta_warning("Unknown window information request: %d\n", request);
} }
request = va_arg (args, MetaCoreGetType); request = va_arg (args, MetaCoreGetType);

View file

@ -421,7 +421,7 @@ enable_compositor (MetaDisplay *display)
!META_DISPLAY_HAS_DAMAGE (display) || !META_DISPLAY_HAS_DAMAGE (display) ||
!META_DISPLAY_HAS_RENDER (display)) !META_DISPLAY_HAS_RENDER (display))
{ {
meta_warning (_("Missing %s extension required for compositing"), meta_warning ("Missing %s extension required for compositing",
!META_DISPLAY_HAS_COMPOSITE (display) ? "composite" : !META_DISPLAY_HAS_COMPOSITE (display) ? "composite" :
!META_DISPLAY_HAS_DAMAGE (display) ? "damage" : "render"); !META_DISPLAY_HAS_DAMAGE (display) ? "damage" : "render");
return; return;

View file

@ -1138,7 +1138,7 @@ meta_change_keygrab (MetaDisplay *display,
if (grab && result != Success) if (grab && result != Success)
{ {
if (result == BadAccess) if (result == BadAccess)
meta_warning (_("Some other program is already using the key %s with modifiers %x as a binding\n"), keysym_name (keysym), modmask | ignored_mask); meta_warning ("Some other program is already using the key %s with modifiers %x as a binding\n", keysym_name (keysym), modmask | ignored_mask);
else else
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Failed to grab key %s with modifiers %x\n", "Failed to grab key %s with modifiers %x\n",
@ -1335,7 +1335,7 @@ meta_display_grab_accelerator (MetaDisplay *display,
{ {
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Failed to parse accelerator\n"); "Failed to parse accelerator\n");
meta_warning (_("\"%s\" is not a valid accelerator\n"), accelerator); meta_warning ("\"%s\" is not a valid accelerator\n", accelerator);
return META_KEYBINDING_ACTION_NONE; return META_KEYBINDING_ACTION_NONE;
} }

View file

@ -1199,8 +1199,8 @@ maybe_give_disable_workarounds_warning (void)
{ {
first_disable = FALSE; first_disable = FALSE;
meta_warning (_("Workarounds for broken applications disabled. " meta_warning ("Workarounds for broken applications disabled. "
"Some applications may not behave properly.\n")); "Some applications may not behave properly.\n");
} }
} }
@ -1274,8 +1274,8 @@ titlebar_handler (GVariant *value,
if (desc == NULL) if (desc == NULL)
{ {
meta_warning (_("Could not parse font description " meta_warning ("Could not parse font description "
"\"%s\" from GSettings key %s\n"), "\"%s\" from GSettings key %s\n",
string_value ? string_value : "(null)", string_value ? string_value : "(null)",
KEY_TITLEBAR_FONT); KEY_TITLEBAR_FONT);
return FALSE; return FALSE;
@ -1340,8 +1340,8 @@ mouse_button_mods_handler (GVariant *value,
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Failed to parse new GSettings value\n"); "Failed to parse new GSettings value\n");
meta_warning (_("\"%s\" found in configuration database is " meta_warning ("\"%s\" found in configuration database is "
"not a valid value for mouse button modifier\n"), "not a valid value for mouse button modifier\n",
string_value); string_value);
return FALSE; return FALSE;
@ -1906,7 +1906,7 @@ update_binding (MetaKeyPref *binding,
{ {
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Failed to parse new GSettings value\n"); "Failed to parse new GSettings value\n");
meta_warning (_("\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"), meta_warning ("\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n",
strokes[i], binding->name); strokes[i], binding->name);
/* Value is kept and will thus be removed next time we save the key. /* Value is kept and will thus be removed next time we save the key.

View file

@ -579,7 +579,7 @@ meta_screen_new (MetaDisplay *display,
if (XGetSelectionOwner (xdisplay, wm_sn_atom) != new_wm_sn_owner) if (XGetSelectionOwner (xdisplay, wm_sn_atom) != new_wm_sn_owner)
{ {
meta_warning (_("Could not acquire window manager selection on screen %d display \"%s\"\n"), meta_warning ("Could not acquire window manager selection on screen %d display \"%s\"\n",
number, display->name); number, display->name);
XDestroyWindow (xdisplay, new_wm_sn_owner); XDestroyWindow (xdisplay, new_wm_sn_owner);
@ -850,7 +850,7 @@ meta_screen_free (MetaScreen *screen,
meta_error_trap_push_with_return (screen->display); meta_error_trap_push_with_return (screen->display);
XSelectInput (screen->display->xdisplay, screen->xroot, 0); XSelectInput (screen->display->xdisplay, screen->xroot, 0);
if (meta_error_trap_pop_with_return (screen->display) != Success) if (meta_error_trap_pop_with_return (screen->display) != Success)
meta_warning (_("Could not release screen %d on display \"%s\"\n"), meta_warning ("Could not release screen %d on display \"%s\"\n",
screen->number, screen->display->name); screen->number, screen->display->name);
unset_wm_check_hint (screen); unset_wm_check_hint (screen);

View file

@ -841,14 +841,14 @@ save_state (void)
if (mkdir (mutter_dir, 0700) < 0 && if (mkdir (mutter_dir, 0700) < 0 &&
errno != EEXIST) errno != EEXIST)
{ {
meta_warning (_("Could not create directory '%s': %s\n"), meta_warning ("Could not create directory '%s': %s\n",
mutter_dir, g_strerror (errno)); mutter_dir, g_strerror (errno));
} }
if (mkdir (session_dir, 0700) < 0 && if (mkdir (session_dir, 0700) < 0 &&
errno != EEXIST) errno != EEXIST)
{ {
meta_warning (_("Could not create directory '%s': %s\n"), meta_warning ("Could not create directory '%s': %s\n",
session_dir, g_strerror (errno)); session_dir, g_strerror (errno));
} }
@ -858,7 +858,7 @@ save_state (void)
if (outfile == NULL) if (outfile == NULL)
{ {
meta_warning (_("Could not open session file '%s' for writing: %s\n"), meta_warning ("Could not open session file '%s' for writing: %s\n",
full_save_file (), g_strerror (errno)); full_save_file (), g_strerror (errno));
goto out; goto out;
} }
@ -999,12 +999,12 @@ save_state (void)
/* FIXME need a dialog for this */ /* FIXME need a dialog for this */
if (ferror (outfile)) if (ferror (outfile))
{ {
meta_warning (_("Error writing session file '%s': %s\n"), meta_warning ("Error writing session file '%s': %s\n",
full_save_file (), g_strerror (errno)); full_save_file (), g_strerror (errno));
} }
if (fclose (outfile)) if (fclose (outfile))
{ {
meta_warning (_("Error closing session file '%s': %s\n"), meta_warning ("Error closing session file '%s': %s\n",
full_save_file (), g_strerror (errno)); full_save_file (), g_strerror (errno));
} }
} }
@ -1134,7 +1134,7 @@ load_state (const char *previous_save_file)
error: error:
meta_warning (_("Failed to parse saved session file: %s\n"), meta_warning ("Failed to parse saved session file: %s\n",
error->message); error->message);
g_error_free (error); g_error_free (error);
@ -1183,7 +1183,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_PARSE, G_MARKUP_ERROR_PARSE,
_("<mutter_session> attribute seen but we already have the session ID")); "<mutter_session> attribute seen but we already have the session ID");
return; return;
} }
@ -1196,7 +1196,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <%s> element"), "Unknown attribute %s on <%s> element",
name, "mutter_session"); name, "mutter_session");
return; return;
} }
@ -1213,7 +1213,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_PARSE, G_MARKUP_ERROR_PARSE,
_("nested <window> tag")); "nested <window> tag");
return; return;
} }
@ -1271,7 +1271,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <%s> element"), "Unknown attribute %s on <%s> element",
name, "window"); name, "window");
session_info_free (pd->info); session_info_free (pd->info);
pd->info = NULL; pd->info = NULL;
@ -1303,7 +1303,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <%s> element"), "Unknown attribute %s on <%s> element",
name, "window"); name, "window");
session_info_free (pd->info); session_info_free (pd->info);
pd->info = NULL; pd->info = NULL;
@ -1375,7 +1375,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <%s> element"), "Unknown attribute %s on <%s> element",
name, "maximized"); name, "maximized");
return; return;
} }
@ -1435,7 +1435,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
_("Unknown attribute %s on <%s> element"), "Unknown attribute %s on <%s> element",
name, "geometry"); name, "geometry");
return; return;
} }
@ -1455,7 +1455,7 @@ start_element_handler (GMarkupParseContext *context,
g_set_error (error, g_set_error (error,
G_MARKUP_ERROR, G_MARKUP_ERROR,
G_MARKUP_ERROR_UNKNOWN_ELEMENT, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
_("Unknown element %s"), "Unknown element %s",
element_name); element_name);
return; return;
} }

View file

@ -82,7 +82,7 @@ ensure_logfile (void)
if (err != NULL) if (err != NULL)
{ {
meta_warning (_("Failed to open debug log: %s\n"), meta_warning ("Failed to open debug log: %s\n",
err->message); err->message);
g_error_free (err); g_error_free (err);
return; return;
@ -92,13 +92,13 @@ ensure_logfile (void)
if (logfile == NULL) if (logfile == NULL)
{ {
meta_warning (_("Failed to fdopen() log file %s: %s\n"), meta_warning ("Failed to fdopen() log file %s: %s\n",
filename, strerror (errno)); filename, strerror (errno));
close (fd); close (fd);
} }
else else
{ {
g_printerr (_("Opened log file %s\n"), filename); g_printerr ("Opened log file %s\n", filename);
} }
g_free (filename); g_free (filename);
@ -274,7 +274,7 @@ meta_debug_spew_real (const char *format, ...)
out = logfile ? logfile : stderr; out = logfile ? logfile : stderr;
if (no_prefix == 0) if (no_prefix == 0)
utf8_fputs (_("Window manager: "), out); utf8_fputs ("Window manager: ", out);
utf8_fputs (str, out); utf8_fputs (str, out);
fflush (out); fflush (out);
@ -424,7 +424,7 @@ meta_bug (const char *format, ...)
#endif #endif
if (no_prefix == 0) if (no_prefix == 0)
utf8_fputs (_("Bug in window manager: "), out); utf8_fputs ("Bug in window manager: ", out);
utf8_fputs (str, out); utf8_fputs (str, out);
fflush (out); fflush (out);
@ -455,7 +455,7 @@ meta_warning (const char *format, ...)
#endif #endif
if (no_prefix == 0) if (no_prefix == 0)
utf8_fputs (_("Window manager warning: "), out); utf8_fputs ("Window manager warning: ", out);
utf8_fputs (str, out); utf8_fputs (str, out);
fflush (out); fflush (out);
@ -483,7 +483,7 @@ meta_fatal (const char *format, ...)
#endif #endif
if (no_prefix == 0) if (no_prefix == 0)
utf8_fputs (_("Window manager error: "), out); utf8_fputs ("Window manager error: ", out);
utf8_fputs (str, out); utf8_fputs (str, out);
fflush (out); fflush (out);

View file

@ -345,7 +345,7 @@ reload_net_wm_pid (MetaWindow *window,
gulong cardinal = (int) value->v.cardinal; gulong cardinal = (int) value->v.cardinal;
if (cardinal <= 0) if (cardinal <= 0)
meta_warning (_("Application set a bogus _NET_WM_PID %lu\n"), meta_warning ("Application set a bogus _NET_WM_PID %lu\n",
cardinal); cardinal);
else else
{ {
@ -1527,8 +1527,7 @@ reload_transient_for (MetaWindow *window,
parent = meta_display_lookup_x_window (window->display, transient_for); parent = meta_display_lookup_x_window (window->display, transient_for);
if (!parent) if (!parent)
{ {
meta_warning (_("Invalid WM_TRANSIENT_FOR window 0x%lx specified " meta_warning ("Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n",
"for %s.\n"),
transient_for, window->desc); transient_for, window->desc);
transient_for = None; transient_for = None;
} }
@ -1538,8 +1537,7 @@ reload_transient_for (MetaWindow *window,
{ {
if (parent == window) if (parent == window)
{ {
meta_warning (_("WM_TRANSIENT_FOR window 0x%lx for %s " meta_warning ("WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n",
"would create loop.\n"),
transient_for, window->desc); transient_for, window->desc);
transient_for = None; transient_for = None;
break; break;

View file

@ -7650,7 +7650,7 @@ update_sm_hints (MetaWindow *window)
&str)) &str))
{ {
if (window->sm_client_id == NULL) /* first time through */ if (window->sm_client_id == NULL) /* first time through */
meta_warning (_("Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"), meta_warning ("Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n",
window->desc); window->desc);
window->sm_client_id = g_strdup (str); window->sm_client_id = g_strdup (str);
@ -8565,7 +8565,7 @@ recalc_window_features (MetaWindow *window)
* about these apps but make them work. * about these apps but make them work.
*/ */
meta_warning (_("Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"), meta_warning ("Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n",
window->desc, window->desc,
window->size_hints.min_width, window->size_hints.min_width,
window->size_hints.min_height, window->size_hints.min_height,

View file

@ -152,7 +152,7 @@ validate_or_free_results (GetPropertyResults *results,
if (res_name == NULL) if (res_name == NULL)
res_name = "unknown"; res_name = "unknown";
meta_warning (_("Window 0x%lx has property %s\nthat was expected to have type %s format %d\nand actually has type %s format %d n_items %d.\nThis is most likely an application bug, not a window manager bug.\nThe window has title=\"%s\" class=\"%s\" name=\"%s\"\n"), meta_warning ("Window 0x%lx has property %s\nthat was expected to have type %s format %d\nand actually has type %s format %d n_items %d.\nThis is most likely an application bug, not a window manager bug.\nThe window has title=\"%s\" class=\"%s\" name=\"%s\"\n",
results->xwindow, results->xwindow,
prop_name ? prop_name : "(bad atom)", prop_name ? prop_name : "(bad atom)",
expected_name ? expected_name : "(bad atom)", expected_name ? expected_name : "(bad atom)",
@ -408,7 +408,7 @@ utf8_string_from_results (GetPropertyResults *results,
char *name; char *name;
name = XGetAtomName (results->display->xdisplay, results->xatom); name = XGetAtomName (results->display->xdisplay, results->xatom);
meta_warning (_("Property %s on window 0x%lx contained invalid UTF-8\n"), meta_warning ("Property %s on window 0x%lx contained invalid UTF-8\n",
name, results->xwindow); name, results->xwindow);
meta_XFree (name); meta_XFree (name);
XFree (results->prop); XFree (results->prop);
@ -491,7 +491,7 @@ utf8_list_from_results (GetPropertyResults *results,
meta_error_trap_push (results->display); meta_error_trap_push (results->display);
name = XGetAtomName (results->display->xdisplay, results->xatom); name = XGetAtomName (results->display->xdisplay, results->xatom);
meta_error_trap_pop (results->display); meta_error_trap_pop (results->display);
meta_warning (_("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"), meta_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n",
name, results->xwindow, i); name, results->xwindow, i);
meta_XFree (name); meta_XFree (name);
meta_XFree (results->prop); meta_XFree (results->prop);