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

webui: Back/Next button are not localized #5020

Conversation

adamkankovsky
Copy link
Contributor

@adamkankovsky adamkankovsky commented Aug 8, 2023

Copy link
Contributor

@KKoukiou KKoukiou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please link the Jira issue comment from vladimir which justifies this change.

@VladimirSlavik
Copy link
Contributor

I'll just copy the comment here into the open. Oh, and it might make sense to have it in the commit too.

The root cause appears to be a bug in xgettext: http://savannah.gnu.org/bugs/?50920 Apparently, mixing the JSX pointy bracket block and js template string (`with backticks`) causes the xgettext parser to seize and exit prematurely for the whole file.

In our case, this can be observed by finding any such template string inside JSX and checking our POT file (in anaconda-l10n repo!) that no translateable strings found below this are present. Example strings (as of writing this): "Next", "Select a disk".

The upstream bug remains open and accordingly manifests in our infra which uses fedora rawhide. We need to work around this by not using such constructs.

It's really sad, the bug started in 2017, last activity is in 2020, and there is no clear resolution. Perhaps it's because JSX is not standardized.

@adamkankovsky adamkankovsky force-pushed the webui-replace-backticks-due-to-translation branch 2 times, most recently from cb16cd7 to 19d7abc Compare August 8, 2023 13:19
@adamkankovsky adamkankovsky force-pushed the webui-replace-backticks-due-to-translation branch from 19d7abc to 86e1104 Compare August 8, 2023 13:38
@VladimirSlavik
Copy link
Contributor

VladimirSlavik commented Aug 8, 2023

Just to have it written down - Somehow the C parser works for JSX, and also does not crash on the syntax that Javascript parser does. This is what Cockpit uses, although it's hard to find how this happened.

So all this needed was changing the one option and commenting it so that we know.

Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@adamkankovsky adamkankovsky force-pushed the webui-replace-backticks-due-to-translation branch from 86e1104 to 9d125a1 Compare August 8, 2023 15:47
@KKoukiou
Copy link
Contributor

KKoukiou commented Aug 8, 2023

/kickstart-test --waive webui-only

@KKoukiou KKoukiou merged commit ac0b288 into rhinstaller:master Aug 8, 2023
13 of 14 checks passed
@adamkankovsky adamkankovsky deleted the webui-replace-backticks-due-to-translation branch August 9, 2023 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants