[polari/wip/fmuellner/more-style-changes: 7/7] style: Use single-quotes for translated strings



commit cb596b357c71a085981a87d8ae8852f378ae2984
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jul 28 19:13:35 2018 +0200

    style: Use single-quotes for translated strings
    
    The coding style of using double quotes for translatable strings
    and single quotes otherwise is unnecessarily complex and cannot
    be enforced with an eslint rule.
    
    Simply use single quotes consistently for all strings.
    
    https://gitlab.gnome.org/GNOME/polari/merge_requests/93

 lint/eslintrc-legacy.json |  3 +--
 src/appNotifications.js   |  2 +-
 src/application.js        | 18 ++++++++---------
 src/chatView.js           | 50 +++++++++++++++++++++++------------------------
 src/connections.js        |  8 ++++----
 src/entryArea.js          | 20 +++++++++----------
 src/initialSetup.js       |  4 ++--
 src/ircParser.js          | 38 +++++++++++++++++------------------
 src/joinDialog.js         |  2 +-
 src/mainWindow.js         |  4 ++--
 src/roomList.js           | 24 +++++++++++------------
 src/roomStack.js          | 10 +++++-----
 src/telepathyClient.js    |  8 ++++----
 src/userList.js           | 32 +++++++++++++++---------------
 src/userTracker.js        |  4 ++--
 src/utils.js              |  6 +++---
 16 files changed, 116 insertions(+), 117 deletions(-)
---
diff --git a/lint/eslintrc-legacy.json b/lint/eslintrc-legacy.json
index 8b71651..7f5a479 100644
--- a/lint/eslintrc-legacy.json
+++ b/lint/eslintrc-legacy.json
@@ -12,7 +12,6 @@
                 "ObjectExpression": "first",
                 "MemberExpression": "off"
             }
-        ],
-        "quotes": "off"
+        ]
    }
 }
diff --git a/src/appNotifications.js b/src/appNotifications.js
index 188ab56..0039a36 100644
--- a/src/appNotifications.js
+++ b/src/appNotifications.js
@@ -84,7 +84,7 @@ var UndoNotification = GObject.registerClass({
 
         this.connect('destroy', () => { this.close(); });
 
-        this.addButton(_("Undo"), () => { this._undo = true; });
+        this.addButton(_('Undo'), () => { this._undo = true; });
     }
 
     close() {
diff --git a/src/application.js b/src/application.js
index fb57d6d..2b3e579 100644
--- a/src/application.js
+++ b/src/application.js
@@ -40,18 +40,18 @@ var Application = GObject.registerClass({
 
         this.add_main_option('start-client', 0,
                              GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
-                             _("Start Telepathy client"), null);
+                             _('Start Telepathy client'), null);
         // Only included for --help output, the actual option is handled
         // from C before handling over control to JS
         this.add_main_option('debugger', 'd',
                              GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
-                             _("Start in debug mode"), null);
+                             _('Start in debug mode'), null);
         this.add_main_option('test-instance', 0,
                              GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
-                             _("Allow running alongside another instance"), null);
+                             _('Allow running alongside another instance'), null);
         this.add_main_option('version', 0,
                              GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
-                             _("Print version and exit"), null);
+                             _('Print version and exit'), null);
         this.connect('handle-local-options', (o, dict) => {
             let v = dict.lookup_value('test-instance', null);
             if (v && v.get_boolean())
@@ -436,7 +436,7 @@ var Application = GObject.registerClass({
             [,, server, port, room] = uri.match(IRC_SCHEMA_REGEX);
             success = true;
         } catch (e) {
-            let label = _("Failed to open link");
+            let label = _('Failed to open link');
             let n = new AppNotifications.MessageNotification(label,
                                                              'dialog-error-symbolic');
             this.notificationQueue.addNotification(n);
@@ -727,7 +727,7 @@ var Application = GObject.registerClass({
             account.set_enabled_finish(res);
             account.visible = false;
 
-            let label = _("%s removed.").format(account.display_name);
+            let label = _('%s removed.').format(account.display_name);
             let n = new AppNotifications.UndoNotification(label);
             this.notificationQueue.addNotification(n);
 
@@ -802,13 +802,13 @@ var Application = GObject.registerClass({
                 'Lapo Calamandrei <calamandrei gmail com>',
                 'Tobias Bernard <tbernard gnome org>'
             ],
-            translator_credits: _("translator-credits"),
-            comments: _("An Internet Relay Chat Client for GNOME"),
+            translator_credits: _('translator-credits'),
+            comments: _('An Internet Relay Chat Client for GNOME'),
             copyright: 'Copyright © 2013-2018 The Polari authors',
             license_type: Gtk.License.GPL_2_0,
             logo_icon_name: 'org.gnome.Polari',
             version: pkg.version,
-            website_label: _("Learn more about Polari"),
+            website_label: _('Learn more about Polari'),
             website: 'https://wiki.gnome.org/Apps/Polari',
 
             transient_for: this.active_window,
diff --git a/src/chatView.js b/src/chatView.js
index 40bdec2..59d9df6 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -134,7 +134,7 @@ class TextView extends Gtk.TextView {
 
     _updateLayout() {
         this._layout = this.create_pango_layout(null);
-        this._layout.set_markup(`<small><b>${_("New Messages")}</b></small>`, -1);
+        this._layout.set_markup(`<small><b>${_('New Messages')}</b></small>`, -1);
     }
 });
 
@@ -776,13 +776,13 @@ var ChatView = GObject.registerClass({
     _showUrlContextMenu(url) {
         let menu = new Gtk.Menu();
 
-        let item = new Gtk.MenuItem({ label: _("Open Link") });
+        let item = new Gtk.MenuItem({ label: _('Open Link') });
         item.connect('activate', () => {
             Utils.openURL(url, Gtk.get_current_event_time());
         });
         menu.append(item);
 
-        item = new Gtk.MenuItem({ label: _("Copy Link Address") });
+        item = new Gtk.MenuItem({ label: _('Copy Link Address') });
         item.connect('activate', () => {
             let clipboard = Gtk.Clipboard.get_default(item.get_display());
             clipboard.set_text(url, -1);
@@ -953,12 +953,12 @@ var ChatView = GObject.registerClass({
     }
 
     _onMemberRenamed(room, oldMember, newMember) {
-        let text = _("%s is now known as %s").format(oldMember.alias, newMember.alias);
+        let text = _('%s is now known as %s').format(oldMember.alias, newMember.alias);
         this._insertStatus(text, oldMember.alias, 'renamed');
     }
 
     _onMemberDisconnected(room, member, message) {
-        let text = _("%s has disconnected").format(member.alias);
+        let text = _('%s has disconnected').format(member.alias);
         if (message)
             text += ` (${message})`;
         this._insertStatus(text, member.alias, 'left');
@@ -967,26 +967,26 @@ var ChatView = GObject.registerClass({
     _onMemberKicked(room, member, actor) {
         let [kicked, kicker] = [member.alias, actor ? actor.alias : null];
         let msg = kicker ?
-            _("%s has been kicked by %s").format(kicked, kicker) :
-            _("%s has been kicked").format(kicked);
+            _('%s has been kicked by %s').format(kicked, kicker) :
+            _('%s has been kicked').format(kicked);
         this._insertStatus(msg, kicked, 'left');
     }
 
     _onMemberBanned(room, member, actor) {
         let [banned, banner] = [member.alias, actor ? actor.alias : null];
         let msg = banner ?
-            _("%s has been banned by %s").format(banned, banner) :
-            _("%s has been banned").format(banned);
+            _('%s has been banned by %s').format(banned, banner) :
+            _('%s has been banned').format(banned);
         this._insertStatus(msg, banned, 'left');
     }
 
     _onMemberJoined(room, member) {
-        let text = _("%s joined").format(member.alias);
+        let text = _('%s joined').format(member.alias);
         this._insertStatus(text, member.alias, 'joined');
     }
 
     _onMemberLeft(room, member, message) {
-        let text = _("%s left").format(member.alias);
+        let text = _('%s left').format(member.alias);
 
         if (message)
             text += ` (${message})`;
@@ -1079,11 +1079,11 @@ var ChatView = GObject.registerClass({
 
         let stats = [];
         if (this._statusCount.joined > 0)
-            stats.push(ngettext("%d user joined",
-                                "%d users joined", 
this._statusCount.joined).format(this._statusCount.joined));
+            stats.push(ngettext('%d user joined',
+                                '%d users joined', 
this._statusCount.joined).format(this._statusCount.joined));
         if (this._statusCount.left > 0)
-            stats.push(ngettext("%d user left",
-                                "%d users left", this._statusCount.left).format(this._statusCount.left));
+            stats.push(ngettext('%d user left',
+                                '%d users left', this._statusCount.left).format(this._statusCount.left));
         // TODO: How do we update the arrow direction when text direction change?
         let iter = buffer.get_iter_at_mark(headerMark);
         let tags = [this._lookupTag('status'), headerTag];
@@ -1149,56 +1149,56 @@ var ChatView = GObject.registerClass({
         if (clockFormat == '24h' || !hasAmPm) {
             if (daysAgo < 1) { // today
                 /* Translators: Time in 24h format */
-                format = _("%H\u2236%M");
+                format = _('%H\u2236%M');
             } else if (daysAgo < 2) { // yesterday
                 /* Translators: this is the word "Yesterday" followed by a
                  time string in 24h format. i.e. "Yesterday, 14:30" */
                 // xgettext:no-c-format
-                format = _("Yesterday, %H\u2236%M");
+                format = _('Yesterday, %H\u2236%M');
             } else if (daysAgo < 7) { // this week
                 /* Translators: this is the week day name followed by a time
                  string in 24h format. i.e. "Monday, 14:30" */
                 // xgettext:no-c-format
-                format = _("%A, %H\u2236%M");
+                format = _('%A, %H\u2236%M');
             } else if (date.get_year() == now.get_year()) { // this year
                 /* Translators: this is the month name and day number
                  followed by a time string in 24h format.
                  i.e. "May 25, 14:30" */
                 // xgettext:no-c-format
-                format = _("%B %d, %H\u2236%M");
+                format = _('%B %d, %H\u2236%M');
             } else { // before this year
                 /* Translators: this is the month name, day number, year
                  number followed by a time string in 24h format.
                  i.e. "May 25 2012, 14:30" */
                 // xgettext:no-c-format
-                format = _("%B %d %Y, %H\u2236%M");
+                format = _('%B %d %Y, %H\u2236%M');
             }
         } else {
             if (daysAgo < 1) { // today
                 /* Translators: Time in 12h format */
-                format = _("%l\u2236%M %p");
+                format = _('%l\u2236%M %p');
             } else if (daysAgo < 2) { // yesterday
                 /* Translators: this is the word "Yesterday" followed by a
                  time string in 12h format. i.e. "Yesterday, 2:30 pm" */
                 // xgettext:no-c-format
-                format = _("Yesterday, %l\u2236%M %p");
+                format = _('Yesterday, %l\u2236%M %p');
             } else if (daysAgo < 7) { // this week
                 /* Translators: this is the week day name followed by a time
                  string in 12h format. i.e. "Monday, 2:30 pm" */
                 // xgettext:no-c-format
-                format = _("%A, %l\u2236%M %p");
+                format = _('%A, %l\u2236%M %p');
             } else if (date.get_year() == now.get_year()) { // this year
                 /* Translators: this is the month name and day number
                  followed by a time string in 12h format.
                  i.e. "May 25, 2:30 pm" */
                 // xgettext:no-c-format
-                format = _("%B %d, %l\u2236%M %p");
+                format = _('%B %d, %l\u2236%M %p');
             } else { // before this year
                 /* Translators: this is the month name, day number, year
                  number followed by a time string in 12h format.
                  i.e. "May 25 2012, 2:30 pm"*/
                 // xgettext:no-c-format
-                format = _("%B %d %Y, %l\u2236%M %p");
+                format = _('%B %d %Y, %l\u2236%M %p');
             }
         }
 
diff --git a/src/connections.js b/src/connections.js
index f6b21c0..b217494 100644
--- a/src/connections.js
+++ b/src/connections.js
@@ -51,7 +51,7 @@ class ConnectionRow extends Gtk.ListBoxRow {
         box.add(new Gtk.Label({ label: name, halign: Gtk.Align.START }));
 
         let insensitiveDesc = new Gtk.Label({
-            label: _("Already added"),
+            label: _('Already added'),
             hexpand: true,
             no_show_all: true,
             halign: Gtk.Align.END
@@ -114,7 +114,7 @@ var ConnectionsList = GObject.registerClass({
             visible: true
         }));
         placeholder.add(new Gtk.Label({
-            label: _("No results."),
+            label: _('No results.'),
             visible: true
         }));
 
@@ -516,7 +516,7 @@ var ConnectionProperties = GObject.registerClass({
     _init(account) {
         /* Translators: %s is a connection name */
         super._init({
-            title: _("“%s” Properties").format(account.display_name),
+            title: _('“%s” Properties').format(account.display_name),
             use_header_bar: 1
         });
 
@@ -560,7 +560,7 @@ var ConnectionProperties = GObject.registerClass({
         case Tp.error_get_dbus_name(Tp.Error.CONNECTION_REFUSED):
         case Tp.error_get_dbus_name(Tp.Error.NETWORK_ERROR):
             this._errorBox.show();
-            this._errorLabel.label = _("Polari disconnected due to a network error. Please check if the 
address field is correct.");
+            this._errorLabel.label = _('Polari disconnected due to a network error. Please check if the 
address field is correct.');
             this._details.setErrorHint(ErrorHint.SERVER);
             break;
         }
diff --git a/src/entryArea.js b/src/entryArea.js
index fd7a713..5d225fe 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -369,19 +369,19 @@ var EntryArea = GObject.registerClass({
 
     pasteText(text, nLines) {
         this._confirmLabel.label =
-            ngettext("Paste %s line of text to public paste service?",
-                     "Paste %s lines of text to public paste service?",
+            ngettext('Paste %s line of text to public paste service?',
+                     'Paste %s lines of text to public paste service?',
                      nLines).format(nLines);
         this._uploadLabel.label =
-            ngettext("Uploading %s line of text to public paste service…",
-                     "Uploading %s lines of text to public paste service…",
+            ngettext('Uploading %s line of text to public paste service…',
+                     'Uploading %s lines of text to public paste service…',
                      nLines).format(nLines);
         this._setPasteContent(text);
     }
 
     pasteImage(pixbuf) {
-        this._confirmLabel.label = _("Upload image to public paste service?");
-        this._uploadLabel.label = _("Uploading image to public paste service…");
+        this._confirmLabel.label = _('Upload image to public paste service?');
+        this._uploadLabel.label = _('Uploading image to public paste service…');
         this._setPasteContent(pixbuf);
     }
 
@@ -402,9 +402,9 @@ var EntryArea = GObject.registerClass({
 
         let name = fileInfo.get_display_name();
         /* Translators: %s is a filename */
-        this._confirmLabel.label = _("Upload “%s” to public paste service?").format(name);
+        this._confirmLabel.label = _('Upload “%s” to public paste service?').format(name);
         /* Translators: %s is a filename */
-        this._uploadLabel.label = _("Uploading “%s” to public paste service…").format(name);
+        this._uploadLabel.label = _('Uploading “%s” to public paste service…').format(name);
         this._setPasteContent(file);
     }
 
@@ -413,9 +413,9 @@ var EntryArea = GObject.registerClass({
         let nick = this._room.channel.connection.self_contact.alias;
         if (this._room.type == Tp.HandleType.ROOM)
             /* translators: %s is a nick, #%s a channel */
-            title = _("%s in #%s").format(nick, this._room.display_name);
+            title = _('%s in #%s').format(nick, this._room.display_name);
         else
-            title = _("Paste from %s").format(nick);
+            title = _('Paste from %s').format(nick);
 
         let app = Gio.Application.get_default();
         try {
diff --git a/src/initialSetup.js b/src/initialSetup.js
index bdc4405..45df25d 100644
--- a/src/initialSetup.js
+++ b/src/initialSetup.js
@@ -81,8 +81,8 @@ var InitialSetupWindow = GObject.registerClass({
 
         let isLastPage = page == SetupPage.ROOM;
 
-        this._prevButton.label = isLastPage ? _("_Back") : _("_Cancel");
-        this._nextButton.label = isLastPage ? _("_Done") : _("_Next");
+        this._prevButton.label = isLastPage ? _('_Back') : _('_Cancel');
+        this._nextButton.label = isLastPage ? _('_Done') : _('_Next');
 
         let context = this._nextButton.get_style_context();
         if (isLastPage)
diff --git a/src/ircParser.js b/src/ircParser.js
index acaeeae..4212472 100644
--- a/src/ircParser.js
+++ b/src/ircParser.js
@@ -20,23 +20,23 @@ var knownCommands = {
     WHOIS: N_("/WHOIS <nick> — requests information on <nick>"),
     */
 
-    CLOSE: N_("/CLOSE [<channel>] [<reason>] — closes <channel>, by default the current one"),
-    HELP: N_("/HELP [<command>] — displays help for <command>, or a list of available commands"),
-    INVITE: N_("/INVITE <nick> [<channel>] — invites <nick> to <channel>, or the current one"),
-    JOIN: N_("/JOIN <channel> — joins <channel>"),
-    KICK: N_("/KICK <nick> — kicks <nick> from current channel"),
-    ME: N_("/ME <action> — sends <action> to the current channel"),
-    MSG: N_("/MSG <nick> [<message>] — sends a private message to <nick>"),
-    NAMES: N_("/NAMES — lists users on the current channel"),
-    NICK: N_("/NICK <nickname> — sets your nick to <nickname>"),
-    PART: N_("/PART [<channel>] [<reason>] — leaves <channel>, by default the current one"),
-    QUERY: N_("/QUERY <nick> — opens a private conversation with <nick>"),
-    QUIT: N_("/QUIT [<reason>] — disconnects from the current server"),
-    SAY: N_("/SAY <text> — sends <text> to the current room/contact"),
-    TOPIC: N_("/TOPIC <topic> — sets the topic to <topic>, or shows the current one"),
+    CLOSE: N_('/CLOSE [<channel>] [<reason>] — closes <channel>, by default the current one'),
+    HELP: N_('/HELP [<command>] — displays help for <command>, or a list of available commands'),
+    INVITE: N_('/INVITE <nick> [<channel>] — invites <nick> to <channel>, or the current one'),
+    JOIN: N_('/JOIN <channel> — joins <channel>'),
+    KICK: N_('/KICK <nick> — kicks <nick> from current channel'),
+    ME: N_('/ME <action> — sends <action> to the current channel'),
+    MSG: N_('/MSG <nick> [<message>] — sends a private message to <nick>'),
+    NAMES: N_('/NAMES — lists users on the current channel'),
+    NICK: N_('/NICK <nickname> — sets your nick to <nickname>'),
+    PART: N_('/PART [<channel>] [<reason>] — leaves <channel>, by default the current one'),
+    QUERY: N_('/QUERY <nick> — opens a private conversation with <nick>'),
+    QUIT: N_('/QUIT [<reason>] — disconnects from the current server'),
+    SAY: N_('/SAY <text> — sends <text> to the current room/contact'),
+    TOPIC: N_('/TOPIC <topic> — sets the topic to <topic>, or shows the current one'),
 };
 const UNKNOWN_COMMAND_MESSAGE =
-    N_("Unknown command — try /HELP for a list of available commands");
+    N_('Unknown command — try /HELP for a list of available commands');
 
 var IrcParser = class {
     constructor(room) {
@@ -50,7 +50,7 @@ var IrcParser = class {
     }
 
     _createFeedbackUsage(cmd) {
-        return this._createFeedbackLabel(_("Usage: %s").format(_(knownCommands[cmd])));
+        return this._createFeedbackLabel(_('Usage: %s').format(_(knownCommands[cmd])));
     }
 
     _createFeedbackGrid(header, items) {
@@ -86,7 +86,7 @@ var IrcParser = class {
             else if (command)
                 output = this._createFeedbackUsage(command);
             else
-                output = this._createFeedbackGrid(_("Known commands:"),
+                output = this._createFeedbackGrid(_('Known commands:'),
                                                   Object.keys(knownCommands));
             break;
         }
@@ -187,7 +187,7 @@ var IrcParser = class {
         case 'NAMES': {
             let channel = this._room.channel;
             let members = channel.group_dup_members_contacts().map(m => m.alias);
-            output = this._createFeedbackGrid(_("Users on %s:").format(channel.identifier),
+            output = this._createFeedbackGrid(_('Users on %s:').format(channel.identifier),
                                               members);
             break;
         }
@@ -267,7 +267,7 @@ var IrcParser = class {
             if (argv.length)
                 this._room.set_topic(stripCommand(text));
             else
-                output = this._createFeedbackLabel(this._room.topic || _("No topic set"));
+                output = this._createFeedbackLabel(this._room.topic || _('No topic set'));
             break;
         }
         default:
diff --git a/src/joinDialog.js b/src/joinDialog.js
index a72e08f..3fd796f 100644
--- a/src/joinDialog.js
+++ b/src/joinDialog.js
@@ -231,7 +231,7 @@ var JoinDialog = GObject.registerClass({
         this._joinButton.visible = isMain;
         this._cancelButton.visible = isMain || isAccountsEmpty;
         this._backButton.visible = !(isMain || isAccountsEmpty);
-        this.title = isMain ? _("Join Chat Room") : _("Add Network");
+        this.title = isMain ? _('Join Chat Room') : _('Add Network');
         this._mainStack.visible_child_name = isMain ? 'main' : 'connection';
         this._updateCanJoin();
     }
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 632f692..f320657 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -358,8 +358,8 @@ var MainWindow = GObject.registerClass({
             this._room.channel.has_interface(Tp.IFACE_CHANNEL_INTERFACE_GROUP))
             numMembers = this._room.channel.group_dup_members_contacts().length;
 
-        let accessibleName = ngettext("%d user",
-                                      "%d users", numMembers).format(numMembers);
+        let accessibleName = ngettext('%d user',
+                                      '%d users', numMembers).format(numMembers);
         this._showUserListButton.get_accessible().set_name(accessibleName);
         this._showUserListButton.label = `${numMembers}`;
     }
diff --git a/src/roomList.js b/src/roomList.js
index 4cf6669..2b9670f 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -190,7 +190,7 @@ var RoomRow = GObject.registerClass({
         if (!this._popover) {
             let menu = new Gio.Menu();
             let isRoom = this._room.type == Tp.HandleType.ROOM;
-            menu.append(isRoom ? _("Leave chatroom") : _("End conversation"),
+            menu.append(isRoom ? _('Leave chatroom') : _('End conversation'),
                         `app.leave-room(("${this._room.id}", ""))`);
 
             this._popover = Gtk.Popover.new_from_model(this, menu);
@@ -296,7 +296,7 @@ var RoomListHeader = GObject.registerClass({
         if (parent)
             parent.invalidate_sort();
 
-        let accessibleName = _("Network %s has an error").format(this._account.display_name);
+        let accessibleName = _('Network %s has an error').format(this._account.display_name);
         this.get_accessible().set_name(accessibleName);
     }
 
@@ -367,14 +367,14 @@ var RoomListHeader = GObject.registerClass({
 
             /* Translators: This is an account name followed by a
                server address, e.g. "GNOME (irc.gnome.org)" */
-            let fullTitle = _("%s (%s)").format(accountName, server);
+            let fullTitle = _('%s (%s)').format(accountName, server);
             this._popoverTitle.label = (accountName == server) ? accountName : fullTitle;
             this._popoverStatus.label = `<sup>${this._getStatusLabel()}<${'/'}sup>`;
         } else {
             let styleContext = this._popoverStatus.get_style_context();
             styleContext.remove_class('dim-label');
 
-            this._popoverTitle.label = `<b>${_("Connection Problem")}<${'/'}b>`;
+            this._popoverTitle.label = `<b>${_('Connection Problem')}<${'/'}b>`;
             this._popoverStatus.label = this._getErrorLabel();
         }
     }
@@ -391,13 +391,13 @@ var RoomListHeader = GObject.registerClass({
     _getStatusLabel() {
         switch (this._getConnectionStatus()) {
         case Tp.ConnectionStatus.CONNECTED:
-            return _("Connected");
+            return _('Connected');
         case Tp.ConnectionStatus.CONNECTING:
-            return _("Connecting…");
+            return _('Connecting…');
         case Tp.ConnectionStatus.DISCONNECTED:
-            return _("Offline");
+            return _('Offline');
         default:
-            return _("Unknown");
+            return _('Unknown');
         }
     }
 
@@ -417,19 +417,19 @@ var RoomListHeader = GObject.registerClass({
         case Tp.error_get_dbus_name(Tp.Error.CERT_HOSTNAME_MISMATCH):
         case Tp.error_get_dbus_name(Tp.Error.CERT_FINGERPRINT_MISMATCH):
         case Tp.error_get_dbus_name(Tp.Error.CERT_SELF_SIGNED):
-            return _("Could not connect to %s in a safe way.").format(this._account.display_name);
+            return _('Could not connect to %s in a safe way.').format(this._account.display_name);
 
         case Tp.error_get_dbus_name(Tp.Error.AUTHENTICATION_FAILED):
-            return _("%s requires a password.").format(this._account.display_name);
+            return _('%s requires a password.').format(this._account.display_name);
 
         case Tp.error_get_dbus_name(Tp.Error.CONNECTION_FAILED):
         case Tp.error_get_dbus_name(Tp.Error.CONNECTION_LOST):
         case Tp.error_get_dbus_name(Tp.Error.CONNECTION_REPLACED):
         case Tp.error_get_dbus_name(Tp.Error.SERVICE_BUSY):
-            return _("Could not connect to %s. The server is busy.").format(this._account.display_name);
+            return _('Could not connect to %s. The server is busy.').format(this._account.display_name);
 
         default:
-            return _("Could not connect to %s.").format(this._account.display_name);
+            return _('Could not connect to %s.').format(this._account.display_name);
         }
     }
 });
diff --git a/src/roomStack.js b/src/roomStack.js
index b3d1522..e58023b 100644
--- a/src/roomStack.js
+++ b/src/roomStack.js
@@ -120,7 +120,7 @@ class SavePasswordConfirmationBar extends Gtk.Revealer {
 
         let target = new GLib.Variant('o', this._room.account.object_path);
         let button = new Gtk.Button({
-            label: _("_Save Password"),
+            label: _('_Save Password'),
             use_underline: true,
             action_name: 'app.save-identify-password',
             action_target: target
@@ -130,7 +130,7 @@ class SavePasswordConfirmationBar extends Gtk.Revealer {
         let box = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
         this._infoBar.get_content_area().add(box);
 
-        let title = _("Should the password be saved?");
+        let title = _('Should the password be saved?');
         this._titleLabel = new Gtk.Label({
             halign: Gtk.Align.START,
             valign: Gtk.Align.CENTER,
@@ -140,7 +140,7 @@ class SavePasswordConfirmationBar extends Gtk.Revealer {
         box.add(this._titleLabel);
 
         let accountName = this._room.account.display_name;
-        let text = _("Identification will happen automatically the next time you connect to 
%s").format(accountName);
+        let text = _('Identification will happen automatically the next time you connect to 
%s').format(accountName);
         this._subtitleLabel = new Gtk.Label({
             label: text,
             ellipsize: Pango.EllipsizeMode.END
@@ -173,11 +173,11 @@ class ChatPlaceholder extends Gtk.Overlay {
             halign: Gtk.Align.START,
             margin_start: 14
         });
-        title.label = `<span letter_spacing="4500">${_("Polari")}</span>`;
+        title.label = `<span letter_spacing="4500">${_('Polari')}</span>`;
         title.get_style_context().add_class('polari-background-title');
 
         let description = new Gtk.Label({
-            label: _("Join a room using the + button."),
+            label: _('Join a room using the + button.'),
             halign: Gtk.Align.CENTER, wrap: true,
             margin_top: 24, use_markup: true
         });
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index da13f56..8d11fb4 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -408,7 +408,7 @@ class TelepathyClient extends Tp.BaseClient {
         });
 
         let reason = Tp.ChannelGroupChangeReason.NONE;
-        message = message || _("Good Bye");
+        message = message || _('Good Bye');
         room.channel.leave_async(reason, message, (c, res) => {
             try {
                 c.leave_finish(res);
@@ -588,11 +588,11 @@ class TelepathyClient extends Tp.BaseClient {
         let accountName = room.account.display_name;
         /* Translators: Those are a botname and an accountName, e.g.
            "Save NickServ password for GNOME" */
-        let summary = _("Save %s password for %s?").format(data.botname, accountName);
-        let text = _("Identification will happen automatically the next time you connect to 
%s").format(accountName);
+        let summary = _('Save %s password for %s?').format(data.botname, accountName);
+        let text = _('Identification will happen automatically the next time you connect to 
%s').format(accountName);
         let notification = this._createNotification(room, summary, text);
 
-        notification.add_button_with_target(_("Save"), 'app.save-identify-password',
+        notification.add_button_with_target(_('Save'), 'app.save-identify-password',
                                             new GLib.Variant('o', accountPath));
 
         this._app.send_notification(this._getIdentifyNotificationID(accountPath), notification);
diff --git a/src/userList.js b/src/userList.js
index 20b43dd..47c4257 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -234,32 +234,32 @@ var UserDetails = GObject.registerClass({
 
     _formatLast(seconds) {
         if (seconds < 60)
-            return ngettext("%d second ago",
-                            "%d seconds ago", seconds).format(seconds);
+            return ngettext('%d second ago',
+                            '%d seconds ago', seconds).format(seconds);
 
         let minutes = seconds / 60;
         if (minutes < 60)
-            return ngettext("%d minute ago",
-                            "%d minutes ago", minutes).format(minutes);
+            return ngettext('%d minute ago',
+                            '%d minutes ago', minutes).format(minutes);
 
         let hours = minutes / 60;
         if (hours < 24)
-            return ngettext("%d hour ago",
-                            "%d hours ago", hours).format(hours);
+            return ngettext('%d hour ago',
+                            '%d hours ago', hours).format(hours);
 
         let days = hours / 24;
         if (days < 7)
-            return ngettext("%d day ago",
-                            "%d days ago", days).format(days);
+            return ngettext('%d day ago',
+                            '%d days ago', days).format(days);
 
         let weeks = days / 7;
         if (days < 30)
-            return ngettext("%d week ago",
-                            "%d weeks ago", weeks).format(weeks);
+            return ngettext('%d week ago',
+                            '%d weeks ago', weeks).format(weeks);
 
         let months = days / 30;
-        return ngettext("%d month ago",
-                        "%d months ago", months).format(months);
+        return ngettext('%d month ago',
+                        '%d months ago', months).format(months);
     }
 
     _onContactInfoReady() {
@@ -419,11 +419,11 @@ var UserPopover = GObject.registerClass({
 
         let label;
         if (status != roomStatus)
-            label = _("Available in another room.");
+            label = _('Available in another room.');
         else if (status == Tp.ConnectionPresenceType.AVAILABLE)
-            label = _("Online");
+            label = _('Online');
         else
-            label = _("Offline");
+            label = _('Offline');
         this._statusLabel.label = label;
 
         this._nickLabel.sensitive = (status == Tp.ConnectionPresenceType.AVAILABLE);
@@ -579,7 +579,7 @@ class UserList extends Gtk.ScrolledWindow {
             visible: true
         }));
         placeholder.add(new Gtk.Label({
-            label: _("No results"),
+            label: _('No results'),
             visible: true
         }));
 
diff --git a/src/userTracker.js b/src/userTracker.js
index 43a6a7f..a77e5ce 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -306,8 +306,8 @@ const UserTracker = GObject.registerClass({
 
     _notifyNickAvailable (member, room) {
         let notification = new Gio.Notification();
-        notification.set_title(_("User is online"));
-        notification.set_body(_("User %s is now online.").format(member.alias));
+        notification.set_title(_('User is online'));
+        notification.set_body(_('User %s is now online.').format(member.alias));
 
         let param = GLib.Variant.new('(ssu)', [
             this._account.get_object_path(),
diff --git a/src/utils.js b/src/utils.js
index 52cdbb6..75da466 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -103,12 +103,12 @@ function getTpEventTime() {
 }
 
 function storeAccountPassword(account, password, callback) {
-    let label = _("Polari server password for %s").format(account.display_name);
+    let label = _('Polari server password for %s').format(account.display_name);
     _storePassword(SECRET_SCHEMA_ACCOUNT, label, account, password, callback);
 }
 
 function storeIdentifyPassword(account, password, callback) {
-    let label = _("Polari NickServ password for %s").format(account.display_name);
+    let label = _('Polari NickServ password for %s').format(account.display_name);
     _storePassword(SECRET_SCHEMA_IDENTIFY, label, account, password, callback);
 }
 
@@ -183,7 +183,7 @@ function openURL(url, timestamp) {
         else
             Gtk.show_uri (Gdk.Screen.get_default(), url, timestamp);
     } catch (e) {
-        let n = new AppNotifications.SimpleOutput(_("Failed to open link"));
+        let n = new AppNotifications.SimpleOutput(_('Failed to open link'));
         app.notificationQueue.addNotification(n);
         debug(`Failed to open ${url}: ${e.message}`);
     }


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