On 9 May 2013 12:26, Matthieu Monrocq <matthieu.monr...@gmail.com> wrote:
> My point is, therefore, that even a seemingly innocent looking sentence > like this one actually turns into a monster: > > "{0} {1, select, singular {{2, select, female {est allée} other {est > allé}}}, other {{2, select, female {sont allées} other {sont allés}}}} {3, > select, singular {{4, female {à la} other {au}}} other {aux}} {5}" > > (note: I apologize if the { and } are mismatched... I gave up) > > And, as mentioned, this is French and not Polish, because in Polish the > plural form is declined with special cases depending on the remainder of > the number modulo 10 quite similar to ordinals in English (st, nd, rd vs > th). > In practice, that almost never happens. Most strings have quite specific context and require no conditionals. Rarely, there are conditions for things like "one" vs "1" and so on. Some use-case require extreme flexibility, but at that point they're more likely to be split off into groups, which may differ greatly and have separate source-language (English) strings: in an RPG game there might be a player character 'female' and 'male' version for each string, then perhaps another for each emotion that may be applicable in that case. ICU is in fact one of the more programable translation libraries. Anything more must be handled in cooperation between engineers and translators, so out of scope of a gettext-alike.
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev