Skip to content

Commit 98f26a2

Browse files
author
Sam Kleinman
committed
DOCS-775: refactor, organization, and edits
1 parent 53656a8 commit 98f26a2

File tree

5 files changed

+79
-62
lines changed

5 files changed

+79
-62
lines changed

conf.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,27 @@
7777
'djangotoolbox' : ('http://djangotoolbox.readthedocs.org/en/latest/', '../build/djangotoolbox.inv'),
7878
}
7979

80+
languages = [
81+
("ar", "Arabic"),
82+
("cn", "Chinese"),
83+
("cs", "Czech"),
84+
("de", "German"),
85+
("es", "Spanish"),
86+
("fr", "French"),
87+
("hu", "Hungarian"),
88+
("id", "Indonesian"),
89+
("it", "Italian"),
90+
("jp", "Japanese"),
91+
("ko", "Korean"),
92+
("lt", "Lithuanian"),
93+
("pl", "Polish"),
94+
("pt", "Portuguese"),
95+
("ro", "Romanian"),
96+
("ru", "Russian"),
97+
("tr", "Turkish"),
98+
("uk", "Ukrainian")
99+
]
100+
80101
# -- Options for HTML output ---------------------------------------------------
81102

82103
html_theme = 'mongodb'
@@ -103,15 +124,19 @@
103124
'pdfpath': manual_edition_path + '.pdf',
104125
'epubpath': manual_edition_path + '.epub',
105126
'manual_path': meta['manual_path'],
127+
'translations': languages,
106128
'repo_name': 'docs',
107129
'jira_project': 'DOCS',
108130
'google_analytics': 'UA-7301842-8',
109131
'project': 'manual',
110132
}
111133

112134
html_sidebars = {
113-
'**': ['pagenav.html', 'formats.html', 'translations.html', 'wikisidebar.html'],
135+
'**': ['pagenav.html'],
114136
}
137+
html_sidebars['**'].append('formats.html')
138+
# html_sidebars['**'].append('translations.html')
139+
html_sidebars['**'].append('wikisidebar.html')
115140

116141
# -- Options for LaTeX output --------------------------------------------------
117142

source/about.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ always available at "http://docs.mongodb.org/manual/."
104104
Contributing to the Documentation
105105
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106106

107+
.. this toctree should be moved to a not-yet-extant "translation"
108+
section of this page.
109+
110+
.. toctree::
111+
:hidden:
112+
113+
/meta/translation
114+
107115
The entire source of the documentation is available in the `docs
108116
repository <https://github.com/mongodb/docs>`_ along with all of the
109117
other `MongoDB project repositories on GitHub <http://github.com/mongodb>`_.

source/i18n.txt renamed to source/meta/translation.txt

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
1-
.. this file is hardlinked from translations.html in themes/mongodb
21
.. _internationalization:
32

43
===================================================
54
MongoDB Manual Internationalization and Translation
65
===================================================
6+
77
.. default-domain:: mongodb
88

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.
9+
The original authorship language for all MongoDB documentation is
10+
American English. However, ensuring that speakers of other languages
11+
can read and understand the documentation is of critical importance to
12+
the documentation project.
13+
14+
In this direction, the MongoDB Documentation project uses the service
15+
provided by `Smartling <http://smartling.com/>`_ to translate the
16+
MongoDB documentation into additional non-English languages. This
17+
translation project is largely supported by the work of volunteer
18+
translators from the MongoDB community who contribute to the
19+
translation effort.
1220

13-
We are using a service provided by `Smartling <http://smartling.com/>`_
14-
to translate the MongoDB documentation into additional languages.
21+
If you would like to volunteer to help translate the MongoDB
22+
documentation, please:
1523

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
24+
- complete the `10gen/MongoDB Contributor Agreement
25+
<http://www.10gen.com/legal/contributor-agreement>`_, and
26+
- create an account on Smartling at
2027
`translate.docs.mongodb.org <http://translate.docs.mongodb.org/>`_.
2128

22-
Please use the same email address you use to ``sign`` the Contributor
23-
agreement when you create the Smartling account.
29+
Please use the same email address you use to sign the contributor as
30+
you use to create your Smartling account.
2431

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.
32+
The `mongodb-translators`_ user group exists to facilitate
33+
collaboration between translators and the documentation team at large.
34+
You can join the Google Group without signing the contributor's
35+
agreement.
3036

3137
We currently have the following languages configured:
3238

3339
- `Arabic <http://ar.docs.mongodb.org>`_
3440
- `Chinese <http://cn.docs.mongodb.org>`_
3541
- `Czech <http://cs.docs.mongodb.org>`_
36-
- `German <http://de.docs.mongodb.org>`_
37-
- `Spanish <http://es.docs.mongodb.org>`_
3842
- `French <http://fr.docs.mongodb.org>`_
43+
- `German <http://de.docs.mongodb.org>`_
3944
- `Hungarian <http://hu.docs.mongodb.org>`_
4045
- `Indonesian <http://id.docs.mongodb.org>`_
4146
- `Italian <http://it.docs.mongodb.org>`_
@@ -46,16 +51,20 @@ We currently have the following languages configured:
4651
- `Portuguese <http://pt.docs.mongodb.org>`_
4752
- `Romanian <http://ro.docs.mongodb.org>`_
4853
- `Russian <http://ru.docs.mongodb.org>`_
54+
- `Spanish <http://es.docs.mongodb.org>`_
4955
- `Turkish <http://tr.docs.mongodb.org>`_
5056
- `Ukrainian <http://uk.docs.mongodb.org>`_
5157

52-
If we are missing your language please contact us (through the
53-
``Report a Problem`` link above or by posting to ``mongodb-translators``).
58+
If you would like to initiate a translation project to an additional
59+
language, please report this issue using the "*Report a Problem*" link
60+
above or by posting to the `mongodb-translators`_ list.
5461

55-
While the translation effort is currently focused on the web site we are
62+
Currently the translation project only publishes rendered translation While the translation effort is currently focused on the web site we are
5663
evaluating how to retrieve the translated phrases for use in other
5764
media.
5865

66+
.. _`mongodb-translators`: http://groups.google.com/group/mongodb-translators
67+
5968
.. seealso::
6069

6170
- :ref:`meta-contributing`

themes/mongodb/theme.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ manual_path = PATH
1111
repo_name = REPONAME
1212
jira_project = JIRA
1313
google_analytics = GACODE
14-
project = PROJECT
14+
project = PROJECT
15+
translations = LANGUAGES

themes/mongodb/translations.html

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,22 @@
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-
-%}
26-
<h3>Translations</h3>
27-
<p><a href="//docs.mongodb.org/manual/i18n/">About the translation project</a></p>
28-
<ul class="translation-menu">
29-
{% set domain = 'docs.mongodb.org' %}
301
{%- if pagename == "index" %}
31-
{% set temppagename = "" %}
2+
{% set page_path = "" %}
323
{% elif file_suffix == '' %}
33-
{% set tempagename = pagename + "/" %}
4+
{% set tempagename = pagename + "/" %}
345
{% else %}
35-
{% set temppagename = pagename %}
6+
{% set page_path = pagename %}
367
{% endif %}
8+
379
{%- if theme_project == 'manual' %}
38-
{% set pageuri = theme_manual_path + "/" + temppagename %}
10+
{% set page_uri = theme_manual_path + "/" + page_path %}
3911
{%- elif theme_project == 'ecosystem' %}
40-
{% set pageuri = theme_project + "/" + temppagename %}
12+
{% set page_uri = theme_project + "/" + page_path %}
4113
{%- elif theme_project == 'meta-driver' %}
42-
{% set pageuri = theme_project + "/" + theme_manual_path + "/" + temppagename %}
14+
{% set page_uri = theme_project + "/" + theme_manual_path + "/" + page_path %}
4315
{%- 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>
16+
17+
<h3><a href="{{ pathto('/meta/translation') }}">Translations</a></h3>
18+
<ul class="translation-menu">
19+
{%- for lc,lang in theme_translations -%}
20+
<li><a href="http://{{lc}}.docs.mongodb.org/{{ page_url }}" rel="nofollow" hreflang="{{lc}}" title="{{html_short_title}} in {{lang}}">{{lang}}</a></li>
4721
{% endfor -%}
4822
</ul>

0 commit comments

Comments
 (0)