2014-01-17 00:55:46 +00:00
twister-html
============
2015-10-27 19:18:44 +00:00
HTML interface for ** [twister ](http://twister.net.co )** (see git repo [here ](https://github.com/miguelfreitas/twister-core )). It is a FOSS which is being under heavy construction.
To use it, clone this repo under `~/.twister/html` like this:
2014-01-17 00:55:46 +00:00
git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html
2015-10-27 19:18:44 +00:00
If you're on **Mac OS X** — clone to `${HOME}/Library/Application\ Support/Twister/html` instead of `~/.twister/html`
Be on the bleeding edge
-----------------------
All nightly improvements and following fixes of these improvements are tested in [blaster ](https://github.com/miguelfreitas/twister-html/tree/blaster ) branch.
To be sure you are at the forefront, in stage of lack of testing and consensus:
git pull & & git checkout blaster
If you want to switch back to stable branch:
git checkout master
Follow `@letstwist` in twister to be aware of recent changes. In case of getting of twister-html related buzz from it:
git pull
2014-10-02 13:27:57 +00:00
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
2015-10-27 19:18:44 +00:00
To make it easier for us to accept your patches, please follow the conventional GitHub workflow
and keep in mind that your pull requests should have **blaster** branch as both the origin and target.
1. After forking, clone your repo:
rm -rf ~/.twister/html # in case you already have it cloned from not your repo
git clone git@github.com:YOURNICKNAME/twister-html.git ~/.twister/html
cd ~/.twister/html
2. Switch to 'blaster' branch:
git checkout blaster
3. CREATE A NEW BRANCH, specific to the fix you're implementing:
git checkout -b my-awesome-fix
4. Make your changes.
5. Commit and push:
git commit -m "fix of #12345: bad foobarizer" && git push
6. Now open a pull request from branch 'YOURNICKNAME:my-awesome-fix' to 'miguelfreitas:blaster' on GitHub.
7. Once the request is accepted, switch back to 'blaster' and track changes in upstream repo:
git remote add upstream https://github.com/miguelfreitas/twister-html.git # this is one-off setup
git fetch upstream & & git checkout blaster
git merge upstream/blaster # 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:
2015-10-27 19:18:44 +00:00
1. Fork the repo and create a new branch from 'blaster' one:
2014-01-17 00:55:46 +00:00
2015-10-27 19:18:44 +00:00
git clone git@github.com:YOURNICKNAME/twister-html.git ~/.twister/html
cd ~/.twister/html & & git checkout blaster
git checkout -b Klingon-translation
2014-01-17 00:55:46 +00:00
2015-10-27 19:18:44 +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 01:01:32 +00:00
2015-10-27 19:18:44 +00:00
var knownLanguages = ['en', 'nl', 'it', 'fr', ... , 'ru', 'tlh'];
2014-01-17 00:55:46 +00:00
2015-10-27 19:18:44 +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').
2014-01-17 00:55:46 +00:00
2015-10-27 19:18:44 +00:00
3. Add a new wordset block after existing ones:
2014-01-17 01:01:32 +00:00
2015-10-27 19:18:44 +00:00
if (preferredLanguage === 'tlh') {
polyglot.locale('tlh');
2014-01-17 01:01:32 +00:00
wordset = {
2015-10-27 19:18:44 +00:00
'Insults': 'mu\'qaD',
...
2014-01-17 01:01:32 +00:00
}
2014-01-17 00:55:46 +00:00
}
2014-01-17 01:01:32 +00:00
2015-10-27 19:18:44 +00:00
4. Stage all changes in file `interface_localization.js` :
2014-01-17 13:39:14 +00:00
git add interface_localization.js
2014-01-17 00:55:46 +00:00
2015-10-27 19:18:44 +00:00
5. Commit & push:
git commit -m 'Klingon translation'
git push origin Klingon-translation
6. Then open the pull request from branch 'YOURNICKNAME:Klingon-translation' to 'miguelfreitas:blaster' on GitHub.
2014-01-17 01:01:32 +00:00
2015-10-27 19:18:44 +00:00
For any help ping `@tasty` in twister.