Skip to content

Commit

Permalink
[#809] Add i18n guide for devs
Browse files Browse the repository at this point in the history
Fixes #809
  • Loading branch information
Sean Hammond committed Apr 2, 2014
1 parent e7775a3 commit d181a8b
Show file tree
Hide file tree
Showing 12 changed files with 447 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/_themes/sphinx-theme-okfn
Submodule sphinx-theme-okfn added at 4628f2
7 changes: 6 additions & 1 deletion doc/contributing/frontend/index.rst
Expand Up @@ -11,6 +11,11 @@ Frontend development guidelines
template-blocks
javascript-module-tutorial

.. seealso::

:doc:`/contributing/string-i18n`
How to mark strings for translation.

-----------------------------
Install frontend dependencies
-----------------------------
Expand Down Expand Up @@ -313,7 +318,7 @@ useful in the future.
Internationalization
====================

All strings within modules should be internationalised. Strings can be
All strings within modules should be internationalized. Strings can be
set in the ``options.i18n`` object and there is a ``.i18n()`` helper for
retrieving them.

Expand Down
6 changes: 5 additions & 1 deletion doc/contributing/html.rst
Expand Up @@ -2,6 +2,11 @@
HTML coding standards
=====================

.. seealso::

:doc:`string-i18n`
How to mark strings for translation.

----------
Formatting
----------
Expand Down Expand Up @@ -151,4 +156,3 @@ And **not**: ::

<p>Blah foo blah
New paragraph, blah</p>

5 changes: 5 additions & 0 deletions doc/contributing/i18n.rst
Expand Up @@ -6,6 +6,11 @@ CKAN is used in many countries, and adding a new language to the web interface i

CKAN uses the url to determine which language is used. An example would be ``/fr/dataset`` would be shown in french. If CKAN is running under a directory then an example would be ``/root/fr/dataset``. For custom paths check the :ref:`ckan.root_path` config option.

.. seealso::

Developers, see :doc:`string-i18n` for how to mark strings for translation in
CKAN code.

.. Note: Storing metadata field values in more than one language is a separate topic. This is achieved by storing the translations in extra fields. A custom dataset form and dataset display template are recommended. Ask the CKAN team for more information.
-------------------
Expand Down
1 change: 1 addition & 0 deletions doc/contributing/index.rst
Expand Up @@ -32,6 +32,7 @@ of contributions to CKAN:
html
javascript
python
string-i18n
testing
frontend/index

Expand Down
5 changes: 5 additions & 0 deletions doc/contributing/javascript.rst
Expand Up @@ -2,6 +2,11 @@
JavaScript coding standards
===========================

.. seealso::

:doc:`string-i18n`
How to mark strings for translation.

----------
Formatting
----------
Expand Down
5 changes: 5 additions & 0 deletions doc/contributing/python.rst
Expand Up @@ -11,6 +11,11 @@ Some good links about Python code style:
- `Python Coding Standards <http://lists.osafoundation.org/pipermail/dev/2003-March/000479.html>`_ from Yahoo
- `Google Python Style Guide <http://google-styleguide.googlecode.com/svn/trunk/pyguide.html>`_

.. seealso::

:doc:`string-i18n`
How to mark strings for translation.


Use single quotes
-----------------
Expand Down

0 comments on commit d181a8b

Please sign in to comment.