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

Variable $translator_name$ used but not defined for some locales #403

Open
vitonsky opened this issue Oct 26, 2023 · 0 comments
Open

Variable $translator_name$ used but not defined for some locales #403

vitonsky opened this issue Oct 26, 2023 · 0 comments
Labels
bug Something isn't working important Must do it
Milestone

Comments

@vitonsky
Copy link
Collaborator

vitonsky commented Oct 26, 2023

Original report

Variable $translator_name$ used but not defined
Very good extension, but encountered an issue with the latest version 5.0.7 and prompted an error: Invalid locale file '...\gbefmodhlophhakmoecijeppjblibmie\5.0.7_0_locales\gu\messages.json': Variable $translator_name$ used but not defined. I cannot directly use chrome webstore here, and I load the plugin through the command line parameter "--load-extension". My chrome version is 118.0.5993.71;I tried using Chrome version 117.x and had the same issue, but the 116 version doesn't seem to prompt.

The problem

I looked at locale file and see the problem:

"translatorsManagerWindow_message_translatorRemovingConfirmation": {
"message": "\"$translator_name$\" અનુવાદક કાઢવા માટે ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર ખરેખર છો"
},

Unlike another locale files like

"translatorsManagerWindow_message_translatorRemovingConfirmation": {
"message": "Are you sure about removing translator \"$translator_name$\"?",
"placeholders": {
"translator_name": {
"content": "$1",
"example": "Google translator"
}
}
},

, the locale file translated by AI is does not have the placeholder translator_name.

Proposal to fix

Fix the original problem - insert placeholder.

Prevent problem for future - add linter rule or script to check all localization files. All files must have the same structure.

@vitonsky vitonsky added bug Something isn't working important Must do it labels Oct 26, 2023
@vitonsky vitonsky changed the title Variable $translator_name$ used but not defined Variable $translator_name$ used but not defined for some locales Oct 26, 2023
@vitonsky vitonsky added this to the Next release milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working important Must do it
Projects
None yet
Development

No branches or pull requests

1 participant