Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5f841f28
Commit
5f841f28
authored
Feb 06, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update i18n coding guidelines
parent
0acb18fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
12 deletions
+31
-12
docs/en_us/developers/source/i18n.rst
+31
-12
No files found.
docs/en_us/developers/source/i18n.rst
View file @
5f841f28
...
...
@@ -14,6 +14,13 @@ See also:
* `Django Translation guidelines <https://docs.djangoproject.com/en/dev/topics/i18n/translation/>`_
* `Django Format localization <https://docs.djangoproject.com/en/dev/topics/i18n/formatting/>`_
Presented in this document are the following sections:
* `General internationalization rules`_
* `Editing source files`_
* `Coverage testing`_
* `Style guidelines`_
General internationalization rules
**********************************
...
...
@@ -57,9 +64,17 @@ do:
produce the best translation. They have a "Translators:" marker. They must
appear on the line preceding the text they describe.
The code samples below show how to do each of these things. Note that you have
to take into account not just the programming language involved, but the type
of file: Javascript embedded in an HTML Mako template is treated differently
The code samples below show how to do each of these things for:
* `Python source code`_
* `Django template files`_
* `Mako template files`_
* `Javascript files`_
* `Coffeescript files`_
* `Other kinds of code`_
Note that you have to take into account not just the programming language involved,
but the type of file: Javascript embedded in an HTML Mako template is treated differently
than Javascript in a pure .js file.
Python source code
...
...
@@ -210,16 +225,20 @@ the strings, or checking the translations into Github, see use cases).
$ rake i18n:generate
4. Django should be ready to go. The next time you run Studio or LMS with a
browser set to Esperanto, the accented-English strings (from step 3, above)
should be displayed. Be sure that your settings for ``USE_I18N`` and
``USE_L10N`` are both set to True. ``USE_I18N`` is set to False by default
in common.py, but is set to True in development settings files.
4. Django should be ready to go. The next time you run Studio or LMS, append
``?preview-lang=eo`` to the URL to turn on Esperanto as a dark language. The
accented-English strings (from step 3, above) should be displayed.
If you experience issues, be sure that your settings for ``USE_I18N`` and
``USE_L10N`` are both set to True.
5. With Esperanto turned on as a dark language (see Step 4), review the pages
affected by your code and verify that you see fake translations. If you see
plain English instead, your code is not being properly translated. Review
the steps in editing source files (above).
5. With your browser set to Esperanto, review the pages affected by your code
and verify that you see fake translations. If you see plain English instead,
your code is not being properly translated. Review the steps in editing
source files (above).
6. When you are done reviewing, append ``?clear-lang`` to the LMS or Studio URL
to reset your session to English.
Coverage testing
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment