Created by: pdecat
Similar to what's done for gettext
but for ngettext
.
Without this change, errors like the following occur with the French locale (and maybe others) using python2:
# ./venv/bin/python bin/solaar
Traceback (most recent call last):
File "/home/patrick/workspaces/Solaar/lib/solaar/ui/window.py", line 382, in _device_selected
_update_info_panel(device, full=True)
File "/home/patrick/workspaces/Solaar/lib/solaar/ui/window.py", line 697, in _update_info_panel
_update_receiver_panel(device, _info._receiver, _info._buttons, full)
File "/home/patrick/workspaces/Solaar/lib/solaar/ui/window.py", line 574, in _update_receiver_panel
paired_text += '\n\n<small>%s</small>' % 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 }
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128)