gnome-games r8549 - in trunk: glines gnibbles gnomine gnotravex libgames-support mahjongg same-gnome
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8549 - in trunk: glines gnibbles gnomine gnotravex libgames-support mahjongg same-gnome
- Date: Sat, 10 Jan 2009 15:35:48 +0000 (UTC)
Author: chpe
Date: Sat Jan 10 15:35:48 2009
New Revision: 8549
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8549&view=rev
Log:
Bug 567103 â Migrate gnome-games to use msgctxt
Add translation context to GamesScoresCategory, and use g_dpgettext2 to
translate instead of Q_().
Modified:
trunk/glines/glines.c
trunk/gnibbles/main.c
trunk/gnomine/gnomine.c
trunk/gnotravex/gnotravex.c
trunk/libgames-support/games-scores-dialog.c
trunk/libgames-support/games-scores.c
trunk/mahjongg/mahjongg.c
trunk/same-gnome/same-gnome.c
Modified: trunk/glines/glines.c
==============================================================================
--- trunk/glines/glines.c (original)
+++ trunk/glines/glines.c Sat Jan 10 15:35:48 2009
@@ -85,9 +85,9 @@
};
static const GamesScoresCategory scorecats[] = {
- { "Small", N_("Small") },
- { "Medium", N_("glines|Medium") },
- { "Large", N_("Large") }
+ { "Small", NC_("board size", "Small") },
+ { "Medium", NC_("board size", "Medium") },
+ { "Large", NC_("board size", "Large") }
};
static GamesScores *highscores;
@@ -1824,7 +1824,7 @@
highscores = games_scores_new ("glines",
scorecats, G_N_ELEMENTS (scorecats),
- NULL, NULL,
+ "board size", NULL,
0 /* default category */,
GAMES_SCORES_STYLE_PLAIN_DESCENDING);
Modified: trunk/gnibbles/main.c
==============================================================================
--- trunk/gnibbles/main.c (original)
+++ trunk/gnibbles/main.c Sat Jan 10 15:35:48 2009
@@ -64,14 +64,14 @@
GtkWidget *chat = NULL;
static const GamesScoresCategory scorecats[] = {
-{"4.0", N_("Beginner")},
-{"3.0", N_("Slow")},
-{"2.0", N_("gnibbles|Medium")},
-{"1.0", N_("Fast")},
-{"4.1", N_("Beginner with Fakes")},
-{"3.1", N_("Slow with Fakes")},
-{"2.1", N_("Medium with Fakes")},
-{"1.1", N_("Fast with Fakes")}
+{ "4.0", NC_("game speed", "Beginner") },
+{ "3.0", NC_("game speed", "Slow") },
+{ "2.0", NC_("game speed", "Medium") },
+{ "1.0", NC_("game speed", "Fast") },
+{ "4.1", NC_("game speed", "Beginner with Fakes") },
+{ "3.1", NC_("game speed", "Slow with Fakes") },
+{ "2.1", NC_("game speed", "Medium with Fakes") },
+{ "1.1", NC_("game speed", "Fast with Fakes") }
};
GamesScores *highscores;
@@ -1068,7 +1068,7 @@
highscores = games_scores_new ("gnibbles",
scorecats, G_N_ELEMENTS (scorecats),
- NULL, NULL,
+ "game speed", NULL,
0 /* default category */,
GAMES_SCORES_STYLE_PLAIN_DESCENDING);
Modified: trunk/gnomine/gnomine.c
==============================================================================
--- trunk/gnomine/gnomine.c (original)
+++ trunk/gnomine/gnomine.c Sat Jan 10 15:35:48 2009
@@ -97,10 +97,10 @@
/*GstElement *sound_player;*/
static const GamesScoresCategory scorecats[] = {
-{"Small", N_("Small")},
-{"Medium", N_("gnomine|Medium")},
-{"Large", N_("Large")},
-{"Custom", N_("Custom")}
+ {"Small", NC_("board size", "Small") },
+ {"Medium", NC_("board size", "Medium") },
+ {"Large", NC_("board size", "Large") },
+ {"Custom", NC_("board size", "Custom") }
};
GamesScores *highscores;
@@ -1017,7 +1017,7 @@
highscores = games_scores_new (APP_NAME,
scorecats, G_N_ELEMENTS (scorecats),
- NULL, NULL,
+ "board size", NULL,
0 /* default category */,
GAMES_SCORES_STYLE_TIME_ASCENDING);
Modified: trunk/gnotravex/gnotravex.c
==============================================================================
--- trunk/gnotravex/gnotravex.c (original)
+++ trunk/gnotravex/gnotravex.c Sat Jan 10 15:35:48 2009
@@ -74,11 +74,11 @@
static GdkGC *bg_gc;
static const GamesScoresCategory scorecats[] = {
-{"2x2", N_("2\303\2272")},
-{"3x3", N_("3\303\2273")},
-{"4x4", N_("4\303\2274")},
-{"5x5", N_("5\303\2275")},
-{"6x6", N_("6\303\2276")}
+ { "2x2", N_("2\303\2272") },
+ { "3x3", N_("3\303\2273") },
+ { "4x4", N_("4\303\2274") },
+ { "5x5", N_("5\303\2275") },
+ { "6x6", N_("6\303\2276") }
};
static GamesScores *highscores;
Modified: trunk/libgames-support/games-scores-dialog.c
==============================================================================
--- trunk/libgames-support/games-scores-dialog.c (original)
+++ trunk/libgames-support/games-scores-dialog.c Sat Jan 10 15:35:48 2009
@@ -87,10 +87,8 @@
static void games_scores_dialog_load_categories (GamesScoresCategory *cat,
GamesScoresDialog *self)
{
- /* Note the Q_ here, this is so we can use context tags on similar
- * names. (Medium is one that can cause trouble for translators
- * in different contexts.) */
- games_scores_dialog_add_category (self, cat->key, Q_(cat->name));
+ /* category->name is already translated here! */
+ games_scores_dialog_add_category (self, cat->key, cat->name);
}
/**
Modified: trunk/libgames-support/games-scores.c
==============================================================================
--- trunk/libgames-support/games-scores.c (original)
+++ trunk/libgames-support/games-scores.c Sat Jan 10 15:35:48 2009
@@ -29,6 +29,8 @@
#include <fcntl.h>
#include <unistd.h>
+#include <glib/gi18n.h>
+
#include "games-scores-backend.h"
#include "games-score.h"
#include "games-scores.h"
@@ -146,8 +148,15 @@
for (i = 0; i < n_categories; ++i) {
const GamesScoresCategory *category = &categories[i];
+ const char *display_name;
+
+ if (categories_context) {
+ display_name = g_dpgettext2 (categories_domain, categories_context, category->name);
+ } else {
+ display_name = dgettext (categories_domain, category->name);
+ }
- games_scores_add_category (self, category->key, category->name);
+ games_scores_add_category (self, category->key, display_name);
}
priv->defcat = g_strdup (categories[default_category_index].key);
Modified: trunk/mahjongg/mahjongg.c
==============================================================================
--- trunk/mahjongg/mahjongg.c (original)
+++ trunk/mahjongg/mahjongg.c Sat Jan 10 15:35:48 2009
@@ -1359,7 +1359,7 @@
GAMES_SCORES_STYLE_TIME_ASCENDING);
for (i = 0; i < nmaps; i++) {
- games_scores_add_category (highscores, maps[i].score_name, maps[i].name); // FIXMEchpe
+ games_scores_add_category (highscores, maps[i].score_name, maps[i].name);
}
}
Modified: trunk/same-gnome/same-gnome.c
==============================================================================
--- trunk/same-gnome/same-gnome.c (original)
+++ trunk/same-gnome/same-gnome.c Sat Jan 10 15:35:48 2009
@@ -51,9 +51,9 @@
};
const GamesScoresCategory scorecats[] = {
- { "Small", N_("Small") },
- { "Medium", N_("same-gnome|Medium") },
- { "Large", N_("Large") }
+ { "Small", NC_("board size", "Small") },
+ { "Medium", NC_("board size", "Medium") },
+ { "Large", NC_("board size", "Large") }
};
GamesScores *highscores;
@@ -164,7 +164,7 @@
highscores = games_scores_new ("same-gnome",
scorecats, G_N_ELEMENTS (scorecats),
- NULL, NULL,
+ "board size", NULL,
0 /* default category */,
GAMES_SCORES_STYLE_PLAIN_DESCENDING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]