wp-cli / i18n-command

Provides internationalization tools for WordPress projects.
MIT License
96 stars 52 forks source link

Author URI of the plugin translation string in generated POT file #387

Closed henrywright closed 5 months ago

henrywright commented 5 months ago

When I generate a POT file using wp i18n make-pot . languages/my-plugin.pot there seems to be an entry for URI. For example:

#. Author URI of the plugin
msgid "https://example.com"
msgstr ""

Even though it isn't a "clickable" link, is it a good idea to make this string available for translation?

swissspidy commented 5 months ago

Why is it not "clickable"? The URL is used for linking to the author's website, for example on the plugins page in wp-admin.

Some people translate their website into other languages, so this might be translated to https://example.com/de or https://example.com/es for example.

So yes, it is a good idea to make this string available for translation and WordPress translates it.

In fact, 'Name', 'Plugin URI', 'Description', 'Author', 'Author URI', 'Version' are all fields that WordPress translates.

So we want to make sure people can translate it.

henrywright commented 5 months ago

My point is the translation may not be from https://example.com/de to https://example.com/es. Instead it may be from https://example.com/de to something like https://hack.me

swissspidy commented 5 months ago

That would be true for every translatable string in WordPress. A translator could change every URL to hack.me. The plugin author URI is not different in that regard.

On that note, WordPress considers translations to be trusted, and trusts translators to not do this kind of things. That's why there are strict processes in place and translations need to be approved etc.

If you feel like WordPress or translate.wordpress.org should do something to prevent such "maltranslation", this is better suited for https://meta.trac.wordpress.org/, as it's not an issue with WP-CLI.