Skip to content
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
16 changes: 8 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
properdocs/contrib/search/lunr-language/** linguist-vendored
properdocs/themes/mkdocs/js/** linguist-vendored
properdocs/themes/mkdocs/js/base.js linguist-vendored=false
properdocs/themes/mkdocs/css/** linguist-vendored
properdocs/themes/mkdocs/css/base.css linguist-vendored=false
properdocs/themes/readthedocs/js/** linguist-vendored
properdocs/themes/readthedocs/js/theme.js linguist-vendored=false
properdocs/themes/readthedocs/css/** linguist-vendored
properdocs/themes/readthedocs/css/theme_extra.css linguist-vendored=false
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/js/** linguist-vendored
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/js/base.js linguist-vendored=false
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/css/** linguist-vendored
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/css/base.css linguist-vendored=false
packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/js/** linguist-vendored
packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/js/theme.js linguist-vendored=false
packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/css/** linguist-vendored
packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/css/theme_extra.css linguist-vendored=false
docs/img/plugin-events.svg linguist-generated
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Check packaged files
shell: bash -e -x {0}
run: |
expected_wheel=(-eproperdocs/{templates/sitemap.xml,config/base.py,py.typed,contrib/search/lunr-language/lunr.nl.js,themes/{mkdocs,readthedocs}/{base.html,locales/{de,es}/LC_MESSAGES/messages.mo}})
expected_sdist=("${expected_wheel[@]}" -e{pyproject.toml,hatch_build.py})
expected_wheel=(-eproperdocs/{templates/sitemap.xml,config/base.py,py.typed,contrib/search/lunr-language/lunr.nl.js})
expected_sdist=("${expected_wheel[@]}" -epyproject.toml)
test "$(tar -ztf dist/properdocs-*.tar.gz | grep -F "${expected_sdist[@]}" | tee /dev/stderr | wc -l)" -eq "${#expected_sdist[@]}"
test "$(unzip -l dist/properdocs-*any.whl | grep -F "${expected_wheel[@]}" | tee /dev/stderr | wc -l)" -eq "${#expected_wheel[@]}"
10 changes: 5 additions & 5 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
properdocs/themes/**/js/jquery-**.min.js
properdocs/themes/mkdocs/js/highlight.pack.js
properdocs/themes/mkdocs/js/bootstrap.bundle.min.js
properdocs/themes/mkdocs/js/modernizr-**.min.js
properdocs/themes/readthedocs/js/theme.js
properdocs/themes/readthedocs/js/html5shiv.min.js
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/js/highlight.pack.js
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/js/bootstrap.bundle.min.js
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/js/modernizr-**.min.js
packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/js/theme.js
packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/js/html5shiv.min.js
properdocs/contrib/search/templates/search/lunr.js
properdocs/contrib/search/lunr-language/lunr.**.js
properdocs/contrib/search/lunr-language/tinyseg.js
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ updated by running the `extract_messages` command. To update the
`pot` file for both built-in themes, run these commands:

```bash
pybabel extract --project=ProperDocs --copyright-holder=ProperDocs --msgid-bugs-address='https://github.com/properdocs/properdocs/issues' --no-wrap --version="$(hatch version)" --mapping-file properdocs/themes/babel.cfg --output-file properdocs/themes/mkdocs/messages.pot properdocs/themes/mkdocs
pybabel extract --project=ProperDocs --copyright-holder=ProperDocs --msgid-bugs-address='https://github.com/properdocs/properdocs/issues' --no-wrap --version="$(hatch version)" --mapping-file properdocs/themes/babel.cfg --output-file properdocs/themes/readthedocs/messages.pot properdocs/themes/readthedocs
(cd packages/properdocs-theme-mkdocs/ && \
pybabel extract --copyright-holder=ProperDocs --msgid-bugs-address='https://github.com/properdocs/properdocs/issues' --no-wrap --version="$(hatch version)" --mapping-file babel.cfg --output-file properdocs_theme_mkdocs/messages.pot properdocs_theme_mkdocs
)
(cd packages/properdocs-theme-readthedocs/ && \
pybabel extract --copyright-holder=ProperDocs --msgid-bugs-address='https://github.com/properdocs/properdocs/issues' --no-wrap --version="$(hatch version)" --mapping-file babel.cfg --output-file properdocs_theme_readthedocs/messages.pot properdocs_theme_readthedocs
)
```

The updated `pot` file should be included in a PR with the updated template.
Expand Down
16 changes: 8 additions & 8 deletions docs/dev-guide/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ In particular, the way to know that the `pt` language should be disambiguated as
So, if we pick `es` (Spanish) as our example language code, to add a translation for it to both built-in themes, run these commands:

```bash
pybabel init --input-file properdocs/themes/mkdocs/messages.pot --output-dir properdocs/themes/mkdocs/locales -l es
pybabel init --input-file properdocs/themes/readthedocs/messages.pot --output-dir properdocs/themes/readthedocs/locales -l es
pybabel init --input-file packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/messages.pot --output-dir packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/locales -l es
pybabel init --input-file packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/messages.pot --output-dir packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/locales -l es
```

The above command will create a file structure as follows:

```text
properdocs/themes/mkdocs/locales
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/locales
├── es
│   └── LC_MESSAGES
│   └── messages.po
Expand Down Expand Up @@ -141,8 +141,8 @@ for.
To update the `fr` translation catalog of both built-in themes, use the following commands:

```bash
pybabel update --ignore-obsolete --input-file properdocs/themes/mkdocs/messages.pot --output-dir properdocs/themes/mkdocs/locales -l fr
pybabel update --ignore-obsolete --input-file properdocs/themes/readthedocs/messages.pot --output-dir properdocs/themes/readthedocs/locales -l fr
pybabel update --ignore-obsolete --input-file packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/messages.pot --output-dir packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/locales -l fr
pybabel update --ignore-obsolete --input-file packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/messages.pot --output-dir packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/locales -l fr
```

You can now move on to the next step and [add a translation] for every updated
Expand Down Expand Up @@ -174,14 +174,14 @@ files of your theme into `messages.mo` files. The following commands will compil
the `es` translation for both built-in themes:

```bash
pybabel compile --statistics --directory properdocs/themes/mkdocs/locales -l es
pybabel compile --statistics --directory properdocs/themes/readthedocs/locales -l es
pybabel compile --statistics --directory packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/locales -l es
pybabel compile --statistics --directory packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/locales -l es
```

The above command results in the following file structure:

```text
properdocs/themes/mkdocs/locales
packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/locales
├── es
│   └── LC_MESSAGES
│   ├── messages.mo
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/choosing-your-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ supports the following options:
The following locales are supported by this theme:

* `en`: English (default)
* (see the list of existing directories `properdocs/themes/mkdocs/locales/*/`)
* (see the list of existing directories `packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs/locales/*/`)

See the guide on [localizing your theme] for more information.

Expand Down Expand Up @@ -203,7 +203,7 @@ theme supports the following options:
The following locales are supported by this theme:

* `en`: English (default)
* (see the list of existing directories `properdocs/themes/readthedocs/locales/*/`)
* (see the list of existing directories `packages/properdocs-theme-readthedocs/properdocs_theme_readthedocs/locales/*/`)

See the guide on [localizing your theme] for more information.

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/customizing-your-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ any additional CSS files included in the `custom_dir`.
[custom_dir]: ./configuration.md#custom_dir
[name]: ./configuration.md#name
[mkdocs]: ./choosing-your-theme.md#mkdocs
[browse source]: https://github.com/properdocs/properdocs/tree/master/properdocs/themes/mkdocs
[browse source]: https://github.com/properdocs/properdocs/tree/master/packages/properdocs-theme-mkdocs/properdocs_theme_mkdocs
[Template Variables]: ../dev-guide/themes.md#template-variables
[Jinja documentation]: https://jinja.palletsprojects.com/en/latest/templates/#template-inheritance
[super block]: https://jinja.palletsprojects.com/en/latest/templates/#super-blocks
Expand Down
26 changes: 26 additions & 0 deletions packages/properdocs-theme-mkdocs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright © 2014-present, Tom Christie. All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:

Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class CustomBuildHook(BuildHookInterface):
def initialize(self, version, build_data):
from babel.messages.frontend import compile_catalog

for theme in 'mkdocs', 'readthedocs':
cmd = compile_catalog()
cmd.directory = os.path.join('properdocs', 'themes', theme, 'locales')
cmd.finalize_options()
cmd.run()
cmd = compile_catalog()
cmd.directory = os.path.join('properdocs_theme_mkdocs', 'locales')
cmd.finalize_options()
cmd.run()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '1.6.1'
Original file line number Diff line number Diff line change
Expand Up @@ -17,86 +17,86 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.14.0\n"

#: properdocs/themes/mkdocs/404.html:8
#: properdocs_theme_mkdocs/404.html:8
msgid "Page not found"
msgstr "Seite nicht gefunden"

#: properdocs/themes/mkdocs/base.html:117
#: properdocs/themes/mkdocs/keyboard-modal.html:31
#: properdocs/themes/mkdocs/search-modal.html:5
#: properdocs_theme_mkdocs/base.html:117
#: properdocs_theme_mkdocs/keyboard-modal.html:31
#: properdocs_theme_mkdocs/search-modal.html:5
msgid "Search"
msgstr "Suche"

#: properdocs/themes/mkdocs/base.html:127
#: properdocs_theme_mkdocs/base.html:127
msgid "Previous"
msgstr "Zurück"

#: properdocs/themes/mkdocs/base.html:132
#: properdocs_theme_mkdocs/base.html:132
msgid "Next"
msgstr "Weiter"

#: properdocs/themes/mkdocs/base.html:143 properdocs/themes/mkdocs/base.html:145
#: properdocs/themes/mkdocs/base.html:147 properdocs/themes/mkdocs/base.html:149
#: properdocs_theme_mkdocs/base.html:143 properdocs_theme_mkdocs/base.html:145
#: properdocs_theme_mkdocs/base.html:147 properdocs_theme_mkdocs/base.html:149
#, python-format
msgid "Edit on %(repo_name)s"
msgstr "Bearbeiten auf %(repo_name)s"

#: properdocs/themes/mkdocs/base.html:151
#: properdocs_theme_mkdocs/base.html:151
msgid "Edit"
msgstr "Bearbeiten"

#: properdocs/themes/mkdocs/base.html:225
#: properdocs_theme_mkdocs/base.html:225
#, python-format
msgid "Documentation built with %(properdocs_link)s."
msgstr "Diese Dokumentation wurde erstellt mit %(properdocs_link)s."

#: properdocs/themes/mkdocs/keyboard-modal.html:5
#: properdocs_theme_mkdocs/keyboard-modal.html:5
msgid "Keyboard Shortcuts"
msgstr "Tastenkombinationen"

#: properdocs/themes/mkdocs/keyboard-modal.html:6
#: properdocs/themes/mkdocs/search-modal.html:6
#: properdocs_theme_mkdocs/keyboard-modal.html:6
#: properdocs_theme_mkdocs/search-modal.html:6
msgid "Close"
msgstr "Schließen"

#: properdocs/themes/mkdocs/keyboard-modal.html:12
#: properdocs_theme_mkdocs/keyboard-modal.html:12
msgid "Keys"
msgstr "Taste"

#: properdocs/themes/mkdocs/keyboard-modal.html:13
#: properdocs_theme_mkdocs/keyboard-modal.html:13
msgid "Action"
msgstr "Aktion"

#: properdocs/themes/mkdocs/keyboard-modal.html:19
#: properdocs_theme_mkdocs/keyboard-modal.html:19
msgid "Open this help"
msgstr "Diese Hilfe anzeigen"

#: properdocs/themes/mkdocs/keyboard-modal.html:23
#: properdocs_theme_mkdocs/keyboard-modal.html:23
msgid "Next page"
msgstr "Nächste Seite"

#: properdocs/themes/mkdocs/keyboard-modal.html:27
#: properdocs_theme_mkdocs/keyboard-modal.html:27
msgid "Previous page"
msgstr "Vorherige Seite"

#: properdocs/themes/mkdocs/search-modal.html:9
#: properdocs_theme_mkdocs/search-modal.html:9
msgid "From here you can search these documents. Enter your search terms below."
msgstr ""
"Von hier aus können Sie diese Dokumente durchsuchen. Geben Sie unten Ihre"
" Suchanfrage ein."

#: properdocs/themes/mkdocs/search-modal.html:12
#: properdocs_theme_mkdocs/search-modal.html:12
msgid "Search..."
msgstr "Suche..."

#: properdocs/themes/mkdocs/search-modal.html:12
#: properdocs_theme_mkdocs/search-modal.html:12
msgid "Type search term here"
msgstr "Geben Sie hier ihre Suchanfrage ein"

#: properdocs/themes/mkdocs/search-modal.html:15
#: properdocs_theme_mkdocs/search-modal.html:15
msgid "No results found"
msgstr "Keine Ergebnisse gefunden"

#: properdocs/themes/mkdocs/toc.html:3
#: properdocs_theme_mkdocs/toc.html:3
msgid "Table of Contents"
msgstr "Inhaltsverzeichnis"
Original file line number Diff line number Diff line change
Expand Up @@ -17,86 +17,86 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.14.0\n"

#: properdocs/themes/mkdocs/404.html:8
#: properdocs_theme_mkdocs/404.html:8
msgid "Page not found"
msgstr "Página no encontrada"

#: properdocs/themes/mkdocs/base.html:117
#: properdocs/themes/mkdocs/keyboard-modal.html:31
#: properdocs/themes/mkdocs/search-modal.html:5
#: properdocs_theme_mkdocs/base.html:117
#: properdocs_theme_mkdocs/keyboard-modal.html:31
#: properdocs_theme_mkdocs/search-modal.html:5
msgid "Search"
msgstr "Buscar"

#: properdocs/themes/mkdocs/base.html:127
#: properdocs_theme_mkdocs/base.html:127
msgid "Previous"
msgstr "Anterior"

#: properdocs/themes/mkdocs/base.html:132
#: properdocs_theme_mkdocs/base.html:132
msgid "Next"
msgstr "Siguiente"

#: properdocs/themes/mkdocs/base.html:143 properdocs/themes/mkdocs/base.html:145
#: properdocs/themes/mkdocs/base.html:147 properdocs/themes/mkdocs/base.html:149
#: properdocs_theme_mkdocs/base.html:143 properdocs_theme_mkdocs/base.html:145
#: properdocs_theme_mkdocs/base.html:147 properdocs_theme_mkdocs/base.html:149
#, python-format
msgid "Edit on %(repo_name)s"
msgstr "Editar en %(repo_name)s"

#: properdocs/themes/mkdocs/base.html:151
#: properdocs_theme_mkdocs/base.html:151
msgid "Edit"
msgstr "Editar"

#: properdocs/themes/mkdocs/base.html:225
#: properdocs_theme_mkdocs/base.html:225
#, python-format
msgid "Documentation built with %(properdocs_link)s."
msgstr "Documentación construida con %(properdocs_link)s."

#: properdocs/themes/mkdocs/keyboard-modal.html:5
#: properdocs_theme_mkdocs/keyboard-modal.html:5
msgid "Keyboard Shortcuts"
msgstr "Atajos de teclado"

#: properdocs/themes/mkdocs/keyboard-modal.html:6
#: properdocs/themes/mkdocs/search-modal.html:6
#: properdocs_theme_mkdocs/keyboard-modal.html:6
#: properdocs_theme_mkdocs/search-modal.html:6
msgid "Close"
msgstr "Cerrar"

#: properdocs/themes/mkdocs/keyboard-modal.html:12
#: properdocs_theme_mkdocs/keyboard-modal.html:12
msgid "Keys"
msgstr "Teclas"

#: properdocs/themes/mkdocs/keyboard-modal.html:13
#: properdocs_theme_mkdocs/keyboard-modal.html:13
msgid "Action"
msgstr "Acción"

#: properdocs/themes/mkdocs/keyboard-modal.html:19
#: properdocs_theme_mkdocs/keyboard-modal.html:19
msgid "Open this help"
msgstr "Abrir esta ayuda"

#: properdocs/themes/mkdocs/keyboard-modal.html:23
#: properdocs_theme_mkdocs/keyboard-modal.html:23
msgid "Next page"
msgstr "Página siguiente"

#: properdocs/themes/mkdocs/keyboard-modal.html:27
#: properdocs_theme_mkdocs/keyboard-modal.html:27
msgid "Previous page"
msgstr "Página anterior"

#: properdocs/themes/mkdocs/search-modal.html:9
#: properdocs_theme_mkdocs/search-modal.html:9
msgid "From here you can search these documents. Enter your search terms below."
msgstr ""
"Desde aquí puede buscar estos documentos. Ingrese sus términos de "
"búsqueda a continuación."

#: properdocs/themes/mkdocs/search-modal.html:12
#: properdocs_theme_mkdocs/search-modal.html:12
msgid "Search..."
msgstr "Buscando..."

#: properdocs/themes/mkdocs/search-modal.html:12
#: properdocs_theme_mkdocs/search-modal.html:12
msgid "Type search term here"
msgstr "Escriba el término de búsqueda aquí"

#: properdocs/themes/mkdocs/search-modal.html:15
#: properdocs_theme_mkdocs/search-modal.html:15
msgid "No results found"
msgstr "No se encontraron resultados"

#: properdocs/themes/mkdocs/toc.html:3
#: properdocs_theme_mkdocs/toc.html:3
msgid "Table of Contents"
msgstr "Tabla de contenidos"
Loading
Loading