| |
@@ -1,6 +1,7 @@
|
| |
#!/bin/env python
|
| |
|
| |
import ConfigParser, sys, os
|
| |
+ import langtable
|
| |
|
| |
'''
|
| |
This script takes the contents of the website-specific LINGUAS file, constructs an options menu for the languages contained therein.
|
| |
@@ -40,7 +41,8 @@
|
| |
lang = lang.strip()
|
| |
if lang and not lang.startswith('#') and not lang in banned:
|
| |
#output.write(' <option value="' + lang + '" py:attrs="{\'selected\': lang == \'' + lang + '\' and \'selected\' or None}">' + language_map.get('Languages',lang) + '</option>\n')
|
| |
- output.write(", '"+lang+"': '"+language_map.get('Languages',lang)+"'")
|
| |
+ #output.write(", '"+lang+"': '"+language_map.get('Languages',lang)+"'")
|
| |
+ output.write(", '"+lang+"': '"+langtable.language_name(languageId=lang).encode('utf-8')+"'")
|
| |
finally:
|
| |
linguas.close()
|
| |
output.write("""}
|
| |
related: https://pagure.io/fedora-infrastructure/issue/9996
This is a few fixups to get translation updated at build time.
The LINGUAS file from weblate does not contain the
en
language (which must be built anyway), so it's now hardcoded in the Makefile.The
pullpos
function has been disabled on some websites that are either not present on weblate (yet) or simply retired.I've also added the langtable library to build the language menu instead of using
build.d/translations.ini
, which is outdated.Next step will be to update the build script to include the
make pullpos
command.