diff options
| author | 2021-02-03 19:17:00 -0500 | |
|---|---|---|
| committer | 2021-02-03 19:17:00 -0500 | |
| commit | 3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 (patch) | |
| tree | a7cf56282e54f05785243bc1e903d6594f2c06ba /scripts/langstatus.py | |
| parent | 787b97a4cb24330b36f11297c6d3a7a473a907d0 (diff) | |
New upstream version 8.1.2.upstream/8.1.2
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)) |
