[gbrainy] Move output code to client + make string localization + tip for translators



commit 2dcf50db6f2f19f8e436c90930b3c18af821d6b7
Author: Jordi Mas <jmas softcatala org>
Date:   Thu Aug 12 13:23:01 2010 +0200

    Move output code to client + make string localization + tip for translators

 src/Clients/Classical/gbrainy.cs |    2 +-
 src/Core/Main/GameManager.cs     |   14 ++++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/Clients/Classical/gbrainy.cs b/src/Clients/Classical/gbrainy.cs
index 513b8a5..58c5746 100755
--- a/src/Clients/Classical/gbrainy.cs
+++ b/src/Clients/Classical/gbrainy.cs
@@ -99,7 +99,7 @@ namespace gbrainy.Clients.Classical
 		{
 			session = new GameSession ();
 			GameManagerPreload (session.GameManager);
-			session.GameManager.ShowGamesSummary ();
+			Console.WriteLine (session.GameManager.GetGamesSummary ());
 
 			session.GameManager.ColorBlind = Preferences.GetBoolValue (Preferences.ColorBlindKey);
 			session.DrawRequest += SessionDrawRequest;
diff --git a/src/Core/Main/GameManager.cs b/src/Core/Main/GameManager.cs
index 3122d92..fd3a807 100644
--- a/src/Core/Main/GameManager.cs
+++ b/src/Core/Main/GameManager.cs
@@ -309,15 +309,21 @@ namespace gbrainy.Core.Main
 			available_games.Clear ();
 		}
 
-		public void ShowGamesSummary ()
+		public string GetGamesSummary ()
 		{
+			String s = string.Empty;
 	#if MONO_ADDINS
-				Console.WriteLine ("Pluggin database:" +
-					System.IO.Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "gbrainy"));
+			s += Catalog.GetString ("Pluggin database:") + " " + 
+					System.IO.Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData), "gbrainy");
+
+			s += Environment.NewLine;
 	#endif
-			Console.WriteLine (Catalog.GetString ("Games registered: {0}: {1} logic puzzles, {2} calculation trainers, {3} memory trainers, {4} verbal analogies"),
+			// Translators: 'Games registered' is the games know to gbrainy (build-in and load from addins-in and external files)
+			s += String.Format (Catalog.GetString ("Games registered: {0}: {1} logic puzzles, {2} calculation trainers, {3} memory trainers, {4} verbal analogies"),
 					cnt_logic + cnt_memory + cnt_calculation + cnt_verbal,
 					cnt_logic, cnt_calculation, cnt_memory, cnt_verbal);
+
+			return s;
 		}
 
 		// Adds all the games and its variants into the available games list



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