Clone in a terminal:
Commit 14388a4
Johan Mattsson - 2012-12-05T17:27:56+00:00
14388a4659c53ebf9e7471ef8bdf661088fff6f0johan.mattsson.m@gmail.com

more localization

Changed files (8)

Diff

diff --git a/src/Argument.vala b/src/Argument.valaindex 6eb990c..352f871 100644--- a/src/Argument.vala+++ b/src/Argument.vala@@ -222,16 +222,16 @@ public class Argument : GLib.Object { 	public void print_help ()  		requires (args.length () > 0) 	{-		stdout.printf ("Usage: ");+		stdout.printf (_("Usage") + ": "); 		stdout.printf (args.nth (0).data); 		stdout.printf (" [FILE] [OPTION ...]\n"); -		print_padded ("-c, --show-coordinates", "show coordinate in glyph view");-		print_padded ("-e, --exit", "exit if a testcase failes");-		print_padded ("-f, --fatal-warning", "treat warnings as fatal");-		print_padded ("-h, --help", "show this message");-		print_padded ("-s, --slow", "sleep between each command in test suite");-		print_padded ("-t, --test [TEST]", "run test case");+		print_padded ("-c, --show-coordinates", _("show coordinate in glyph view"));+		print_padded ("-e, --exit", _("exit if a testcase failes"));+		print_padded ("-f, --fatal-warning", _("treat warnings as fatal"));+		print_padded ("-h, --help", _("show this message"));+		print_padded ("-s, --slow", _("sleep between each command in test suite"));+		print_padded ("-t, --test [TEST]", _("run test case")); 		 		stdout.printf ("\n"); 	}diff --git a/src/BackgroundTool.vala b/src/BackgroundTool.valaindex 8cde8be..2e505e9 100644--- a/src/BackgroundTool.vala+++ b/src/BackgroundTool.vala@@ -37,7 +37,7 @@ class BackgroundTool : Tool { 	bool resize_bg; // DEL 	 	public BackgroundTool (string name) {-		base (name, "Move, resize and rotate background image");+		base (name, _("Move, resize and rotate background image")); 		 		top_limit = 0; 		bottom_limit = 0;diff --git a/src/ExportTool.vala b/src/ExportTool.valaindex c15ae3c..714fff6 100644--- a/src/ExportTool.vala+++ b/src/ExportTool.vala@@ -26,7 +26,7 @@ public class ExportTool : Tool { 	private static bool stop_export_thread = false;  	public ExportTool (string n) {-		base (n, "Export glyph to svg file", 'e', CTRL);+		base (n, _("Export glyph to svg file"), 'e', CTRL); 	 		select_action.connect((self) => { 			export_svg_font ();@@ -289,8 +289,8 @@ os.put_string (  <div> 	<h4 class="smaller">Alphabet</h4>-	<p class="smaller">a b c d e f g h i j k l m n o p q r s t u v w x y z å ä ö</p>-	<p class="smaller">A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Å Ä Ö</p>+	<p class="smaller">""" + _("a b c d e f g h i j k l m n o p q r s t u v w x y z") + """</p>+	<p class="smaller">""" + _("A B C D E F G H I J K L M N O P Q R S T U V W X Y Z") + """</p> 	<p class="smaller">0 1 2 3 4 5 6 7 8 9</p> </div> @@ -347,7 +347,7 @@ os.put_string ( 			return @"$PREFIX/bin/birdfont-export"; 		} -		warning ("Can't fint birdfont-export.");+		warning ("Can't find birdfont-export."); 		 		return "birdfont-export"; 	}@@ -510,7 +510,7 @@ os.put_string ( 			try { 				fo.write (); 			} catch (Error e) {-				warning ("EOF convertion falied.");+				warning ("EOF conversion falied."); 				critical (@"$(e.message)"); 			} 		}diff --git a/src/GlyphRange.vala b/src/GlyphRange.valaindex ddc638d..0918941 100644--- a/src/GlyphRange.vala+++ b/src/GlyphRange.vala@@ -33,18 +33,17 @@ public class GlyphRange { 	} 	 	public void use_default_range () {-		add_range ('a', 'z');+		string lower_case = _("a b c d e f g h i j k l m n o p q r s t u v w x y z");+		string upper_case = _("A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"); -		add_single ('å');-		add_single ('ä');-		add_single ('ö');--		add_range ('A', 'Z');+		foreach (string c in lower_case.split (" ")) {+			add_single (c.get_char ());+		} -		add_single ('Å');-		add_single ('Ä');-		add_single ('Ö');-		+		foreach (string c in upper_case.split (" ")) {+			add_single (c.get_char ());+		}+				 		add_range ('0', '9'); 		 		add_single (' '); // TODO: add all spaces here.diff --git a/src/MergeTool.vala b/src/MergeTool.valaindex 452515d..030d9bb 100644--- a/src/MergeTool.vala+++ b/src/MergeTool.vala@@ -20,7 +20,7 @@ namespace Supplement { class MergeTool : Tool {  	public MergeTool (string n) {-		base (n, "Merge paths");+		base (n, _("Merge paths")); 	 		select_action.connect((self) => { 			Glyph g = MainWindow.get_current_glyph ();diff --git a/src/MoveTool.vala b/src/MoveTool.valaindex 91f5232..6b23ba6 100644--- a/src/MoveTool.vala+++ b/src/MoveTool.vala@@ -33,7 +33,7 @@ class MoveTool : Tool { 	ImageSurface? resize_handle; 	 	public MoveTool (string n) {-		base (n, "Move paths", 'm', CTRL);+		base (n, _("Move paths"), 'm', CTRL); 		 		resize_handle = Icons.get_icon ("resize_handle.png"); 	diff --git a/src/PenTool.vala b/src/PenTool.valaindex 0b4bd42..1b7d02d 100644--- a/src/PenTool.vala+++ b/src/PenTool.vala@@ -45,7 +45,7 @@ class PenTool : Tool { 	public static double precision = 1; 	 	public PenTool (string name) {-		base (name, "Right click to add new point, left click to move points and double click to add new point on path", ',', CTRL);+		base (name, _("Right click to add new point, left click to move points and double click to add new point on path"), ',', CTRL); 		 		select_action.connect ((self) => { 		});diff --git a/src/VersionList.vala b/src/VersionList.valaindex a208431..18713b4 100644--- a/src/VersionList.vala+++ b/src/VersionList.vala@@ -29,7 +29,7 @@ public class VersionList : DropMenu { 		base ("version"); 		set_direction (MenuDirection.POP_UP); 		-		MenuAction ma = add_item ("New version");+		MenuAction ma = add_item (_("New version")); 		ma.action = (self) => { 			return_if_fail (self.parent != null); 			return_if_fail (glyphs.length () > 0);@@ -83,7 +83,7 @@ public class VersionList : DropMenu { 		versions++; 		glyphs.append (new_version); -		ma = add_item (@"Version $(versions - 1)");+		ma = add_item (_("Version") + @" $(versions - 1)"); 		ma.index = (int) glyphs.length () - 1; 		ma.action = (self) => { 			Font font = Supplement.get_current_font ();

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112