Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: offer translations of HTML templates #134

Open
effjot opened this issue Sep 5, 2022 · 1 comment
Open

Enhancement: offer translations of HTML templates #134

effjot opened this issue Sep 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@effjot
Copy link
Contributor

effjot commented Sep 5, 2022

A little enhancement proposal for i18n: Could we add an option to the processing tool reset_html_templates for selection languages? We could store translated HTML files in pg_metadata/resources/html with language suffixes (e.g. main_de.html) for the user to choose from.
Perhaps it is also possible to put the html files on Transifex in order to keep all translation work in a single place.

@mdouchin
Copy link
Contributor

mdouchin commented Sep 5, 2022

Hi !
Good catch. I had the idea to use the same process as for values (see: https://docs.3liz.org/qgis-pgmetadata-plugin/database/routines/generate_html_from_json.html) and also search & replace the field names with the translated ones.

This would ease the translation process: the HTML template would remain the same (or transformed a bitt to recognize the field names to translate), and we won't need to update N templates every time we change the template or add a field.

The translations would then be stored in a table (as for the field glossary). Side effect: transifex won't be used with this technique...

@mdouchin mdouchin added the enhancement New feature or request label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants