diff --git a/src/natcap/invest/internationalization/README.md b/src/natcap/invest/internationalization/README.md index 2594b400a..89182d5cc 100644 --- a/src/natcap/invest/internationalization/README.md +++ b/src/natcap/invest/internationalization/README.md @@ -23,7 +23,7 @@ When we are ready to get a new batch of translations, here is the process. 1. Run the following from the root invest directory, replacing `` with the language code: ``` -pybabel extract \ # extract messages from source code and write to template +pybabel extract \ --no-wrap \ --project InVEST \ --version 3.10 \ @@ -58,7 +58,7 @@ git commit -m "update message catalog with new translations" ``` mkdir -p src/natcap/invest/internationalization/locales//LC_MESSAGES/ # create the expected directory structure -pybabel init --input-file src/natcap/invest/internationalization/messages.pot --output-file src/natcap/invest/internationalization/locales//LC_MESSAGES/messages.po # initialize the message catalog from the template +pybabel init --input-file src/natcap/invest/internationalization/messages.pot --output-file src/natcap/invest/internationalization/locales//LC_MESSAGES/messages.po --locale # initialize the message catalog from the template ``` Then follow the "Process to update translations" instructions above, starting from step 2. diff --git a/src/natcap/invest/ui_server.py b/src/natcap/invest/ui_server.py index 12da86aac..8ce35f715 100644 --- a/src/natcap/invest/ui_server.py +++ b/src/natcap/invest/ui_server.py @@ -75,11 +75,10 @@ def get_invest_getspec(): Returns: A JSON string. """ - # this will be the model key name, not language specific - target_model = request.get_json() - target_module = MODEL_METADATA[target_model].pyname install_language(request.args.get('language', 'en')) importlib.reload(natcap.invest) + target_model = request.get_json() + target_module = MODEL_METADATA[target_model].pyname model_module = importlib.import_module(name=target_module) return spec_utils.serialize_args_spec(model_module.ARGS_SPEC) diff --git a/src/natcap/invest/validation.py b/src/natcap/invest/validation.py index d1ca954ae..04ec3dc5b 100644 --- a/src/natcap/invest/validation.py +++ b/src/natcap/invest/validation.py @@ -20,6 +20,7 @@ import numpy from . import utils from . import spec_utils + #: A flag to pass to the validation context manager indicating that all keys #: should be checked. CHECK_ALL_KEYS = None diff --git a/tests/test_cli.py b/tests/test_cli.py index eed612470..a0da47913 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -225,7 +225,6 @@ class CLIHeadlessTests(unittest.TestCase): new_parameter_set_path, ]) validation_output = stdout_stream.getvalue() - print(repr(validation_output)) # it's expected that these paths aren't found because it's looking in # the temporary test directory. do_batch is False so it doesn't check # the population_csv_dir path, which also wouldn't exist.