On 13 May 2011 23:59, Phillip Gawlowski <cmdjackryan / googlemail.com> wrote:
> On Fri, May 13, 2011 at 11:11 PM, Michal Suchanek <hramrach / centrum.cz> wrote:
>>
>> The first problem here is that this is a sentence with parametrized
>> verb, and verbs have predetermined location in the sentence different
>> across languages. It is at the start in English and at the end in
>> Japanese meaning that the parameter order is different when the
>> sentence is translated.
>>
>> In this simple case it would be easy to make two messages, one for
>> moving and another for copying but some messages may be quite long and
>> use more than two different verbs which would explode the number of
>> strings that have to be written, stored and updated considerably.
>
> Well, you'll *have* to create different messages for
> copying/moving/deleting. The only thing you can insert dynamically are
> non-translatable parameters (number of files, estimated time [and even
> that has to be localized]).
>
>> Seriously, I don't expect there is a translation framework that
>> handles all of this.
>
> That's because we don't have natural language processing worth a damn yet. ;)
>
> You'll have to brute force the problem: Strings are translated with
> place-holders for data.
>
>> But if there is one that can generate sentences that don't read
>> completely ridiculous and can be translated into various languages I
>> would like to hear about it.
>
> Take a look at https://github.com/svenfuchs/i18n/wiki. Rails uses it,
> and from the looks of it, you store translated strings with parameters
> in YAML files named after the language(s) you support.

Yes, it looks good.

At least it should take care of generating messages for
Moving 1 file | Moving 1st file
Moving 2 files | Moving 2nd file
etc

Thanks

Michal