[gbrainy] Fixes bugzilla issue #794178



commit 240f6710f6755a324c01332503d85819d760b992
Author: Jordi Mas <jmas softcatala org>
Date:   Sat Mar 10 07:29:25 2018 +0100

    Fixes bugzilla issue #794178

 src/Core/Main/GameManager.cs |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/Core/Main/GameManager.cs b/src/Core/Main/GameManager.cs
index 335ff77..4a145e5 100644
--- a/src/Core/Main/GameManager.cs
+++ b/src/Core/Main/GameManager.cs
@@ -242,6 +242,11 @@ namespace gbrainy.Core.Main
                        available_games.Clear ();
                }
 
+               private String AddString(String str)
+               {
+                       return " - " + str + Environment.NewLine;
+               }
+
                public string GetGamesSummary (ITranslations translations)
                {
                        String s = string.Empty;
@@ -253,11 +258,11 @@ namespace gbrainy.Core.Main
        #endif
                        // Translators: 'Games registered' is the games know to gbrainy (build-in and load 
from addins-in and external files)
             int total = cnt_logic + cnt_memory + cnt_calculation + cnt_verbal;
-            s += String.Format (translations.GetString ("{0} games registered:") +  Environment.NewLine , 
total);
-            s += String.Format (translations.GetString (" - {0} logic puzzles") +  Environment.NewLine , 
cnt_logic);
-            s += String.Format (translations.GetString (" - {0} calculation trainers") +  
Environment.NewLine , cnt_calculation);
-            s += String.Format (translations.GetString (" - {0} memory trainers") +  Environment.NewLine , 
cnt_memory);
-            s += String.Format (translations.GetString (" - {0} verbal analogies"), cnt_verbal);
+            s += String.Format (translations.GetPluralString ("{0} game registered:", "{0} games 
registered:", total) +  Environment.NewLine, total);
+            s += AddString (String.Format (translations.GetPluralString ("{0} logic puzzle", "{0} logic 
puzzles", cnt_logic), cnt_logic));
+            s += AddString (String.Format (translations.GetPluralString ("{0} calculation trainer", "{0} 
calculation trainers", cnt_calculation), cnt_calculation));
+            s += AddString (String.Format (translations.GetPluralString ("{0} memory trainer", "{0} memory 
trainers", cnt_memory), cnt_memory));
+            s += AddString (String.Format (translations.GetPluralString ("{0} verbal analogy", "{0} verbal 
analogies", cnt_verbal), cnt_verbal));
                        return s;
                }
 


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