Skip to content

fix(templates): render translated 'not specified' string for missing coordinate epoch - #2437

Closed
hardikkaurani wants to merge 1 commit into
geopython:masterfrom
hardikkaurani:fix/2436-epoch-untranslated-literal
Closed

hardikkaurani wants to merge 1 commit into
geopython:masterfrom
hardikkaurani:fix/2436-epoch-untranslated-literal

Conversation

@hardikkaurani

Copy link
Copy Markdown

Overview

When storageCrsCoordinateEpoch is not specified on a collection, the Jinja2 template was rendering the literal string _(not specified) instead of evaluating the gettext translation function _('not specified'). This PR fixes the template expression in pygeoapi/templates/collections/collection.html and adds regression assertions in tests/api/test_api.py.

Related Issue / discussion

Fixes #2436

Additional information

  • Minimal production diff (+1/-1 in template, +2 lines regression test).
  • Does not introduce new dependencies.
  • Resolves the untranslated literal visible on collection HTML pages (e.g. obs collection where coordinate epoch is not specified).

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute bugfix to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

…coordinate epoch

Fixes geopython#2436 by calling the gettext helper `_('not specified')` instead of outputting the literal string `'_(not specified)'` when `storageCrsCoordinateEpoch` is not set.
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.

Untranslated literal _(not specified) shown for Epoch on collection page

2 participants