xgettext only recognizes _("foo"), not _('foo') in .js files. Fix

Noted in https://bugzilla.gnome.org/show_bug.cgi?id=609838
This commit is contained in:
Dan Winship 2010-02-15 08:33:35 -05:00
parent 01c267b095
commit 229cfd9f80
3 changed files with 13 additions and 13 deletions

View File

@ -86,7 +86,7 @@ AppFavorites.prototype = {
let app = Shell.AppSystem.get_default().get_app(appId); let app = Shell.AppSystem.get_default().get_app(appId);
Main.overview.infoBar.setMessage(_('%s has been added to your favorites.').format(app.get_name()), Lang.bind(this, function () { Main.overview.infoBar.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () {
this._removeFavorite(appId); this._removeFavorite(appId);
})); }));
}, },
@ -104,7 +104,7 @@ AppFavorites.prototype = {
if (!this._removeFavorite(appId)) if (!this._removeFavorite(appId))
return; return;
Main.overview.infoBar.setMessage(_('%s has been removed from your favorites.').format(this._favorites[appId].get_name()), Main.overview.infoBar.setMessage(_("%s has been removed from your favorites.").format(this._favorites[appId].get_name()),
Lang.bind(this, function () { Lang.bind(this, function () {
this._addFavorite(appId); this._addFavorite(appId);
})); }));

View File

@ -92,7 +92,7 @@ InfoBar.prototype = {
x_fill: true, x_fill: true,
y_fill: false }); y_fill: false });
this._label = new St.Label(); this._label = new St.Label();
this._undo = new St.Button({ label: _('Undo'), this._undo = new St.Button({ label: _("Undo"),
style_class: 'info-bar-link-button' }); style_class: 'info-bar-link-button' });
let bin = new St.Bin({ x_fill: false, let bin = new St.Bin({ x_fill: false,

View File

@ -104,17 +104,17 @@ StatusMenu.prototype = {
let item; let item;
item = this._createImageMenuItem(_('Available'), 'gtk-yes', true); item = this._createImageMenuItem(_("Available"), 'gtk-yes', true);
item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSessionPresenceStatus.AVAILABLE)); item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSessionPresenceStatus.AVAILABLE));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
item = this._createImageMenuItem(_('Busy'), 'gtk-no', true); item = this._createImageMenuItem(_("Busy"), 'gtk-no', true);
item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSessionPresenceStatus.BUSY)); item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSessionPresenceStatus.BUSY));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
item = this._createImageMenuItem(_('Invisible'), 'gtk-close', true); item = this._createImageMenuItem(_("Invisible"), 'gtk-close', true);
item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSessionPresenceStatus.INVISIBLE)); item.connect('activate', Lang.bind(this, this._setPresenceStatus, GnomeSessionPresenceStatus.INVISIBLE));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
@ -123,13 +123,13 @@ StatusMenu.prototype = {
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
item = this._createImageMenuItem(_('Account Information...'), 'user-info'); item = this._createImageMenuItem(_("Account Information..."), 'user-info');
item.connect('activate', Lang.bind(this, this._onAccountInformationActivate)); item.connect('activate', Lang.bind(this, this._onAccountInformationActivate));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
let gconf = Shell.GConf.get_default(); let gconf = Shell.GConf.get_default();
item = new Gtk.CheckMenuItem({ label: _('Sidebar'), item = new Gtk.CheckMenuItem({ label: _("Sidebar"),
active: gconf.get_boolean(SIDEBAR_VISIBLE_KEY) }); active: gconf.get_boolean(SIDEBAR_VISIBLE_KEY) });
item.connect('activate', Lang.bind(this, item.connect('activate', Lang.bind(this,
function() { function() {
@ -139,7 +139,7 @@ StatusMenu.prototype = {
item.show(); item.show();
this._sidebarItem = item; this._sidebarItem = item;
item = this._createImageMenuItem(_('System Preferences...'), 'preferences-desktop'); item = this._createImageMenuItem(_("System Preferences..."), 'preferences-desktop');
item.connect('activate', Lang.bind(this, this._onPreferencesActivate)); item.connect('activate', Lang.bind(this, this._onPreferencesActivate));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
@ -148,23 +148,23 @@ StatusMenu.prototype = {
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
item = this._createImageMenuItem(_('Lock Screen'), 'system-lock-screen'); item = this._createImageMenuItem(_("Lock Screen"), 'system-lock-screen');
item.connect('activate', Lang.bind(this, this._onLockScreenActivate)); item.connect('activate', Lang.bind(this, this._onLockScreenActivate));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
item = this._createImageMenuItem(_('Switch User'), 'system-users'); item = this._createImageMenuItem(_("Switch User"), 'system-users');
item.connect('activate', Lang.bind(this, this._onLoginScreenActivate)); item.connect('activate', Lang.bind(this, this._onLoginScreenActivate));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
this._loginScreenItem = item; this._loginScreenItem = item;
item = this._createImageMenuItem(_('Log Out...'), 'system-log-out'); item = this._createImageMenuItem(_("Log Out..."), 'system-log-out');
item.connect('activate', Lang.bind(this, this._onQuitSessionActivate)); item.connect('activate', Lang.bind(this, this._onQuitSessionActivate));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();
item = this._createImageMenuItem(_('Shut Down...'), 'system-shutdown'); item = this._createImageMenuItem(_("Shut Down..."), 'system-shutdown');
item.connect('activate', Lang.bind(this, this._onShutDownActivate)); item.connect('activate', Lang.bind(this, this._onShutDownActivate));
this._menu.append(item); this._menu.append(item);
item.show(); item.show();