gadicc / meteor-messageformat

MessageFormat i18n support for Meteor, with reactive templates
54 stars 22 forks source link

[V2] Error after fresh install & run #194

Open lfilho opened 8 years ago

lfilho commented 8 years ago

Hello there! Thanks for your work!

Following steps from V2's README I received the following error. Here were the steps:

$ node --version
  v5.0.0
$ meteor --version
  Meteor 1.2.1
$ meteor add msgfmt:core msgfmt:extract msgfmt:ui
$ meteor list | grep msgfmt
  msgfmt:core                          2.0.0-preview.17  MessageFormat support,...
  msgfmt:extract                       2.0.0-preview.12  Extracts native / tran...
  msgfmt:ui                            2.0.0-preview.7  messageformat: translat...
$ vim lib/i18n.js # Added `msgfmt.init('en');` to it.
$ meteor
  [[[[[ ~/workspace/my-app ]]]]]

  => Started proxy.
  => Started MongoDB.
  => Started your app.

  => App running at: http://localhost:3000/
  I20160116-11:00:59.506(-2)? Exception in callback of async function: TypeError: Object [object Object] has no method ''
  I20160116-11:00:59.507(-2)?     at packages/msgfmt_extract/extract.js:94:1
  I20160116-11:00:59.507(-2)?     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)

Did I miss anything?

lfilho commented 8 years ago

Also tried under node 0.10, same error.

My app keeps running, though. And accessing /translate it shows:

Site Translations

Native language: en (0 strings)

Run mf_extract in the root directory of your project to extract all the translateable strings.

For more details see: messageformat.meteor.com.

I thought mf_extract was deprecated for V2...

lfilho commented 8 years ago

Added a {{mf 'home_greeting' 'Hi there'}} to one of my templates, /template kept saying the message in my comment above.

Ctrl-c'ed and started meteor again. Same thing.