Included the textdomain loading fix:
http://plugins.trac.ww.wp.xz.cn/changeset/240575/wp-useronline
Thanks.
As for the plural forms, each language can have a different plural definition, so that’s something you should change in the .po file.
Thread Starter
tin68
(@tin68)
But in the setup description it should be mentioned that the plural from in the pot file must be entered:
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
should be for German eg.
"Plural-Forms: nplurals=2; plural=n != 1;\n"
Besides that in the recent pot file there are some errors:
#: admin.php:24
#, php-format
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
msgid_plural ""
"There are a total of <strong><a href='%s'>%s users</a></strong> online now."
msgstr[0] ""
msgstr[1] ""
should read as
#: admin.php:24
#, php-format
msgid "There is <strong><a href='%s'>%s user</a></strong> online now."
msgid_plural "There are a total of <strong><a href='%s'>%s users</a></strong> online now."
msgstr[0] ""
msgstr[1] ""
Or
#: template-tags.php:79
#, php-format
msgid ""
"There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</"
"strong> and <strong>%s</strong>."
msgid_plural ""
"There are a total of <strong>%s</strong> online now: <strong>%s</strong>, "
"<strong>%s</strong> and <strong>%s</strong>."
msgstr[0] ""
msgstr[1] ""
should read as
#: template-tags.php:79
#, php-format
msgid ""
"There is <strong>%s</strong> online now: <strong>%s</strong>, <strong>%s</"
"strong> and <strong>%s</strong>."
msgid_plural "There are a total of <strong>%s</strong> online now: <strong>%s</strong>, "
"<strong>%s</strong> and <strong>%s</strong>."
msgstr[0] ""
msgstr[1] ""
I’ve notified the person in charge of the .pot generator.
Both POT formats are perfectly acceptable.
Where exactly was your problem? Was there a error in poEdit, in translating, in generating a MO file, in using the already-generated MO file?
Hi people, I don’t understand anything you are above talking about.
My problem is : I don’t now how to use those .po, .pot or .mo files to translate the plugin in my language (PT-BR). What do a I have to do to put translation working correctly?
I have tried to exclude all files except ‘wp-useronline-pt_BR.po’ and ‘wp-useronline-pt_BR.mo’ but nothing happened. I’ve deactivated an re-activated that plugin and nothing have happened. It’s in English all the time and don’t change.
I’ve tried to use poedit to check ‘.pot’ and ‘.po’ files but they seem to be OK.
What do I have to do in this case?
Nothing is clear to me and I don’t know to edit PHP files.
Why don’t you promote a simple way (like a button or a checkbox or a dropdown menu) to help users to configure the correct language of the plugin? As simple as possible for beginners like me.
Few people understand PHP programming.
Thank you for your comprehension.
[]’s
@marcos Blatt: As tin68 mentioned, there was a bug in the plugin that prevented it from loading the appropriate translation.
You have 2 options:
Reinstall version 2.73.
or:
Move the appropriate .mo file from wp-useronline/lang to wp-useronline