Skip to content
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

Documentation en francais #55

Merged
merged 10 commits into from
Dec 11, 2023
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ instance/

# Sphinx documentation
docs/_build/
docs/apidoc/modules.rst
docs/apidoc/xhydro*.rst

# PyBuilder
target/
Expand Down
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ build:
jobs:
pre_build:
- sphinx-apidoc -o docs/apidoc --private --module-first xhydro
- sphinx-build -M gettext docs docs/_build

conda:
environment: environment-dev.yml
Expand Down
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog
=========


v0.4.0 (unreleased)
-------------------
Contributors to this version: Trevor James Smith (:user:`Zeitsperre`).

New features and enhancements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Added French language support to the documentation. (:issue:`53`, :pull:`55`).

v0.3.0 (2023-12-01)
-------------------
Contributors to this version: Gabriel Rondeau-Genesse (:user:`RondeauG`), Trevor James Smith (:user:`Zeitsperre`).
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ endef
export PRINT_HELP_PYSCRIPT

BROWSER := python -c "$$BROWSER_PYSCRIPT"
LOCALES := docs/locales

help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
Expand Down Expand Up @@ -78,13 +79,21 @@ coverage: ## check code coverage quickly with the default Python
autodoc: clean-docs ## create sphinx-apidoc files:
sphinx-apidoc -o docs/apidoc --private --module-first xhydro

initialize-translations: clean-docs ## initialize translations, ignoring autodoc-generated files
${MAKE} -C docs gettext
sphinx-intl update -p docs/_build/gettext -d docs/locales -l fr

linkcheck: autodoc ## run checks over all external links found throughout the documentation
$(MAKE) -C docs linkcheck

docs: autodoc ## generate Sphinx HTML documentation, including API docs
$(MAKE) -C docs html
$(MAKE) -C docs html BUILDDIR="_build/html/en"
ifneq ("$(wildcard $(LOCALES))","")
${MAKE} -C docs gettext
$(MAKE) -C docs html BUILDDIR="_build/html/fr" SPHINXOPTS="-D language='fr'"
endif
ifndef READTHEDOCS
$(BROWSER) docs/_build/html/index.html
$(BROWSER) docs/_build/html/en/html/index.html
endif

servedocs: docs ## compile the docs watching for changes
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
# Usually you set "language" from the command line for these cases.
language = "en"

# Set the locales
locale_dirs = ["locales"]
gettext_compact = False

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
Expand Down
64 changes: 64 additions & 0 deletions docs/locales/fr/LC_MESSAGES/authors.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2023, Thomas-Charles Fortier Filion
# This file is distributed under the same license as the xHydro package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: xHydro 0.3.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-08 12:18-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: fr\n"
"Language-Team: fr <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.12.1\n"

#: ../../../AUTHORS.rst:3
msgid "Credits"
msgstr ""

#: ../../../AUTHORS.rst:6
msgid "Development Lead"
msgstr ""

#: ../../../AUTHORS.rst:8
msgid ""
"Thomas-Charles Fortier Filion <tcff_hydro@outlook.com> `@TC-FF "
"<https://github.com/TC-FF>`_"
msgstr ""

#: ../../../AUTHORS.rst:11
msgid "Co-Developers"
msgstr ""

#: ../../../AUTHORS.rst:13
msgid ""
"Trevor James Smith <smith.trevorj@ouranos.ca> `@Zeitsperre "
"<https://github.com/Zeitsperre>`_"
msgstr ""

#: ../../../AUTHORS.rst:14
msgid ""
"Gabriel Rondeau-Genesse <rondeau-genesse.gabriel@ouranos.ca> `@RondeauG "
"<https://github.com/RondeauG>`_"
msgstr ""

#: ../../../AUTHORS.rst:15
msgid ""
"Sébastien Langlois `@sebastienlanglois "
"<https://github.com/sebastienlanglois>`_"
msgstr ""

#: ../../../AUTHORS.rst:18
msgid "Contributors"
msgstr ""

#: ../../../AUTHORS.rst:20
msgid "None yet. Why not be the first?"
msgstr ""
Loading