Home › Forums › Additional Help › Translations › Patterns like %sEventbrite Application Keys%s
- This topic has 5 replies, 1 voice, and was last updated 10 years, 7 months ago by
Geoff.
-
AuthorPosts
-
September 24, 2015 at 3:33 am #1008193
Jerfa
GuestHi,
discovering The Events Calendar and I really like it!
So I decided to bring my contribution by translating plugins/add-ons in my native language (french).Until now, I completed the translations and suggested some modifications for:
- Advanced Post Manager
- Easy Digital Downloads Tickets
- Eventbrite Tickets
- Events Calendar Pro
- Filter Bar
- Shopp Tickets
- WooCommerce Tickets
- WP E-Commerce Tickets
But I have a question about a pattern that I can find in Eventbrite Tickets, for instance.
In a translation string, I can see:- %sEventbrite Application Keys%s
- %sEventbrite settings page%s
- %sSign up for Eventbrite now%s
And others with the same pattern.
Do I have to translate what is inside the %s ?As far as I can understand from this answer by George (MT Support) on the forum, I should not translate it.
But in almost all existing translations of similar strings I’ve seen in other languages, content is translated.
Could someone enlighten me?
I thank you in advance! 🙂
September 24, 2015 at 8:15 am #1008345Geoff
MemberHi Jerfa and thanks for working on translations for the plugin–you rock!
Good question. Yeah, the %s is used as a variable to turn a words from singular to plural. As George mentioned, in most cases, there is no need to translate it because it simply adds an s which is pretty standard across many languages. However, you can certainly translate that variable to something else, if need be, and that will allow you to customize the way words are pluralized.
Cheers!
GeoffSeptember 25, 2015 at 1:38 am #1008617Jerfa
GuestHi Geoff and thanks for your prompt answer-you rock! 😉
I don’t think that
%sis used to manage plural form. It is rather a placeholder for a string (works like insprintf()function).But thanks to the first example given on this page, I finally understood how to deal with the translation of:
%sString to be translated%s
The common use case is to add an html tag enclosing the string (often an openingatag with href attribute for the first%s, and the closingatag for the second%s). So the string inside both%sneeds indeed usually to be translated.Hope it can help. 🙂
Thanks again and long life to Modern Tribe and The Events Calendar!
Cheers!
—
JerfaSeptember 25, 2015 at 2:09 am #1008619Jerfa
GuestWhoops!
I messed with the code tag…
And I don’t see how to edit and modify my post.
Could an admin or moderator cancel the post above?So sorry.
I’ll post the same well formatted below.Jerfa
September 25, 2015 at 2:10 am #1008620Jerfa
GuestHi Geoff and thanks for your prompt answer-you rock! 😉
I don’t think that %s is used to manage plural form. It is rather a placeholder for a string (works like in the sprintf() function).
But thanks to the first example given on this page, I finally understood how to deal with the translation of:
%sstring to be translated%s
The most common use case is to add an html tag enclosing the string (often an opening a tag with href attribute for the first %s, and the closing a tag for the second %s). So the string inside both %s needs indeed usually to be translated. E.g. (in french):
%schaîne à traduire%s
Hope it can help. 🙂
Thanks again and long life to Modern Tribe and The Events Calendar!Cheers!
JerfaSeptember 25, 2015 at 7:27 am #1008694Geoff
MemberHeck yeah! Nice work and thanks for sorting this out–I know we and others will find this super useful. 🙂
Cheers!
Geoff -
AuthorPosts
- The topic ‘Patterns like %sEventbrite Application Keys%s’ is closed to new replies.
