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

Extract texts from templates #1991

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

ynojima
Copy link
Member

@ynojima ynojima commented May 24, 2024

Issue: #1990

While localization repositories extracts texts from .adoc and .md files with po4a utility, po4a cannot extract texts from html template files as they contains template directives, which is not valid html tag. To localize texts in html template files, localization repositories have whole html template file instead of just extracted texts. See: https://github.com/quarkusio/ja.quarkus.io/tree/main/l10n/override/ja_JP

This impacts maintenability of lozalization repositories because once original html template files are updated, localized html template files need to be updated even when it doesn't contain texts change.

This commit extracts texts from html template files to yaml files. Once this change is introduced, localization repositories can process yaml files with po4a.

Copy link

github-actions bot commented May 24, 2024

🙈 The PR is closed and the preview is expired.

@ynojima ynojima force-pushed the extract-texts-from-templates branch from 89ddbef to d317304 Compare May 24, 2024 04:46
While localization repositories extracts texts from .adoc and .md files with
po4a utility, po4a cannot extract texts from html template files as they
contains template directives, which is not valid html tag.
To localize texts in html template files, localization repositories have
whole html template file instead of just extracted texts.
See: https://github.com/quarkusio/ja.quarkus.io/tree/main/l10n/override/ja_JP

This impacts maintenability of lozalization repositories because
once original html template files are updated, localized html template
files need to be updated even when it doesn't contain texts change.

This commit extracts texts from html template files to yaml files.
Once this change is introduced, localization repositories can process
yaml files with po4a.
@ynojima ynojima force-pushed the extract-texts-from-templates branch from d317304 to ca8a5ef Compare May 24, 2024 07:16
@ynojima ynojima marked this pull request as ready for review May 24, 2024 07:23
@gsmet
Copy link
Member

gsmet commented May 30, 2024

@ynojima sorry for the delay, I will have a look soon. I totally agree we should do this.

@ynojima
Copy link
Member Author

ynojima commented May 30, 2024

Thank you! I merged origin/main in 8c14ab5 to resolve conflict.

@gsmet gsmet merged commit bd26d27 into quarkusio:main Jun 4, 2024
1 check passed
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.

2 participants