Closed jbueza closed 9 years ago
Hmm, that seems a little too DRY to me. One of the major things I want to achieve with this play on Mojo is that the syntax is very obvious and explanatory. I didn't find original Mojo had that going for it.
Mojo.L isn't very subjective although I know it is widely used.
I was thinking something like Mojo.Loc() or Mojo.i18n() would probably be a little more clear to our user base who mostly don't experiment with as mature frameworks like Chrome / Firefox devs would.
+1 for Mojo.i18n(). For examples, do you want to set the best practices to have a shorthand like this?
var L = Mojo.i18n;
//...code for view
text: L('btnOk');
I'm more used to _() or __() which is what is used in most PHP platforms. Symfony, Wordpress, Cake etc.
Have you used that at all?
That might with the underscore dudes: http://documentcloud.github.com/underscore/ but I'm not sure if people will be using Underscore inside appcelerator. __ shorthand does seem easier!
Seems more DRY to probably go like this:
Primarily inspired by addon developers who write localized versions on Chrome and Firefox.