singapore: the smallest big galery
home » forum » Internationalisation » Compiling problem

You are not logged in.

#1 2006-05-06 10:48:17

BJS
Member

Compiling problem

I'm working on Slovak translation of singapore 0.10.0PRE2. Here is what I've done so far:

- downloaded singapore.pot
- translated it using poEdit and saved as singapore.sk.pot
- uploaded to locale directory
- executed compile.php
- got a message i18n po compiler, All operations complete. Return to tools.

But nothing happened. I suppose it should create singapore.sk.pmo file in the locale directory. Am I wrong?

One more question. I quite don't understand plural forms feature. I've entered string

Code:

nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;

into the .pot file header. What next? Do I have to enter the different plural forms of necessary words somewhere? That would make sense to me.

Offline

 

#2 2006-05-10 16:22:13

tamlyn
Lead Developer

Re: Compiling problem

The file should be called singapore.sk.po
po = portable object
pot = portable object template
mo = machine object (compiled po - not used in singapore)
pmo = php machine object (compiled po - not a standard file format)

It's all a bit confusing I know and sometime I think we'd be better off with strings in a php file.

I just downloaded poEdit to try out the plural forms (only supported in v1.3 and above). Click on a string that has plural forms such as '%s gallery' and you will be presented with tabs in the translation area, one tab for each form - these tabs update when you update the plural-forms string. Quite clever really!

Offline

 

#3 2006-05-12 12:33:10

BJS
Member

Re: Compiling problem

Thanks for the answer. Compiling works.

Still don't get the poEdit plural forms. I have 4 tabs: original text, translation, and one comment tab for each of these. When I add the plural form string nothing happens. No additional tabs or menu options.

Offline

 

#4 2006-05-12 12:49:05

tamlyn
Lead Developer

Re: Compiling problem

Oh. What happens when you use the translation? Does it use the same form for all number values or does it use english? Are you sure you're using a version of poEdit that supports plurals (v1.3 or above)? Otherwise you could edit the po file 'by hand' in a text editor.

Offline

 

#5 2006-05-14 14:16:28

BJS
Member

Re: Compiling problem

I've finally got poEdit working. There's an issue using plural forms described here

Issues using poEdit

But have something else now. If in original singapore.pot or singapore.admin.pot are plural forms not defined for some entries and I do so, they are not translated and displayed in English.

For example if I change

Code:

#: ../includes/singapore.class.php:492
#, possible-c-format
msgid "Page created in %s seconds"
msgstr ""

into

Code:

#: ../includes/singapore.class.php:492
#, possible-c-format
msgid "Page created in %s second"
msgid_plural "Page created in %s seconds"
msgstr[0] "Stránka vygenerovaná za %s sekundu"
msgstr[1] "Stránka vygenerovaná za %s sekundy"
msgstr[2] "Stránka vygenerovaná za %s sekúnd"

the text is not translated on the page and is in its old form
Page created in %s second
Is it because it's hard-coded somewhere else so I should change this as well?

Offline

 

#6 2006-05-17 23:04:58

tamlyn
Lead Developer

Re: Compiling problem

Yeah that string doesn't use plural forms. I suppose I didn't think it would be that useful since the number will nearly always be less than zero.

Offline