diff options
| author | 2016-11-15 14:18:46 -0300 | |
|---|---|---|
| committer | 2016-11-15 14:18:46 -0300 | |
| commit | ffb671c61a24a9086343b54bad080e145ff33fc5 (patch) | |
| tree | 2c5291f7a34edf4afdc8e07887a148291bfa3fa1 /scripts/langstatus.py | |
| parent | 4e3224c012df9f74f010eb92203520515e8537b9 (diff) | |
New upstream version 7.8.1upstream/7.8.1
Diffstat (limited to 'scripts/langstatus.py')
| -rwxr-xr-x | scripts/langstatus.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/langstatus.py b/scripts/langstatus.py new file mode 100755 index 0000000..c31067d --- /dev/null +++ b/scripts/langstatus.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +import nikola.nikola +import os.path +import glob + +used = [] +exist = [] +for tr in nikola.nikola.LEGAL_VALUES['TRANSLATIONS']: + if isinstance(tr, tuple): + used.append(tr[0]) + used.append(tr) + +for file in glob.glob(os.path.join('nikola', 'data', 'themes', 'base', + 'messages', 'messages_*.py')): + lang = file.split('_', 1)[1][:-3] + exist.append(lang) + if lang in used: + print('{0}: found'.format(lang)) + elif os.path.islink(file): + print('\x1b[1;1m\x1b[1;30m{0}: symlink\x1b[0m'.format(lang)) + else: + print('\x1b[1;1m\x1b[1;31m{0}: NOT found\x1b[0m'.format(lang)) |
