[gcompris/gcomprixogoo] String formating are better adapted for translators.



commit 78bcdb35937f12690932d0cb9bc51907afcafb55
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Thu Dec 17 23:09:27 2009 +0100

    String formating are better adapted for translators.
    
    We had some errors of the kind:
    warning: 'msgid' format string with unnamed arguments cannot be properly
    
    We fixed this by using formal parameter positioning in C and python.

 src/administration-activity/admin/board_list.py |    6 ++++--
 src/administration-activity/admin/wordlist.py   |    3 ++-
 src/babymatch-activity/shapegame.c              |    2 +-
 src/click_on_letter-activity/click_on_letter.c  |    2 +-
 src/colors-activity/colors.c                    |    2 +-
 5 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/administration-activity/admin/board_list.py b/src/administration-activity/admin/board_list.py
index 757e2ff..32b746e 100644
--- a/src/administration-activity/admin/board_list.py
+++ b/src/administration-activity/admin/board_list.py
@@ -623,7 +623,8 @@ class Board_list:
   def locales(self, button):
     conf_locales = self.get_configured(self.active_profile, 'locale', 'NULL')
     self.main_vbox = gcompris.configuration_window ( \
-      _('<b>%s</b> configuration\n for profile <b>%s</b>') % ('Locale', self.active_profile.name ),
+      _('<b>{config}</b> configuration\n for profile <b>{profile}</b>').format(config='Locale',
+                                                                               profile=self.active_profile.name),
       self.ok_callback
       )
 
@@ -641,7 +642,8 @@ class Board_list:
 
     conf_locales = self.get_configured(self.active_profile, 'locale_sound', 'NULL')
     self.main_vbox = gcompris.configuration_window ( \
-      _('<b>%s</b> configuration\n for profile <b>%s</b>') % ('Locale sound', self.active_profile.name ),
+      _('<b>{config}</b> configuration\n for profile <b>{profile}</b>').format(config='Locale sound',
+                                                                               profile=self.active_profile.name),
       self.ok_callback
       )
 
diff --git a/src/administration-activity/admin/wordlist.py b/src/administration-activity/admin/wordlist.py
index afa480f..556b7ee 100644
--- a/src/administration-activity/admin/wordlist.py
+++ b/src/administration-activity/admin/wordlist.py
@@ -42,7 +42,8 @@ class Words_list:
     files = glob.glob('wordlist_*.xml')
 
     self.main_vbox = gcompris.configuration_window ( \
-      _('<b>%s</b> configuration\n for profile <b>%s</b>') % ('Wordlist', self.active_profile.name ),
+      _('<b>{config}</b> configuration\n for profile <b>{profile}</b>').format(config='Wordlist',
+                                                                               profile=self.active_profile.name),
       self.wordlist_callback
       )
 
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index 5d60953..565100b 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -1844,7 +1844,7 @@ config_start(GcomprisBoard *agcomprisBoard,
   if (gcomprisBoard)
     pause_board(TRUE);
 
-  gchar * label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
+  gchar * label = g_strdup_printf(_("<b>%1$s</b> configuration\n for profile <b>%2$s</b>"),
 				  agcomprisBoard->name,
 				  aProfile? aProfile->name : "");
 
diff --git a/src/click_on_letter-activity/click_on_letter.c b/src/click_on_letter-activity/click_on_letter.c
index 23e1552..8a1457c 100644
--- a/src/click_on_letter-activity/click_on_letter.c
+++ b/src/click_on_letter-activity/click_on_letter.c
@@ -622,7 +622,7 @@ config_start(GcomprisBoard *agcomprisBoard,
   if (gcomprisBoard)
     pause_board(TRUE);
 
-  gchar *label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
+  gchar *label = g_strdup_printf(_("<b>%1$s</b> configuration\n for profile <b>%2$s</b>"),
 				 agcomprisBoard->name,
 				 aProfile ? aProfile->name : "");
   GcomprisBoardConf *bconf;
diff --git a/src/colors-activity/colors.c b/src/colors-activity/colors.c
index 7c17604..fdb5b5e 100644
--- a/src/colors-activity/colors.c
+++ b/src/colors-activity/colors.c
@@ -166,7 +166,7 @@ colors_config_start(GcomprisBoard *agcomprisBoard,
   if (gcomprisBoard)
     pause_board(TRUE);
 
-  label = g_strdup_printf(_("<b>%s</b> configuration\n for profile <b>%s</b>"),
+  label = g_strdup_printf(_("<b>%1$s</b> configuration\n for profile <b>%2$s</b>"),
 			  agcomprisBoard->name, aProfile ? aProfile->name : "");
 
   GcomprisBoardConf *bconf = gc_board_config_window_display(label, conf_ok);



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