Skip to content

Commit

Permalink
Don't call dgettext before clients call bindtextdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed Sep 11, 2013
1 parent 763464e commit 685159f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libkkc/keymap.vala
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ namespace Kkc {

static construct {
for (var i = 0; i < Commands.length; i++) {
var label = dgettext (Config.GETTEXT_PACKAGE,
Commands[i].label);
_CommandTable.set (Commands[i].name, label);
_CommandTable.set (Commands[i].name, Commands[i].label);
}
}

Expand All @@ -88,7 +86,10 @@ namespace Kkc {
* @return label
*/
public static string get_command_label (string command) {
return _CommandTable.get (command);
var label = _CommandTable.get (command);
if (label != null)
label = dgettext (Config.GETTEXT_PACKAGE, label);
return label;
}

/**
Expand Down

0 comments on commit 685159f

Please sign in to comment.