First thing: I looked at the keywords used by polish locale files and it
seems that it uses 'few' instead of 'many', so change it accordingly.

On Fri, Oct 1, 2010 at 5:11 PM, Scorpio <[email protected]> wrote:

> i'm not quite sure i get the order of things. i translated the whole
> yml file to the best of my ability and now do i need to put
>
> your_key:
>  one: singular_word
>  many: paucal_word
>  other: plural_word
>
> for every model at the top of the file or the version below? Because
> unless I'm reading this wrong they should do the same thing
>


Hobo internally picks the model name translation from
activerecord.models.<your_model>, so you should add the translation there.
You don't need to do anything else in order to see your model names
translated, because hobo should take care of it: just add the keys.


>
> pl:
>  activerecord:
>    models:
>      your_model:
>
> Once thats done what do i do with statements like    edit_link:
> "Edytuj {{model}}" where i need a 4th form not the base one ?
>
>
I don't know enough about how Rails I18n is implemented for Polish and
multi-plural languages, so it's better you take a look at this:

http://dev.netizer.pl/rails-i18n-and-zero-one-two-few-many-other.html

and probably the following will solve your problem:
http://blog.zabiello.com/2010/08/02/pluralization-rails

Please read that and report here whether it works for you.

Also.. where do i put the I18n.t('your_key',  :count => n) selecting
> the singular,paucal, plural forms? Sorry its my first try at
> internationalization and i'm green as grass
>
> I'm gonna give an example so that I can be clear
> 1 Kategoria
> 2 Kategorie
> 5 Kategorii
> Edit/Update  KategoriÄ™
>

You have the possibility to interpolate the translation of your model name
like in:

some_key: "Edit %{model}"

OR when that is not possible you can add the specific keys for each model,
for each action and that will be used by Hobo. For example:

hobo:
  categories:
    actions:
      edit: "<Edit in Polish> KategoriÄ™"
      update: "<Update in Polish> KategoriÄ™"
  users:
    actions:
      edit: "<Edit in Polish> <User in Polish>"

Sorry to ask for a step by step guide but I have no idea how to call
> those forms later in code (how do i tell i18n when to use what?).
>

For the sentences that hobo uses internally you should just add the right
keys in the hobo.pl.yml file, and that just because we have no Polish
translation... when we have that your Hobo will speak Polish without you
adding anything.

But you will probably add a few things in your app, and if your app is
multi-language you can use the I18n.t method in your code or the <t .../>
tag or the <ht .../> tag in your dryml templates to pick the right
translation for different languages


> Secondly how do i tell the app to use pl.dryml for rails messages
> hobo.pl.dryml for hobo parts and app.pl for the grammar forms for my
> app and all?
>

Are you talking about templates or about locale files?

ciao
dd

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to