more clean up
This commit is contained in:
parent
1d7689cda4
commit
d1ffc55708
|
@ -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 `<LANG>` 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 <LANG> message catalog with new translations"
|
|||
|
||||
```
|
||||
mkdir -p src/natcap/invest/internationalization/locales/<LANG>/LC_MESSAGES/ # create the expected directory structure
|
||||
pybabel init --input-file src/natcap/invest/internationalization/messages.pot --output-file src/natcap/invest/internationalization/locales/<LANG>/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/<LANG>/LC_MESSAGES/messages.po --locale <LANG> # initialize the message catalog from the template
|
||||
```
|
||||
Then follow the "Process to update translations" instructions above, starting from step 2.
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue