Home › Forums › WordPress Themes – Premium › Pure & Simple › Translation
Hi, I’ve just translated the Pure&Simple theme with Poedit.
Everything seems to work except “Published on” and “Last Modified”. These two remained untranslated.
Also I wondered what “Bookmark this article” does? Could you explain that, please?
One small detail, though not very, very important… When translating a plugin some weeks ago, I noticed that the plurals can be better adapted to languages that decline nouns. E.g. we say:
1 komentář
2, 3, 4 komentáře
5, 6, 7…. komentářů
You see? The screenshot attached shows what poedit offered in that plugin’s .po file. Would it be difficult to use it with Styled Themes? (But actually I have no idea how many of your customers are from countries like that)
Snmekobrazovky2014-12-01v21.48.35.png
Hi Zdenka,
It’s a bit odd that Published on and Last modified text is not translated. Can you attach the po or pot file and mo file that you’ve.
Regarding the plurals text, We’re using that text in comments_popup_link() function and if you see parameter of that function http://codex.wordpress.org/Function_Reference/comments_popup_link , it either allow for single text and plurals text only. May be it’s a good idea to raise a ticket in WordPress core to see if they are going to add it in future then it won’t be hard for us to do that 🙂
Thanks, I’ll send you the po / pot files by email.
It was the WP popular posts plugin (https://wordpress.org/plugins/wordpress-popular-posts/). I’ll try to ask the author.
Please, could you explain what “Bookmark this article” in article info under each post does? Thank you.
I got a quick answer from the author of WP Popular post plugin.
“It’s actually quite simple. This should get you started: theme internationalization documentation. Once the translatable strings are in place, I suggest using Poedit to generate the .po files.”
Could you have a look at the “Plural” paragraph in the link above, please?
BookMark this article is just a rel tag for specifying notation of permalink. You can read more about it here : http://microformats.org/wiki/rel-bookmark#rel.3D.22bookmark.22
I’ll check that po file and get back to you why those two texts are not translating.
And regarding plural form of comments, we will check that plugin and see how they are managed there. We will do our homework and let you know about that one.
Thanks
Oh, sorry! I just noticed that I did not copy the link in the previous reply, for plurals: https://developer.wordpress.org/themes/functionality/internationalization/
“All rights reserved” also remained untranslated.
Bookmark….thanks, but would you please explain the practical usage in common language? It seems like clicking just take you bact to the title.
Thanks for the link.
I see other text like Edit this article are also untranslated we’re checking that how few text are not getting translated.
Bookmark .. functionality wise it’s just a link and the rel nothing more and rel=”bookmark” is a just notation of Premalink of this page. There is good discussion about it here : http://stackoverflow.com/questions/2803505/what-is-meant-by-the-rel-bookmark-link-attribute
“Edit this article” is translated on my side.
Thanks for link on “Bookmark”. So it’s just “a link to a key entry point within an extended document”, which – in Pure&Simple – is the title. To tell the truth I don’t see a big advantage of having such a link among other meta data where it is simply overseen. A scroll to top aid would be much better. And this can be achieved either with a “top devider” or a plugin.
Ya Edit this article is translated that’s was my mistake with wrong browser window 🙂
Figured out what is causing the problem with your translation. The text where _x function of localization is not working well with PoEdit. https://wordpress.org/support/topic/_x-not-working-for-localizing-custom-post-type-and-taxonomy?replies=3
So for the quick fix replace _x( with __( function.
For example the the below code can be changed like this as the middle parameter of _x function refers only the context text.
_x( 'Published on %s', 'post date', 'pure-and-simple' )
__( 'Published on %s', 'pure-and-simple' )
Where should I find the “x”? I don’t see any in PoEdit
Snmekobrazovky2014-12-03v9.47.04.png
_x is a function of WordPress and they are in the Pure & Simple theme. Please find it on the theme’s code and you’ll find them in few places where your translation are not working.
I really appreciate your kind and quick answer, but I’m not so skilled at coding…,
I had been looking for “_x” in the editor, too. But there is no “_x” before “all rights reserved” (in footer.php)
There is “_e” before “last modified” (content-single.php)
I cannot find “Published on”. Could you give me a hint?
I only found _x twice in the Archive.php.
Ok here are fixes step by step and we’re applying this fix on the next version update too.
Open template-tags.php file go to line 191 and find the code below :
_x( 'Published on %s', 'post date', 'pure-and-simple' )
replace it with
__( 'Published on %s', 'pure-and-simple' )
open content-single.php file and find this below code on line 46
_e( 'Last Modified on ', 'my-text-domain' );
and replace it with :
_e( 'Last Modified on ', 'pure-and-simple' );
go to footer.php file and find the below code in line 35 :
esc_attr_e('All rights reserved.', 'preferential')
and replace it with
esc_attr_e('All rights reserved.', 'pure-and-simple')
I hope it helps.
Thank you very much for correcting the bug in the newest version of P&S.
However it seems like the “Published on:” just under the post / page titles are still resistant to translation (both on the main blog page and individual posts). Or does it work correctly on you side?
Thanks
zdenka
Dear Zdenka,
It looks like you’ve not done the last modification we’ve asked on the Child theme it’s on the parent theme. Sorry that we forgot to ask the same.
We’ve asked the following quick fix last time because the .pot file was not generated properly so we’ve generated it again in the new version.
Open template-tags.php file go to line 191 and find the code below :
_x( 'Published on %s', 'post date', 'pure-and-simple' )
replace it with
__( 'Published on %s', 'pure-and-simple' )
If you’re using the same old cs_CZ.po file then use the same quick fix of above.
OR
Regenerate the po file from .pot file we’ve provided it you’ve to go through translation once again but it will fix the problem properly. And if you’ve decided to regenerate it then you’ve to use the plural form of your language on POEdit. And this the text you need to use there : nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;
See here for more information about it : http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms
With our premium themes, we offer access to site documentation, video tutorials and timely support. Even if you have just started on WordPress, our support staff have the patience to help you create appealing sites gracefully.
Company
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.To find out more, including how to control cookies, see here: Privacy Policy
© Copyright © 2023 Styled Themes. All Right Reserved.