Live data from Hacker News

MessageFormat: Unicode standard for localizable message strings

github.com

1–10 of 68 posts

Re: MessageFormat: Unicode standard for localizable message strings

#3
The meeting notes in the repo was a nice surprise. Overall looked great, striking a good balance.

  .input {$var :number maximumFractionDigits=0}
  .local $var2 = {$var :number maximumFractionDigits=2}
  .match $var2
  0 {{The selector can apply a different function to {$var} for the purposes of selection}}
  * {{A placeholder in a pattern can apply a different function to {$var :number maximumFractionDigits=3}}}
Oof, that's a programming language already. And new syntax to be inevitably iterated on. I feel like we have too many of those already, from Python f-strings to template engines.

I wish it'll at least stay small: no nesting, no plugins, no looping, no operators, no side effects or calls to external functions (see Log4J).

Re: MessageFormat: Unicode standard for localizable message strings

#4
post #2

This seems great in concept, and totally infeasible. But if anyone can do it, unicode seems like a great candidate. Does anyone have reason for more optimism?

Care to explain why you think it's infeasible? Then one could provide targeted counter-optimism ;)

I don't see what's infeasible about it. It doesn't seem too different from .po files (gettext catalogs) meshed with hooks for post-processing as would see in e.g. a handlebars, both of which have individually found great adoption.

Re: MessageFormat: Unicode standard for localizable message strings

#5
post #4
post #2

This seems great in concept, and totally infeasible. But if anyone can do it, unicode seems like a great candidate. Does anyone have reason for more optimism?

Care to explain why you think it's infeasible? Then one could provide targeted counter-optimism ;) I don't see what's infeasible about it. It doesn't seem too different from .po files (gettext catalogs) meshed with hooks for post-processing as would see in e.g. a handlebars, both of which have individually found great adoption.

> why you think it's infeasible?

GP based his opinion on the assumption that this spec new and no implementations for it exist.

Re: MessageFormat: Unicode standard for localizable message strings

#6
post #2

This seems great in concept, and totally infeasible. But if anyone can do it, unicode seems like a great candidate. Does anyone have reason for more optimism?

Unicode consortium already manages a ton of language specs. If there's any group of folks I'd trust to understand languages (natural or otherwise), it's them.

Re: MessageFormat: Unicode standard for localizable message strings

#8
post #2

This seems great in concept, and totally infeasible. But if anyone can do it, unicode seems like a great candidate. Does anyone have reason for more optimism?

I've been using this format for almost 10 years, and I only see increasing adoption. Why would I be pessimistic?

Re: MessageFormat: Unicode standard for localizable message strings

#10
Looking for an expert who knows both libintl/Gettext and MessageFormat.

What is the equivalent of xgettext.pl, the file extension for the main catalog file `.po`, the __ function?

How does gender work (small example)? How does layering pt_BR on pt_PT work?

What is a compelling reason to switch?

Post reply on HN