Subtitles of category/month pages are not translated #75

Closed
EddyLB opened this Issue Apr 4, 2014 · 5 comments

Projects

None yet

2 participants

@EddyLB
Contributor
EddyLB commented Apr 4, 2014

As shown below for the "Site Internet" category of my wife's blog, the subtitle "There are 2 posts filed in " is not translated:
screen shot 2014-04-04 at 23 47 25

This is also the case of pages presenting the post of a month as shown below (There were...):
screen shot 2014-04-04 at 23 51 47

@EddyLB
Contributor
EddyLB commented Apr 4, 2014

I realise that the page "Nothing Found" is also not translated as shown below (while the text is available in the fr_FR.po file):

screen shot 2014-04-04 at 23 56 19

@raamdev
Owner
raamdev commented Apr 4, 2014

Ahh, it looks like there was a mixup with the text-domain that I used for translations. Some code uses independent-publisher and some of it uses independent_publisher (with the underscore), so when I generated the default language files (using independent-publisher), a bunch of the translate strings did not get included. A dumb mistake on my part!

I'm fixing this now and will submit a new version for release to WordPress.org. Thanks so much for reporting this!

@raamdev
Owner
raamdev commented Apr 4, 2014

@EddyLB I fixed the inconsistent text-domain usage, however I realized that you may have run into a different issue.

It looks like you're using POEdit to generate your translation file. For the translation functions that support plural form (e.g., _n()), you need to tell POEdit that the function supports plural form by adding :1,2 to the function (e.g., _n():1,2):

screen shot 2014-04-04 at 7 21 37 pm

When you do that and then click "Update" to refresh, POEdit will display two boxes for any strings that contain a singular and plural translation:

screen shot 2014-04-04 at 7 25 05 pm

I'm pretty new to translations, so I'm only now learning about all this. It's amazing how difficult it is and how little real information there is out there to help.

Can you let me know if this fixed your problem? Also, if you can regenerate the French translation and submit a Pull Request, I will make sure that goes into the next theme update. I will wait for your updated translation before submitting the new update to WordPress.org.

@raamdev
Owner
raamdev commented Apr 4, 2014

Oh, I forgot to mention that you can grab a copy of the latest theme files here and use that to regenerate and submit the updated French translation.

@raamdev
Owner
raamdev commented Apr 4, 2014

@EddyLB I realized that I needed to make those changes in POEdit and then regenerate the default .po file so that it would also include the plural strings. Commit d7bc31d does exactly that and you'll now find both strings in languages/default.po. For example:

#: ../inc/template-tags.php:591
#, php-format
msgid "There was one post published in %2$s."
msgid_plural "There were %1$s posts published in %2$s"
msgstr[0] ""
msgstr[1] ""
@raamdev raamdev added a commit that closed this issue Apr 10, 2014
@raamdev Releasing v1.4
* Fixes #82
* Fixes #75
* Fixes #72
* Fixes #35
ce5fda2
@raamdev raamdev closed this in ce5fda2 Apr 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment