From 934ecb821d4ec00257435285dec0129c21c6423e Mon Sep 17 00:00:00 2001 From: Dimitriy Ryazantcev Date: Wed, 14 Dec 2016 11:52:47 +0200 Subject: [PATCH 1/3] Update l10n strings in code --- lib/logitech_receiver/i18n.py | 2 +- lib/logitech_receiver/notifications.py | 2 +- lib/logitech_receiver/status.py | 14 +++---- lib/solaar/ui/pair_window.py | 4 +- lib/solaar/ui/window.py | 58 ++++++++++---------------- 5 files changed, 34 insertions(+), 46 deletions(-) diff --git a/lib/logitech_receiver/i18n.py b/lib/logitech_receiver/i18n.py index 5c6ca195..43210364 100644 --- a/lib/logitech_receiver/i18n.py +++ b/lib/logitech_receiver/i18n.py @@ -38,7 +38,7 @@ _DUMMY = ( _("empty"), _("critical"), _("low"), _("good"), _("full"), # battery charging statuses - _("discharging"), _("recharging"), _("almost full"), _("full"), + _("discharging"), _("recharging"), _("almost full"), _("charged"), _("slow recharge"), _("invalid battery"), _("thermal error"), # pairing errors diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py index 7a0d2664..4e4aa4db 100644 --- a/lib/logitech_receiver/notifications.py +++ b/lib/logitech_receiver/notifications.py @@ -64,7 +64,7 @@ def _process_receiver_notification(receiver, status, n): # pairing lock notification if n.sub_id == 0x4A: status.lock_open = bool(n.address & 0x01) - reason = _("pairing lock is ") + (_("open") if status.lock_open else _("closed")) + reason = (_("pairing lock is open") if status.lock_open else _("pairing lock is closed")) if _log.isEnabledFor(_INFO): _log.info("%s: %s", receiver, reason) diff --git a/lib/logitech_receiver/status.py b/lib/logitech_receiver/status.py index 4fb59113..e55381f6 100644 --- a/lib/logitech_receiver/status.py +++ b/lib/logitech_receiver/status.py @@ -27,6 +27,7 @@ del getLogger from .i18n import _ +from gettext import ngettext from .common import NamedInts as _NamedInts, NamedInt as _NamedInt from . import hidpp10 as _hidpp10 from . import hidpp20 as _hidpp20 @@ -96,8 +97,7 @@ class ReceiverStatus(dict): def __str__(self): count = len(self._receiver) return (_("No paired devices.") if count == 0 else - _("1 paired device.") if count == 1 else - (str(count) + _(" paired devices."))) + ngettext("%(count)s paired device.", "%(count)s paired devices.", count) % { 'count': count }) __unicode__ = __str__ def changed(self, alert=ALERT.NOTIFICATION, reason=None): @@ -146,9 +146,9 @@ class DeviceStatus(dict): battery_level = self.get(KEYS.BATTERY_LEVEL) if battery_level is not None: if isinstance(battery_level, _NamedInt): - yield _("Battery") + ': ' + _(str(battery_level)) + yield _("Battery: %(level)s") % { 'level': _(str(battery_level)) } else: - yield _("Battery") + ': ' + ('%d%%' % battery_level) + yield _("Battery: %(percent)d%%") % { 'percent': battery_level } battery_status = self.get(KEYS.BATTERY_STATUS) if battery_status is not None: @@ -159,7 +159,7 @@ class DeviceStatus(dict): light_level = self.get(KEYS.LIGHT_LEVEL) if light_level is not None: if comma: yield ', ' - yield _("Lighting") + (': %d ' % light_level) + _("lux") + yield _("Lighting: %(level)s lux") % { 'level': light_level } return ''.join(i for i in _items()) @@ -200,9 +200,9 @@ class DeviceStatus(dict): # only show the notification once alert = ALERT.NOTIFICATION | ALERT.ATTENTION if isinstance(level, _NamedInt): - reason = '%s: %s (%s)' % (_("Battery"), _(str(level)), _(str(status))) + reason = _("Battery: %(level)s (%(status)s)") % { 'level': _(level), 'status': _(status) } else: - reason = '%s: %d%% (%s)' % (_("Battery"), level, _(str(status))) + reason = _("Battery: %(percent)d%% (%(status)s)") % { 'percent': level, 'status': _(status) } if changed or reason: # update the leds on the device, if any diff --git a/lib/solaar/ui/pair_window.py b/lib/solaar/ui/pair_window.py index aaed4cd8..62958b8e 100644 --- a/lib/solaar/ui/pair_window.py +++ b/lib/solaar/ui/pair_window.py @@ -152,7 +152,7 @@ def _pairing_succeeded(assistant, receiver, device): page = _create_page(assistant, Gtk.AssistantPageType.SUMMARY) - header = Gtk.Label(_("Found a new device") + ':') + header = Gtk.Label(_("Found a new device:")) header.set_alignment(0.5, 0) page.pack_start(header, False, False, 0) @@ -194,7 +194,7 @@ def create(receiver): assert receiver.kind is None assistant = Gtk.Assistant() - assistant.set_title(receiver.name + ': ' + _("pair new device")) + assistant.set_title(_('%(receiver_name)s: pair new device') % { 'receiver_name': receiver.name }) assistant.set_icon_name('list-add') assistant.set_size_request(400, 240) diff --git a/lib/solaar/ui/window.py b/lib/solaar/ui/window.py index 5facfd82..6e27e095 100644 --- a/lib/solaar/ui/window.py +++ b/lib/solaar/ui/window.py @@ -29,6 +29,7 @@ from gi.repository.GObject import TYPE_PYOBJECT from solaar import NAME from solaar.i18n import _ +from gettext import ngettext # from solaar import __version__ as VERSION from solaar.ui import async as _ui_async from logitech_receiver import hidpp10 as _hidpp10 @@ -61,23 +62,6 @@ _TREE_SEPATATOR = (None, 0, False, None, None, None, None, None) assert len(_TREE_SEPATATOR) == len(_COLUMN_TYPES) assert len(_COLUMN_TYPES) == len(_COLUMN) -_TOOLTIP_LINK_SECURE = _("The wireless link between this device and its receiver is encrypted.") -_TOOLTIP_LINK_INSECURE = _("The wireless link between this device and its receiver is not encrypted.\n" - "\n" - "For pointing devices (mice, trackballs, trackpads), this is a minor security issue.\n" - "\n" - "It is, however, a major security issue for text-input devices (keyboards, numpads),\n" - "because typed text can be sniffed inconspicuously by 3rd parties within range.") - -_UNIFYING_RECEIVER_TEXT = ( - _("No device paired") + '.\n\n' + _("Up to %d devices can be paired to this receiver") + '.', - '%d ' + _("paired devices") + '\n\n' + _("Up to %d devices can be paired to this receiver") + '.', - ) -_NANO_RECEIVER_TEXT = ( - _("No device paired") + '.\n\n ', - ' \n\n' + _("Only one device can be paired to this receiver") + '.', - ) - # # create UI layout # @@ -525,9 +509,9 @@ def _update_details(button): yield (_("Index"), device.number) yield (_("Wireless PID"), device.wpid) hid_version = device.protocol - yield (_("Protocol"), 'HID++ %1.1f' % hid_version if hid_version else 'unknown') + yield (_("Protocol"), 'HID++ %1.1f' % hid_version if hid_version else _('Unknown')) if read_all and device.polling_rate: - yield (_("Polling rate"), '%d ms (%dHz)' % (device.polling_rate, 1000 // device.polling_rate)) + yield (_("Polling rate"), _('%(rate)d ms (%(rate_hz)dHz)') % { 'rate': device.polling_rate, 'rate_hz': 1000 // device.polling_rate }) if read_all or not device.online: yield (_("Serial"), device.serial) @@ -578,16 +562,15 @@ def _update_receiver_panel(receiver, panel, buttons, full=False): assert receiver devices_count = len(receiver) - if receiver.max_devices > 1: - if devices_count == 0: - panel._count.set_markup(_UNIFYING_RECEIVER_TEXT[0] % receiver.max_devices) - else: - panel._count.set_markup(_UNIFYING_RECEIVER_TEXT[1] % (devices_count, receiver.max_devices)) - else: - if devices_count == 0: - panel._count.set_markup(_NANO_RECEIVER_TEXT[0]) - else: - panel._count.set_markup(_NANO_RECEIVER_TEXT[1]) + + paired_text = _('No device paired.') if devices_count == 0 else ngettext('%(count)s paired device.', '%(count)s paired devices.', devices_count) % { 'count': devices_count } + + if(receiver.max_devices > 0): + paired_text += '\n\n%s' % ngettext('Up to %(max_count)s device can be paired to this receiver.', 'Up to %(max_count)s devices can be paired to this receiver.', receiver.max_devices) % { 'max_count': receiver.max_devices } + elif(devices_count > 0): + paired_text += '\n\n%s' % _('Only one device can be paired to this receiver.') + + panel._count.set_markup(paired_text) is_pairing = receiver.status.lock_open if is_pairing: @@ -635,7 +618,7 @@ def _update_device_panel(device, panel, buttons, full=False): if isinstance(battery_level, _NamedInt): text = _(str(battery_level)) else: - text = '%d%%' % battery_level + text = _("%(battery_percent)d%%") % { 'battery_percent': battery_level } if is_online: if charging: text += ' (%s)' % _("charging") @@ -649,11 +632,16 @@ def _update_device_panel(device, panel, buttons, full=False): if not_secure: panel._secure._text.set_text(_("not encrypted")) panel._secure._icon.set_from_icon_name('security-low', _INFO_ICON_SIZE) - panel._secure.set_tooltip_text(_TOOLTIP_LINK_INSECURE) + panel._secure.set_tooltip_text(_("The wireless link between this device and its receiver is not encrypted.\n" + "\n" + "For pointing devices (mice, trackballs, trackpads), this is a minor security issue.\n" + "\n" + "It is, however, a major security issue for text-input devices (keyboards, numpads),\n" + "because typed text can be sniffed inconspicuously by 3rd parties within range.")) else: panel._secure._text.set_text(_("encrypted")) panel._secure._icon.set_from_icon_name('security-high', _INFO_ICON_SIZE) - panel._secure.set_tooltip_text(_TOOLTIP_LINK_SECURE) + panel._secure.set_tooltip_text(_("The wireless link between this device and its receiver is encrypted.")) panel._secure._icon.set_visible(True) else: panel._secure._text.set_markup('%s' % _("offline")) @@ -666,7 +654,7 @@ def _update_device_panel(device, panel, buttons, full=False): panel._lux.set_visible(False) else: panel._lux._icon.set_from_icon_name(_icons.lux(light_level), _INFO_ICON_SIZE) - panel._lux._text.set_text('%d %s' % (light_level, _("lux"))) + panel._lux._text.set_text(_("%(light_level)d lux") % { 'light_level': light_level }) panel._lux.set_visible(True) else: panel._lux.set_visible(False) @@ -813,9 +801,9 @@ def update(device, need_popup=False): _model.set_value(item, _COLUMN.STATUS_ICON, _CAN_SET_ROW_NONE) else: if isinstance(battery_level, _NamedInt): - status_text = str(battery_level) + status_text = _("%(battery_level)s") % { 'battery_level': _(str(battery_level)) } else: - status_text = '%d%%' % battery_level + status_text = _("%(battery_percent)d%%") % { 'battery_percent': battery_level } _model.set_value(item, _COLUMN.STATUS_TEXT, status_text) charging = device.status.get(_K.BATTERY_CHARGING) From a0c6a6ce59b710c114442e0088fe462492b96a8d Mon Sep 17 00:00:00 2001 From: Dimitriy Ryazantcev Date: Wed, 14 Dec 2016 11:58:22 +0200 Subject: [PATCH 2/3] Update l10n pot template --- po/solaar.pot | 315 +++++++++++++++++++++++++++++--------------------- 1 file changed, 184 insertions(+), 131 deletions(-) diff --git a/po/solaar.pot b/po/solaar.pot index 9a303ed5..cdcad839 100644 --- a/po/solaar.pot +++ b/po/solaar.pot @@ -7,7 +7,7 @@ msgid "" msgstr "Project-Id-Version: solaar 0.9.2\n" "Report-Msgid-Bugs-To: \n" - "POT-Creation-Date: 2013-09-29 16:36+0300\n" + "POT-Creation-Date: 2016-12-21 00:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,6 +15,7 @@ msgstr "Project-Id-Version: solaar 0.9.2\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: lib/logitech_receiver/i18n.py:38 msgid "critical" @@ -24,7 +25,7 @@ msgstr "" msgid "empty" msgstr "" -#: lib/logitech_receiver/i18n.py:38 lib/logitech_receiver/i18n.py:41 +#: lib/logitech_receiver/i18n.py:38 msgid "full" msgstr "" @@ -40,6 +41,10 @@ msgstr "" msgid "almost full" msgstr "" +#: lib/logitech_receiver/i18n.py:41 +msgid "charged" +msgstr "" + #: lib/logitech_receiver/i18n.py:41 msgid "discharging" msgstr "" @@ -80,7 +85,7 @@ msgstr "" msgid "Bootloader" msgstr "" -#: lib/logitech_receiver/i18n.py:48 lib/solaar/ui/window.py:535 +#: lib/logitech_receiver/i18n.py:48 lib/solaar/ui/window.py:525 msgid "Firmware" msgstr "" @@ -93,18 +98,14 @@ msgid "Other" msgstr "" #: lib/logitech_receiver/notifications.py:67 -msgid "closed" +msgid "pairing lock is closed" msgstr "" #: lib/logitech_receiver/notifications.py:67 -msgid "open" +msgid "pairing lock is open" msgstr "" -#: lib/logitech_receiver/notifications.py:67 -msgid "pairing lock is " -msgstr "" - -#: lib/logitech_receiver/notifications.py:150 lib/solaar/ui/notify.py:118 +#: lib/logitech_receiver/notifications.py:150 lib/solaar/ui/notify.py:123 msgid "unpaired" msgstr "" @@ -112,78 +113,98 @@ msgstr "" msgid "powered on" msgstr "" -#: lib/logitech_receiver/receiver.py:107 lib/solaar/ui/window.py:622 +#: lib/logitech_receiver/receiver.py:107 lib/solaar/ui/window.py:611 msgid "unknown" msgstr "" -#: lib/logitech_receiver/settings_templates.py:77 +#: lib/logitech_receiver/settings_templates.py:119 msgid "Smooth Scrolling" msgstr "" -#: lib/logitech_receiver/settings_templates.py:78 +#: lib/logitech_receiver/settings_templates.py:120 msgid "High-sensitivity mode for vertical scroll with the wheel." msgstr "" -#: lib/logitech_receiver/settings_templates.py:79 +#: lib/logitech_receiver/settings_templates.py:121 msgid "Side Scrolling" msgstr "" -#: lib/logitech_receiver/settings_templates.py:80 +#: lib/logitech_receiver/settings_templates.py:122 msgid "When disabled, pushing the wheel sideways sends custom button " "events\n" "instead of the standard side-scrolling events." msgstr "" -#: lib/logitech_receiver/settings_templates.py:82 +#: lib/logitech_receiver/settings_templates.py:124 msgid "Sensitivity (DPI)" msgstr "" -#: lib/logitech_receiver/settings_templates.py:83 +#: lib/logitech_receiver/settings_templates.py:125 msgid "Swap Fx function" msgstr "" -#: lib/logitech_receiver/settings_templates.py:84 +#: lib/logitech_receiver/settings_templates.py:126 msgid "When set, the F1..F12 keys will activate their special function,\n" "and you must hold the FN key to activate their standard function." msgstr "" -#: lib/logitech_receiver/settings_templates.py:87 +#: lib/logitech_receiver/settings_templates.py:129 msgid "When unset, the F1..F12 keys will activate their standard function,\n" "and you must hold the FN key to activate their special function." msgstr "" -#: lib/logitech_receiver/settings_templates.py:89 +#: lib/logitech_receiver/settings_templates.py:131 msgid "Hand Detection" msgstr "" -#: lib/logitech_receiver/settings_templates.py:90 +#: lib/logitech_receiver/settings_templates.py:132 msgid "Turn on illumination when the hands hover over the keyboard." msgstr "" -#: lib/logitech_receiver/status.py:98 -msgid "No paired devices." +#: lib/logitech_receiver/settings_templates.py:133 +msgid "Smart Shift" +msgstr "" + +#: lib/logitech_receiver/settings_templates.py:134 +msgid "Automatically switch the mouse wheel between ratchet and freespin " + "mode.\n" + "The mouse wheel is always free at 0, and always locked at 50" msgstr "" #: lib/logitech_receiver/status.py:99 -msgid "1 paired device." +msgid "No paired devices." msgstr "" -#: lib/logitech_receiver/status.py:100 -msgid " paired devices." +#: lib/logitech_receiver/status.py:100 lib/solaar/ui/window.py:566 +#, python-format +msgid "%(count)s paired device." +msgid_plural "%(count)s paired devices." +msgstr[0] "" +msgstr[1] "" + +#: lib/logitech_receiver/status.py:149 +#, python-format +msgid "Battery: %(level)s" msgstr "" -#: lib/logitech_receiver/status.py:149 lib/logitech_receiver/status.py:151 -#: lib/logitech_receiver/status.py:203 lib/logitech_receiver/status.py:205 -#: lib/solaar/ui/window.py:143 -msgid "Battery" +#: lib/logitech_receiver/status.py:151 +#, python-format +msgid "Battery: %(percent)d%%" msgstr "" -#: lib/logitech_receiver/status.py:162 lib/solaar/ui/window.py:150 -msgid "Lighting" +#: lib/logitech_receiver/status.py:162 +#, python-format +msgid "Lighting: %(level)s lux" msgstr "" -#: lib/logitech_receiver/status.py:162 lib/solaar/ui/window.py:663 -msgid "lux" +#: lib/logitech_receiver/status.py:203 +#, python-format +msgid "Battery: %(level)s (%(status)s)" +msgstr "" + +#: lib/logitech_receiver/status.py:205 +#, python-format +msgid "Battery: %(percent)d%% (%(status)s)" msgstr "" #: lib/solaar/listener.py:95 @@ -210,6 +231,7 @@ msgid "Unpairing failed" msgstr "" #: lib/solaar/ui/__init__.py:54 +#, python-brace-format msgid "Failed to unpair %{device} from %{receiver}." msgstr "" @@ -234,29 +256,29 @@ msgstr "" msgid "Logitech documentation" msgstr "" -#: lib/solaar/ui/action.py:68 lib/solaar/ui/window.py:316 +#: lib/solaar/ui/action.py:68 lib/solaar/ui/window.py:306 msgid "About" msgstr "" #: lib/solaar/ui/action.py:95 lib/solaar/ui/action.py:98 -#: lib/solaar/ui/window.py:203 +#: lib/solaar/ui/window.py:193 msgid "Unpair" msgstr "" -#: lib/solaar/ui/config_panel.py:98 +#: lib/solaar/ui/config_panel.py:120 msgid "Working" msgstr "" -#: lib/solaar/ui/config_panel.py:101 +#: lib/solaar/ui/config_panel.py:123 msgid "Read/write operation failed." msgstr "" -#: lib/solaar/ui/notify.py:120 +#: lib/solaar/ui/notify.py:125 msgid "connected" msgstr "" -#: lib/solaar/ui/notify.py:122 lib/solaar/ui/tray.py:290 -#: lib/solaar/ui/tray.py:295 lib/solaar/ui/window.py:653 +#: lib/solaar/ui/notify.py:127 lib/solaar/ui/tray.py:295 +#: lib/solaar/ui/tray.py:300 lib/solaar/ui/window.py:647 msgid "offline" msgstr "" @@ -284,7 +306,7 @@ msgid "No further details are available about the error." msgstr "" #: lib/solaar/ui/pair_window.py:155 -msgid "Found a new device" +msgid "Found a new device:" msgstr "" #: lib/solaar/ui/pair_window.py:180 @@ -292,7 +314,8 @@ msgid "The wireless link is not encrypted" msgstr "" #: lib/solaar/ui/pair_window.py:197 -msgid "pair new device" +#, python-format +msgid "%(receiver_name)s: pair new device" msgstr "" #: lib/solaar/ui/pair_window.py:205 @@ -312,19 +335,121 @@ msgstr "" msgid "Quit" msgstr "" -#: lib/solaar/ui/tray.py:274 +#: lib/solaar/ui/tray.py:279 msgid "no receiver" msgstr "" -#: lib/solaar/ui/tray.py:293 +#: lib/solaar/ui/tray.py:298 msgid "no status" msgstr "" -#: lib/solaar/ui/window.py:58 -msgid "The wireless link between this device and its receiver is encrypted." +#: lib/solaar/ui/window.py:100 +msgid "Scanning" msgstr "" -#: lib/solaar/ui/window.py:59 +#: lib/solaar/ui/window.py:133 +msgid "Battery" +msgstr "" + +#: lib/solaar/ui/window.py:136 +msgid "Wireless Link" +msgstr "" + +#: lib/solaar/ui/window.py:140 +msgid "Lighting" +msgstr "" + +#: lib/solaar/ui/window.py:169 +msgid "Show Technical Details" +msgstr "" + +#: lib/solaar/ui/window.py:182 +msgid "Pair new device" +msgstr "" + +#: lib/solaar/ui/window.py:201 +msgid "Select a device" +msgstr "" + +#: lib/solaar/ui/window.py:498 +msgid "Path" +msgstr "" + +#: lib/solaar/ui/window.py:500 +msgid "USB id" +msgstr "" + +#: lib/solaar/ui/window.py:503 lib/solaar/ui/window.py:505 +#: lib/solaar/ui/window.py:517 lib/solaar/ui/window.py:519 +msgid "Serial" +msgstr "" + +#: lib/solaar/ui/window.py:509 +msgid "Index" +msgstr "" + +#: lib/solaar/ui/window.py:510 +msgid "Wireless PID" +msgstr "" + +#: lib/solaar/ui/window.py:512 +msgid "Protocol" +msgstr "" + +#: lib/solaar/ui/window.py:512 +msgid "Unknown" +msgstr "" + +#: lib/solaar/ui/window.py:514 +#, python-format +msgid "%(rate)d ms (%(rate_hz)dHz)" +msgstr "" + +#: lib/solaar/ui/window.py:514 +msgid "Polling rate" +msgstr "" + +#: lib/solaar/ui/window.py:529 +msgid "none" +msgstr "" + +#: lib/solaar/ui/window.py:530 +msgid "Notifications" +msgstr "" + +#: lib/solaar/ui/window.py:566 +msgid "No device paired." +msgstr "" + +#: lib/solaar/ui/window.py:569 +#, python-format +msgid "Up to %(max_count)s device can be paired to this receiver." +msgid_plural "Up to %(max_count)s devices can be paired to this receiver." +msgstr[0] "" +msgstr[1] "" + +#: lib/solaar/ui/window.py:571 +msgid "Only one device can be paired to this receiver." +msgstr "" + +#: lib/solaar/ui/window.py:621 lib/solaar/ui/window.py:806 +#, python-format +msgid "%(battery_percent)d%%" +msgstr "" + +#: lib/solaar/ui/window.py:624 +msgid "charging" +msgstr "" + +#: lib/solaar/ui/window.py:626 +msgid "last known" +msgstr "" + +#: lib/solaar/ui/window.py:633 +msgid "not encrypted" +msgstr "" + +#: lib/solaar/ui/window.py:635 msgid "The wireless link between this device and its receiver is not " "encrypted.\n" "\n" @@ -337,92 +462,20 @@ msgid "The wireless link between this device and its receiver is not " "within range." msgstr "" -#: lib/solaar/ui/window.py:67 lib/solaar/ui/window.py:71 -msgid "No device paired" -msgstr "" - -#: lib/solaar/ui/window.py:67 lib/solaar/ui/window.py:68 -#, python-format -msgid "Up to %d devices can be paired to this receiver" -msgstr "" - -#: lib/solaar/ui/window.py:68 -msgid "paired devices" -msgstr "" - -#: lib/solaar/ui/window.py:72 -msgid "Only one device can be paired to this receiver" -msgstr "" - -#: lib/solaar/ui/window.py:110 -msgid "Scanning" -msgstr "" - -#: lib/solaar/ui/window.py:146 -msgid "Wireless Link" -msgstr "" - -#: lib/solaar/ui/window.py:179 -msgid "Show Technical Details" -msgstr "" - -#: lib/solaar/ui/window.py:192 -msgid "Pair new device" -msgstr "" - -#: lib/solaar/ui/window.py:211 -msgid "Select a device" -msgstr "" - -#: lib/solaar/ui/window.py:508 -msgid "Path" -msgstr "" - -#: lib/solaar/ui/window.py:510 -msgid "USB id" -msgstr "" - -#: lib/solaar/ui/window.py:513 lib/solaar/ui/window.py:515 -#: lib/solaar/ui/window.py:527 lib/solaar/ui/window.py:529 -msgid "Serial" -msgstr "" - -#: lib/solaar/ui/window.py:519 -msgid "Index" -msgstr "" - -#: lib/solaar/ui/window.py:520 -msgid "Wireless PID" -msgstr "" - -#: lib/solaar/ui/window.py:522 -msgid "Protocol" -msgstr "" - -#: lib/solaar/ui/window.py:524 -msgid "Polling rate" -msgstr "" - -#: lib/solaar/ui/window.py:539 -msgid "none" -msgstr "" - -#: lib/solaar/ui/window.py:540 -msgid "Notifications" -msgstr "" - -#: lib/solaar/ui/window.py:635 -msgid "charging" -msgstr "" - -#: lib/solaar/ui/window.py:637 -msgid "last known" +#: lib/solaar/ui/window.py:642 +msgid "encrypted" msgstr "" #: lib/solaar/ui/window.py:644 -msgid "not encrypted" +msgid "The wireless link between this device and its receiver is encrypted." msgstr "" -#: lib/solaar/ui/window.py:648 -msgid "encrypted" +#: lib/solaar/ui/window.py:657 +#, python-format +msgid "%(light_level)d lux" +msgstr "" + +#: lib/solaar/ui/window.py:804 +#, python-format +msgid "%(battery_level)s" msgstr "" From 197ff7365d8efee0d645a8c7c47520830de9aae9 Mon Sep 17 00:00:00 2001 From: Dimitriy Ryazantcev Date: Wed, 14 Dec 2016 13:14:37 +0200 Subject: [PATCH 3/3] Add Russian translation --- docs/i18n.md | 2 + lib/solaar/ui/about.py | 1 + po/ru.po | 510 ++++++++++++++++++++++++++++++ share/applications/solaar.desktop | 1 + 4 files changed, 514 insertions(+) create mode 100644 po/ru.po diff --git a/docs/i18n.md b/docs/i18n.md index 20ffcdff..645540e0 100644 --- a/docs/i18n.md +++ b/docs/i18n.md @@ -44,11 +44,13 @@ Currently Solaar has been translated in the following languages: - Polski: [Adrian Piotrowicz][nexces] - Portuguese-BR: [Drovetto][drovetto], [Josenivaldo Benito Jr.][jrbenito] - Română: Daniel Pavel +- Russian: [Dimitriy Ryazantcev][DJm00n] - Svensk: [Daniel Zippert][zipperten], Emelie Snecker [papoteur]: http://github.com/papoteur [david-geiger]: http://github.com/david-geiger [damsweb]: http://github.com/damsweb +[DJm00n]: https://github.com/DJm00n [nexces]: http://github.com/nexces [zipperten]: http://github.com/zipperten [micheleolivo]: http://github.com/micheleolivo diff --git a/lib/solaar/ui/about.py b/lib/solaar/ui/about.py index 6d9af932..6d8ce5e3 100644 --- a/lib/solaar/ui/about.py +++ b/lib/solaar/ui/about.py @@ -72,6 +72,7 @@ def _create(): 'Drovetto, JrBenito (Portuguese-BR)', 'Daniel Pavel (română)', 'Daniel Zippert, Emelie Snecker (svensk)', + 'Dimitriy Ryazantcev (Russian)', ))) about.set_website('http://pwr.github.io/Solaar/') diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 00000000..38cc622e --- /dev/null +++ b/po/ru.po @@ -0,0 +1,510 @@ +# Russian translations for solaar package. +# Copyright (C) 2013 THE solaar'S COPYRIGHT HOLDER +# This file is distributed under the same license as the solaar package. +# +# Automatically generated, 2013. +# Dmitry Ryazantcev , 2013-2016. +msgid "" +msgstr "Project-Id-Version: solaar 0.9.2\n" + "Report-Msgid-Bugs-To: \n" + "POT-Creation-Date: 2016-12-21 00:13+0200\n" + "PO-Revision-Date: 2016-12-21 00:12+0200\n" + "Last-Translator: Dmitry Ryazantcev \n" + "Language-Team: Russian \n" + "Language: ru\n" + "MIME-Version: 1.0\n" + "Content-Type: text/plain; charset=UTF-8\n" + "Content-Transfer-Encoding: 8bit\n" + "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 " + "&& n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + "X-Generator: Poedit 1.5.4\n" + +#: lib/logitech_receiver/i18n.py:38 +msgid "critical" +msgstr "критический" + +#: lib/logitech_receiver/i18n.py:38 +msgid "empty" +msgstr "пусто" + +#: lib/logitech_receiver/i18n.py:38 +msgid "full" +msgstr "полный" + +#: lib/logitech_receiver/i18n.py:38 +msgid "good" +msgstr "средний" + +#: lib/logitech_receiver/i18n.py:38 +msgid "low" +msgstr "низкий" + +#: lib/logitech_receiver/i18n.py:41 +msgid "almost full" +msgstr "почти полная" + +#: lib/logitech_receiver/i18n.py:41 +msgid "charged" +msgstr "заряжено" + +#: lib/logitech_receiver/i18n.py:41 +msgid "discharging" +msgstr "разряжается" + +#: lib/logitech_receiver/i18n.py:41 +msgid "recharging" +msgstr "перезаряжается" + +#: lib/logitech_receiver/i18n.py:42 +msgid "invalid battery" +msgstr "недопустимая батарея" + +#: lib/logitech_receiver/i18n.py:42 +msgid "slow recharge" +msgstr "медленная разрядка" + +#: lib/logitech_receiver/i18n.py:42 +msgid "thermal error" +msgstr "тепловая ошибка" + +#: lib/logitech_receiver/i18n.py:45 +msgid "device not supported" +msgstr "устройство не поддерживается" + +#: lib/logitech_receiver/i18n.py:45 +msgid "device timeout" +msgstr "тайм аут устройства" + +#: lib/logitech_receiver/i18n.py:45 +msgid "sequence timeout" +msgstr "тайм аут последовательности" + +#: lib/logitech_receiver/i18n.py:45 +msgid "too many devices" +msgstr "слишком много устройств" + +#: lib/logitech_receiver/i18n.py:48 +msgid "Bootloader" +msgstr "Загрузчик" + +#: lib/logitech_receiver/i18n.py:48 lib/solaar/ui/window.py:525 +msgid "Firmware" +msgstr "Прошивка" + +#: lib/logitech_receiver/i18n.py:48 +msgid "Hardware" +msgstr "Оборудование" + +#: lib/logitech_receiver/i18n.py:48 +msgid "Other" +msgstr "Другое" + +#: lib/logitech_receiver/notifications.py:67 +msgid "pairing lock is closed" +msgstr "сопряжение заблокировано" + +#: lib/logitech_receiver/notifications.py:67 +msgid "pairing lock is open" +msgstr "сопряжение разблокировано" + +#: lib/logitech_receiver/notifications.py:150 lib/solaar/ui/notify.py:123 +msgid "unpaired" +msgstr "не сопряжено" + +#: lib/logitech_receiver/notifications.py:192 +msgid "powered on" +msgstr "включено" + +#: lib/logitech_receiver/receiver.py:107 lib/solaar/ui/window.py:611 +msgid "unknown" +msgstr "неизвестно" + +#: lib/logitech_receiver/settings_templates.py:119 +msgid "Smooth Scrolling" +msgstr "Плавная прокрутка" + +#: lib/logitech_receiver/settings_templates.py:120 +msgid "High-sensitivity mode for vertical scroll with the wheel." +msgstr "Режим высокой чувствительности для вертикальной прокрутки колесом." + +#: lib/logitech_receiver/settings_templates.py:121 +msgid "Side Scrolling" +msgstr "Горизонтальная прокрутка" + +#: lib/logitech_receiver/settings_templates.py:122 +msgid "When disabled, pushing the wheel sideways sends custom button " + "events\n" + "instead of the standard side-scrolling events." +msgstr "Когда отключено, нажатие на колесо сбоку будет отправлять\n" + "пользовательские события нажатия, вместо стандартных\n" + "событий горизонтальной прокрутки." + +#: lib/logitech_receiver/settings_templates.py:124 +msgid "Sensitivity (DPI)" +msgstr "Чувствительность (DPI)" + +#: lib/logitech_receiver/settings_templates.py:125 +msgid "Swap Fx function" +msgstr "Сменить поведение Fx" + +#: lib/logitech_receiver/settings_templates.py:126 +msgid "When set, the F1..F12 keys will activate their special function,\n" + "and you must hold the FN key to activate their standard function." +msgstr "Если включено, то кнопки F1..F12 будут активировать\n" + "их дополнительную функцию и вы должны будете зажать\n" + "кнопку FN для активации их стандартной функции." + +#: lib/logitech_receiver/settings_templates.py:129 +msgid "When unset, the F1..F12 keys will activate their standard function,\n" + "and you must hold the FN key to activate their special function." +msgstr "Если выключено, то кнопки F1..F12 будут активировать\n" + "их стандартную функцию и вы должны будете зажать\n" + "кнопку FN для активации их дополнительной функции." + +#: lib/logitech_receiver/settings_templates.py:131 +msgid "Hand Detection" +msgstr "Обнаружение рук" + +#: lib/logitech_receiver/settings_templates.py:132 +msgid "Turn on illumination when the hands hover over the keyboard." +msgstr "Включать подсветку, когда руки над клавиатурой." + +#: lib/logitech_receiver/settings_templates.py:133 +msgid "Smart Shift" +msgstr "Smart Shift" + +#: lib/logitech_receiver/settings_templates.py:134 +msgid "Automatically switch the mouse wheel between ratchet and freespin " + "mode.\n" + "The mouse wheel is always free at 0, and always locked at 50" +msgstr "Автоматически переключать режим колесика между пошаговой и " + "сверхбыстрой прокруткой.\n" + "Колесико мыши всегда свободно при значении 0 и заблокировано при 50" + +#: lib/logitech_receiver/status.py:99 +msgid "No paired devices." +msgstr "Нет сопряженных устройств." + +#: lib/logitech_receiver/status.py:100 lib/solaar/ui/window.py:566 +#, python-format +msgid "%(count)s paired device." +msgid_plural "%(count)s paired devices." +msgstr[0] "%(count)s сопряженное устройство." +msgstr[1] "%(count)s сопряженные устройства." +msgstr[2] "%(count)s сопряженных устройств." + +#: lib/logitech_receiver/status.py:149 +#, python-format +msgid "Battery: %(level)s" +msgstr "Батарея: %(level)s" + +#: lib/logitech_receiver/status.py:151 +#, python-format +msgid "Battery: %(percent)d%%" +msgstr "Батарея: %(percent)d%%" + +#: lib/logitech_receiver/status.py:162 +#, python-format +msgid "Lighting: %(level)s lux" +msgstr "Освещенность: %(level)s lux" + +#: lib/logitech_receiver/status.py:203 +#, python-format +msgid "Battery: %(level)s (%(status)s)" +msgstr "Батарея: %(level)s (%(status)s)" + +#: lib/logitech_receiver/status.py:205 +#, python-format +msgid "Battery: %(percent)d%% (%(status)s)" +msgstr "Батарея: %(percent)d%% (%(status)s)" + +#: lib/solaar/listener.py:95 +msgid "The receiver was unplugged." +msgstr "Приёмник был извлечен." + +#: lib/solaar/ui/__init__.py:48 +msgid "Permissions error" +msgstr "Ошибка доступа" + +#: lib/solaar/ui/__init__.py:49 +#, python-format +msgid "Found a Logitech Receiver (%s), but did not have permission to open " + "it." +msgstr "Найден приёмник Logitech (%s), но нет прав для доступа к нему." + +#: lib/solaar/ui/__init__.py:51 +msgid "If you've just installed Solaar, try removing the receiver and " + "plugging it back in." +msgstr "Если это первый запуск Solaar, попробуйте извлечь и снова вставить " + "приёмник." + +#: lib/solaar/ui/__init__.py:53 +msgid "Unpairing failed" +msgstr "Отмена сопряжения не удалась" + +#: lib/solaar/ui/__init__.py:54 +#, python-brace-format +msgid "Failed to unpair %{device} from %{receiver}." +msgstr "Отмена сопряжения %{device} с %{receiver} не удалась." + +#: lib/solaar/ui/__init__.py:56 +msgid "The receiver returned an error, with no further details." +msgstr "Приёмник вернул ошибку, без дополнительных деталей." + +#: lib/solaar/ui/about.py:39 +msgid "Shows status of devices connected\n" + "through wireless Logitech receivers." +msgstr "Показывает статус устройств, подсоединенных\n" + "через беспроводные приёмники Logitech." + +#: lib/solaar/ui/about.py:48 +msgid "GUI design" +msgstr "Дизайн интерфейса" + +#: lib/solaar/ui/about.py:49 +msgid "Testing" +msgstr "Тестирование" + +#: lib/solaar/ui/about.py:54 +msgid "Logitech documentation" +msgstr "Документация Logitech" + +#: lib/solaar/ui/action.py:68 lib/solaar/ui/window.py:306 +msgid "About" +msgstr "О программе" + +#: lib/solaar/ui/action.py:95 lib/solaar/ui/action.py:98 +#: lib/solaar/ui/window.py:193 +msgid "Unpair" +msgstr "Отмена сопряжения" + +#: lib/solaar/ui/config_panel.py:120 +msgid "Working" +msgstr "Работает" + +#: lib/solaar/ui/config_panel.py:123 +msgid "Read/write operation failed." +msgstr "Операция чтения/записи не удалась." + +#: lib/solaar/ui/notify.py:125 +msgid "connected" +msgstr "соединено" + +#: lib/solaar/ui/notify.py:127 lib/solaar/ui/tray.py:295 +#: lib/solaar/ui/tray.py:300 lib/solaar/ui/window.py:647 +msgid "offline" +msgstr "нет соединения" + +#: lib/solaar/ui/pair_window.py:133 +msgid "Pairing failed" +msgstr "Сопряжение не удалось" + +#: lib/solaar/ui/pair_window.py:135 +msgid "Make sure your device is within range, and has a decent battery " + "charge." +msgstr "Удостоверьтесь, что ваше устройство в радиусе приёма и батарея " + "заряжена." + +#: lib/solaar/ui/pair_window.py:137 +msgid "A new device was detected, but it is not compatible with this " + "receiver." +msgstr "Обнаружено новое устройство, но оно не совместимо с этим приёмником." + +#: lib/solaar/ui/pair_window.py:139 +#, python-format +msgid "The receiver only supports %d paired device(s)." +msgstr "Приёмник поддерживает только %d сопряженных устройств(а)." + +#: lib/solaar/ui/pair_window.py:141 +msgid "No further details are available about the error." +msgstr "Дополнительные детали об этой ошибке не доступны." + +#: lib/solaar/ui/pair_window.py:155 +msgid "Found a new device:" +msgstr "Найдено новое устройство:" + +#: lib/solaar/ui/pair_window.py:180 +msgid "The wireless link is not encrypted" +msgstr "Беспроводное соединение не зашифровано" + +#: lib/solaar/ui/pair_window.py:197 +#, python-format +msgid "%(receiver_name)s: pair new device" +msgstr "%(receiver_name)s: новое сопряженное устройство" + +#: lib/solaar/ui/pair_window.py:205 +msgid "Turn on the device you want to pair." +msgstr "Включите устройство, с которым вы хотите создать сопряжение." + +#: lib/solaar/ui/pair_window.py:206 +msgid "If the device is already turned on,\n" + "turn if off and on again." +msgstr "Если устройство уже включено,\n" + "выключите и включите его снова." + +#: lib/solaar/ui/tray.py:55 +msgid "No Logitech receiver found" +msgstr "Приёмник Logitech не найден" + +#: lib/solaar/ui/tray.py:62 +msgid "Quit" +msgstr "Выйти" + +#: lib/solaar/ui/tray.py:279 +msgid "no receiver" +msgstr "нет приёмника" + +#: lib/solaar/ui/tray.py:298 +msgid "no status" +msgstr "нет статуса" + +#: lib/solaar/ui/window.py:100 +msgid "Scanning" +msgstr "Сканирование" + +#: lib/solaar/ui/window.py:133 +msgid "Battery" +msgstr "Батарея" + +#: lib/solaar/ui/window.py:136 +msgid "Wireless Link" +msgstr "Беспроводное соединение" + +#: lib/solaar/ui/window.py:140 +msgid "Lighting" +msgstr "Подсветка" + +#: lib/solaar/ui/window.py:169 +msgid "Show Technical Details" +msgstr "Показать технические детали" + +#: lib/solaar/ui/window.py:182 +msgid "Pair new device" +msgstr "Новое сопряженное устройство" + +#: lib/solaar/ui/window.py:201 +msgid "Select a device" +msgstr "Выбор устройства" + +#: lib/solaar/ui/window.py:498 +msgid "Path" +msgstr "Путь" + +#: lib/solaar/ui/window.py:500 +msgid "USB id" +msgstr "Идент. USB" + +#: lib/solaar/ui/window.py:503 lib/solaar/ui/window.py:505 +#: lib/solaar/ui/window.py:517 lib/solaar/ui/window.py:519 +msgid "Serial" +msgstr "Серийный ном." + +#: lib/solaar/ui/window.py:509 +msgid "Index" +msgstr "Номер" + +#: lib/solaar/ui/window.py:510 +msgid "Wireless PID" +msgstr "Беспров. PID" + +#: lib/solaar/ui/window.py:512 +msgid "Protocol" +msgstr "Протокол" + +#: lib/solaar/ui/window.py:512 +msgid "Unknown" +msgstr "Неизвестен" + +#: lib/solaar/ui/window.py:514 +#, python-format +msgid "%(rate)d ms (%(rate_hz)dHz)" +msgstr "%(rate)d мс (%(rate_hz)dГц)" + +#: lib/solaar/ui/window.py:514 +msgid "Polling rate" +msgstr "Част. опроса" + +#: lib/solaar/ui/window.py:529 +msgid "none" +msgstr "нет" + +#: lib/solaar/ui/window.py:530 +msgid "Notifications" +msgstr "Уведомления" + +#: lib/solaar/ui/window.py:566 +msgid "No device paired." +msgstr "Нет сопряженных устройств." + +#: lib/solaar/ui/window.py:569 +#, python-format +msgid "Up to %(max_count)s device can be paired to this receiver." +msgid_plural "Up to %(max_count)s devices can be paired to this receiver." +msgstr[0] "До %(max_count)s устройства может быть сопряжено с этим " + "приёмником." +msgstr[1] "До %(max_count)s устройств может быть сопряжено с этим " + "приёмником." +msgstr[2] "До %(max_count)s устройств может быть сопряжено с этим " + "приёмником." + +#: lib/solaar/ui/window.py:571 +msgid "Only one device can be paired to this receiver." +msgstr "Только одно устройство может быть сопряжено с этим приёмником." + +#: lib/solaar/ui/window.py:621 lib/solaar/ui/window.py:806 +#, python-format +msgid "%(battery_percent)d%%" +msgstr "%(battery_percent)d%%" + +#: lib/solaar/ui/window.py:624 +msgid "charging" +msgstr "заряжается" + +#: lib/solaar/ui/window.py:626 +msgid "last known" +msgstr "последнее известное" + +#: lib/solaar/ui/window.py:633 +msgid "not encrypted" +msgstr "не зашифровано" + +#: lib/solaar/ui/window.py:635 +msgid "The wireless link between this device and its receiver is not " + "encrypted.\n" + "\n" + "For pointing devices (mice, trackballs, trackpads), this is a minor " + "security issue.\n" + "\n" + "It is, however, a major security issue for text-input devices " + "(keyboards, numpads),\n" + "because typed text can be sniffed inconspicuously by 3rd parties " + "within range." +msgstr "Беспроводное соединение между этим устройством и приёмником не " + "зашифровано.\n" + "\n" + "Для указывающих устройств (мышь, трекбол, трекпад) - это не " + "серьёзная уязвимость в безопасности.\n" + "\n" + "Но, это серьезная уязвимость для устройств ввода текста (клавиатура, " + "цифровая клавиатура),\n" + "т.к. вводимый текст может быть \"подслушан\" незаметно кем-то еще в " + "радиусе передачи." + +#: lib/solaar/ui/window.py:642 +msgid "encrypted" +msgstr "зашифровано" + +#: lib/solaar/ui/window.py:644 +msgid "The wireless link between this device and its receiver is encrypted." +msgstr "Беспроводное соединение между этим устройством и приёмником " + "зашифровано." + +#: lib/solaar/ui/window.py:657 +#, python-format +msgid "%(light_level)d lux" +msgstr "%(light_level)d люкс" + +#: lib/solaar/ui/window.py:804 +#, python-format +msgid "%(battery_level)s" +msgstr "%(battery_level)s" diff --git a/share/applications/solaar.desktop b/share/applications/solaar.desktop index 1f155172..e28f7278 100644 --- a/share/applications/solaar.desktop +++ b/share/applications/solaar.desktop @@ -3,6 +3,7 @@ Name=Solaar Comment=Logitech Unifying Receiver peripherals manager Comment[fr]=Gestionnaire de périphériques pour les récepteurs Logitech Unifying Comment[hr]=Upravitelj Logitechovih uređaja povezanih putem Unifying i Nano prijemnika +Comment[ru]=Управление приёмником Logitech Unifying Receiver Exec=solaar Icon=solaar StartupNotify=true