Skip to content

Commit 26c4ad8

Browse files
author
Ed Costello
committed
DOCS-775 related, create page on translations, add links to NLS variants
1 parent 15df244 commit 26c4ad8

File tree

5 files changed

+110
-11
lines changed

5 files changed

+110
-11
lines changed

source/about.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ current manual in the :hardlink:`release.txt` file.
9999
The most up-to-date, current, and stable version of the manual is
100100
always available at "http://docs.mongodb.org/manual/."
101101

102+
.. _meta-contributing:
103+
102104
Contributing to the Documentation
103105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104106

source/i18n.txt

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. this file is hardlinked from translations.html in themes/mongodb
2+
.. _internationalization:
3+
4+
===================================================
5+
MongoDB Manual Internationalization and Translation
6+
===================================================
7+
.. default-domain:: mongodb
8+
9+
The primary language of the MongoDB Documentation is English
10+
(American English at that) but we recognize the need to provide
11+
documentation in additional languages.
12+
13+
We are using a service provided by `Smartling <http://smartling.com/>`_
14+
to translate the MongoDB documentation into additional languages.
15+
16+
If you would like to volunteer to translate the MongoDB documentation,
17+
we need you to complete the
18+
`10gen/MongoDB Contributor Agreement <http://www.10gen.com/legal/contributor-agreement>`_.
19+
You will also need to create an account on Smartling at
20+
`translate.docs.mongodb.org <http://translate.docs.mongodb.org/>`_.
21+
22+
Please use the same email address you use to ``sign`` the Contributor
23+
agreement when you create the Smartling account.
24+
25+
We have a Google Group for translators at
26+
`mongodb-translators <http://groups.google.com/group/mongodb-translators>`_
27+
You can join the Google Group w/o signing the contributor's agreement
28+
but we will need a signed agreement before I add you to the Smartling
29+
project.
30+
31+
We currently have the following languages configured:
32+
33+
- `Arabic <http://ar.docs.mongodb.org>`_
34+
- `Chinese <http://cn.docs.mongodb.org>`_
35+
- `Czech <http://cs.docs.mongodb.org>`_
36+
- `German <http://de.docs.mongodb.org>`_
37+
- `Spanish <http://es.docs.mongodb.org>`_
38+
- `French <http://fr.docs.mongodb.org>`_
39+
- `Hungarian <http://hu.docs.mongodb.org>`_
40+
- `Indonesian <http://id.docs.mongodb.org>`_
41+
- `Italian <http://it.docs.mongodb.org>`_
42+
- `Japanese <http://jp.docs.mongodb.org>`_
43+
- `Korean <http://ko.docs.mongodb.org>`_
44+
- `Lithuanian <http://lt.docs.mongodb.org>`_
45+
- `Polish <http://pl.docs.mongodb.org>`_
46+
- `Portuguese <http://pt.docs.mongodb.org>`_
47+
- `Romanian <http://ro.docs.mongodb.org>`_
48+
- `Russian <http://ru.docs.mongodb.org>`_
49+
- `Turkish <http://tr.docs.mongodb.org>`_
50+
- `Ukrainian <http://uk.docs.mongodb.org>`_
51+
52+
If we are missing your language please contact us (through the
53+
``Report a Problem`` link above or by posting to ``mongodb-translators``).
54+
55+
While the translation effort is currently focused on the web site we are
56+
evaluating how to retrieve the translated phrases for use in other
57+
media.
58+
59+
.. seealso::
60+
61+
- :ref:`meta-contributing`
62+
- `Style and Conventions <https://github.com/mongodb/docs/blob/master/meta.style-guide.rst>`_
63+
- `Documentation Organization <https://github.com/mongodb/docs/blob/master/meta.organization.rst>`_
64+
- `Practices and Processes <https://github.com/mongodb/docs/blob/master/meta.practices.rst>`_
65+
- `Building and Deploying MongoDB Documentation <https://github.com/mongodb/docs/blob/master/meta.build.rst>`_

themes/mongodb/analytics.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
_gaq.push(['_setAccount', '{{theme_google_analytics}}']);
66
_gaq.push(['_setDomainName', 'docs.mongodb.org']);
77
{%- if (pagename == "meta/401") or (pagename == "meta/403") or (pagename == "meta/404") or (pagename == "meta/410") %}
8-
_gaq.push(['_trackPageview', '/{{theme_manaul_path}}/{{pagename}}/?page=' + document.location.pathname + document.location.search + '&from=' + document.referrer]);
8+
_gaq.push(['_trackPageview', '/{{theme_manual_path}}/{{pagename}}/?page=' + document.location.pathname + document.location.search + '&from=' + document.referrer]);
99
{%- else %}
1010
_gaq.push(['_trackPageview']);
1111
{%- endif %}

themes/mongodb/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
<li class="normal"><a href="http://www.mongodb.org/downloads">Download</a></li>
133133
<li class="normal"><a href="http://www.mongodb.org/display/DOCS/Drivers">Drivers</a></li>
134134
<li class="normal"><a href="http://www.mongodb.org/display/DOCS/Events">Events</a></li>
135-
<li class="normal last"><a class="last" href="http://www.mongodb.org/display/DOCS/International+Documentation">International</a></li>
135+
<li class="normal last"><a class="last" href="http://docs.mongodb.org/manual/i18n/">Translations</a></li>
136136
</ul>
137137
</div>
138138
</div>

themes/mongodb/translations.html

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,48 @@
1+
{# This is one pass at adding national language links to pages but I'm concerned
2+
it is making build take significantly longer. It really shouldn't. But perhaps
3+
hardlinks to the languages and a JS thing to click to "this page in Klingon"?
4+
#}
5+
{%- set nlslangs = {
6+
"ar": "Arabic",
7+
"cn": "Chinese",
8+
"cs": "Czech",
9+
"de": "German",
10+
"es": "Spanish",
11+
"fr": "French",
12+
"hu": "Hungarian",
13+
"id": "Indonesian",
14+
"it": "Italian",
15+
"jp": "Japanese",
16+
"ko": "Korean",
17+
"lt": "Lithuanian",
18+
"pl": "Polish",
19+
"pt": "Portuguese",
20+
"ro": "Romanian",
21+
"ru": "Russian",
22+
"tr": "Turkish",
23+
"uk": "Ukrainian"
24+
}
25+
-%}
126
<h3>Translations</h3>
27+
<p><a href="//docs.mongodb.org/manual/i18n/">About the translation project</a></p>
228
<ul class="translation-menu">
29+
{% set domain = 'docs.mongodb.org' %}
30+
{%- if pagename == "index" %}
31+
{% set temppagename = "" %}
32+
{% elif file_suffix == '' %}
33+
{% set tempagename = pagename + "/" %}
34+
{% else %}
35+
{% set temppagename = pagename %}
36+
{% endif %}
337
{%- if theme_project == 'manual' %}
4-
<li><a href="http://jp.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
5-
<li><a href="http://cn.docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
6-
<!-- <li><a href="http://docs.mongodb.org/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
38+
{% set pageuri = theme_manual_path + "/" + temppagename %}
739
{%- elif theme_project == 'ecosystem' %}
8-
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
9-
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
10-
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
40+
{% set pageuri = theme_project + "/" + temppagename %}
1141
{%- elif theme_project == 'meta-driver' %}
12-
<li><a href="http://jp.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Japanese</a></li>
13-
<li><a href="http://cn.docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">Chinese</a></li>
14-
<!-- <li><a href="http://docs.mongodb.org/{{theme_project}}/{{theme_manual_path}}/{%- if pagename == "index" %}{%- else %}{{pagename}}{%- endif %}" rel="nofollow">English</a></li> -->
42+
{% set pageuri = theme_project + "/" + theme_manual_path + "/" + temppagename %}
1543
{%- endif %}
44+
{%- for lc,lang in nlslangs|dictsort(true): -%}
45+
{%- set lang = nlslangs[lc] -%}
46+
<li><a href="http://{{lc}}.{{domain}}/{{pageuri}}" rel="nofollow" hreflang="{{lc}}" title="{{html_short_title}} in {{lang}}">{{lang}}</a></li>
47+
{% endfor -%}
1648
</ul>

0 commit comments

Comments
 (0)