globalizejs/globalize

Compile hundreds of plain text messages

Open

#652 geöffnet am 18. Nov. 2016

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (645 Forks)batch import
help wanted

Repository-Metriken

Stars
 (4.759 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

For my web site I want to take advantage of compiling my formatters and messages. My web site contains:

  • 6 different formaters (e.g. dateFormatter({ date: "long" }, numberFormatter({ style: 'decimal', minimumFractionDigits: 0, maximumFractionDigits: 2 } etc.)
  • 10 complicated messages with plural and gender
  • more than 200 plain text messages

Sorry for this stupid question: What is the strategy for design time compilation of such app?

Every compiled plain text messages produced complicated JS code, e.g. Globalize.b1130668030 = messageFormatterFn((function( ) { return function (d) { return "My plain text message 1"; }})(), Globalize("en").pluralGenerator({}));

Plain text message compilation cancels positive effect of 6 formatters and 10 messages compilation.

Contributor Guide