[ease] Mark strings for translation.
- From: Stéphane Maniaci <maniacis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] Mark strings for translation.
- Date: Thu, 27 May 2010 23:12:48 +0000 (UTC)
commit 333904ae7bcc918034e3c8afb2db78cd82af0a30
Author: Stéphane Maniaci <stephane maniaci gmail com>
Date: Fri May 28 01:11:05 2010 +0200
Mark strings for translation.
Needed : unabusive capitalization, and reformulation.
src/Document.vala | 12 ++++++------
src/EditorWindow.vala | 14 +++++++-------
src/Element.vala | 2 +-
src/HTMLExporter.vala | 8 ++++----
src/ImageActor.vala | 2 +-
src/OpenDialog.vala | 2 +-
src/SlideActor.vala | 2 +-
src/SlidePane.vala | 4 ++--
src/TransitionPane.vala | 14 +++++++-------
src/Transitions.vala | 33 +++++++++++++++++----------------
10 files changed, 47 insertions(+), 46 deletions(-)
---
diff --git a/src/Document.vala b/src/Document.vala
index 5f84d55..83e073d 100644
--- a/src/Document.vala
+++ b/src/Document.vala
@@ -58,13 +58,13 @@ public class Ease.Document : GLib.Object
var doc = Parser.parse_file(filename + "Document.xml");
if (doc == null)
{
- stdout.printf("No Document");
+ stdout.printf(_("No Document"));
}
var root = doc->get_root_element();
if (root == null)
{
- stdout.printf("No root node");
+ stdout.printf(_("No root node"));
}
else
{
@@ -118,8 +118,8 @@ public class Ease.Document : GLib.Object
Gtk.DialogFlags.NO_SEPARATOR,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.CLOSE,
- "Error saving: %s", e. message);
- dialog.title = "Error Saving";
+ _("Error saving: %s"), e. message);
+ dialog.title = _("Error Saving");
dialog.border_width = 5;
dialog.run();
}
@@ -284,9 +284,9 @@ public class Ease.Document : GLib.Object
Gtk.DialogFlags.NO_SEPARATOR,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.CLOSE,
- "Error exporting: %s",
+ _("Error exporting: %s"),
e. message);
- dialog.title = "Error Exporting";
+ dialog.title = _("Error Exporting");
dialog.border_width = 5;
dialog.run();
}
diff --git a/src/EditorWindow.vala b/src/EditorWindow.vala
index b443951..d2da865 100644
--- a/src/EditorWindow.vala
+++ b/src/EditorWindow.vala
@@ -262,7 +262,7 @@ public class Ease.EditorWindow : Gtk.Window
// signal handlers
private void show_open_dialog()
{
- var dialog = new Gtk.FileChooserDialog("Open File",
+ var dialog = new Gtk.FileChooserDialog(_("Open File"),
this,
Gtk.FileChooserAction.OPEN,
null);
@@ -287,15 +287,15 @@ public class Ease.EditorWindow : Gtk.Window
private Gtk.MenuItem create_file_menu()
{
/* TODO : use mnemonics */
- var menuItem = new Gtk.MenuItem.with_label("File");
+ var menuItem = new Gtk.MenuItem.with_label(_("File"));
var menu = new Gtk.Menu();
- var newItem = new Gtk.MenuItem.with_label("New");
+ var newItem = new Gtk.MenuItem.with_label(_("New"));
var newMenu = new Gtk.Menu();
- var newPres = new Gtk.MenuItem.with_label("Presentation");
+ var newPres = new Gtk.MenuItem.with_label(_("Presentation"));
newPres.activate.connect(new_presentation);
- var newTheme = new Gtk.MenuItem.with_label("Theme");
- var Quit = new Gtk.MenuItem.with_label("Quit");
+ var newTheme = new Gtk.MenuItem.with_label(_("Theme"));
+ var Quit = new Gtk.MenuItem.with_label(_("Quit"));
Quit.activate.connect( Gtk.main_quit );
newMenu.append(newPres);
@@ -303,7 +303,7 @@ public class Ease.EditorWindow : Gtk.Window
newItem.set_submenu(newMenu);
menu.append(newItem);
- var openItem = new Gtk.MenuItem.with_label("Open");
+ var openItem = new Gtk.MenuItem.with_label(_("Open"));
openItem.activate.connect(show_open_dialog);
openItem.set_accel_path("<-Document>/File/Open");
Gtk.AccelMap.add_entry("<-Document>/File/Open",
diff --git a/src/Element.vala b/src/Element.vala
index 5184120..4a10771 100644
--- a/src/Element.vala
+++ b/src/Element.vala
@@ -152,7 +152,7 @@ public class Ease.Element : GLib.Object
html += "src=\"" + exporter.path + " " +
data.get("filename") + "\" " +
"controls=\"yes\">" +
- "Your browser does not support the video tag" +
+ _("Your browser does not support the video tag") +
"</video>";
// copy the video file
diff --git a/src/HTMLExporter.vala b/src/HTMLExporter.vala
index ba7340a..8adfab3 100644
--- a/src/HTMLExporter.vala
+++ b/src/HTMLExporter.vala
@@ -48,7 +48,7 @@ public class Ease.HTMLExporter : GLib.Object
*/
public bool request_path(Gtk.Window win)
{
- var dialog = new Gtk.FileChooserDialog("Export to HTML",
+ var dialog = new Gtk.FileChooserDialog(_("Export to HTML"),
win,
Gtk.FileChooserAction.SAVE,
"gtk-save",
@@ -66,7 +66,7 @@ public class Ease.HTMLExporter : GLib.Object
// create the progress dialog
window = new Gtk.Dialog();
window.width_request = 400;
- window.set_title("Exporting as HTML");
+ window.set_title(_("Exporting as HTML"));
Gtk.VBox vbox = (Gtk.VBox)(window.get_content_area());
vbox.pack_start(progress, true, true, 5);
window.show_all();
@@ -134,9 +134,9 @@ public class Ease.HTMLExporter : GLib.Object
Gtk.DialogFlags.NO_SEPARATOR,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.CLOSE,
- "Error copying: %s",
+ _("Error copying: %s"),
e. message);
- dialog.title = "Error Copying File";
+ dialog.title = _("Error Copying File");
dialog.border_width = 5;
dialog.run();
dialog.destroy();
diff --git a/src/ImageActor.vala b/src/ImageActor.vala
index 6a5c916..454a5c6 100644
--- a/src/ImageActor.vala
+++ b/src/ImageActor.vala
@@ -44,7 +44,7 @@ public class Ease.ImageActor : Actor
}
catch (GLib.Error e)
{
- stdout.printf("Error loading ImageActor: %s", e.message);
+ stdout.printf(_("Error loading ImageActor: %s"), e.message);
}
finally
{
diff --git a/src/OpenDialog.vala b/src/OpenDialog.vala
index 3be0b0e..b2ec66d 100644
--- a/src/OpenDialog.vala
+++ b/src/OpenDialog.vala
@@ -46,7 +46,7 @@ public class Ease.OpenDialog : GLib.Object
private void instance_run()
{
- var dialog = new Gtk.FileChooserDialog("Open File",
+ var dialog = new Gtk.FileChooserDialog(_("Open File"),
null,
Gtk.FileChooserAction.SELECT_FOLDER,
"gtk-cancel", Gtk.ResponseType.CANCEL,
diff --git a/src/SlideActor.vala b/src/SlideActor.vala
index 9d2bd37..db058a2 100644
--- a/src/SlideActor.vala
+++ b/src/SlideActor.vala
@@ -132,7 +132,7 @@ public class Ease.SlideActor : Clutter.Group
}
catch (GLib.Error e)
{
- stdout.printf("Error loading background: %s", e.message);
+ stdout.printf(_("Error loading background: %s"), e.message);
}
}
else // the background is a solid color
diff --git a/src/SlidePane.vala b/src/SlidePane.vala
index b551217..eac6140 100644
--- a/src/SlidePane.vala
+++ b/src/SlidePane.vala
@@ -38,7 +38,7 @@ public class Ease.SlidePane : Gtk.VBox
var vbox = new Gtk.VBox(false, 0);
var hbox = new Gtk.HBox(false, 0);
var align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Effect"));
+ align.add(new Gtk.Label(_("Effect")));
vbox.pack_start(align, false, false, 0);
effect = new Gtk.ComboBox();
align = new Gtk.Alignment(0, 0, 1, 1);
@@ -49,7 +49,7 @@ public class Ease.SlidePane : Gtk.VBox
// effect duration
vbox = new Gtk.VBox(false, 0);
align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Duration"));
+ align.add(new Gtk.Label(_("Duration")));
vbox.pack_start(align, false, false, 0);
duration = new Gtk.SpinButton.with_range(0, 10, 0.25);
duration.digits = 2;
diff --git a/src/TransitionPane.vala b/src/TransitionPane.vala
index b3cdf36..9aadd57 100644
--- a/src/TransitionPane.vala
+++ b/src/TransitionPane.vala
@@ -62,7 +62,7 @@ public class Ease.TransitionPane : Gtk.VBox
var vbox = new Gtk.VBox(false, 0);
hbox = new Gtk.HBox(false, 0);
var align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Effect"));
+ align.add(new Gtk.Label(_("Effect")));
vbox.pack_start(align, false, false, 0);
effect = new Gtk.ComboBox.text();
for (var i = 0; i < Transitions.size; i++)
@@ -78,7 +78,7 @@ public class Ease.TransitionPane : Gtk.VBox
// transition transition_time
vbox = new Gtk.VBox(false, 0);
align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Duration"));
+ align.add(new Gtk.Label(_("Duration")));
vbox.pack_start(align, false, false, 0);
transition_time = new Gtk.SpinButton.with_range(0, 10, 0.25);
transition_time.digits = 2;
@@ -96,7 +96,7 @@ public class Ease.TransitionPane : Gtk.VBox
hbox = new Gtk.HBox(false, 0);
vbox = new Gtk.VBox(false, 0);
align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Direction"));
+ align.add(new Gtk.Label(_("Direction")));
vbox.pack_start(align, false, false, 0);
variant = new Gtk.ComboBox.text();
variant_align = new Gtk.Alignment(0, 0, 1, 1);
@@ -109,11 +109,11 @@ public class Ease.TransitionPane : Gtk.VBox
vbox = new Gtk.VBox(false, 0);
hbox = new Gtk.HBox(false, 0);
align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Start Transition"));
+ align.add(new Gtk.Label(_("Start Transition")));
vbox.pack_start(align, false, false, 0);
start_transition = new Gtk.ComboBox.text();
- start_transition.append_text("Manually");
- start_transition.append_text("Automatically");
+ start_transition.append_text(_("Manually"));
+ start_transition.append_text(_("Automatically"));
start_transition.set_active(0);
align = new Gtk.Alignment(0, 0, 1, 1);
align.add(start_transition);
@@ -123,7 +123,7 @@ public class Ease.TransitionPane : Gtk.VBox
// start transition delay
vbox = new Gtk.VBox(false, 0);
align = new Gtk.Alignment(0, 0, 0, 0);
- align.add(new Gtk.Label("Delay"));
+ align.add(new Gtk.Label(_("Delay")));
vbox.pack_start(align, false, false, 0);
delay = new Gtk.SpinButton.with_range(0, 10, 0.25);
delay.digits = 2;
diff --git a/src/Transitions.vala b/src/Transitions.vala
index 1ee8b66..b13881f 100644
--- a/src/Transitions.vala
+++ b/src/Transitions.vala
@@ -35,25 +35,26 @@ public static class Ease.Transitions : GLib.Object
public static void init()
{
Transitions = new Gee.ArrayList<Transition>();
- add_transition("None", {}, 0);
+ string []directions = { _("Up"), _("Down"), _("Left"), _("Right") };
+
+ add_transition(_("None"), {}, 0);
add_transition(_("Fade"), {}, 0);
- /* FIXME : is there a way to put the redundants variants into the same string ? */
- add_transition(_("Slide"), { _("Up"), _("Down"), _("Left"), _("Right") }, 4);
+ add_transition(_("Slide"), directions, 4);
add_transition(_("Drop"), {}, 0);
add_transition(_("Pivot"), { _("Top Left"), _("Top Right"), _("Bottom Left"), _("Bottom Right") }, 4);
- add_transition(_("Flip"), { "Top to Bottom", "Bottom to Top", "Left to Right", "Right to Left" }, 4);
- add_transition("Revolving Door", { "Top", "Bottom", "Left", "Right" }, 4);
- add_transition("Reveal", { "Top", "Bottom", "Left", "Right" }, 4);
- add_transition("Fall", {}, 0);
- add_transition("Slats", {}, 0);
- add_transition("Open Door", {}, 0);
- add_transition("Zoom", { "Center", "Top Left", "Top Right", "Bottom Left", "Bottom Right" }, 5);
- add_transition("Panel", { "Up", "Down", "Left", "Right" }, 4);
- add_transition("Spin Contents", { "Left", "Right" }, 2);
- add_transition("Swing Contents", {}, 0);
- add_transition("Slide Contents", { "Up", "Down", "Left", "Right" }, 4);
- add_transition("Spring Contents", { "Up", "Down" }, 2);
- add_transition("Zoom Contents", { "In", "Out" }, 2);
+ add_transition(_("Flip"), { _("Top to Bottom"), _("Bottom to Top"), _("Left to Right"), _("Right to Left") }, 4);
+ add_transition(_("Revolving Door"), directions, 4);
+ add_transition(_("Reveal"), directions, 4);
+ add_transition(_("Fall"), {}, 0);
+ add_transition(_("Slats"), {}, 0);
+ add_transition(_("Open Door"), {}, 0);
+ add_transition(_("Zoom"), { _("Center"), _("Top Left"), _("Top Right"), _("Bottom Left"), _("Bottom Right") }, 5);
+ add_transition(_("Panel"), directions, 4);
+ add_transition(_("Spin Contents"), { _("Left"), _("Right") }, 2);
+ add_transition(_("Swing Contents"), {}, 0);
+ add_transition(_("Slide Contents"), directions, 4);
+ add_transition(_("Spring Contents"), { _("Up"), _("Down") }, 2);
+ add_transition(_("Zoom Contents"), { _("In"), _("Out") }, 2);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]