Commit 0a932431 authored by Ad Schellevis's avatar Ad Schellevis

(lang) sort collected gettext from "make dynamic", closes...

(lang) sort collected gettext from "make dynamic", closes https://github.com/opnsense/core/issues/659
parent 13749d46
......@@ -56,8 +56,14 @@ for filename in glob.glob('%s/plugins/*.py'%'/'.join(os.path.realpath(__file__).
fOut=open('%s/%s.php'%(targetPath,modulename),'w')
fOut.write(templateText)
# fill with gettext tags
# collect and sort tags
translations = list()
for textValue in lang.getTranslations(OPNsenseRoot):
translations.append(textValue)
translations.sort()
# fill with gettext tags
for textValue in translations:
line="echo gettext('%s');\n"%(unicode(textValue).replace("'","\\'"))
fOut.write(line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment