Miguel Freitas
5df149b3fd
|
10 years ago | |
---|---|---|
css | 10 years ago | |
img | 11 years ago | |
js | 10 years ago | |
sound | 11 years ago | |
theme_calm | 10 years ago | |
theme_nin | 10 years ago | |
AUTHORS | 10 years ago | |
LICENSE | 11 years ago | |
README.md | 10 years ago | |
abort.html | 11 years ago | |
following.html | 10 years ago | |
home.html | 10 years ago | |
index.html | 11 years ago | |
login.html | 10 years ago | |
network.html | 10 years ago | |
options.html | 10 years ago | |
profile-edit.html | 10 years ago | |
tmobile.html | 11 years ago |
README.md
twister-html
HTML interface for Twister (github). To use it, clone this repo under ~/.twister/html like this:
git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html
Localisation
If you want a localised interface (currently available only for NL, IT, FR, DE and RU),
use the experimental i18n
branch:
git checkout i18n
If you want to translate it in your own language, check these instructions
Contribute
Feel free to fork and send pull requests! To make it easier for us to accept your patches, please follow the conventional GitHub workflow:
# 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
Translations
If you want to add your own translation, edit interface_localization.js
like this:
-
fork the repo, checkout
i18n
and create a new branchgit clone git@github.com:yournickname/twister-html.git ~/.twister/html cd ~/.twister/html git checkout i18n git checkout -b Klingon
-
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:
var knownLanguages = ["en","nl","it","fr","ru","tlh"];`
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").
-
add a new wordset block after existing ones
if(preferredLanguage == "tlh"){ polyglot.locale("tlh"); wordset = { "Insults": "mu'qaD, .... } }
-
stage all changes in file
interface_localization.js
git add interface_localization.js
-
commit & push
git commit -m "Klingon translation" git push
-
When opening the pull request on github, make sure you're pointing to
miguelfreitas:i18n
as the base, so we can merge it straight away in the right place. For any help, ping @toyg.