twister-html/README.md

78 lines
2.4 KiB
Markdown
Raw Normal View History

2014-01-17 00:55:46 +00:00
twister-html
============
HTML interface for [Twister](http://twister.net.co) [(github)](https://github.com/miguelfreitas/twister-core).
2014-01-17 00:55:46 +00:00
To use it, clone this repo under ~/.twister/html like this:
git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html
2014-10-02 21:18:51 +00:00
If you'r on **Mac OS X** - clone to ${HOME}/Library/Application\ Support/Twister/html instead of ~/.twister/html
2014-01-17 00:55:46 +00:00
Contribute
----------
Feel free to fork and send pull requests!
2014-10-02 21:18:51 +00:00
To make it easier for us to accept your patches, please follow the conventional GitHub workflow:
2014-01-17 00:55:46 +00:00
# after forking, clone your repo
rm -rf ~/.twister/html
git clone git@github.com:yournickname/twister-html.git ~/.twister/html
cd ~/.twister/html
# CREATE A NEW BRANCH, specific to the fix you're implementing
git checkout -b my-fix
# ... make your changes ...
# commit and push
git commit -m "Fixing #1234 - bad foobarizer" && git push
# Now open a pull request from branch my-fix to miguelfreitas:master on github.
# Once the request is accepted, switch back to master and track upstream
git remote add upstream https://github.com/miguelfreitas/twister-html.git # one-off setup
git fetch upstream
git checkout master
git merge upstream/master # you should get a fast-forward message here
git push
2014-10-02 21:18:51 +00:00
2014-01-17 00:55:46 +00:00
Translations
------------
If you want to add your own translation, edit `interface_localization.js` like this:
2014-10-02 21:18:51 +00:00
1. fork the repo and create a new branch
git clone git@github.com:yournickname/twister-html.git ~/.twister/html
cd ~/.twister/html
git checkout -b Klingon
2014-01-17 00:55:46 +00:00
2. add your language to the list of available choices. You should use your ISO code here,
it should match what the browser reports. The Klingon ISO is "tlh", so:
2014-01-17 21:49:32 +00:00
var knownLanguages = ["en","nl","it","fr","ru","tlh"];`
2014-01-17 00:55:46 +00:00
For multi-region languages, if you want to catch them all, use only the first half
(e.g. to match it and it-ch, specify "it").
3. add a new wordset block after existing ones
if(preferredLanguage == "tlh"){
polyglot.locale("tlh");
wordset = {
"Insults": "mu'qaD,
....
}
2014-01-17 00:55:46 +00:00
}
2014-01-17 13:39:14 +00:00
4. stage all changes in file `interface_localization.js`
2014-01-17 00:55:46 +00:00
2014-01-17 13:39:14 +00:00
git add interface_localization.js
5. commit & push
2014-01-17 00:55:46 +00:00
git commit -m "Klingon translation"
git push
2014-01-17 00:55:46 +00:00
2014-10-02 21:18:51 +00:00
3. When opening the pull request on github. For any help, ping @toyg.