thx ad7six! didn't know that there even exists a msg_id_plural. now that i
know, searching the web for this problem is a lot easier.
but it turned out that it doesn't work at all - although i'm using po edit
now:
msgid ""
msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Project-Id-Version: Challenge App\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: xxx\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: German\n"
"X-Poedit-SourceCharset: UTF-8\n"
msgid "%d year"
msgid_plural "%d years"
msgstr[0] "%d Jahr"
msgstr[1] "%d Jahre"
msgid "%d month"
msgid_plural "%d months"
msgstr[0] "%d Monat"
msgstr[1] "%d Monate"
msgid "%d week"
msgid_plural "%d weeks"
msgstr[0] "%d Woche"
msgstr[1] "%d Wochen"
msgid "%d day"
msgid_plural "%d days"
msgstr[0] "%d Tag"
msgstr[1] "%d Tage"
msgid "%d hour"
msgid_plural "%d hours"
msgstr[0] "%d Stunde"
msgstr[1] "%d Stunden"
msgid "%d minute"
msgid_plural "%d minutes"
msgstr[0] "%d Minute"
msgstr[1] "%d Minuten"
msgid "%d second"
msgid_plural "%d seconds"
msgstr[0] "%d Sekunde"
msgstr[1] "%d Sekunden"
leads to a "Missing plural form translation for "%d month" in "cake"
domain, "deu" locale. Check your po file for correct plurals and valid
Plural-Forms header. [CORE/Cake/I18n/I18n.php, line 211]"
weeks and days work on a random basis. maybe this problem is related to a
caching issue?
greetings,
On Friday, September 7, 2012 10:24:58 AM UTC+2, Johannes N wrote:
>
> Hi guys!
>
> I searched the whole web, but didn't found anything about this one.
>
> In my latest project I use following code to inform the user, when a
> sweepstake is going to end:
>
> <?=$this->Time->timeAgoInWords($challenge["Challenge"]["end"], array("end"
> => "+1 year"))?>
>
> Code itself works like a charme, but unfortunately the translations get
> mixed up. CakePHP translates some singular values to plural, and vice versa.
>
> So, my /Locale/deu/LC_MESSAGES/cake.po file looks like
>
> msgid "%d year"
> msgstr "%d Jahr"
>
> msgid "%d years"
> msgstr "%d Jahre"
>
> msgid "%d month"
> msgstr "%d Monat"
>
> msgid "%d months"
> msgstr "%d Monate"
>
> msgid "%d week"
> msgstr "%d Woche"
>
> msgid "%d weeks"
> msgstr "%d Wochen"
>
> msgid "%d day"
> msgstr "%d Tag"
>
> msgid "%d days"
> msgstr "%d Tage"
>
> msgid "%d hour"
> msgstr "%d Stunde"
>
> msgid "%d hours"
> msgstr "%d Stunden"
>
> msgid "%d minute"
> msgstr "%d Minute"
>
> msgid "%d minutes"
> msgstr "%d Minuten"
>
> msgid "%d second"
> msgstr "%d Sekunde"
>
> msgid "%d seconds"
> msgstr "%d Sekunden"
>
>
> Currently the app displays the : 5 Monat, 3 Woche, 3 Tag, although it
> should be: 5 Monate, 3 Wochen, 3 Tage (5 months, 3 weeks, 3 days).
>
> In my opinion everything's set up correctly. I've looked into
> /lib/Cake/Utility/CakeTime.php (829-835) and double checked the code there
> as well. So, Guys, can anyone help me with this problem?
>
> Greetings from Vienna,
>
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.