Allow to use .json lang files. #95

Open
tirana opened this Issue Aug 16, 2013 · 3 comments

Comments

Projects
None yet
3 participants

tirana commented Aug 16, 2013

Shifter expects only .js lang files. however, the content type of the lang files is json.

Due some limitations we are unable to use .js. it will be nice if shifter allows to customize used extension.
Proposition: Use .json if .js lang file has been not found.

dmi3y commented Aug 16, 2013

Possibly .js was chosen on purpose, cause it is not strict syntaxed JSON like format. So people could or could not use quotes around keys, and as well use single or double ones, all this taking in count by shifter and normalized on output.. From other hand little bit discipline always good in programming world:)

kenjiru commented Sep 2, 2013

I would also like to see the file extension for the language files changed to .json. WebStorm and Idea always complain that the language files contain errors and they mark the whole subtree as containing an error, which is annoying.

Is there any serious reason for not using a .json extension?

dmi3y commented Sep 4, 2013

I really could not see reasons why not. Though would rather wait some official comments about it. Possibly the Intl support is not highest priority for shifter. Even the final callback is fired before the lang parser, which is kinda awkward for tests writing.

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