Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Add support for Transifex localizations#175

Merged
toolness merged 11 commits intomozilla:gh-pagesfrom
toolness:transifex
Jan 29, 2013
Merged

Add support for Transifex localizations#175
toolness merged 11 commits intomozilla:gh-pagesfrom
toolness:transifex

Conversation

@toolness
Copy link
Contributor

Check it out, yo! See the section on localization in the README for more info: https://github.com/toolness/friendlycode/tree/transifex#localization

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I moved the github-related config information to package.json in 8e970e9.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, cool. package.json does feel more appropriate.

@stenington
Copy link
Contributor

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.
@stenington
Copy link
Contributor

The language dropdown is nice! Setting languages in the browser can be a bit clunky.

toolness added a commit that referenced this pull request Jan 29, 2013
Add support for Transifex localizations
@toolness toolness merged commit ad9c3e9 into mozilla:gh-pages Jan 29, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants