Skip to content

Restore model spec translations that were missing from Workbench#2477

Draft
emilyanndavis wants to merge 5 commits intonatcap:mainfrom
emilyanndavis:bugfix/2462-wb-model-spec-translations
Draft

Restore model spec translations that were missing from Workbench#2477
emilyanndavis wants to merge 5 commits intonatcap:mainfrom
emilyanndavis:bugfix/2462-wb-model-spec-translations

Conversation

@emilyanndavis
Copy link
Copy Markdown
Member

Description

Fixes #2462. Specifically:

  • Reloads natcap.invest.spec to ensure model inputs/outputs defined in natcap.invest.spec are localized when needed. This happens in the following contexts:
    • before returning model spec to Workbench,
    • before returning model spec to CLI, and
    • before returning model spec from rst_generator.invest_spec.
  • Wraps WORKSPACE name and about in gettext. (This must have been present before, since "workspace" and its translations already existed in our message catalogs, but mistakenly omitted at some point thereafter, perhaps in the course of refactoring or otherwise moving things around.)

I also included some miscellaneous linting cleanup (unused imports, extra lines, f-strings w/o variables, etc.).

I'm not sure if this warrants a HISTORY update or not.

Before

Note "Workspace" and "File Suffix" are untranslated.

wb-localization-bug_2026-03-25

After

Note "Workspace" ("Espacio de Trabajo"), its description ("La carpeta donde…"), and "File Suffix" ("Sufijo del Archivo") are (again) translated as expected.

wb-localization-fixed_2026-04-03

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
    - [ ] Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@emilyanndavis emilyanndavis marked this pull request as draft April 3, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workbench: some text not localized even though we have its translation

1 participant