Hi Graydon, 2013/5/6 Graydon Hoare <[email protected]>
> > Yes, this is the sort of thing I was thinking of: that there are some > pressures that a gettext() layer feed back to the selection of > formatting strings that might be worth considering. > > Also that it might be nice to make fmt!() default-to, or very easily be > adapted-to (without too much extra noise, say with ifmt!() or such) > invoking the message-catalogue system. The _() macro is used in C I > think due to trying to reduce the noise-effect i18n efforts have on > code. We should keep that in mind. > > > There are other difficulties with localizing formatted messages that are > > never systematically solved, for example, accounting for gender. In all, > > it looks like an interesting area for library research, beyond the basic > > "stick this value pretty-printed into a string" problem. > > There are a few of those, yes. They get quite complex. What do you think of using Rust lambdas for context-sensitive translations? That could easily accommodate any sort of variance, and would not complicate the fmt! syntax (though it would require another fmt-like macro to substitute, as well as mark, translated messages). Creating message catalogs may be more challenging this way, but they should be automatically collected and type-bracketed from the source by a translation tool, and most of the messages would be plain strings or have stock code patterns to fill. Best regards, Mikhail
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
