Add support for Transifex localizations#175
Conversation
This command outputs a plist file for the given i18n bundle module. Transifex doesn't currently support requirejs i18n bundles, and the Apple plist format appears to be the closest thing to it.
The script doesn't really do anything yet other than display some information about the project. Also added request as a dependency to package.json, as we use it to communicate with transifex's REST API.
This makes it easy for folks to test out their localization in Friendlycode without needing to clone the git repo.
bin/build-i18n.js
Outdated
There was a problem hiding this comment.
I wonder if it's worth mentioning something about the githubUrl and githubBranch configuration settings in the README? Maybe they're not going to need to be changed often enough to matter though. It seems like you'd only change them if you were localizing a fork with a different set of strings.
There was a problem hiding this comment.
Yeah, this is a bit wonky to me... ideally I think that build-i18n.js would introspect into the .git directory to discover this information, to avoid the need for these variables in the first place, but there are lots of weird edge cases involved in that.
But wait! Another way to do this might be to use the repository property in package.json, and poke at that. It's a far more appropriate location for the information than require-config.js!
There was a problem hiding this comment.
Ok, I moved the github-related config information to package.json in 8e970e9.
There was a problem hiding this comment.
Ah, cool. package.json does feel more appropriate.
|
Nice! The README seems accurate to me, and is pretty clear on how to work with Transifex to localize friendlycode. It seems like things get potentially a little confusing if someone wants to fork friendlycode, and then localize that as a separate Transifex project, but I don't think that's a major use case. This seems great to me! |
I tried to use the "repository" key in package.json described here: https://npmjs.org/doc/json.html#repository The use of 'repository.defaultBranch' is my own invention, though, which is hopefully acceptable.
|
The language dropdown is nice! Setting languages in the browser can be a bit clunky. |
Add support for Transifex localizations
Check it out, yo! See the section on localization in the README for more info: https://github.com/toolness/friendlycode/tree/transifex#localization