Files @ 31f510a88584
Branch filter:

Location: kallithea/rhodecode/i18n/how_to

Bradley M. Kuhn
Update minified YUI to version 2.9 built from Source.

yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated
it to something else and applied more aggresive minification. We stick to a
clean but minified version 2.9.

The license of YUI is BSD 3-clause, as described on
http://yuilibrary.com/license/ .

Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd
compliant to distribute this Object Code version with the Corresponding Source
(or offer therefor).

This yui.2.9.js is built from Source this way:
git clone https://github.com/yui/builder
git clone https://github.com/yui/yui2
cd yui2/
git checkout hudson-yui2-2800
ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
rm -f tmp.js
for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
done
java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js

The source is mirrored and available on https://kallithea-scm.org/repos/mirror .
##########################
# to create new language #
##########################

Translations are available on transifex under::

    https://www.transifex.com/projects/p/RhodeCode/

Preferred method is to register on transifex and request new language translation.

manual creation of new language
+++++++++++++++++++++++++++++++
 
Dowload sources of RhodeCode. Run::

    python setup.py develop

To prepare the enviroment


Make sure all translation strings are extracted by running::

    python setup.py extract_messages

Create new language by executing following command::
    python setup.py init_catalog -l <new_language_code>

This creates a new language under directory rhodecode/i18n/<new_language_code>
Be sure to update transifex mapping under .tx/config for new language

Edit the new PO file located in LC_MESSAGES directory with poedit or your
favorite PO files editor. Do translations and at the end verify the translation
file for any errors. This can be done by executing::

    msgfmt -f -c rhodecode/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po>

finally compile the translations::

    python setup.py compile_catalog -l <new_language_code>

##########################
# to update translations #
##########################

Fetch latest version of strings for translation by running::

    python setup.py extract_messages

Update PO file by doing::

    python setup.py update_catalog -l <new_language_code><- to update the translations

Edit the new updated po file. Repeat all steps after `init_catalog` step from
new translation instructions


########################
# testing translations #
########################

Edit test.ini file and set lang attribute to::

    lang=<new_language_code>

Run RhodeCode tests by executing::

    nosetests