mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Ignore some dodgy TL strings, fix another dodgy string
This commit is contained in:
parent
250076a132
commit
fb55cc3390
5 changed files with 53 additions and 5 deletions
|
|
@ -31,6 +31,10 @@ import json
|
|||
from docopt import docopt
|
||||
import yaml
|
||||
|
||||
ignored_strings = [
|
||||
'none', 'saset'
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
arguments = docopt(__doc__, version="0.1.0")
|
||||
|
||||
|
|
@ -54,6 +58,13 @@ if __name__ == '__main__':
|
|||
if match not in irc_strings:
|
||||
irc_strings.append(match)
|
||||
|
||||
for s in ignored_strings:
|
||||
try:
|
||||
irc_strings.remove(s)
|
||||
except ValueError:
|
||||
# ignore any that don't exist
|
||||
...
|
||||
|
||||
print("irc strings:", len(irc_strings))
|
||||
with open(os.path.join(arguments['<languages-dir>'], 'example', 'irc.lang.json'), 'w') as f:
|
||||
f.write(json.dumps({k:k for k in irc_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
|
@ -77,6 +88,13 @@ if __name__ == '__main__':
|
|||
if '\n' in match and match not in help_strings:
|
||||
help_strings.append(match)
|
||||
|
||||
for s in ignored_strings:
|
||||
try:
|
||||
help_strings.remove(s)
|
||||
except ValueError:
|
||||
# ignore any that don't exist
|
||||
...
|
||||
|
||||
print("help strings:", len(help_strings))
|
||||
with open(os.path.join(arguments['<languages-dir>'], 'example', 'help.lang.json'), 'w') as f:
|
||||
f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
|
@ -100,6 +118,13 @@ if __name__ == '__main__':
|
|||
if match not in help_strings:
|
||||
help_strings.append(match)
|
||||
|
||||
for s in ignored_strings:
|
||||
try:
|
||||
help_strings.remove(s)
|
||||
except ValueError:
|
||||
# ignore any that don't exist
|
||||
...
|
||||
|
||||
print("nickserv help strings:", len(help_strings))
|
||||
with open(os.path.join(arguments['<languages-dir>'], 'example', 'nickserv.lang.json'), 'w') as f:
|
||||
f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
|
@ -123,6 +148,13 @@ if __name__ == '__main__':
|
|||
if match not in help_strings:
|
||||
help_strings.append(match)
|
||||
|
||||
for s in ignored_strings:
|
||||
try:
|
||||
help_strings.remove(s)
|
||||
except ValueError:
|
||||
# ignore any that don't exist
|
||||
...
|
||||
|
||||
print("chanserv help strings:", len(help_strings))
|
||||
with open(os.path.join(arguments['<languages-dir>'], 'example', 'chanserv.lang.json'), 'w') as f:
|
||||
f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
|
@ -146,6 +178,13 @@ if __name__ == '__main__':
|
|||
if match not in help_strings:
|
||||
help_strings.append(match)
|
||||
|
||||
for s in ignored_strings:
|
||||
try:
|
||||
help_strings.remove(s)
|
||||
except ValueError:
|
||||
# ignore any that don't exist
|
||||
...
|
||||
|
||||
print("hostserv help strings:", len(help_strings))
|
||||
with open(os.path.join(arguments['<languages-dir>'], 'example', 'hostserv.lang.json'), 'w') as f:
|
||||
f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue