mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
package: i18n: Mark progress status strings for translation
Help: #1938. - package.py: ugettext_lazy applied to 'installing', 'downloading' and other statuses. - setup.html: trans function applied to "Check again" in template. Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com> [sunil: Mark remaining to status strings also] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
e03161201c
commit
d1f9f4bfcc
@ -9,8 +9,10 @@ import subprocess
|
||||
import threading
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy
|
||||
|
||||
from plinth import actions
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -153,13 +155,14 @@ class Transaction(object):
|
||||
|
||||
status_map = {
|
||||
'pmstatus':
|
||||
_('installing'),
|
||||
ugettext_lazy('installing'),
|
||||
'dlstatus':
|
||||
_('downloading'),
|
||||
ugettext_lazy('downloading'),
|
||||
'media-change':
|
||||
_('media change'),
|
||||
ugettext_lazy('media change'),
|
||||
'pmconffile':
|
||||
_('configuration file: {file}').format(file=parts[1]),
|
||||
format_lazy(ugettext_lazy('configuration file: {file}'),
|
||||
file=parts[1]),
|
||||
}
|
||||
self.status_string = status_map.get(parts[0], '')
|
||||
self.percentage = int(float(parts[2]))
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
This application is currently not available in your distribution.
|
||||
{% endblocktrans %}
|
||||
<button type="submit" class="btn btn-default btn-sm" name="refresh-packages">
|
||||
<span class="fa fa-refresh"></span> Check again
|
||||
<span class="fa fa-refresh"></span> {% trans "Check again" %}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user