mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-15 16:56:32 +01:00
Remove Tracks 2.1 instructions
parent
d2625dee33
commit
503a104de6
1 changed files with 43 additions and 60 deletions
|
|
@ -1,60 +1,43 @@
|
|||
h1. Translating Tracks
|
||||
|
||||
Translating Tracks into another language is not very difficult, does not require you to be a developer and can be done from your webbrowser.
|
||||
|
||||
Tracks <=2.1 uses different built-in mechanism for creating translations than Tracks 2.2.
|
||||
|
||||
h2. Overview
|
||||
|
||||
In general the steps are:
|
||||
|
||||
* get a copy of tracks
|
||||
** either make a copy of your running tracks (to make sure you always have a working verions)
|
||||
** or get it from git using @git clone https://github.com/TracksApp/tracks.git@
|
||||
* for Tracks 2.1, create a new locale for the language you want to add to Tracks
|
||||
** create an empty locale file in @/config/locales@, i.e. @touch /path/to/copy/of/tracks/config/locales/XX.yml@
|
||||
*** @XX.yml@ is the locale file for your language where @XX@ is the short name for your country like the following who are already there: en (english) or de (german) or nl (dutch).
|
||||
* Make sure the database is current: @bundle exec rake db:migrate@
|
||||
** this will require you to configure a database in @config/databases.yml@ for the development environment. To be safe, do not use your production database, but use a copy of your database or make backups!
|
||||
** Furthermore for languages that require special character sets like hebrew, configure the correct character set both in @config/database.yml@ and for your database (i.e. in @/etc/my.cfg@ for mysql). Mysql uses @latin1@ by default and that won't work for hebrew.
|
||||
* launch the built-in Tracks server in development mode:
|
||||
** for Tracks 2.2: @bundle exec rails s@
|
||||
** for Tracks 2.1: @script/server -e development@
|
||||
** this will run tracks on localhost on port 3000
|
||||
** access it by pointing your webbrowser to @http://localhost:3000@
|
||||
* go to your preferences page and select your language as default
|
||||
** all pages should look wrong or fail or just display everything in English (fallback option). No worry!
|
||||
* For Tracks 2.2, import the existing translations into the Tolk database: @bundle exec rake tolk:sync && bundle exec rake tolk:import@
|
||||
* For Tracks 2.2, point your browser to @http://localhost:3000/tolk@
|
||||
** Select the language you want to work on or create a new one
|
||||
** When you are done, either submit the new language file to Assembla or create a pull request
|
||||
*** using @bundle exec rake tolk:dump_all@ will write all changes to the locale .yml files in @/path/to/tracks/config/locale@. You can then test it on @http://localhost:3000@
|
||||
*** Or: download the locale file: @http://localhost:3000/tolk/locales/XX.yml@ where @XX@ is the name of your locale (for example nl or de or cz)
|
||||
* For Tracks 2.1, point your browser to @http://localhost:3000/translate@
|
||||
** this is the translate plug-in that will show you all strings that need to be translated
|
||||
** set the filter right: set your language by choosing "Translate from EN to XX" with XX being your language and choose Display
|
||||
** You can select "untranslated" to filter on untranslated strings
|
||||
** The "auto translage" link uses Google to translate the string. Very handy. Be aware though that it will translate parameters like @%{count}@ too. Change this back or Tracks will fail
|
||||
** When you save the translations, it will write it to @XX.yml@ in your @config/locales@ directory
|
||||
|
||||
Some pages need to be translated manually:
|
||||
|
||||
* @app/views/integrations/index.en.html@. Create an @index.XX.html@ in this directory with @XX@ being your language
|
||||
* Same goes for @app/views/data/index.en.html@ and @yaml_form.en.html@
|
||||
|
||||
For the datepicker in the edit and new todo form, you need to add a translation file in @public/javascripts/i18n@. They can be found in http://jqueryui.com/demos/datepicker/#localization which references the following repository of translations: http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/
|
||||
|
||||
h2. Help and troubleshooting
|
||||
|
||||
* you can switch languages by changing the url on every page
|
||||
** http://localhost:3000?locale=nl will switch to dutch.
|
||||
** if your page gives errors, first check with @locale=en@ if the error is caused by your language changes. Remember that auto translate can mess up parameters, sometimes putting a space between @$@ and @{param}@ and sometimes translating the name of the parameter!
|
||||
** see the i18n documentation for rails for more technical details http://guides.rubyonrails.org/i18n.html
|
||||
* if you see a question mark (?) instead of a special language character, there is most likely a wrong encoding setting somewhere. I had @latin1@ for my character set in mysql preventing special characters to be imported correctly by Tolk. Beware that you need to alter the tolk_* tables to have @utf-8@ as its encoding. Also be aware that you need to update the character set of the @TEXT@ field in the tolk-* tables too!
|
||||
|
||||
h2. Getting your changes into the next release
|
||||
|
||||
* the easiest for the maintainer of Tracks is to create a clone of Tracks on github, merge your changes and issue a pull request.
|
||||
** make sure you only add your changes needed for the translation
|
||||
* or create a ticket on assembla with a patch with your changes
|
||||
* or upload the changed files to assembla in a ticket if creating a patch is not for you :-)
|
||||
h1. Translating Tracks
|
||||
|
||||
Translating Tracks into another language is not very difficult, does not require you to be a developer and can be done from your web browser.
|
||||
|
||||
h2. Overview
|
||||
|
||||
In general the steps are:
|
||||
|
||||
* get a copy of Tracks
|
||||
** either make a copy of your running tracks (to make sure you always have a working version)
|
||||
** or get it from git using @git clone https://github.com/TracksApp/tracks.git@
|
||||
* Make sure the database is current: @bundle exec rake db:migrate@
|
||||
** this will require you to configure a database in @config/databases.yml@ for the development environment. To be safe, do not use your production database, but use a copy of your database or make backups!
|
||||
** Furthermore for languages that require special character sets like Hebrew, configure the correct character set both in @config/database.yml@ and for your database (i.e. in @/etc/my.cfg@ for mysql). Mysql uses @latin1@ by default and that won't work for Hebrew.
|
||||
* Import the existing translations into the Tolk database: @bundle exec rake tolk:sync && bundle exec rake tolk:import@
|
||||
* launch the built-in Tracks server in development mode:
|
||||
** @bundle exec rails s@
|
||||
** this will run tracks on localhost on port 3000
|
||||
* Point your browser to @http://localhost:3000/tolk@
|
||||
** Select the language you want to work on or create a new one
|
||||
** When you are done, dump the languages back to the YAML files
|
||||
*** @bundle exec rake tolk:dump_all@ will write all changes to the locale .yml files in @/path/to/tracks/config/locale@. You can then test it on @http://localhost:3000@
|
||||
*** Or: download the locale file: @http://localhost:3000/tolk/locales/XX.yml@ where @XX@ is the name of your locale (for example nl or de or cz)
|
||||
|
||||
Some pages need to be translated manually:
|
||||
|
||||
* @app/views/integrations/index.en.html@. Create an @index.XX.html@ in this directory with @XX@ being your language
|
||||
* Same goes for @app/views/data/index.en.html@ and @yaml_form.en.html@
|
||||
|
||||
For the datepicker in the edit and new todo form, you need to add a translation file in @public/javascripts/i18n@. They can be found in http://jqueryui.com/demos/datepicker/#localization which references the following repository of translations: http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/
|
||||
|
||||
h2. Help and troubleshooting
|
||||
|
||||
* you can switch languages by changing the URL on every page
|
||||
** http://localhost:3000?locale=nl will switch to dutch.
|
||||
** if your page gives errors, first check with @locale=en@ if the error is caused by your language changes. Remember that auto translate can mess up parameters, sometimes putting a space between @$@ and @{param}@ and sometimes translating the name of the parameter!
|
||||
** see the i18n documentation for rails for more technical details http://guides.rubyonrails.org/i18n.html
|
||||
* if you see a question mark (?) instead of a special language character, there is most likely a wrong encoding setting somewhere. I had @latin1@ for my character set in mysql preventing special characters to be imported correctly by Tolk. Beware that you need to alter the tolk_* tables to have @utf-8@ as its encoding. Also be aware that you need to update the character set of the @TEXT@ field in the tolk-* tables too!
|
||||
|
||||
h2. Getting your changes into the next release
|
||||
|
||||
* the easiest for the maintainer of Tracks is to create a clone of Tracks on GitHub, merge your changes and issue a pull request.
|
||||
** make sure you only add your changes needed for the translation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue