Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Improved placeholders of translatable string #1043

Closed
wants to merge 2 commits into from

Conversation

claudiosanches
Copy link
Contributor

Some HTML is allowed on translatable strings, WordPress core and WooCommerce includes <a href="%s"> in translatable strings, so becomes less hard to understand, since %s will get joined to another words.

It's possible to find some references in: https://github.com/WordPress/WordPress/search?p=2&q=%3Ca+href%3D%22%251%24s%22+%252%24s%3E&unscoped_q=%3Ca+href%3D%22%251%24s%22+%252%24s%3E

@nerrad
Copy link
Contributor

nerrad commented Oct 14, 2019

Some related convo in #889 (which in turn is spawned from convo elsewhere).

I agree that having the tags in the localized string is more translator friendly, if we're going to go this route then we'll either need to use something like this: WordPress/gutenberg#17376 or the calypso solution.

Personally, I'd prefer to see us use strings that would be more familiar to WP translators (i.e. the former), but to use the pull I did we'll need to shim it in this plugin for now because even if the pull is merged it won't be available for a few WP versions.

cc @Aljullu and @mikejolley for your thoughts.

@claudiosanches
Copy link
Contributor Author

claudiosanches commented Oct 15, 2019

Personally, I'd prefer to see us use strings that would be more familiar to WP translators (i.e. the former),

I'm speaking as one of the translators, I'm a Locale Manager for pt_BR, also I translate WooCommerce to pt_BR, that's why I found those strings.

@Aljullu
Copy link
Contributor

Aljullu commented Oct 15, 2019

Personally, I'd prefer to see us use strings that would be more familiar to WP translators (i.e. the former), but to use the pull I did we'll need to shim it in this plugin for now because even if the pull is merged it won't be available for a few WP versions.

@nerrad If it's easy, I agree importing your PR from upstream is the best option. That would allow us to update the translation strings now without having to wait until our minimum Gutenberg version updates. I still think we should wait until it's merged into Gutenberg master before importing the code, so we don't need to update it if the PR code changes.

@nerrad nerrad added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Oct 19, 2019
@mikejolley
Copy link
Member

See #1736

@mikejolley mikejolley closed this Feb 14, 2020
@claudiosanches claudiosanches deleted the fix/string-with-url branch August 18, 2020 20:09
@nielslange nielslange added the focus: i18n The issue/PR is related to internationalization. label May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: i18n The issue/PR is related to internationalization. status: blocked The issue is blocked from progressing, waiting for another piece of work to be done.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants