gadicc / meteor-messageformat

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

/translate not working. #222

Open cryptoboy opened 8 years ago

cryptoboy commented 8 years ago

Added lib/common.js with the only line:

msgfmt.init('en');

Using the new version - fresh project with just 1 sample message in the HTML.

$ meteor list | grep msg
msgfmt:core              2.0.0-preview.21  MessageFormat i18n support, the Me...
msgfmt:extract           2.0.1  Extracts native / translatable strings from y...
msgfmt:ui-dev-only       2.0.4  msgfmt-ui that is never deployed

I also had to do meteor remove autopublish due to some warning messages when running locally.

Finally - app is running, but when I go to http://localhost:3000/translate I just seem to get the main page. (Is this a routing issue? i.e. the default meteor app is catching all routes and not letting msgfmt do its magic?)

UPDATE:

I should also mention that 2 files were generated under server:

extracts.msgfmt
extracts.msgfmt~

However I don't see mfAll.js - is that generated after successfully hitting the /translate?

UPDATE 2:

In case it is version specific:

$ meteor --version
Meteor 1.3.2.4
cryptoboy commented 8 years ago

Solved. Obviously without installing iron:router it doesn't work.

I would add this in the instructions somewhere for people just starting out:

meteor add iron:router

gadicc commented 8 years ago

Sorry for the pain, hopefully writing the v2 docs next week. Leaving this open so I don't forget. Should work fine with flow-router too... were you using any router?

gadicc commented 8 years ago

(will answer properly next week, i'm away for the weekend)

gadicc commented 8 years ago

@cryptoboy what router are you using, btw?

cryptoboy commented 8 years ago

Sorry for the delay - I am actually pretty much new to Meteor, so I was trying both the translation system and Meteor at the same time. So yeah, I didn't have a router, just some default basic app. :)

pisacode commented 7 years ago

Are you considering React-Router any time soon?