Skip to content

DOCS-775 related, create page on translations, add links to NLS variants #600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/about.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ current manual in the :hardlink:`release.txt` file.
The most up-to-date, current, and stable version of the manual is
always available at "http://docs.mongodb.org/manual/."

.. _meta-contributing:

Contributing to the Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
65 changes: 65 additions & 0 deletions source/i18n.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. this file is hardlinked from translations.html in themes/mongodb
.. _internationalization:

===================================================
MongoDB Manual Internationalization and Translation
===================================================
.. default-domain:: mongodb

The primary language of the MongoDB Documentation is English
(American English at that) but we recognize the need to provide
documentation in additional languages.

We are using a service provided by `Smartling <http://smartling.com/>`_
to translate the MongoDB documentation into additional languages.

If you would like to volunteer to translate the MongoDB documentation,
we need you to complete the
`10gen/MongoDB Contributor Agreement <http://www.10gen.com/legal/contributor-agreement>`_.
You will also need to create an account on Smartling at
`translate.docs.mongodb.org <http://translate.docs.mongodb.org/>`_.

Please use the same email address you use to ``sign`` the Contributor
agreement when you create the Smartling account.

We have a Google Group for translators at
`mongodb-translators <http://groups.google.com/group/mongodb-translators>`_
You can join the Google Group w/o signing the contributor's agreement
but we will need a signed agreement before I add you to the Smartling
project.

We currently have the following languages configured:

- `Arabic <http://ar.docs.mongodb.org>`_
- `Chinese <http://cn.docs.mongodb.org>`_
- `Czech <http://cs.docs.mongodb.org>`_
- `German <http://de.docs.mongodb.org>`_
- `Spanish <http://es.docs.mongodb.org>`_
- `French <http://fr.docs.mongodb.org>`_
- `Hungarian <http://hu.docs.mongodb.org>`_
- `Indonesian <http://id.docs.mongodb.org>`_
- `Italian <http://it.docs.mongodb.org>`_
- `Japanese <http://jp.docs.mongodb.org>`_
- `Korean <http://ko.docs.mongodb.org>`_
- `Lithuanian <http://lt.docs.mongodb.org>`_
- `Polish <http://pl.docs.mongodb.org>`_
- `Portuguese <http://pt.docs.mongodb.org>`_
- `Romanian <http://ro.docs.mongodb.org>`_
- `Russian <http://ru.docs.mongodb.org>`_
- `Turkish <http://tr.docs.mongodb.org>`_
- `Ukrainian <http://uk.docs.mongodb.org>`_

If we are missing your language please contact us (through the
``Report a Problem`` link above or by posting to ``mongodb-translators``).

While the translation effort is currently focused on the web site we are
evaluating how to retrieve the translated phrases for use in other
media.

.. seealso::

- :ref:`meta-contributing`
- `Style and Conventions <https://github.com/mongodb/docs/blob/master/meta.style-guide.rst>`_
- `Documentation Organization <https://github.com/mongodb/docs/blob/master/meta.organization.rst>`_
- `Practices and Processes <https://github.com/mongodb/docs/blob/master/meta.practices.rst>`_
- `Building and Deploying MongoDB Documentation <https://github.com/mongodb/docs/blob/master/meta.build.rst>`_
2 changes: 1 addition & 1 deletion themes/mongodb/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
_gaq.push(['_setAccount', '{{theme_google_analytics}}']);
_gaq.push(['_setDomainName', 'docs.mongodb.org']);
{%- if (pagename == "meta/401") or (pagename == "meta/403") or (pagename == "meta/404") or (pagename == "meta/410") %}
_gaq.push(['_trackPageview', '/{{theme_manaul_path}}/{{pagename}}/?page=' + document.location.pathname + document.location.search + '&from=' + document.referrer]);
_gaq.push(['_trackPageview', '/{{theme_manual_path}}/{{pagename}}/?page=' + document.location.pathname + document.location.search + '&from=' + document.referrer]);
{%- else %}
_gaq.push(['_trackPageview']);
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion themes/mongodb/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<li class="normal"><a href="http://www.mongodb.org/downloads">Download</a></li>
<li class="normal"><a href="http://www.mongodb.org/display/DOCS/Drivers">Drivers</a></li>
<li class="normal"><a href="http://www.mongodb.org/display/DOCS/Events">Events</a></li>
<li class="normal last"><a class="last" href="http://www.mongodb.org/display/DOCS/International+Documentation">International</a></li>
<li class="normal last"><a class="last" href="http://docs.mongodb.org/manual/i18n/">Translations</a></li>
</ul>
</div>
</div>
Expand Down
50 changes: 41 additions & 9 deletions themes/mongodb/translations.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
{# This is one pass at adding national language links to pages but I'm concerned
it is making build take significantly longer. It really shouldn't. But perhaps
hardlinks to the languages and a JS thing to click to "this page in Klingon"?
#}
{%- set nlslangs = {
"ar": "Arabic",
"cn": "Chinese",
"cs": "Czech",
"de": "German",
"es": "Spanish",
"fr": "French",
"hu": "Hungarian",
"id": "Indonesian",
"it": "Italian",
"jp": "Japanese",
"ko": "Korean",
"lt": "Lithuanian",
"pl": "Polish",
"pt": "Portuguese",
"ro": "Romanian",
"ru": "Russian",
"tr": "Turkish",
"uk": "Ukrainian"
}
-%}
<h3>Translations</h3>
<p><a href="//docs.mongodb.org/manual/i18n/">About the translation project</a></p>
<ul class="translation-menu">
{% set domain = 'docs.mongodb.org' %}
{%- if pagename == "index" %}
{% set temppagename = "" %}
{% elif file_suffix == '' %}
{% set tempagename = pagename + "/" %}
{% else %}
{% set temppagename = pagename %}
{% endif %}
{%- if theme_project == 'manual' %}
<li><a href="http://jp.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
<li><a href="http://cn.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
<!-- <li><a href="http://docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
{% set pageuri = theme_manual_path + "/" + temppagename %}
{%- elif theme_project == 'ecosystem' %}
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
{% set pageuri = theme_project + "/" + temppagename %}
{%- elif theme_project == 'meta-driver' %}
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
{% set pageuri = theme_project + "/" + theme_manual_path + "/" + temppagename %}
{%- endif %}
{%- for lc,lang in nlslangs|dictsort(true): -%}
{%- set lang = nlslangs[lc] -%}
<li><a href="http://{{lc}}.{{domain}}/{{pageuri}}" rel="nofollow" hreflang="{{lc}}" title="{{html_short_title}} in {{lang}}">{{lang}}</a></li>
{% endfor -%}
</ul>