From cf88986e1e859b2f76cd6be7a133ce0a440e9886 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Mon, 4 Feb 2019 04:55:45 +1000 Subject: [PATCH] Finish updating TL instructions --- DEVELOPING.md | 4 ++-- updatetranslations.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index 7b8035a5..839ea879 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -145,7 +145,7 @@ We support translating server strings using [CrowdIn](https://crowdin.com/projec 1. `cd` to the base directory (the one this `DEVELOPING` file is in). 2. Install the `pyyaml` and `docopt` deps using `pip3 install pyyamp docopt`. -3. Run the `updatetranslations.py` script with: `./updatetranslations.py irc languages` +3. Run the `updatetranslations.py` script with: `./updatetranslations.py run irc languages` 4. Commit the changes CrowdIn's integration should grab the new translation files automagically. @@ -158,7 +158,7 @@ You shouldn't need to do this, but to update 'em manually: 1. `cd` to the base directory (the one this `DEVELOPING` file is in). 2. Install the `pyyaml` and `docopt` deps using `pip3 install pyyamp docopt`. -3. Run the `updatetranslations.py` script with: `./updatetranslations.py irc languages` +3. Run the `updatetranslations.py` script with: `./updatetranslations.py run irc languages` 4. Install the [CrowdIn CLI tool](https://support.crowdin.com/cli-tool/). 5. Make sure the CrowdIn API key is correct in `~/.crowdin.yaml` 6. Run `crowdin upload sources` diff --git a/updatetranslations.py b/updatetranslations.py index e2b7e26c..f68f1384 100755 --- a/updatetranslations.py +++ b/updatetranslations.py @@ -55,7 +55,7 @@ if __name__ == '__main__': irc_strings.append(match) print("irc strings:", len(irc_strings)) - with open(os.path.join(arguments[''], 'example-irc.lang.json'), 'w') as f: + with open(os.path.join(arguments[''], 'example', 'irc.lang.json'), 'w') as f: f.write(json.dumps({k:k for k in irc_strings}, sort_keys=True, indent=2, separators=(',', ': '))) f.write('\n') @@ -74,7 +74,7 @@ if __name__ == '__main__': help_strings.append(match) print("help strings:", len(help_strings)) - with open(os.path.join(arguments[''], 'example-help.lang.json'), 'w') as f: + with open(os.path.join(arguments[''], 'example', 'help.lang.json'), 'w') as f: f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': '))) f.write('\n') @@ -93,7 +93,7 @@ if __name__ == '__main__': help_strings.append(match) print("nickserv help strings:", len(help_strings)) - with open(os.path.join(arguments[''], 'example-nickserv.lang.json'), 'w') as f: + with open(os.path.join(arguments[''], 'example', 'nickserv.lang.json'), 'w') as f: f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': '))) f.write('\n') @@ -112,7 +112,7 @@ if __name__ == '__main__': help_strings.append(match) print("chanserv help strings:", len(help_strings)) - with open(os.path.join(arguments[''], 'example-chanserv.lang.json'), 'w') as f: + with open(os.path.join(arguments[''], 'example', 'chanserv.lang.json'), 'w') as f: f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': '))) f.write('\n') @@ -131,6 +131,6 @@ if __name__ == '__main__': help_strings.append(match) print("hostserv help strings:", len(help_strings)) - with open(os.path.join(arguments[''], 'example-hostserv.lang.json'), 'w') as f: + with open(os.path.join(arguments[''], 'example', 'hostserv.lang.json'), 'w') as f: f.write(json.dumps({k:k for k in help_strings}, sort_keys=True, indent=2, separators=(',', ': '))) f.write('\n')