printers: Make printer's status translatable

Translate printer's status correctly.
Don't translate maintenance commands.
This commit is contained in:
Marek Kasik 2011-01-18 16:04:47 +01:00
parent de981f9254
commit deebec140e

View file

@ -266,11 +266,11 @@ printer_selection_changed_cb (GtkTreeSelection *selection,
g_strfreev (printer_reasons); g_strfreev (printer_reasons);
if (error_index >= 0) if (error_index >= 0)
status = g_strdup (statuses[error_index]); status = g_strdup (_(statuses[error_index]));
else if (warning_index >= 0) else if (warning_index >= 0)
status = g_strdup (statuses[warning_index]); status = g_strdup (_(statuses[warning_index]));
else if (report_index >= 0) else if (report_index >= 0)
status = g_strdup (statuses[report_index]); status = g_strdup (_(statuses[report_index]));
} }
if (status == NULL) if (status == NULL)
@ -278,13 +278,13 @@ printer_selection_changed_cb (GtkTreeSelection *selection,
switch (printer_state) switch (printer_state)
{ {
case 3: case 3:
status = g_strdup ( N_ ("Idle")); status = g_strdup ( _("Idle"));
break; break;
case 4: case 4:
status = g_strdup ( N_ ("Processing")); status = g_strdup ( _("Processing"));
break; break;
case 5: case 5:
status = g_strdup ( N_ ("Paused")); status = g_strdup ( _("Paused"));
break; break;
} }
} }
@ -1445,15 +1445,15 @@ printer_maintenance_cb (GtkButton *button,
== button) == button)
{ {
response = execute_maintenance_command (printer_name, response = execute_maintenance_command (printer_name,
_("PrintSelfTestPage"), "PrintSelfTestPage",
_("Test page")); _("Test page"));
} }
else if ((GtkButton*) gtk_builder_get_object (priv->builder, else if ((GtkButton*) gtk_builder_get_object (priv->builder,
"clean-print-heads-button") "clean-print-heads-button")
== button) == button)
response = execute_maintenance_command (printer_name, response = execute_maintenance_command (printer_name,
_("Clean all"), "Clean all",
_("Clean print heads command")); _("Clean print heads"));
if (response && response->state == IPP_ERROR) if (response && response->state == IPP_ERROR)
g_warning (_("An error has occured during a maintenance command.")); g_warning (_("An error has occured during a maintenance command."));
} }