I am working on website internalization and it has YUI3 in stack, so it is good to use YUI intl module for that. Reading documentation gave idea to leverage shifter builder to convert Java property i18n files into YUI3 intl format (think as YRB(.pres) as they both have same syntax. Going from that I created meta module/meta/module.json
file looking like this:
{
"modulename": {
"requires": [
"oop"
]
},
"lang": ["en"]
}
And accordingly placed the language file like module/lang/modulename_en.pres
.
That's not worked out, build processing successfully but no lang folders with context created. Also I tried use json like javascript version with no luck. I guess missing some additional step.
UPD: Thank you for comments. There is wrong syntax in my meta, the lang
property has to be on the same level as requires
that fixed problem with finding language files but still there is error when trying to use .pres files. Here it is the output:
....
shifter [info] shifting 2 langs for module
fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'c:\\..\module\lang\module.js'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.openSync (c:\Program Files\nodejs\node_modules\shifter\node_mod
ules\cpr\node_modules\graceful-fs\graceful-fs.js:68:26)
at Object.fs.readFileSync (fs.js:284:15)
at c:\Program Files\nodejs\node_modules\shifter\lib\module.js:424:26
at Array.forEach (native)
at Object.buildLang [as lang] (c:\Program Files\nodejs\node_modules\shifter\
lib\module.js:417:11)
at c:\Program Files\nodejs\node_modules\shifter\lib\module.js:709:33
at c:\Program Files\nodejs\node_modules\shifter\lib\stack.js:24:38
at c:\Program Files\nodejs\node_modules\shifter\lib\module.js:372:13
at c:\Program Files\nodejs\node_modules\shifter\node_modules\gear\node_modul
es\async\lib\async.js:190:13
I also opened report into shifter github repo. Will try to debug and see what I am missing here.