Skip to content

Commit

Permalink
Add languages
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Mar 27, 2021
1 parent 5253fd4 commit ae7cf54
Show file tree
Hide file tree
Showing 90 changed files with 3,540 additions and 1,621 deletions.
14 changes: 7 additions & 7 deletions BUILD_HOWTO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ Requirements
~~~~~~~~~~~~

There are some extra requirements to build the docs: you will need to
have ``sphinx``, ``sphinx_rtd_theme``, ``numpydoc`` and ``ipython`` installed.
have ``sphinx``, ``sphinx-book-theme``, ``numpydoc`` and ``ipython`` installed.

If you have a conda environment, you can install the extra
requirements with::

conda install sphinx sphinx_rtd_theme ipython numpydoc sphinx-intl
conda install sphinx sphinx-book-theme ipython numpydoc sphinx-intl

If you use pip, activate your python environment and install the requirements
with::

pip install sphinx sphinx_rtd_theme ipython numpydoc sphinx-intl
pip install sphinx sphinx-book-theme ipython numpydoc sphinx-intl


Building the documentation
Expand Down Expand Up @@ -67,7 +67,7 @@ Update the translation files
OGGM-Edu is available in other languages (although almost nothing is translated yet).

Each time OGGM-Edu is updated in english, it is wize to also update the translation
files (`.po`) files. After a regular `make html` build, simply run the `translate.sh`
files (`.po`) files. After a `make html` build, simply run the `translate.sh`
script from the same `oggm-edu/docs` folder: it will update the `.po` files
accordingly.

Expand All @@ -77,12 +77,12 @@ Build the website in one of the available languages

German::

sphinx-build -b html -D language=de . _build/de
sphinx-build -b html -t language_de . _build/de

French::

sphinx-build -b html -D language=fr . _build/fr
sphinx-build -b html -t language_fr . _build/fr

Spanish::

sphinx-build -b html -D language=es . _build/es
sphinx-build -b html -t language_es . _build/es
10 changes: 5 additions & 5 deletions docs/classes_howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ high school level (using the web applications) and at the university level
(using the programmable notebooks). You will find some help to get you started
below.

Using the OGGM-Edu web apps at the highschool level
---------------------------------------------------
Using the OGGM-Edu web apps at the high school level
----------------------------------------------------

OGGM-Edu can be used to organize a 2 to 4 hours class, possibly even
longer. It could be organized as such:
Expand Down Expand Up @@ -46,8 +46,8 @@ short notebook. In a second session (after an hour or so),
summarize the usual pitfalls:

- recognize that notebooks are actual files (not something magical on browser)
- aknowledge that the order of execution of cells matter
- aknowledge that errors in cell execution are OK and can be recovered from
- acknowledge that the order of execution of cells matter
- acknowledge that errors in cell execution are OK and can be recovered from
- show how to restart with a fresh notebook
- encourage the use of keyboard shortcuts (such as `[shift+enter]` and
`[ctrl+m] + key`)
Expand Down Expand Up @@ -76,7 +76,7 @@ in mentoring each other than we are.
Implementation
--------------

Ready to give it a go? You will find more information in the pages below:
Ready to give OGGM-Edu a go? You will find more information in the pages below:

.. toctree::
:maxdepth: 1
Expand Down
64 changes: 51 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'
# https://stackoverflow.com/questions/55808716/sphinx-documentation-translation-i18n-of-conf-py-variables
# sphinx-build -b html -t language_de . _build/de
for t in tags:
if t.startswith('language_'):
language = t[9:]


# Options for internationalization
Expand All @@ -95,10 +100,11 @@


# For local builds we have to parse the current language
READTHEDOCS_LANGUAGE = os.environ.get('READTHEDOCS_LANGUAGE', 'en')
READTHEDOCS_LANGUAGE = os.environ.get('READTHEDOCS_LANGUAGE', language)
SPHINXOPTS = os.environ.get('SPHINXOPTS', None)
if SPHINXOPTS is not None and 'language=' in SPHINXOPTS:
READTHEDOCS_LANGUAGE = SPHINXOPTS.split('language=')[-1]
language = READTHEDOCS_LANGUAGE

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -144,16 +150,48 @@
# a list of builtin themes.
html_theme = 'sphinx_book_theme'


extra_navbar = """<p align="left"><strong>License</strong></p>
<p align="left">
<a href="default.asp">
<img alt="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg">
</a>
</p>
<p align="left">Unless specified otherwise, the content of OGGM-Edu is shared
under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International</a> license.</p>
"""
if READTHEDOCS_LANGUAGE == 'de':
extra_navbar = """<p align="left"><strong>Licenz</strong></p>
<p align="left">
<a href="default.asp">
<img alt="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg">
</a>
</p>
<p align="left">Falls nicht anders festgelegt, ist der Inhalt von OGGM-Edu unter einer
<a href="https://creativecommons.org/licenses/by/4.0/deed.de">Creative Commons Attribution 4.0 International</a>-Lizenz geteilt.</p>
"""
toc_title = "Auf dieser Seite"
elif READTHEDOCS_LANGUAGE == 'fr':
extra_navbar = """<p align="left"><strong>License</strong></p>
<p align="left">
<a href="default.asp">
<img alt="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg">
</a>
</p>
<p align="left">Sauf indication contraire, le contenu de OGGM-Edu est partagé avec une license <a href="https://creativecommons.org/licenses/by/4.0/deed.fr">Creative Commons Attribution 4.0 International</a>.</p>
"""
toc_title = "Sur cette page"
elif READTHEDOCS_LANGUAGE == 'es':
extra_navbar = """<p align="left"><strong>Licencia</strong></p>
<p align="left">
<a href="default.asp">
<img alt="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg">
</a>
</p>
<p align="left">A menos que se especifique lo contrario, el contenido de OGGM-Edu se comparte con una licencia <a href="https://creativecommons.org/licenses/by/4.0/deed.es">Creative Commons Attribution 4.0 International</a>.</p>
"""
toc_title = "En esta página"
else:
extra_navbar = """<p align="left"><strong>License</strong></p>
<p align="left">
<a href="default.asp">
<img alt="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg" src="https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/by.svg">
</a>
</p>
<p align="left">Unless specified otherwise, the content of OGGM-Edu is shared
under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International</a> license.</p>
"""
toc_title = "On this page"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -165,7 +203,7 @@
"use_edit_page_button": True,
"path_to_docs": "docs",
"home_page_in_toc": True,
"toc_title": "On this page",
"toc_title": toc_title,
"extra_navbar": extra_navbar,
}

Expand Down
8 changes: 4 additions & 4 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ High school activity sheets
---------------------------

Here are examples of suggested activities developed by Josie Lino, a
high school student who did an internship with us. They and have not yet
been tested in class. Feel free to adapt from them, and send us your
suggestions!
high school student who wrote them during a short internship with us.
They have not yet been tested in class.
Feel free to adapt from them, and send us your suggestions!

- :ref:`as_gallery`
- :ref:`as_simulator`

We don't have examples for the Glacier Explorer app yet. Send us some! Or
We don't have examples for the Glacier Explorer app yet. Send us one! Or
check out `this twitter thread <https://twitter.com/OGGM_org/status/1359450122451619842>`_
for some inspiration.
54 changes: 27 additions & 27 deletions docs/locale/de/LC_MESSAGES/activity_sheets/as_gallery.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,40 @@ msgid ""
msgstr ""
"Project-Id-Version: OGGM-Edu 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-14 13:17+0200\n"
"POT-Creation-Date: 2021-03-26 12:05+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.5.3\n"
"Generated-By: Babel 2.8.0\n"

#: ../../activity_sheets/as_gallery.rst:4
#: ../../activity_sheets/as_gallery.rst:6
msgid "Lesson plan 1: Glacier Gallery"
msgstr ""

#: ../../activity_sheets/as_gallery.rst
msgid "Author"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:7
#: ../../activity_sheets/as_gallery.rst:9
msgid "Josie Lino"
msgstr ""

#: ../../activity_sheets/as_gallery.rst
msgid "Grades"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:9
#: ../../activity_sheets/as_gallery.rst:11
msgid "High school students"
msgstr ""

#: ../../activity_sheets/as_gallery.rst
msgid "Brief Description"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:11
#: ../../activity_sheets/as_gallery.rst:13
msgid ""
"Utilizing the interactive app :ref:`gallery` provided by OGGM-Edu, "
"students will be introduced to glaciers and their forms."
Expand All @@ -51,53 +51,53 @@ msgstr ""
msgid "Objectives"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:14
#: ../../activity_sheets/as_gallery.rst:17
msgid "Upon completion of this lesson, students will be able to:"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:16
#: ../../activity_sheets/as_gallery.rst:17
msgid "Identify the standard definition of a glacier"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:17
#: ../../activity_sheets/as_gallery.rst:18
msgid "Compare and contrast the four glacier types presented in the app"
msgstr ""

#: ../../activity_sheets/as_gallery.rst
msgid "Materials Needed"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:20
#: ../../activity_sheets/as_gallery.rst:21
msgid ""
"Computer with access to OGGM-Edu (possibly one computer per group of 2 or"
" 3)"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:21
#: ../../activity_sheets/as_gallery.rst:22
msgid "A writing utensil and paper"
msgstr ""

#: ../../activity_sheets/as_gallery.rst
msgid "Lesson Plan"
msgstr ""

#: ../../activity_sheets/as_gallery.rst:25
#: ../../activity_sheets/as_gallery.rst:26
msgid ""
"Brainstorm with students to discern what they know about glaciers. This "
"could entail asking students to individually write down their initial "
"definition of a glacier, or collaboratively create a mind-map that lists "
"the characteristics of a glacier."
msgstr ""

#: ../../activity_sheets/as_gallery.rst:28
#: ../../activity_sheets/as_gallery.rst:29
msgid ""
"Open the Glacier Gallery app and highlight the definition of a glacier "
"defined by OGGM-Edu. Emphasize that a glacier is a perennial land-mass of"
" ice, and highlight the differences between the student-provided "
"definition against the OGGM-Edu provided definition of a glacier."
msgstr ""

#: ../../activity_sheets/as_gallery.rst:32
#: ../../activity_sheets/as_gallery.rst:33
msgid ""
"Provide short instruction on how to use the Glacier Gallery. Ask students"
" to independently (either alone or in small groups) to create a visual "
Expand All @@ -106,32 +106,32 @@ msgid ""
"time to work and occasionally offer your assistance when asked or needed."
msgstr ""

#: ../../activity_sheets/as_gallery.rst:37
#: ../../activity_sheets/as_gallery.rst:38
msgid ""
"If not rushed for time, ask students to individually present their "
"findings. Otherwise, create your own compare-and-contrast visualization "
"method and use student-input to fill it in."
msgstr ""

#: ../../activity_sheets/as_gallery.rst:39
#: ../../activity_sheets/as_gallery.rst:40
msgid ""
"Summarize the key differences between the four glacier types in a method "
"that would allow students to take notes."
msgstr ""

#: ../../activity_sheets/as_gallery.rst:40
#: ../../activity_sheets/as_gallery.rst:41
msgid "For the remainder of the lesson, ask students to ask questions."
msgstr ""

#: ../../<rst_epilog>:3
msgid "**License**"
msgstr ""
#~ msgid "**License**"
#~ msgstr ""

#: ../../<rst_epilog>:8
msgid ""
"*Unless specified otherwise (e.g. certain images, links...), the content "
"of this page is shared under a* `Creative Commons Attribution 4.0 "
"International <https://creativecommons.org/licenses/by/4.0/>`_ *license "
"(CC BY 4.0).*"
msgstr ""
#~ msgid ""
#~ "*Unless specified otherwise (e.g. certain "
#~ "images, links...), the content of this"
#~ " page is shared under a* `Creative"
#~ " Commons Attribution 4.0 International "
#~ "<https://creativecommons.org/licenses/by/4.0/>`_ *license "
#~ "(CC BY 4.0).*"
#~ msgstr ""

0 comments on commit ae7cf54

Please sign in to comment.