-
Notifications
You must be signed in to change notification settings - Fork 573
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
i18n Improvements #696
i18n Improvements #696
Conversation
…e placeholders for the links
'name' => esc_html__( 'oEmbed', 'cmb2' ), | ||
'desc' => sprintf( | ||
/* translators: %s: link to codex.wordpress.org/Embeds */ | ||
esc_html__( 'Enter a youtube, twitter, or instagram URL. Supports services listed at %s.', 'cmb2' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you want to leave comments for translators, the _x()
family of functions should be used. e.g.
esc_html_x( 'Enter a youtube, twitter, or instagram URL. Supports services listed at %s.', '%s is a link to codex.wordpress.org/Embeds', 'cmb2' ),
@jtsternberg You should never use context As for the When using context function, It creates a new line in translate.wordpress.org, and allows you to provide a different meaning for this particular string. |
Oh wow, well thank you very much for educating me! Looks like I've been using those functions improperly. I'll review this a bit more thoroughly when I get back to my computer, but should be good. Thanks again! |
@jtsternberg the best example of proper use of
|
Thanks for you contribution @ramiy! |
update translation strings related issues.
esc_html__()
andesc_attr__()
.<a>
links with%s
placeholder.%s
,%1$s
and%2$s
).