libgimpwidgets, plug-ins: translate dialog buttons
GTK no longer contains stock labels, so the button labels needed to be marked as translatable.
This commit is contained in:
@ -174,7 +174,7 @@ gimp_dialog_constructed (GObject *object)
|
|||||||
if (show_help_button && private->help_func && private->help_id)
|
if (show_help_button && private->help_func && private->help_id)
|
||||||
{
|
{
|
||||||
private->help_button = gtk_dialog_add_button (GTK_DIALOG (object),
|
private->help_button = gtk_dialog_add_button (GTK_DIALOG (object),
|
||||||
("_Help"),
|
_("_Help"),
|
||||||
GTK_RESPONSE_HELP);
|
GTK_RESPONSE_HELP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,14 +89,14 @@ def save_colorxhtml(procedure, run_mode, image, n_layers, layers, file, args, da
|
|||||||
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
|
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
|
||||||
dialog = Gtk.Dialog(use_header_bar=use_header_bar,
|
dialog = Gtk.Dialog(use_header_bar=use_header_bar,
|
||||||
title=_("Save as colored HTML text..."))
|
title=_("Save as colored HTML text..."))
|
||||||
dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
dialog.add_button("_OK", Gtk.ResponseType.OK)
|
dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
|
|
||||||
choose_file_dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
|
choose_file_dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
|
||||||
title=_("Read characters from file..."),
|
title=_("Read characters from file..."),
|
||||||
action=Gtk.FileChooserAction.OPEN)
|
action=Gtk.FileChooserAction.OPEN)
|
||||||
choose_file_dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
choose_file_dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
choose_file_dialog.add_button("_OK", Gtk.ResponseType.OK)
|
choose_file_dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
|
|
||||||
def choose_file(button, user_data=None):
|
def choose_file(button, user_data=None):
|
||||||
choose_file_dialog.show()
|
choose_file_dialog.show()
|
||||||
|
@ -121,8 +121,8 @@ def gradient_css_save(procedure, args, data):
|
|||||||
file_chooser_dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
|
file_chooser_dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
|
||||||
title=_("Save as CSS file..."),
|
title=_("Save as CSS file..."),
|
||||||
action=Gtk.FileChooserAction.SAVE)
|
action=Gtk.FileChooserAction.SAVE)
|
||||||
file_chooser_dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
file_chooser_dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
file_chooser_dialog.add_button("_OK", Gtk.ResponseType.OK)
|
file_chooser_dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
|
|
||||||
#Connect config so reset works on custom widget
|
#Connect config so reset works on custom widget
|
||||||
def gradient_reset (*args):
|
def gradient_reset (*args):
|
||||||
|
@ -201,8 +201,8 @@ def run(procedure, run_mode, image, n_layers, layers, args, data):
|
|||||||
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
|
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
|
||||||
dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
|
dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
|
||||||
title=_("Histogram Export..."))
|
title=_("Histogram Export..."))
|
||||||
dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
dialog.add_button("_OK", Gtk.ResponseType.OK)
|
dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
|
|
||||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
|
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
|
||||||
homogeneous=False, spacing=10)
|
homogeneous=False, spacing=10)
|
||||||
@ -243,8 +243,8 @@ def run(procedure, run_mode, image, n_layers, layers, args, data):
|
|||||||
file_chooser_dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
|
file_chooser_dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
|
||||||
title=_("Histogram Export file..."),
|
title=_("Histogram Export file..."),
|
||||||
action=Gtk.FileChooserAction.SAVE)
|
action=Gtk.FileChooserAction.SAVE)
|
||||||
file_chooser_dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
file_chooser_dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
file_chooser_dialog.add_button("_OK", Gtk.ResponseType.OK)
|
file_chooser_dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
|
|
||||||
# Bucket size parameter
|
# Bucket size parameter
|
||||||
label = Gtk.Label.new_with_mnemonic(_("_Bucket Size"))
|
label = Gtk.Label.new_with_mnemonic(_("_Bucket Size"))
|
||||||
|
@ -142,8 +142,8 @@ class PaletteOffset (Gimp.PlugIn):
|
|||||||
dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
|
dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
|
||||||
title=_("Offset Palette..."))
|
title=_("Offset Palette..."))
|
||||||
|
|
||||||
dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
dialog.add_button("_OK", Gtk.ResponseType.OK)
|
dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
|
|
||||||
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
|
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
|
||||||
homogeneous=False, spacing=12)
|
homogeneous=False, spacing=12)
|
||||||
|
@ -76,10 +76,10 @@ def run(procedure, args, data):
|
|||||||
self.set_property("help-id", PROC_NAME)
|
self.set_property("help-id", PROC_NAME)
|
||||||
Gtk.Window.set_title(self, _("Python Console"))
|
Gtk.Window.set_title(self, _("Python Console"))
|
||||||
Gtk.Window.set_role(self, PROC_NAME)
|
Gtk.Window.set_role(self, PROC_NAME)
|
||||||
Gtk.Dialog.add_button(self, "_Save", Gtk.ResponseType.OK)
|
Gtk.Dialog.add_button(self, _("_Save"), Gtk.ResponseType.OK)
|
||||||
Gtk.Dialog.add_button(self, "Cl_ear", RESPONSE_CLEAR)
|
Gtk.Dialog.add_button(self, _("Cl_ear"), RESPONSE_CLEAR)
|
||||||
Gtk.Dialog.add_button(self, _("_Browse..."), RESPONSE_BROWSE)
|
Gtk.Dialog.add_button(self, _("_Browse..."), RESPONSE_BROWSE)
|
||||||
Gtk.Dialog.add_button(self, "_Close", Gtk.ResponseType.CLOSE)
|
Gtk.Dialog.add_button(self, _("_Close"), Gtk.ResponseType.CLOSE)
|
||||||
|
|
||||||
Gtk.Widget.set_name (self, PROC_NAME)
|
Gtk.Widget.set_name (self, PROC_NAME)
|
||||||
GimpUi.Dialog.set_alternative_button_order_from_array(self,
|
GimpUi.Dialog.set_alternative_button_order_from_array(self,
|
||||||
@ -256,8 +256,8 @@ def run(procedure, args, data):
|
|||||||
dlg = GimpUi.ProcBrowserDialog(use_header_bar=use_header_bar)
|
dlg = GimpUi.ProcBrowserDialog(use_header_bar=use_header_bar)
|
||||||
Gtk.Window.set_title(dlg, _("Python Procedure Browser"))
|
Gtk.Window.set_title(dlg, _("Python Procedure Browser"))
|
||||||
Gtk.Window.set_role(dlg, PROC_NAME)
|
Gtk.Window.set_role(dlg, PROC_NAME)
|
||||||
Gtk.Dialog.add_button(dlg, "Apply", Gtk.ResponseType.APPLY)
|
Gtk.Dialog.add_button(dlg, _("_Apply"), Gtk.ResponseType.APPLY)
|
||||||
Gtk.Dialog.add_button(dlg, "Close", Gtk.ResponseType.CLOSE)
|
Gtk.Dialog.add_button(dlg, _("_Close"), Gtk.ResponseType.CLOSE)
|
||||||
|
|
||||||
Gtk.Dialog.set_default_response(self, Gtk.ResponseType.OK)
|
Gtk.Dialog.set_default_response(self, Gtk.ResponseType.OK)
|
||||||
GimpUi.Dialog.set_alternative_button_order_from_array(dlg,
|
GimpUi.Dialog.set_alternative_button_order_from_array(dlg,
|
||||||
@ -308,8 +308,8 @@ def run(procedure, args, data):
|
|||||||
dlg = Gtk.FileChooserDialog()
|
dlg = Gtk.FileChooserDialog()
|
||||||
Gtk.Window.set_title(dlg, _("Save Python-Fu Console Output"))
|
Gtk.Window.set_title(dlg, _("Save Python-Fu Console Output"))
|
||||||
Gtk.Window.set_transient_for(dlg, self)
|
Gtk.Window.set_transient_for(dlg, self)
|
||||||
Gtk.Dialog.add_button(dlg, "_Cancel", Gtk.ResponseType.CANCEL)
|
Gtk.Dialog.add_button(dlg, _("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
Gtk.Dialog.add_button(dlg, "_Save", Gtk.ResponseType.OK)
|
Gtk.Dialog.add_button(dlg, _("_Save"), Gtk.ResponseType.OK)
|
||||||
Gtk.Dialog.set_default_response(self, Gtk.ResponseType.OK)
|
Gtk.Dialog.set_default_response(self, Gtk.ResponseType.OK)
|
||||||
GimpUi.Dialog.set_alternative_button_order_from_array(dlg,
|
GimpUi.Dialog.set_alternative_button_order_from_array(dlg,
|
||||||
[ Gtk.ResponseType.OK,
|
[ Gtk.ResponseType.OK,
|
||||||
|
@ -1721,8 +1721,8 @@ class SpyroWindow():
|
|||||||
|
|
||||||
def dialog_button_box():
|
def dialog_button_box():
|
||||||
|
|
||||||
self.dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
|
self.dialog.add_button(_("_Cancel"), Gtk.ResponseType.CANCEL)
|
||||||
self.ok_btn = self.dialog.add_button("_OK", Gtk.ResponseType.OK)
|
self.ok_btn = self.dialog.add_button(_("_OK"), Gtk.ResponseType.OK)
|
||||||
btn = self.dialog.add_button(_("Re_draw"), RESPONSE_REDRAW)
|
btn = self.dialog.add_button(_("Re_draw"), RESPONSE_REDRAW)
|
||||||
btn.set_tooltip_text(
|
btn.set_tooltip_text(
|
||||||
_("If you change the settings of a tool, change color, or change the selection, "
|
_("If you change the settings of a tool, change color, or change the selection, "
|
||||||
|
Reference in New Issue
Block a user