openownership / data-standard-sphinx-theme

Documentation theme for the Beneficial Ownership Data Standard.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Internationalisation: string not being translated in navigation menu #48

Closed siwhitehouse closed 5 years ago

siwhitehouse commented 5 years ago

See http://standard.openownership.org/ru/0.2-dev-ru-translation/ where

"Beneficial Ownership Data Standard"

is not translated.

Checking in https://www.transifex.com/OpenDataServices/bods-theme/translate/#ru/sphinx-pot/163569068 shows that this did not get pushed up to Transifex.

I re-ran python setup.py extract_messages locally and pushed to Transifex (as per https://github.com/openownership/data-standard-sphinx-theme) and I don't see the string in either my local oods/locale/sphinx.pot file or in Transifex.

Note that we currently have an issue raised by our reviewer on how "Beneficial Ownership Data Standard" should be translated, depending on context. That shouldn't block us from investigating this issue.

rhiaro commented 5 years ago

It's because the name is included via the project variable on https://github.com/openownership/data-standard-sphinx-theme/blob/master/oods/sphinxtheme/navbar.html#L5 which is set in the main data-standard repo config https://github.com/openownership/data-standard/blob/master/docs/conf.py#L57

OCDS solves this problem by not using the project variable in the template, and inserting the string directly wrapped in trans blocks: https://github.com/open-contracting/standard/blob/1.1-dev/standard/docs/en/_templates/layout.html#L7

siwhitehouse commented 5 years ago

This is fixed by #51