[longomatch] Enable translations in the migration tool



commit 4758f760ec890d71c2172cb6c351079dad71afe2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Feb 24 13:18:11 2015 +0100

    Enable translations in the migration tool

 LongoMatch.Migration/MainWindow.cs |    7 ++++---
 LongoMatch.Migration/Program.cs    |    2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Migration/MainWindow.cs b/LongoMatch.Migration/MainWindow.cs
index 44feddc..1944b84 100644
--- a/LongoMatch.Migration/MainWindow.cs
+++ b/LongoMatch.Migration/MainWindow.cs
@@ -88,9 +88,10 @@ public partial class MainWindow: Gtk.Window
        }
        
        void UpdateLabel () {
-               label3.Markup = " <b> Databases </b>: " + dbs.Count + "\n\n" + 
-                       " <b> Analysis templates </b>: " + categories.Count + "\n\n" +
-                               " <b> Teams templates: </b>: " + teams.Count + "\n\n";
+               label3.Markup = String.Format (" <b> {0} </b>: {1}\n\n <b> {2} </b>: {3}\n\n <b> {4} </b>: 
{5}\n\n",
+                                              Catalog.GetString ("Databases"), dbs.Count,
+                                              Catalog.GetString ("Dashboards"), categories.Count,
+                                              Catalog.GetString ("Teams"), teams.Count);
        }
        
        protected void OnDeleteEvent (object sender, DeleteEventArgs a)
diff --git a/LongoMatch.Migration/Program.cs b/LongoMatch.Migration/Program.cs
index fccdf9d..784bc7e 100644
--- a/LongoMatch.Migration/Program.cs
+++ b/LongoMatch.Migration/Program.cs
@@ -18,6 +18,7 @@
 using System;
 using Gtk;
 using System.IO;
+using Mono.Unix;
 
 namespace LongoMatch.Migration
 {
@@ -26,6 +27,7 @@ namespace LongoMatch.Migration
                public static void Main (string[] args)
                {
                        SetupBasedir ();
+                       Catalog.Init ("longomatch", LongoMatch.Config.RelativeToPrefix ("share/locale"));
                        InitGtk ();
                        MainWindow win = new MainWindow ();
                        win.Show ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]