Doesn't Work With Recent MessageFormat Updates #4

Closed
iammerrick opened this Issue Feb 21, 2014 · 8 comments

Comments

Projects
None yet
3 participants
@iammerrick

Simply doesn't work anymore. See: SlexAxton/messageformat.js#38

@jokeyrhyme

This comment has been minimized.

Show comment Hide comment
@jokeyrhyme

jokeyrhyme Mar 4, 2014

Any chance of a pull-request? Is there anything you need help with?

Any chance of a pull-request? Is there anything you need help with?

@jokeyrhyme

This comment has been minimized.

Show comment Hide comment
@jokeyrhyme

jokeyrhyme Mar 4, 2014

I ended up just using grunt-exec to run messageformat CLI directly.

I ended up just using grunt-exec to run messageformat CLI directly.

@iammerrick

This comment has been minimized.

Show comment Hide comment
@iammerrick

iammerrick Mar 4, 2014

That works but requires messageformat be installed globally. (Or referenced relatively.) I really want npm to implement bundle exec style functionality.

That works but requires messageformat be installed globally. (Or referenced relatively.) I really want npm to implement bundle exec style functionality.

@jokeyrhyme

This comment has been minimized.

Show comment Hide comment
@jokeyrhyme

jokeyrhyme Mar 4, 2014

Yeah, I installed messageformat locally (yuck, I know).

My grunt-exec configuration looks like:

exec: {
  messageformat: {
    cmd: 'node_modules/messageformat/bin/messageformat.js -l en js/locales/en js/locales/en/i18n.js'
  }
},

Kinda' terrible, but it works for me for now. I agree, about npm exec, that would be awesome:

Yeah, I installed messageformat locally (yuck, I know).

My grunt-exec configuration looks like:

exec: {
  messageformat: {
    cmd: 'node_modules/messageformat/bin/messageformat.js -l en js/locales/en js/locales/en/i18n.js'
  }
},

Kinda' terrible, but it works for me for now. I agree, about npm exec, that would be awesome:

@alex-dow

This comment has been minimized.

Show comment Hide comment
@alex-dow

alex-dow Jun 3, 2015

this project seems dead unfortunately. I have started a new one at https://github.com/alex-dow/grunt-messageformat-compiler

alex-dow commented Jun 3, 2015

this project seems dead unfortunately. I have started a new one at https://github.com/alex-dow/grunt-messageformat-compiler

@jokeyrhyme

This comment has been minimized.

Show comment Hide comment
@jokeyrhyme

jokeyrhyme Jun 3, 2015

Has anyone already looked at either of the following libraries as a replacement for this project?

How do they compare to this project? Which of these is the easiest to migrate to?

If no-one has any experience with these, I'll try to do a comparison myself in the next few weeks and see how it goes.

Has anyone already looked at either of the following libraries as a replacement for this project?

How do they compare to this project? Which of these is the easiest to migrate to?

If no-one has any experience with these, I'll try to do a comparison myself in the next few weeks and see how it goes.

@alex-dow

This comment has been minimized.

Show comment Hide comment
@alex-dow

alex-dow Jun 3, 2015

While I'm not aware of any formal comparisons to any of these projects, I can explain my rationale for wanting to stick close to MessageFormat:

i18next has a translation UI, a nice JSON structure, including support for multiline strings that are stored in arrays. Unfortunately, i18next does not use the ICU standard syntax. Since my webapp will also have a backend component to it written in Java and using ICU4J, I'd rather stick with the more common standard.

FormatJS is robust, has direct integrations with some popular frameworks, and does use MessageFormat and thus uses ICU standards. However, it relies on the http://www.ecma-international.org/ecma-402/1.0/index.html. Only IE11 fully supports this standard. Polyfills exist, but I'd prefer to avoid using them when possible.

Globalize has dependency overhead. This is something I appreciate about MessageFormat. It compiles your string resource files into small snippets of javascript that have no dependencies on anything at all. This makes integration into existing code painless, and has the least amount of overhead.

These are just my opinions really, and I have not done extensive research into any of those tools. But I still find that MessageFormat provides client-side localization with the lowest footprint and widest browser support (without resorting to polyfills).

alex-dow commented Jun 3, 2015

While I'm not aware of any formal comparisons to any of these projects, I can explain my rationale for wanting to stick close to MessageFormat:

i18next has a translation UI, a nice JSON structure, including support for multiline strings that are stored in arrays. Unfortunately, i18next does not use the ICU standard syntax. Since my webapp will also have a backend component to it written in Java and using ICU4J, I'd rather stick with the more common standard.

FormatJS is robust, has direct integrations with some popular frameworks, and does use MessageFormat and thus uses ICU standards. However, it relies on the http://www.ecma-international.org/ecma-402/1.0/index.html. Only IE11 fully supports this standard. Polyfills exist, but I'd prefer to avoid using them when possible.

Globalize has dependency overhead. This is something I appreciate about MessageFormat. It compiles your string resource files into small snippets of javascript that have no dependencies on anything at all. This makes integration into existing code painless, and has the least amount of overhead.

These are just my opinions really, and I have not done extensive research into any of those tools. But I still find that MessageFormat provides client-side localization with the lowest footprint and widest browser support (without resorting to polyfills).

@jokeyrhyme

This comment has been minimized.

Show comment Hide comment
@jokeyrhyme

jokeyrhyme Jun 3, 2015

@alex-dow great points, very useful. Thanks.

@alex-dow great points, very useful. Thanks.

@iammerrick iammerrick closed this Dec 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment