mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-24 01:12:56 -04:00
Fix lang selector sort
This commit is contained in:
parent
b8dca4e341
commit
e9e58e6b3f
@ -395,7 +395,7 @@ def create_app(args):
|
||||
web_version=os.environ.get("LT_WEB") is not None,
|
||||
version=get_version(),
|
||||
swagger_url=swagger_url,
|
||||
available_locales=[{'code': l['code'], 'name': _lazy(l['name'])} for l in get_available_locales(not args.debug)],
|
||||
available_locales=sorted([{'code': l['code'], 'name': _lazy(l['name'])} for l in get_available_locales(not args.debug)], key=lambda s: s['name']),
|
||||
current_locale=get_locale(),
|
||||
alternate_locales=get_alternate_locale_links()
|
||||
))
|
||||
|
@ -76,7 +76,7 @@
|
||||
</li>
|
||||
<li class="locale-panel">
|
||||
<select id="locales" onchange="changeLocale(this)">
|
||||
{% for l in available_locales %}<option value="{{ l['code'] }}" {{ 'selected' if current_locale == l['code'] else ''}}>{{ l['name'] }}</option>{% endfor %}
|
||||
{% for l in available_locales %}<option value="{{ l['code'] }}" {{ 'selected' if current_locale == l['code'] else ''}}>{{ l['name'].capitalize() }}</option>{% endfor %}
|
||||
</select>
|
||||
<a href="https://hosted.weblate.org/projects/libretranslate/app/{{ current_locale }}/">{{ _h("Edit") }}<i class="material-icons">create</i></a>
|
||||
</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user