aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/langmatrix.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-02-03 19:17:50 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-02-03 19:17:50 -0500
commit475d074fd74425efbe783fad08f97f2df0c4909f (patch)
tree2acdae53999b3c74b716efa4edb5b40311fa356a /scripts/langmatrix.py
parentcd502d52787f666fff3254d7d7e7578930c813c2 (diff)
parent3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 (diff)
Update upstream source from tag 'upstream/8.1.2'
Update to upstream version '8.1.2' with Debian dir e5e966a9e6010ef70618dc9a61558fa4db35aceb
Diffstat (limited to 'scripts/langmatrix.py')
-rwxr-xr-xscripts/langmatrix.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/langmatrix.py b/scripts/langmatrix.py
new file mode 100755
index 0000000..357ddea
--- /dev/null
+++ b/scripts/langmatrix.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+"""A matrix! Of languages!"""
+import nikola.nikola
+
+keys = ['LUXON_LOCALES', 'MOMENTJS_LOCALES', 'PYPHEN_LOCALES', 'DOCUTILS_LOCALES']
+keys_short = ['language', 'luxon', 'moment', 'pyphen', 'docutils']
+print('\t'.join(keys_short))
+
+for tr in nikola.nikola.LEGAL_VALUES['TRANSLATIONS']:
+ if isinstance(tr, tuple):
+ tr = tr[0]
+ out = tr
+ if len(out) < 8:
+ out += '\t'
+ for key in keys:
+ out += '\t'
+ out += '\x1b[37;42;1m+' if tr in nikola.nikola.LEGAL_VALUES[key] else '\x1b[37;41;1m-'
+ print(out + '\t\x1b[0m')
+
+print('\t'.join(keys_short))