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

Many duplicate translations due to unnecessary context and i18n issues in general #671

Open
Zodiac1978 opened this issue Nov 7, 2024 · 2 comments
Labels
[Type] Bug An existing feature does not function as intended.

Comments

@Zodiac1978
Copy link

In this theme there are different strings with the same text and meaning (e.g. „Learn more“, "Search", "Comments", etc.) used with _x to give context.
https://github.com/search?q=repo%3AWordPress%2Ftwentytwentyfive%20learn%20more&type=code

This should be done via translator comment and not context feature. Context is for disambiguation (e.g. Post as verb vs. Post as noun):
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context

The problem with all those context strings is, that GlotPress now has duplicate entries with the exact same translation, because there is no need for disambiguation.


Furthermore the latest fixes from here are not on WordPress.org:

Two different context strings leading to two translation entries:
https://translate.wordpress.org/projects/wp-themes/twentytwentyfive/de/default/?filters%5Bterm%5D=button+text.+verb&filters%5Bterm_scope%5D=scope_any&filters%5Bstatus%5D=current&filters%5Bwith_context%5D=yes&filters%5Buser_login%5D=&filter=Apply+Filters&sort%5Bby%5D=priority&sort%5Bhow%5D=desc

Although there is this commit:
c23d72c

The same is with "Type here..." and the other strings from the commit. Although this error is unnecessary at all, because context shouldn't be used here in the first place.


Also there are two naming conventions for the same thing:

Font size name - Extra Large
https://translate.wordpress.org/projects/wp-themes/twentytwentyfive/de/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=19027114&filters%5Btranslation_id%5D=122682819

Space size name - X-Large
https://translate.wordpress.org/projects/wp-themes/twentytwentyfive/de/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=19027144&filters%5Btranslation_id%5D=124068808

Why this? Couldn't this be consolidated to have fewer strings?


Additionally there are many font names (Again with context "Font family name" - why?)

https://translate.wordpress.org/projects/wp-themes/twentytwentyfive/de/default/?filters%5Bterm%5D=Font+family+name&filters%5Bterm_scope%5D=scope_any&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filters%5Bwith_context%5D=yes&filters%5Buser_login%5D=&filter=Apply+Filters&sort%5Bby%5D=priority&sort%5Bhow%5D=desc

And there is no explanation what to do with it. Why should it be translatable? Is it used as title? What would happen if I translate every font to "Comic Sans"? Is it really used or just label? Without comment, you don't know it as translator.

@Zodiac1978 Zodiac1978 added the [Type] Bug An existing feature does not function as intended. label Nov 7, 2024
@carolinan
Copy link
Contributor

carolinan commented Nov 7, 2024

Hi
I spent a lot of time on reducing the duplication, but clearly I missed some, thank you for reporting them.
It will not be possible to resolve these before the 6.7 release. The issue will need to be re-created as an issue on Trac.
One of the reasons is that the release is past the string freeze, but also because there is not enough time.

Furthermore the latest fixes from here are not on WordPress.org

The theme does not decide when these strings are updated after each release candidate. I am personally unsure of what the required steps are.

The font family name is translation ready for the same reason that other names like "WordPress" are translation ready.
In some languages they are translated and in some they are not.

The names are visible as the labels for the font family options in the different Typography settings:
The font family label showing over a focused font preset in the Site Editor

The font family context is not added by the theme. As far as I know, it is built into the font management system in core.
This is similar to how the template names, spacing sizes etc have context. The only thing the theme does is supply the name.
To address this, a second separate issue needs to be created in the Gutenberg GitHub repository, since the label is part of the editor.

Does it matter at all if the string is the name of a custom template or a font size? I don't know enough about how different languages determine that. But at some point someone decided it was important enough to distinguish between them, not to make it difficult for translators but to help them.

@carolinan
Copy link
Contributor

Changing the label does not change which font file WordPress loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended.
Projects
None yet
Development

No branches or pull requests

2 participants