From ea8988043c544a4d4c807d57b3cd39720a5822a5 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Sat, 1 Apr 2017 08:35:43 -0400 Subject: [PATCH 01/35] Updated .gitignore file --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index e612dcf4d..a863e5cf8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,7 @@ dist/ bower_components/ node_modules/ npm-debug.log +bin/ +include/ +lib/ +local/ \ No newline at end of file From 7dadea51728d1bcb6e9f54f95ce5a5bcb22a098e Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Sat, 1 Apr 2017 08:59:46 -0400 Subject: [PATCH 02/35] Added i18n support using Babel and Spanish translation --- MANIFEST.in | 5 + README.rst | 2 + babel.cfg | 10 ++ locale/es/LC_MESSAGES/sphinx.mo | Bin 0 -> 3438 bytes locale/es/LC_MESSAGES/sphinx.po | 190 ++++++++++++++++++++++++++++++++ locale/sphinx.pot | 170 ++++++++++++++++++++++++++++ setup.cfg | 20 ++++ setup.py | 10 ++ 8 files changed, 407 insertions(+) create mode 100644 babel.cfg create mode 100644 locale/es/LC_MESSAGES/sphinx.mo create mode 100644 locale/es/LC_MESSAGES/sphinx.po create mode 100644 locale/sphinx.pot diff --git a/MANIFEST.in b/MANIFEST.in index 1e6a2ebd3..f8e746404 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,9 @@ include *.txt +include babel.cfg include LICENSE +recursive-include locale *.mo +recursive-include locale *.pot +recursive-include locale *.po recursive-include sphinx_rtd_theme *.conf recursive-include sphinx_rtd_theme *.css recursive-include sphinx_rtd_theme *.eot @@ -9,3 +13,4 @@ recursive-include sphinx_rtd_theme *.svg recursive-include sphinx_rtd_theme *.ttf recursive-include sphinx_rtd_theme *.woff recursive-include sphinx_rtd_theme *.woff2 +prune build \ No newline at end of file diff --git a/README.rst b/README.rst index e45fab846..8b952af1f 100644 --- a/README.rst +++ b/README.rst @@ -105,6 +105,8 @@ Changelog master ------ +* Added Spanish translation +* Added i18n support using Babel * Include fontawesome-webfont.woff2 in pip package * Updated wyrm_ and Font Awesome * Split multiple data types on different lines diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 000000000..34f66b18e --- /dev/null +++ b/babel.cfg @@ -0,0 +1,10 @@ +# How setup this file +# http://babel.edgewall.org/wiki/Documentation/setup.html +# this file description: +# http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration + +# Extraction from Jinja2 HTML templates +[jinja2: **/**.html] +encoding = utf-8 +ignore_tags = script,style +include_attrs = alt title summary \ No newline at end of file diff --git a/locale/es/LC_MESSAGES/sphinx.mo b/locale/es/LC_MESSAGES/sphinx.mo new file mode 100644 index 0000000000000000000000000000000000000000..b9337464a2351dfdfbe10f12c166d085d394f8a0 GIT binary patch literal 3438 zcmcJR-)kL36vs!cRj*a5Rz$6I8mT7W-rU4c!_5zyUu`2v8gf&iPzbZTlfBdK-MO8a zy~!;IKKW4bL7||Jd90uaL7_qL;TC+8{slhxyEj4gt1gZN|DaH0MN_!9Uj_#*gKn_J)|w0{7f1`D{H1doCRa2UiRHUS<5r@>jU z0zM0V4ITlvK=S8%knH~mJ`dgj-vsZ1H2yD;?EC}X01so*E#%-!@DsGhFvtgQgQMVa zI8Sk31do9!NcL}lzk=U@_+tXjQruTT^7}R})PDzj1^f-9b^mDdZ!kvt5S)AlyatxQ zCP;pNiwpVt6G-!Z0hhqL?fw%8n(X$2w9YvA26z^vJPYtO(6*m{4!(uhU?23di( zf8(|;5+20D+KE0tRdLui*?q|QH1+Iij|*Nka($xjRDU*jEj96g?VId0RXAYB2gPKu zJ7;{5R_NF~VBtX5YRc_dc||sqRXXA0fes}W$j6ZRtmD8H-U)QQImUN+S{JTLPR`(g zQBl>Ahny_7+XJ@9+S9sY_CKHUb?UgQN-KG&gR~|SXIYk?9FA`&SM9A^b*^3>MD$ga zYw==eNHRqr@>X}x;^KVJD>Wyn+w8cXN~M-npd@Tl&k}TMbbs7N@3!Cwpu;mICD<0;d`< z!#@%YQ3;Hyqfj)LiST2Y<=RSNf@*tDtfvVk=tRWIHH&Q7pwe|}aig!u!143CCRrt$ z(FT^aX^e8qd#V1q_f&L>yr)j5Tr3AH`#66KxKVP0*F_|`)u{<2y9Dsu9UiKXC))9v za6y%eq}eO%B5%i56IU@eH57+%T*NWo&?dB8pv%@}9HU+WZ45k*n=nGfg@H|-zT3bE z8RG$l$V8`6l?O;uq>YkDZ#!OZKJ?oDmSK^0ORvs(sW@C5DXhr4HqKkLkqW)(G_u~R zF7vs?sriL7Q?s)xbCpVA`NFD~6);lk&0?K0A1)1j;FaF@hEMaMq4LOxR~jjmFwpB9 zF83KXS{^CoTl1DyLRqIZlm;y|dcXY?&wZtZ65P$9R4_(Vy^>6MSf(usFXs z*Gtz>u~eARiNjgstv2ge$e~aN>#cXImgs-46$UrPOsZK6Bp~%1J z5VzmjvDZ==iXxlBDPoj1Y`L`+sYFm(a6&h6d}}t{8OL%ZLMWC7z;4$BzJ=)J^y-{G zi?W_9$ot3>Y99wbulE)VTHB$DG@QjNf(WKP^H3^m4}~DGF71;9M^|en*|i=-YgbOJ z#AB0vu1Ss{A<3bza2fAd#KJeY!NzRe!sl, 2017. +# Leonardo Caballero , 2017. +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.2.4\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2017-03-26 11:44-0400\n" +"PO-Revision-Date: 2017-03-26 18:40-0400\n" +"Last-Translator: Leonardo Caballero \n" +"Language-Team: Spanish Team\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Generated-By: Babel 2.4.0\n" + +#: sphinx_rtd_theme/breadcrumbs.html:31 +msgid "Docs" +msgstr "Documentos" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "Editar en GitHub" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "Editar en Bitbucket" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "Editar en GitLab" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "Ver página de código fuente" + +#: sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "Próximo" + +#: sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "Anterior" + +#: sphinx_rtd_theme/footer.html:19 sphinx_rtd_theme/layout_old.html:193 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/layout_old.html:195 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "© Copyright %(copyright)s." + +#: sphinx_rtd_theme/footer.html:26 +#, python-format +msgid "" +"\n" +" \n" +" Build\n" +" %(build_id)s.\n" +" \n" +" " +msgstr "" +"\n" +" \n" +" Construido\n" +" %(build_id)s.\n" +" \n" +" " + +#: sphinx_rtd_theme/footer.html:33 +#, python-format +msgid "" +"\n" +" \n" +" Revision %(commit)s.\n" +" \n" +" " +msgstr "" +"\n" +" \n" +" Revisión %(commit)s.\n" +" \n" +" " + +#: sphinx_rtd_theme/footer.html:39 sphinx_rtd_theme/layout_old.html:199 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "Actualizado por última vez en %(last_updated)s." + +#: sphinx_rtd_theme/footer.html:46 +msgid "" +"Built with Sphinx using a theme provided by " +"Read the Docs" +msgstr "" +"Construido con Sphinx usando un tema proporcionado por " +"Read the Docs" + +#: sphinx_rtd_theme/layout.html:35 sphinx_rtd_theme/layout_old.html:123 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "Buscar en %(docstitle)s" + +#: sphinx_rtd_theme/layout.html:55 sphinx_rtd_theme/layout_old.html:135 +msgid "About these documents" +msgstr "Sobre este documento" + +#: sphinx_rtd_theme/layout.html:59 sphinx_rtd_theme/layout_old.html:138 +msgid "Index" +msgstr "Índice" + +#: sphinx_rtd_theme/layout.html:63 sphinx_rtd_theme/layout_old.html:141 +#: sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "Búsqueda" + +#: sphinx_rtd_theme/layout.html:66 sphinx_rtd_theme/layout_old.html:144 +msgid "Copyright" +msgstr "Copyright" + +#: sphinx_rtd_theme/layout_old.html:29 +msgid "Navigation" +msgstr "Navegación" + +#: sphinx_rtd_theme/layout_old.html:202 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" +"Creado usando Sphinx " +"%(sphinx_version)s." + +#: sphinx_rtd_theme/search.html:26 +msgid "" +"Please activate JavaScript to enable the search\n" +" functionality." +msgstr "" +"Por favor, active JavaScript para habilitar la funcionalidad\n" +" de búsqueda." + +#: sphinx_rtd_theme/search.html:33 +msgid "Search Results" +msgstr "Resultados de la búsqueda" + +#: sphinx_rtd_theme/search.html:35 +msgid "" +"Your search did not match any documents. Please make sure that all words " +"are spelled correctly and that you've selected enough categories." +msgstr "Su búsqueda no coincide con ningún documentos. Por favor, asegúrese de que todas las palabras estén correctamente escritas y que usted allá seleccionado las suficientes categorías." + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "Buscar documentos" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "Versiones" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "Descargas" + +#: sphinx_rtd_theme/versions.html:23 +msgid "On Read the Docs" +msgstr "En Read the Docs" + +#: sphinx_rtd_theme/versions.html:25 +msgid "Project Home" +msgstr "Página de Proyecto" + +#: sphinx_rtd_theme/versions.html:28 +msgid "Builds" +msgstr "Construcciones" + +#: sphinx_rtd_theme/versions.html:32 +msgid "" +"Free document hosting provided by Read the Docs." +msgstr "" +"Alojamiento gratuito de documentos proporcionado por Read the Docs." diff --git a/locale/sphinx.pot b/locale/sphinx.pot new file mode 100644 index 000000000..502c5a9fc --- /dev/null +++ b/locale/sphinx.pot @@ -0,0 +1,170 @@ +# Translations template for sphinx_rtd_theme. +# Copyright (C) 2017 ORGANIZATION +# This file is distributed under the same license as the sphinx_rtd_theme +# project. +# FIRST AUTHOR , 2017. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: sphinx_rtd_theme 0.2.4\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2017-03-26 11:44-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.4.0\n" + +#: sphinx_rtd_theme/breadcrumbs.html:31 +msgid "Docs" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45 +msgid "Edit on GitHub" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52 +msgid "Edit on Bitbucket" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59 +msgid "Edit on GitLab" +msgstr "" + +#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64 +msgid "View page source" +msgstr "" + +#: sphinx_rtd_theme/footer.html:5 +msgid "Next" +msgstr "" + +#: sphinx_rtd_theme/footer.html:8 +msgid "Previous" +msgstr "" + +#: sphinx_rtd_theme/footer.html:19 sphinx_rtd_theme/layout_old.html:193 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "" + +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/layout_old.html:195 +#, python-format +msgid "© Copyright %(copyright)s." +msgstr "" + +#: sphinx_rtd_theme/footer.html:26 +#, python-format +msgid "" +"\n" +" \n" +" Build\n" +" %(build_id)s.\n" +" \n" +" " +msgstr "" + +#: sphinx_rtd_theme/footer.html:33 +#, python-format +msgid "" +"\n" +" \n" +" Revision %(commit)s.\n" +" \n" +" " +msgstr "" + +#: sphinx_rtd_theme/footer.html:39 sphinx_rtd_theme/layout_old.html:199 +#, python-format +msgid "Last updated on %(last_updated)s." +msgstr "" + +#: sphinx_rtd_theme/footer.html:46 +msgid "" +"Built with Sphinx using a theme provided by " +"Read the Docs" +msgstr "" + +#: sphinx_rtd_theme/layout.html:35 sphinx_rtd_theme/layout_old.html:123 +#, python-format +msgid "Search within %(docstitle)s" +msgstr "" + +#: sphinx_rtd_theme/layout.html:55 sphinx_rtd_theme/layout_old.html:135 +msgid "About these documents" +msgstr "" + +#: sphinx_rtd_theme/layout.html:59 sphinx_rtd_theme/layout_old.html:138 +msgid "Index" +msgstr "" + +#: sphinx_rtd_theme/layout.html:63 sphinx_rtd_theme/layout_old.html:141 +#: sphinx_rtd_theme/search.html:11 +msgid "Search" +msgstr "" + +#: sphinx_rtd_theme/layout.html:66 sphinx_rtd_theme/layout_old.html:144 +msgid "Copyright" +msgstr "" + +#: sphinx_rtd_theme/layout_old.html:29 +msgid "Navigation" +msgstr "" + +#: sphinx_rtd_theme/layout_old.html:202 +#, python-format +msgid "" +"Created using Sphinx " +"%(sphinx_version)s." +msgstr "" + +#: sphinx_rtd_theme/search.html:26 +msgid "" +"Please activate JavaScript to enable the search\n" +" functionality." +msgstr "" + +#: sphinx_rtd_theme/search.html:33 +msgid "Search Results" +msgstr "" + +#: sphinx_rtd_theme/search.html:35 +msgid "" +"Your search did not match any documents. Please make sure that all words " +"are spelled correctly and that you've selected enough categories." +msgstr "" + +#: sphinx_rtd_theme/searchbox.html:4 +msgid "Search docs" +msgstr "" + +#: sphinx_rtd_theme/versions.html:11 +msgid "Versions" +msgstr "" + +#: sphinx_rtd_theme/versions.html:17 +msgid "Downloads" +msgstr "" + +#: sphinx_rtd_theme/versions.html:23 +msgid "On Read the Docs" +msgstr "" + +#: sphinx_rtd_theme/versions.html:25 +msgid "Project Home" +msgstr "" + +#: sphinx_rtd_theme/versions.html:28 +msgid "Builds" +msgstr "" + +#: sphinx_rtd_theme/versions.html:32 +msgid "" +"Free document hosting provided by Read the Docs." +msgstr "" + diff --git a/setup.cfg b/setup.cfg index 2a9acf13d..fe2f3e46b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,22 @@ [bdist_wheel] universal = 1 + +# How setup this file for babel configurations +# http://babel.pocoo.org/en/latest/setup.html +[compile_catalog] +domain = sphinx +directory = locale/ + +[extract_messages] +mapping_file = babel.cfg +output_file = locale/sphinx.pot +keywords = _ l_ lazy_gettext + +[init_catalog] +input_file = locale/sphinx.pot +output_file = locale/$LANG/LC_MESSAGES/sphinx.po + +[update_catalog] +domain = sphinx +input_file = locale/sphinx.pot +output_dir = locale/ diff --git a/setup.py b/setup.py index e6c0a69fb..5763e2283 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ .. _github: https://www.github.com/snide/sphinx_rtd_theme """ +from babel.messages import frontend as babel from setuptools import setup from sphinx_rtd_theme import __version__ @@ -43,4 +44,13 @@ 'Topic :: Documentation', 'Topic :: Software Development :: Documentation', ], + install_requires= [ + 'Sphinx>=1.4.1', + ], + cmdclass = { + 'compile_catalog': babel.compile_catalog, + 'extract_messages': babel.extract_messages, + 'init_catalog': babel.init_catalog, + 'update_catalog': babel.update_catalog + }, ) From be27427d7b5930d61f3cf449d00941a4cfaee987 Mon Sep 17 00:00:00 2001 From: Leonardo Caballero Date: Sun, 2 Apr 2017 10:13:18 -0400 Subject: [PATCH 03/35] Revert commit ea89880 --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index a863e5cf8..e612dcf4d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,3 @@ dist/ bower_components/ node_modules/ npm-debug.log -bin/ -include/ -lib/ -local/ \ No newline at end of file From 4cff61f2aaed18aafa101473129900f4b392b858 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Sun, 2 Apr 2017 20:51:40 -0400 Subject: [PATCH 04/35] Updated way how import babel library to use for as command class options --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5763e2283..01c8dbc38 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,11 @@ .. _github: https://www.github.com/snide/sphinx_rtd_theme """ -from babel.messages import frontend as babel + +try: + from babel.messages import frontend as babel +except ImportError: + pass from setuptools import setup from sphinx_rtd_theme import __version__ From 8f21fd0c0fa683a97bbffa4a49a9c7f8ae372530 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Mon, 3 Apr 2017 09:54:17 -0400 Subject: [PATCH 05/35] Removed sphinx.mo file --- locale/es/LC_MESSAGES/sphinx.mo | Bin 3438 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 locale/es/LC_MESSAGES/sphinx.mo diff --git a/locale/es/LC_MESSAGES/sphinx.mo b/locale/es/LC_MESSAGES/sphinx.mo deleted file mode 100644 index b9337464a2351dfdfbe10f12c166d085d394f8a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3438 zcmcJR-)kL36vs!cRj*a5Rz$6I8mT7W-rU4c!_5zyUu`2v8gf&iPzbZTlfBdK-MO8a zy~!;IKKW4bL7||Jd90uaL7_qL;TC+8{slhxyEj4gt1gZN|DaH0MN_!9Uj_#*gKn_J)|w0{7f1`D{H1doCRa2UiRHUS<5r@>jU z0zM0V4ITlvK=S8%knH~mJ`dgj-vsZ1H2yD;?EC}X01so*E#%-!@DsGhFvtgQgQMVa zI8Sk31do9!NcL}lzk=U@_+tXjQruTT^7}R})PDzj1^f-9b^mDdZ!kvt5S)AlyatxQ zCP;pNiwpVt6G-!Z0hhqL?fw%8n(X$2w9YvA26z^vJPYtO(6*m{4!(uhU?23di( zf8(|;5+20D+KE0tRdLui*?q|QH1+Iij|*Nka($xjRDU*jEj96g?VId0RXAYB2gPKu zJ7;{5R_NF~VBtX5YRc_dc||sqRXXA0fes}W$j6ZRtmD8H-U)QQImUN+S{JTLPR`(g zQBl>Ahny_7+XJ@9+S9sY_CKHUb?UgQN-KG&gR~|SXIYk?9FA`&SM9A^b*^3>MD$ga zYw==eNHRqr@>X}x;^KVJD>Wyn+w8cXN~M-npd@Tl&k}TMbbs7N@3!Cwpu;mICD<0;d`< z!#@%YQ3;Hyqfj)LiST2Y<=RSNf@*tDtfvVk=tRWIHH&Q7pwe|}aig!u!143CCRrt$ z(FT^aX^e8qd#V1q_f&L>yr)j5Tr3AH`#66KxKVP0*F_|`)u{<2y9Dsu9UiKXC))9v za6y%eq}eO%B5%i56IU@eH57+%T*NWo&?dB8pv%@}9HU+WZ45k*n=nGfg@H|-zT3bE z8RG$l$V8`6l?O;uq>YkDZ#!OZKJ?oDmSK^0ORvs(sW@C5DXhr4HqKkLkqW)(G_u~R zF7vs?sriL7Q?s)xbCpVA`NFD~6);lk&0?K0A1)1j;FaF@hEMaMq4LOxR~jjmFwpB9 zF83KXS{^CoTl1DyLRqIZlm;y|dcXY?&wZtZ65P$9R4_(Vy^>6MSf(usFXs z*Gtz>u~eARiNjgstv2ge$e~aN>#cXImgs-46$UrPOsZK6Bp~%1J z5VzmjvDZ==iXxlBDPoj1Y`L`+sYFm(a6&h6d}}t{8OL%ZLMWC7z;4$BzJ=)J^y-{G zi?W_9$ot3>Y99wbulE)VTHB$DG@QjNf(WKP^H3^m4}~DGF71;9M^|en*|i=-YgbOJ z#AB0vu1Ss{A<3bza2fAd#KJeY!NzRe!sl Date: Mon, 3 Apr 2017 10:40:42 -0400 Subject: [PATCH 06/35] Removed Sphinx and Babel command class from setup.py file and added a TRANSLATE file for more details about translate the package --- README.rst | 6 ++++++ TRANSLATE.rst | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 13 ------------- 3 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 TRANSLATE.rst diff --git a/README.rst b/README.rst index 8b952af1f..a9159628c 100644 --- a/README.rst +++ b/README.rst @@ -99,6 +99,12 @@ You can currently add the following: * ``:bitbucket_url:`` This will force the "Edit on Bitbucket" to the configured URL * ``:gitlab_url:`` This will force the "Edit on GitLab" to the configured URL +Translations +============ + +You can help to translate the Read the Docs Sphinx Theme, +please check out the ``TRANSLATE.rst`` file for more details. + Changelog ========= diff --git a/TRANSLATE.rst b/TRANSLATE.rst new file mode 100644 index 000000000..50086a6c5 --- /dev/null +++ b/TRANSLATE.rst @@ -0,0 +1,52 @@ +****************** +Translation Guide +****************** + +.. contents:: + +You can help to translate the Read the Docs Sphinx Theme. + +Languages availables: + +- Spanish contributed by Leonardo J. Caballero G. +- Your Language by YOUR NAME. + +Installation +============ + +For translate the Read the Docs Sphinx Theme you need install the following packages: + +.. code:: bash + + $ pip install babel Jinja2 + +Distutils/Setuptools Integration +================================ + +You can configure different parts of the theme. + +Compile catalog +--------------- + +For compile catalog of the theme's project-wide is available. +More options please, check out http://babel.pocoo.org/en/latest/setup.html#compile-catalog + +Extract messages +---------------- + +It is available the option to extract messages to translate. +More options please, check out http://babel.pocoo.org/en/latest/setup.html#extract-messages + +init catalog +------------ + +It is available the option to init catalog. +More options please, check out http://babel.pocoo.org/en/latest/setup.html#init-catalog + +update catalog +-------------- + +It is available the option to init catalog. +More options please, check out http://babel.pocoo.org/en/latest/setup.html#update-catalog + + diff --git a/setup.py b/setup.py index 01c8dbc38..e38fb528d 100644 --- a/setup.py +++ b/setup.py @@ -5,10 +5,6 @@ """ -try: - from babel.messages import frontend as babel -except ImportError: - pass from setuptools import setup from sphinx_rtd_theme import __version__ @@ -48,13 +44,4 @@ 'Topic :: Documentation', 'Topic :: Software Development :: Documentation', ], - install_requires= [ - 'Sphinx>=1.4.1', - ], - cmdclass = { - 'compile_catalog': babel.compile_catalog, - 'extract_messages': babel.extract_messages, - 'init_catalog': babel.init_catalog, - 'update_catalog': babel.update_catalog - }, ) From 15d2198a4559e851b0b732dfad65eac56a8046fb Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Fri, 14 Apr 2017 10:54:18 -0400 Subject: [PATCH 07/35] Check spell --- TRANSLATE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TRANSLATE.rst b/TRANSLATE.rst index 50086a6c5..ddc0ed2f2 100644 --- a/TRANSLATE.rst +++ b/TRANSLATE.rst @@ -14,7 +14,7 @@ Languages availables: Installation ============ -For translate the Read the Docs Sphinx Theme you need install the following packages: +For translating the Read the Docs Sphinx Theme you will need to install the following packages: .. code:: bash From 81cd11d14fee6f17e1cf11b56663bec313eab573 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 14 Apr 2018 15:33:00 -0400 Subject: [PATCH 08/35] Revert unrelated changes --- docs/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index b546279e7..787aa5357 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -18,7 +18,7 @@ Fixes * Fix table centering (#599) Other Changes ------------- +--------------- v0.3.0 ====== From cadb79f73dae3dcbba8b738e66d4cd2104b25e8e Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 14 Apr 2018 15:33:39 -0400 Subject: [PATCH 09/35] Update translations catalogs --- locale/es/LC_MESSAGES/sphinx.po | 63 +++++++++++++++++---------------- locale/sphinx.pot | 40 ++++++++------------- 2 files changed, 46 insertions(+), 57 deletions(-) diff --git a/locale/es/LC_MESSAGES/sphinx.po b/locale/es/LC_MESSAGES/sphinx.po index 61725d7a0..4a6843518 100644 --- a/locale/es/LC_MESSAGES/sphinx.po +++ b/locale/es/LC_MESSAGES/sphinx.po @@ -8,16 +8,16 @@ msgid "" msgstr "" "Project-Id-Version: sphinx_rtd_theme 0.2.4\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-03-26 11:44-0400\n" +"POT-Creation-Date: 2018-04-14 15:30-0400\n" "PO-Revision-Date: 2017-03-26 18:40-0400\n" "Last-Translator: Leonardo Caballero \n" -"Language-Team: Spanish Team\n" "Language: es\n" +"Language-Team: Spanish Team\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" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.4.0\n" +"Generated-By: Babel 2.5.3\n" #: sphinx_rtd_theme/breadcrumbs.html:31 msgid "Docs" @@ -47,12 +47,12 @@ msgstr "Próximo" msgid "Previous" msgstr "Anterior" -#: sphinx_rtd_theme/footer.html:19 sphinx_rtd_theme/layout_old.html:193 +#: sphinx_rtd_theme/footer.html:19 #, python-format msgid "© Copyright %(copyright)s." msgstr "© Copyright %(copyright)s." -#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/layout_old.html:195 +#: sphinx_rtd_theme/footer.html:21 #, python-format msgid "© Copyright %(copyright)s." msgstr "© Copyright %(copyright)s." @@ -89,56 +89,43 @@ msgstr "" " \n" " " -#: sphinx_rtd_theme/footer.html:39 sphinx_rtd_theme/layout_old.html:199 +#: sphinx_rtd_theme/footer.html:39 #, python-format msgid "Last updated on %(last_updated)s." msgstr "Actualizado por última vez en %(last_updated)s." #: sphinx_rtd_theme/footer.html:46 +#, fuzzy msgid "" "Built with Sphinx using a theme provided by " +"href=\"https://github.com/rtfd/sphinx_rtd_theme\">theme provided by " "Read the Docs" msgstr "" -"Construido con Sphinx usando un tema proporcionado por " -"Read the Docs" +"Construido con Sphinx usando un tema " +"proporcionado por Read the Docs" -#: sphinx_rtd_theme/layout.html:35 sphinx_rtd_theme/layout_old.html:123 +#: sphinx_rtd_theme/layout.html:37 #, python-format msgid "Search within %(docstitle)s" msgstr "Buscar en %(docstitle)s" -#: sphinx_rtd_theme/layout.html:55 sphinx_rtd_theme/layout_old.html:135 +#: sphinx_rtd_theme/layout.html:61 msgid "About these documents" msgstr "Sobre este documento" -#: sphinx_rtd_theme/layout.html:59 sphinx_rtd_theme/layout_old.html:138 +#: sphinx_rtd_theme/layout.html:64 msgid "Index" msgstr "Índice" -#: sphinx_rtd_theme/layout.html:63 sphinx_rtd_theme/layout_old.html:141 -#: sphinx_rtd_theme/search.html:11 +#: sphinx_rtd_theme/layout.html:67 sphinx_rtd_theme/search.html:11 msgid "Search" msgstr "Búsqueda" -#: sphinx_rtd_theme/layout.html:66 sphinx_rtd_theme/layout_old.html:144 +#: sphinx_rtd_theme/layout.html:70 msgid "Copyright" msgstr "Copyright" -#: sphinx_rtd_theme/layout_old.html:29 -msgid "Navigation" -msgstr "Navegación" - -#: sphinx_rtd_theme/layout_old.html:202 -#, python-format -msgid "" -"Created using Sphinx " -"%(sphinx_version)s." -msgstr "" -"Creado usando Sphinx " -"%(sphinx_version)s." - #: sphinx_rtd_theme/search.html:26 msgid "" "Please activate JavaScript to enable the search\n" @@ -155,7 +142,10 @@ msgstr "Resultados de la búsqueda" msgid "" "Your search did not match any documents. Please make sure that all words " "are spelled correctly and that you've selected enough categories." -msgstr "Su búsqueda no coincide con ningún documentos. Por favor, asegúrese de que todas las palabras estén correctamente escritas y que usted allá seleccionado las suficientes categorías." +msgstr "" +"Su búsqueda no coincide con ningún documentos. Por favor, asegúrese de " +"que todas las palabras estén correctamente escritas y que usted allá " +"seleccionado las suficientes categorías." #: sphinx_rtd_theme/searchbox.html:4 msgid "Search docs" @@ -188,3 +178,14 @@ msgid "" msgstr "" "Alojamiento gratuito de documentos proporcionado por Read the Docs." + +#~ msgid "Navigation" +#~ msgstr "Navegación" + +#~ msgid "" +#~ "Created using Sphinx %(sphinx_version)s." +#~ msgstr "" +#~ "Creado usando Sphinx %(sphinx_version)s." + diff --git a/locale/sphinx.pot b/locale/sphinx.pot index 502c5a9fc..2188365ab 100644 --- a/locale/sphinx.pot +++ b/locale/sphinx.pot @@ -1,22 +1,22 @@ # Translations template for sphinx_rtd_theme. -# Copyright (C) 2017 ORGANIZATION +# Copyright (C) 2018 ORGANIZATION # This file is distributed under the same license as the sphinx_rtd_theme # project. -# FIRST AUTHOR , 2017. +# FIRST AUTHOR , 2018. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: sphinx_rtd_theme 0.2.4\n" +"Project-Id-Version: sphinx_rtd_theme 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-03-26 11:44-0400\n" +"POT-Creation-Date: 2018-04-14 15:30-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.4.0\n" +"Generated-By: Babel 2.5.3\n" #: sphinx_rtd_theme/breadcrumbs.html:31 msgid "Docs" @@ -46,12 +46,12 @@ msgstr "" msgid "Previous" msgstr "" -#: sphinx_rtd_theme/footer.html:19 sphinx_rtd_theme/layout_old.html:193 +#: sphinx_rtd_theme/footer.html:19 #, python-format msgid "© Copyright %(copyright)s." msgstr "" -#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/layout_old.html:195 +#: sphinx_rtd_theme/footer.html:21 #, python-format msgid "© Copyright %(copyright)s." msgstr "" @@ -77,7 +77,7 @@ msgid "" " " msgstr "" -#: sphinx_rtd_theme/footer.html:39 sphinx_rtd_theme/layout_old.html:199 +#: sphinx_rtd_theme/footer.html:39 #, python-format msgid "Last updated on %(last_updated)s." msgstr "" @@ -85,43 +85,31 @@ msgstr "" #: sphinx_rtd_theme/footer.html:46 msgid "" "Built with Sphinx using a theme provided by " +"href=\"https://github.com/rtfd/sphinx_rtd_theme\">theme provided by " "Read the Docs" msgstr "" -#: sphinx_rtd_theme/layout.html:35 sphinx_rtd_theme/layout_old.html:123 +#: sphinx_rtd_theme/layout.html:37 #, python-format msgid "Search within %(docstitle)s" msgstr "" -#: sphinx_rtd_theme/layout.html:55 sphinx_rtd_theme/layout_old.html:135 +#: sphinx_rtd_theme/layout.html:61 msgid "About these documents" msgstr "" -#: sphinx_rtd_theme/layout.html:59 sphinx_rtd_theme/layout_old.html:138 +#: sphinx_rtd_theme/layout.html:64 msgid "Index" msgstr "" -#: sphinx_rtd_theme/layout.html:63 sphinx_rtd_theme/layout_old.html:141 -#: sphinx_rtd_theme/search.html:11 +#: sphinx_rtd_theme/layout.html:67 sphinx_rtd_theme/search.html:11 msgid "Search" msgstr "" -#: sphinx_rtd_theme/layout.html:66 sphinx_rtd_theme/layout_old.html:144 +#: sphinx_rtd_theme/layout.html:70 msgid "Copyright" msgstr "" -#: sphinx_rtd_theme/layout_old.html:29 -msgid "Navigation" -msgstr "" - -#: sphinx_rtd_theme/layout_old.html:202 -#, python-format -msgid "" -"Created using Sphinx " -"%(sphinx_version)s." -msgstr "" - #: sphinx_rtd_theme/search.html:26 msgid "" "Please activate JavaScript to enable the search\n" From a4fd6e01ef074fb5b9e3210d786b488b751bf415 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Sat, 14 Apr 2018 15:37:46 -0400 Subject: [PATCH 10/35] Docs: Move translation file --- README.rst | 2 +- docs/index.rst | 1 + TRANSLATE.rst => docs/translations.rst | 17 ++++++++--------- 3 files changed, 10 insertions(+), 10 deletions(-) rename TRANSLATE.rst => docs/translations.rst (77%) diff --git a/README.rst b/README.rst index b099aa60c..d09805e44 100644 --- a/README.rst +++ b/README.rst @@ -57,4 +57,4 @@ Translations ------------ You can help to translate the Read the Docs Sphinx Theme, -please read the :doc:`` file for more details. +please read the :doc:`translations ` guide for more details. diff --git a/docs/index.rst b/docs/index.rst index ad690c1e7..fb804a55d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,6 +8,7 @@ configuring changelog contributing + translations .. toctree:: diff --git a/TRANSLATE.rst b/docs/translations.rst similarity index 77% rename from TRANSLATE.rst rename to docs/translations.rst index ddc0ed2f2..03725f675 100644 --- a/TRANSLATE.rst +++ b/docs/translations.rst @@ -1,12 +1,13 @@ + ****************** -Translation Guide +Translation Guide ****************** -.. contents:: +.. contents:: You can help to translate the Read the Docs Sphinx Theme. -Languages availables: +Languages available: - Spanish contributed by Leonardo J. Caballero G. - Your Language by YOUR NAME. @@ -28,25 +29,23 @@ You can configure different parts of the theme. Compile catalog --------------- -For compile catalog of the theme's project-wide is available. +For compile catalog of the theme's project-wide is available. More options please, check out http://babel.pocoo.org/en/latest/setup.html#compile-catalog Extract messages ---------------- -It is available the option to extract messages to translate. +It is available the option to extract messages to translate. More options please, check out http://babel.pocoo.org/en/latest/setup.html#extract-messages init catalog ------------ -It is available the option to init catalog. +It is available the option to init catalog. More options please, check out http://babel.pocoo.org/en/latest/setup.html#init-catalog update catalog -------------- -It is available the option to init catalog. +It is available the option to init catalog. More options please, check out http://babel.pocoo.org/en/latest/setup.html#update-catalog - - From bbaef3aa7be0aab0711a07f2a61ea3dbdd9b7286 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 00:28:53 -0400 Subject: [PATCH 11/35] Updated .gitignore file --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index d8e220094..27b7d86f9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,12 @@ *.sass-cache .ropeproject/ .ruby-version +bin/ dist/ bower_components/ +include/ +lib/ +local/ node_modules npm-debug.log package-lock.json From c35a4eb535c6d777d5f3fc231a507fb620cb66ce Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 00:30:55 -0400 Subject: [PATCH 12/35] Updated translations guide section --- docs/translations.rst | 202 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 187 insertions(+), 15 deletions(-) diff --git a/docs/translations.rst b/docs/translations.rst index 03725f675..459e28d82 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -21,31 +21,203 @@ For translating the Read the Docs Sphinx Theme you will need to install the foll $ pip install babel Jinja2 -Distutils/Setuptools Integration -================================ +Translating Applications with Babel +----------------------------------- -You can configure different parts of the theme. +After you marked all the strings you want to translate in this Sphinx theme with the gettext function +alias ``_('str')`` or ``{% trans %}string 1, string 2, string 3, etc.{% endtrans %}`` blocks. -Compile catalog ---------------- +Then it’s time to create a .pot file. A .pot file contains all the strings and is the template for a +.po file which contains the translated strings. The ``babel`` package can do all that for you. -For compile catalog of the theme's project-wide is available. -More options please, check out http://babel.pocoo.org/en/latest/setup.html#compile-catalog +.. note:: + The ``babel`` package install a command called ``pybabel``, please, check out for more options at + http://babel.pocoo.org/en/latest/cmdline.html + +Jinja2 HTML templates +--------------------- + +This Sphinx theme using a awesome modern and designer-friendly HTML templating language for Python +called ``Jinja2``. The ``Jinja2`` package is used for that. + +Configuration +============= + +For enable the *Internationalization and Localization* for this Sphinx Theme, you will need checkout +the following configurations: + +Translations files +------------------ + +The translations files are based on ``gettext`` format and they are placed at the +:file:`sphinx_rtd_theme/locale/` directory, like it showing the following structure: + +.. code:: bash + + sphinx_rtd_theme/locale/ + ├── es + │   └── LC_MESSAGES + │   ├── sphinx.mo + │   └── sphinx.po + └── sphinx.pot + +- The :file:`sphinx.pot` file, is the **Portable Object Template** Gettext format. + +- The :file:`sphinx.po` file, is the **Portable Object** Gettext format to translate. + +- The :file:`sphinx.mo` file, is the **Machine Object** Gettext format generated later of translate + your :file:`sphinx.po` file via the catalog compilation. + +Babel Configurations +-------------------- + +The ``babel`` packages provides commands for integration into :file:`setup.py` scripts, based on either +the ``distutils`` package that is part of the Python standard library, or the third-party ``setuptools`` +package. + +Then :file:`setup.cfg` file simply configures the behavior of the various setup commands for this package. +This file contains the options that you can be specified on the command-line. The :file:`setup.cfg` file +at root folder of this Sphinx theme, look like the following: + +.. code:: cfg + + [bdist_wheel] + universal = 1 + + # Babel configurations for setup.py scripts + [compile_catalog] + domain = sphinx + directory = sphinx_rtd_theme/locale/ + + [extract_messages] + mapping_file = babel.cfg + output_file = sphinx_rtd_theme/locale/sphinx.pot + keywords = _ l_ lazy_gettext + + [init_catalog] + input_file = sphinx_rtd_theme/locale/sphinx.pot + output_file = sphinx_rtd_theme/locale/$LANG/LC_MESSAGES/sphinx.po + + [update_catalog] + domain = sphinx + input_file = sphinx_rtd_theme/locale/sphinx.pot + output_dir = sphinx_rtd_theme/locale/ + +.. seealso:: + More details check out the following links: + + - `Writing the Setup Configuration File `_. + - `How setup this file for babel configurations `_. + +Extraction Configurations +------------------------- + +First of all you have to get into the folder where you have your Sphinx theme and create a mapping file +called :file:`babel.cfg` that contains the **extraction from Jinja2 HTML templates** configurations. +For typical Sphinx extensions, this is what you want in there: + +.. code:: cfg + + # Extraction from Jinja2 HTML templates + [jinja2: **/**.html] + encoding = utf-8 + ignore_tags = script,style + include_attrs = alt title summary placeholder + + +.. seealso:: + More details check out the following links: + + - `How setup this file `_ + - `A previous file example description `_ + +Administrative Tasks +==================== + +The ``babel`` package have a *Distutils/Setuptools Integration* which supports the options +defined in the :file:`setup.cfg` file that can be executed via command line. + +These options are the commonly using as **"Translations Administrative Tasks"** and the most +used tasks are described below: Extract messages ---------------- -It is available the option to extract messages to translate. -More options please, check out http://babel.pocoo.org/en/latest/setup.html#extract-messages +It can extract localizable messages from a variety of difference source files, +and generate a PO (portable object) template file from the collected messages. + +Running the command will produce a PO template file: + +.. code:: bash + + $ python ./setup.py extract_messages -o ./sphinx_rtd_theme/locale/sphinx.pot -init catalog +.. $ python ./setup.py extract_messages --output-file ./sphinx_rtd_theme/locale/sphinx.pot + +.. tip:: + More options please, check out http://babel.pocoo.org/en/latest/setup.html#extract-messages + +Init catalog ------------ -It is available the option to init catalog. -More options please, check out http://babel.pocoo.org/en/latest/setup.html#init-catalog +It creates a new translation catalog based on a PO template file (POT). -update catalog +Running the command will produce a PO file: + +.. code:: bash + + $ python ./setup.py init_catalog -l es -i ./sphinx_rtd_theme/locale/sphinx.pot -o ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po + running init_catalog + creating catalog './sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po' based on './sphinx_rtd_theme/locale/sphinx.pot' + +.. tip:: + More options please, check out http://babel.pocoo.org/en/latest/setup.html#init-catalog + +Update catalog -------------- -It is available the option to init catalog. -More options please, check out http://babel.pocoo.org/en/latest/setup.html#update-catalog +It updates an existing translations catalog based on a PO template file (POT). + +Running the following command will update a PO file: + +.. code:: bash + + $ python ./setup.py update_catalog -l es -i ./sphinx_rtd_theme/locale/sphinx.pot -o ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po + running update_catalog + updating catalog ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po based on ./sphinx_rtd_theme/locale/sphinx.pot + +.. tip:: + More options please, check out http://babel.pocoo.org/en/latest/setup.html#update-catalog + +Compile catalog +--------------- + +For compile catalog of the theme's project-wide is available. + +If the command has been correctly installed or registered, a +project's setup.py script should allow you to use the command: + +.. code:: bash + + $ python ./setup.py compile_catalog -d ./sphinx_rtd_theme/locale/ -l es + running compile_catalog +.. $ python ./setup.py compile_catalog --directory ./sphinx_rtd_theme/locale/ --locale es + running compile_catalog + compiling catalog ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po to ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo + +Statistics about translations +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +For to print the statistics about the theme translations from his catalog. + +Running the following command will printing the statistics: + +.. code:: bash + + $ pybabel compile -D sphinx -d sphinx_rtd_theme/locale/ -f --statistics + + 28 of 28 messages (100%) translated in sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po + compiling catalog sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po to sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo + +.. tip:: + More options for ``compile`` sub-command, please, check out http://babel.pocoo.org/en/latest/cmdline.html#compile From bba0eedf358fd743ddf6561226df1a052c20859b Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 00:48:40 -0400 Subject: [PATCH 13/35] Updated Babel configurations --- babel.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/babel.cfg b/babel.cfg index 34f66b18e..a1339b8e7 100644 --- a/babel.cfg +++ b/babel.cfg @@ -1,10 +1,10 @@ # How setup this file -# http://babel.edgewall.org/wiki/Documentation/setup.html +# http://babel.pocoo.org/en/latest/setup.html # this file description: -# http://babel.edgewall.org/wiki/Documentation/messages.html#extraction-method-mapping-and-configuration +# http://babel.pocoo.org/en/latest/messages.html#extraction-method-mapping-and-configuration # Extraction from Jinja2 HTML templates [jinja2: **/**.html] encoding = utf-8 ignore_tags = script,style -include_attrs = alt title summary \ No newline at end of file +include_attrs = alt title summary placeholder From 45b72fa6163b481100a8b4b5b0f2246f4c751c99 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 18:02:17 -0400 Subject: [PATCH 14/35] Added more improvements about i18n support for templates --- sphinx_rtd_theme/breadcrumbs.html | 4 ++-- sphinx_rtd_theme/layout.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx_rtd_theme/breadcrumbs.html b/sphinx_rtd_theme/breadcrumbs.html index 31550d8b3..c2b630c2f 100644 --- a/sphinx_rtd_theme/breadcrumbs.html +++ b/sphinx_rtd_theme/breadcrumbs.html @@ -71,10 +71,10 @@ {% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} {% endif %} diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index c6e2514c1..cb6086009 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -104,7 +104,7 @@ {# Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #} - + {% endif %} From 326a12eb5645a1c7a3629f68266f295736b1c6c2 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 18:05:34 -0400 Subject: [PATCH 15/35] Moved into sphinx_rtd_theme the locale directory --- MANIFEST.in | 4 +- setup.cfg | 20 ++++---- .../locale}/es/LC_MESSAGES/sphinx.po | 46 ++++++++----------- .../locale}/sphinx.pot | 10 ++-- sphinx_rtd_theme/theme.conf | 2 +- 5 files changed, 38 insertions(+), 44 deletions(-) rename {locale => sphinx_rtd_theme/locale}/es/LC_MESSAGES/sphinx.po (81%) rename {locale => sphinx_rtd_theme/locale}/sphinx.pot (93%) diff --git a/MANIFEST.in b/MANIFEST.in index f8e746404..3b468af4a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,6 @@ include *.txt include babel.cfg include LICENSE -recursive-include locale *.mo -recursive-include locale *.pot -recursive-include locale *.po recursive-include sphinx_rtd_theme *.conf recursive-include sphinx_rtd_theme *.css recursive-include sphinx_rtd_theme *.eot @@ -13,4 +10,5 @@ recursive-include sphinx_rtd_theme *.svg recursive-include sphinx_rtd_theme *.ttf recursive-include sphinx_rtd_theme *.woff recursive-include sphinx_rtd_theme *.woff2 +recursive-include sphinx_rtd_theme/locale *.pot *.po *.mo prune build \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index fe2f3e46b..b8d961346 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,22 +1,22 @@ [bdist_wheel] universal = 1 -# How setup this file for babel configurations +# Babel configurations for setup.py scripts # http://babel.pocoo.org/en/latest/setup.html -[compile_catalog] -domain = sphinx -directory = locale/ - [extract_messages] mapping_file = babel.cfg -output_file = locale/sphinx.pot +output_file = sphinx_rtd_theme/locale/sphinx.pot keywords = _ l_ lazy_gettext [init_catalog] -input_file = locale/sphinx.pot -output_file = locale/$LANG/LC_MESSAGES/sphinx.po +input_file = sphinx_rtd_theme/locale/sphinx.pot +output_file = sphinx_rtd_theme/locale/$LANG/LC_MESSAGES/sphinx.po [update_catalog] domain = sphinx -input_file = locale/sphinx.pot -output_dir = locale/ +input_file = sphinx_rtd_theme/locale/sphinx.pot +output_dir = sphinx_rtd_theme/locale/ + +[compile_catalog] +domain = sphinx +directory = sphinx_rtd_theme/locale/ diff --git a/locale/es/LC_MESSAGES/sphinx.po b/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po similarity index 81% rename from locale/es/LC_MESSAGES/sphinx.po rename to sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po index 4a6843518..17a10389d 100644 --- a/locale/es/LC_MESSAGES/sphinx.po +++ b/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po @@ -1,18 +1,17 @@ # Spanish translations for sphinx_rtd_theme. -# Copyright (C) 2017 Read the Docs +# Copyright (C) 2018 Read the Docs # This file is distributed under the same license as the sphinx_rtd_theme # project. -# FIRST AUTHOR , 2017. -# Leonardo Caballero , 2017. +# Leonardo J. Caballero G. , 2017, 2018. msgid "" msgstr "" -"Project-Id-Version: sphinx_rtd_theme 0.2.4\n" +"Project-Id-Version: sphinx_rtd_theme 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2018-04-14 15:30-0400\n" -"PO-Revision-Date: 2017-03-26 18:40-0400\n" -"Last-Translator: Leonardo Caballero \n" +"POT-Creation-Date: 2018-04-16 18:43-0400\n" +"PO-Revision-Date: 2018-04-16 12:39-0400\n" +"Last-Translator: Leonardo J. Caballero G. \n" "Language: es\n" -"Language-Team: Spanish Team\n" +"Language-Team: es\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -39,23 +38,23 @@ msgstr "Editar en GitLab" msgid "View page source" msgstr "Ver página de código fuente" -#: sphinx_rtd_theme/footer.html:5 +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 msgid "Next" msgstr "Próximo" -#: sphinx_rtd_theme/footer.html:8 +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 msgid "Previous" msgstr "Anterior" #: sphinx_rtd_theme/footer.html:19 #, python-format msgid "© Copyright %(copyright)s." -msgstr "© Copyright %(copyright)s." +msgstr "© Derechos de autor %(copyright)s." #: sphinx_rtd_theme/footer.html:21 #, python-format msgid "© Copyright %(copyright)s." -msgstr "© Copyright %(copyright)s." +msgstr "© Derechos de autor %(copyright)s." #: sphinx_rtd_theme/footer.html:26 #, python-format @@ -95,15 +94,14 @@ msgid "Last updated on %(last_updated)s." msgstr "Actualizado por última vez en %(last_updated)s." #: sphinx_rtd_theme/footer.html:46 -#, fuzzy msgid "" "Built with Sphinx using a theme provided by " "Read the Docs" msgstr "" "Construido con Sphinx usando un tema " -"proporcionado por Read the Docs" +" href=\"https://github.com/rtfd/sphinx_rtd_theme\">tema proporcionado" +" por Read the Docs" #: sphinx_rtd_theme/layout.html:37 #, python-format @@ -112,7 +110,7 @@ msgstr "Buscar en %(docstitle)s" #: sphinx_rtd_theme/layout.html:61 msgid "About these documents" -msgstr "Sobre este documento" +msgstr "Sobre esta documentación" #: sphinx_rtd_theme/layout.html:64 msgid "Index" @@ -124,7 +122,11 @@ msgstr "Búsqueda" #: sphinx_rtd_theme/layout.html:70 msgid "Copyright" -msgstr "Copyright" +msgstr "Derechos de autor" + +#: sphinx_rtd_theme/layout.html:107 +msgid "Logo" +msgstr "Logotipo" #: sphinx_rtd_theme/search.html:26 msgid "" @@ -179,13 +181,3 @@ msgstr "" "Alojamiento gratuito de documentos proporcionado por Read the Docs." -#~ msgid "Navigation" -#~ msgstr "Navegación" - -#~ msgid "" -#~ "Created using Sphinx %(sphinx_version)s." -#~ msgstr "" -#~ "Creado usando Sphinx %(sphinx_version)s." - diff --git a/locale/sphinx.pot b/sphinx_rtd_theme/locale/sphinx.pot similarity index 93% rename from locale/sphinx.pot rename to sphinx_rtd_theme/locale/sphinx.pot index 2188365ab..7e16098ef 100644 --- a/locale/sphinx.pot +++ b/sphinx_rtd_theme/locale/sphinx.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: sphinx_rtd_theme 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2018-04-14 15:30-0400\n" +"POT-Creation-Date: 2018-04-16 18:43-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,11 +38,11 @@ msgstr "" msgid "View page source" msgstr "" -#: sphinx_rtd_theme/footer.html:5 +#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 msgid "Next" msgstr "" -#: sphinx_rtd_theme/footer.html:8 +#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 msgid "Previous" msgstr "" @@ -110,6 +110,10 @@ msgstr "" msgid "Copyright" msgstr "" +#: sphinx_rtd_theme/layout.html:107 +msgid "Logo" +msgstr "" + #: sphinx_rtd_theme/search.html:26 msgid "" "Please activate JavaScript to enable the search\n" diff --git a/sphinx_rtd_theme/theme.conf b/sphinx_rtd_theme/theme.conf index 530c1cdc8..09fd1d411 100644 --- a/sphinx_rtd_theme/theme.conf +++ b/sphinx_rtd_theme/theme.conf @@ -1,7 +1,7 @@ [theme] inherit = basic stylesheet = css/theme.css -pygments_style = default +pygments_style = sphinx [options] canonical_url = From 9c59240e50e2a307400e500ba02a3381d5f04bf2 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 18:13:49 -0400 Subject: [PATCH 16/35] Updated .gitignore file --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 27b7d86f9..24237b080 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.pyc *.egg-info *.egg +*.mo *build/ .tox .coverage @@ -17,3 +18,4 @@ local/ node_modules npm-debug.log package-lock.json +pip-selfcheck.json \ No newline at end of file From 5ddbabdcd45baa716450f8d39e2e1c3f9538f3f2 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 19:21:14 -0400 Subject: [PATCH 17/35] Added more details informations about translations guide --- docs/translations.rst | 195 ++++++++++++++++++++++++++++++------------ 1 file changed, 141 insertions(+), 54 deletions(-) diff --git a/docs/translations.rst b/docs/translations.rst index 459e28d82..281e8ea32 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -21,6 +21,32 @@ For translating the Read the Docs Sphinx Theme you will need to install the foll $ pip install babel Jinja2 +If the command has been correctly installed, a command should allow you to use the following command: + +.. code:: bash + + $ pybabel subcommand options + +More options about this commands, execute the following command: + +.. code:: bash + + $ pybabel --help + Usage: pybabel command [options] [args] + + Options: + --version show program's version number and exit + -h, --help show this help message and exit + --list-locales print all known locales and exit + -v, --verbose print as much as possible + -q, --quiet print as little as possible + + commands: + compile compile message catalogs to MO files + extract extract messages from source files and generate a POT file + init create new message catalogs from a POT file + update update existing message catalogs from a POT file + Translating Applications with Babel ----------------------------------- @@ -54,19 +80,25 @@ The translations files are based on ``gettext`` format and they are placed at th .. code:: bash - sphinx_rtd_theme/locale/ - ├── es - │   └── LC_MESSAGES - │   ├── sphinx.mo - │   └── sphinx.po - └── sphinx.pot + sphinx_rtd_theme/locale/ + ├── es + │   └── LC_MESSAGES + │   ├── sphinx.mo + │   └── sphinx.po + └── sphinx.pot -- The :file:`sphinx.pot` file, is the **Portable Object Template** Gettext format. +:file:`sphinx_rtd_theme/locale//LC_MESSAGES/` + This folder contains a specific language is the **Gettext format**. -- The :file:`sphinx.po` file, is the **Portable Object** Gettext format to translate. +:file:`sphinx.pot` + This file is the **Portable Object Template** Gettext format. -- The :file:`sphinx.mo` file, is the **Machine Object** Gettext format generated later of translate - your :file:`sphinx.po` file via the catalog compilation. +:file:`sphinx.po` + This file is the **Portable Object** Gettext format to translate. + +:file:`sphinx.mo` + This file is the **Machine Object** Gettext format generated later of translate + your :file:`sphinx.po` file via the catalog compilation. Babel Configurations -------------------- @@ -81,33 +113,92 @@ at root folder of this Sphinx theme, look like the following: .. code:: cfg - [bdist_wheel] - universal = 1 + [bdist_wheel] + universal = 1 + + # Babel configurations for setup.py scripts + [compile_catalog] + domain = sphinx + directory = sphinx_rtd_theme/locale/ - # Babel configurations for setup.py scripts - [compile_catalog] - domain = sphinx - directory = sphinx_rtd_theme/locale/ + [extract_messages] + mapping_file = babel.cfg + output_file = sphinx_rtd_theme/locale/sphinx.pot + keywords = _ l_ lazy_gettext - [extract_messages] - mapping_file = babel.cfg - output_file = sphinx_rtd_theme/locale/sphinx.pot - keywords = _ l_ lazy_gettext + [init_catalog] + input_file = sphinx_rtd_theme/locale/sphinx.pot + output_file = sphinx_rtd_theme/locale/$LANG/LC_MESSAGES/sphinx.po + + [update_catalog] + domain = sphinx + input_file = sphinx_rtd_theme/locale/sphinx.pot + output_dir = sphinx_rtd_theme/locale/ + +If the command has been correctly installed or registered, a project's setup.py script should +allow you to use the following command: + +.. code:: bash - [init_catalog] - input_file = sphinx_rtd_theme/locale/sphinx.pot - output_file = sphinx_rtd_theme/locale/$LANG/LC_MESSAGES/sphinx.po + $ python ./setup.py subcommand options - [update_catalog] - domain = sphinx - input_file = sphinx_rtd_theme/locale/sphinx.pot - output_dir = sphinx_rtd_theme/locale/ +More options about this commands, execute the following command: + +.. code:: bash + + $ python ./setup.py --help-commands + Standard commands: + build build everything needed to install + build_py "build" pure Python modules (copy to build directory) + build_ext build C/C++ extensions (compile/link to build directory) + build_clib build C/C++ libraries used by Python extensions + build_scripts "build" scripts (copy and fixup #! line) + clean clean up temporary files from 'build' command + install install everything from build directory + install_lib install all Python modules (extensions and pure Python) + install_headers install C/C++ header files + install_scripts install scripts (Python or otherwise) + install_data install data files + sdist create a source distribution (tarball, zip file, etc.) + register register the distribution with the Python package index + bdist create a built (binary) distribution + bdist_dumb create a "dumb" built distribution + bdist_rpm create an RPM distribution + bdist_wininst create an executable installer for MS Windows + upload upload binary package to PyPI + check perform some checks on the package + + Extra commands: + saveopts save supplied options to setup.cfg or other config file + compile_catalog compile message catalogs to binary MO files + develop install package in 'development mode' + upload_docs Upload documentation to PyPI + extract_messages extract localizable strings from the project code + init_catalog create a new catalog based on a POT file + test run unit tests after in-place build + update_catalog update message catalogs from a POT file + setopt set an option in setup.cfg or another config file + install_egg_info Install an .egg-info directory for the package + rotate delete older distributions, keeping N newest files + bdist_wheel create a wheel distribution + egg_info create a distribution's .egg-info directory + alias define a shortcut to invoke one or more commands + easy_install Find/get/install Python packages + bdist_egg create an "egg" distribution + dist_info create a .dist-info directory + build_sphinx Build Sphinx documentation + + usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] + or: setup.py --help [cmd1 cmd2 ...] + or: setup.py --help-commands + or: setup.py cmd --help .. seealso:: + More details check out the following links: - - `Writing the Setup Configuration File `_. - - `How setup this file for babel configurations `_. + - `Writing the Setup Configuration File `_. + - `How setup this file for babel configurations `_. Extraction Configurations ------------------------- @@ -118,18 +209,19 @@ For typical Sphinx extensions, this is what you want in there: .. code:: cfg - # Extraction from Jinja2 HTML templates - [jinja2: **/**.html] - encoding = utf-8 - ignore_tags = script,style - include_attrs = alt title summary placeholder + # Extraction from Jinja2 HTML templates + [jinja2: **/**.html] + encoding = utf-8 + ignore_tags = script,style + include_attrs = alt title summary placeholder .. seealso:: + More details check out the following links: - - `How setup this file `_ - - `A previous file example description `_ + - `How setup this file `_ + - `A previous file example description `_ Administrative Tasks ==================== @@ -146,23 +238,21 @@ Extract messages It can extract localizable messages from a variety of difference source files, and generate a PO (portable object) template file from the collected messages. -Running the command will produce a PO template file: +Running the following command will produce a PO template file: .. code:: bash $ python ./setup.py extract_messages -o ./sphinx_rtd_theme/locale/sphinx.pot -.. $ python ./setup.py extract_messages --output-file ./sphinx_rtd_theme/locale/sphinx.pot - .. tip:: + More options please, check out http://babel.pocoo.org/en/latest/setup.html#extract-messages Init catalog ------------ -It creates a new translation catalog based on a PO template file (POT). - -Running the command will produce a PO file: +It creates a new translation catalog based on a PO template file (POT). Running the following +command will produce a PO file: .. code:: bash @@ -171,14 +261,14 @@ Running the command will produce a PO file: creating catalog './sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po' based on './sphinx_rtd_theme/locale/sphinx.pot' .. tip:: + More options please, check out http://babel.pocoo.org/en/latest/setup.html#init-catalog Update catalog -------------- -It updates an existing translations catalog based on a PO template file (POT). - -Running the following command will update a PO file: +It updates an existing translations catalog based on a PO template file (POT). Running the following +command will update a PO file: .. code:: bash @@ -187,30 +277,26 @@ Running the following command will update a PO file: updating catalog ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po based on ./sphinx_rtd_theme/locale/sphinx.pot .. tip:: + More options please, check out http://babel.pocoo.org/en/latest/setup.html#update-catalog Compile catalog --------------- -For compile catalog of the theme's project-wide is available. - -If the command has been correctly installed or registered, a -project's setup.py script should allow you to use the command: +It compile catalog an existing translations based on PO files into MO files. Running the following +command will compile catalog of PO files: .. code:: bash $ python ./setup.py compile_catalog -d ./sphinx_rtd_theme/locale/ -l es running compile_catalog -.. $ python ./setup.py compile_catalog --directory ./sphinx_rtd_theme/locale/ --locale es - running compile_catalog compiling catalog ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po to ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo Statistics about translations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -For to print the statistics about the theme translations from his catalog. - -Running the following command will printing the statistics: +For to print the statistics about the theme translations from his catalog. Running the following +command will printing the statistics: .. code:: bash @@ -220,4 +306,5 @@ Running the following command will printing the statistics: compiling catalog sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po to sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo .. tip:: + More options for ``compile`` sub-command, please, check out http://babel.pocoo.org/en/latest/cmdline.html#compile From e53c739eef428992e73a71bd74a084e0a559fce8 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 19:28:50 -0400 Subject: [PATCH 18/35] Fixed some typo --- docs/translations.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/translations.rst b/docs/translations.rst index 281e8ea32..3306df183 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -27,7 +27,7 @@ If the command has been correctly installed, a command should allow you to use t $ pybabel subcommand options -More options about this commands, execute the following command: +Execute the follow command for more options and follow these instructions to get details: .. code:: bash @@ -142,7 +142,7 @@ allow you to use the following command: $ python ./setup.py subcommand options -More options about this commands, execute the following command: +Execute the follow command for more options and follow these instructions to get details: .. code:: bash From cb18bac4bb4653e9fc29885385bae835f5e5072b Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 17 Apr 2018 20:06:31 -0400 Subject: [PATCH 19/35] Updated changelog file~ --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 787aa5357..4bee7d89a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -11,6 +11,7 @@ New Features * Added Spanish translation * Added i18n support using Babel +* Added Translation Guide documentation Fixes ----- From e6008cecddbdebbadc6012a6dd66d30f981308a3 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Wed, 18 Apr 2018 11:41:22 -0400 Subject: [PATCH 20/35] Removed output commands examples --- docs/translations.rst | 76 +++---------------------------------------- 1 file changed, 5 insertions(+), 71 deletions(-) diff --git a/docs/translations.rst b/docs/translations.rst index 3306df183..a3a1cf3ca 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -32,20 +32,6 @@ Execute the follow command for more options and follow these instructions to get .. code:: bash $ pybabel --help - Usage: pybabel command [options] [args] - - Options: - --version show program's version number and exit - -h, --help show this help message and exit - --list-locales print all known locales and exit - -v, --verbose print as much as possible - -q, --quiet print as little as possible - - commands: - compile compile message catalogs to MO files - extract extract messages from source files and generate a POT file - init create new message catalogs from a POT file - update update existing message catalogs from a POT file Translating Applications with Babel ----------------------------------- @@ -147,51 +133,6 @@ Execute the follow command for more options and follow these instructions to get .. code:: bash $ python ./setup.py --help-commands - Standard commands: - build build everything needed to install - build_py "build" pure Python modules (copy to build directory) - build_ext build C/C++ extensions (compile/link to build directory) - build_clib build C/C++ libraries used by Python extensions - build_scripts "build" scripts (copy and fixup #! line) - clean clean up temporary files from 'build' command - install install everything from build directory - install_lib install all Python modules (extensions and pure Python) - install_headers install C/C++ header files - install_scripts install scripts (Python or otherwise) - install_data install data files - sdist create a source distribution (tarball, zip file, etc.) - register register the distribution with the Python package index - bdist create a built (binary) distribution - bdist_dumb create a "dumb" built distribution - bdist_rpm create an RPM distribution - bdist_wininst create an executable installer for MS Windows - upload upload binary package to PyPI - check perform some checks on the package - - Extra commands: - saveopts save supplied options to setup.cfg or other config file - compile_catalog compile message catalogs to binary MO files - develop install package in 'development mode' - upload_docs Upload documentation to PyPI - extract_messages extract localizable strings from the project code - init_catalog create a new catalog based on a POT file - test run unit tests after in-place build - update_catalog update message catalogs from a POT file - setopt set an option in setup.cfg or another config file - install_egg_info Install an .egg-info directory for the package - rotate delete older distributions, keeping N newest files - bdist_wheel create a wheel distribution - egg_info create a distribution's .egg-info directory - alias define a shortcut to invoke one or more commands - easy_install Find/get/install Python packages - bdist_egg create an "egg" distribution - dist_info create a .dist-info directory - build_sphinx Build Sphinx documentation - - usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] - or: setup.py --help [cmd1 cmd2 ...] - or: setup.py --help-commands - or: setup.py cmd --help .. seealso:: @@ -256,9 +197,8 @@ command will produce a PO file: .. code:: bash - $ python ./setup.py init_catalog -l es -i ./sphinx_rtd_theme/locale/sphinx.pot -o ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po - running init_catalog - creating catalog './sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po' based on './sphinx_rtd_theme/locale/sphinx.pot' + $ python ./setup.py init_catalog -l es -i ./sphinx_rtd_theme/locale/sphinx.pot \ + -o ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po .. tip:: @@ -272,9 +212,8 @@ command will update a PO file: .. code:: bash - $ python ./setup.py update_catalog -l es -i ./sphinx_rtd_theme/locale/sphinx.pot -o ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po - running update_catalog - updating catalog ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po based on ./sphinx_rtd_theme/locale/sphinx.pot + $ python ./setup.py update_catalog -l es -i ./sphinx_rtd_theme/locale/sphinx.pot \ + -o ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po .. tip:: @@ -288,9 +227,7 @@ command will compile catalog of PO files: .. code:: bash - $ python ./setup.py compile_catalog -d ./sphinx_rtd_theme/locale/ -l es - running compile_catalog - compiling catalog ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po to ./sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo + $ python ./setup.py compile_catalog -d ./sphinx_rtd_theme/locale/ Statistics about translations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -302,9 +239,6 @@ command will printing the statistics: $ pybabel compile -D sphinx -d sphinx_rtd_theme/locale/ -f --statistics - 28 of 28 messages (100%) translated in sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po - compiling catalog sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po to sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.mo - .. tip:: More options for ``compile`` sub-command, please, check out http://babel.pocoo.org/en/latest/cmdline.html#compile From 8e835304d8989af6b63db3594dfd9ab902af6fa8 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Wed, 18 Apr 2018 17:53:16 -0400 Subject: [PATCH 21/35] Added more improvements about i18n from Pull request reviews --- sphinx_rtd_theme/footer.html | 29 +++--- .../locale/es/LC_MESSAGES/sphinx.po | 98 ++++++------------- sphinx_rtd_theme/locale/sphinx.pot | 61 ++++-------- sphinx_rtd_theme/search.html | 2 +- sphinx_rtd_theme/versions.html | 2 +- 5 files changed, 68 insertions(+), 124 deletions(-) diff --git a/sphinx_rtd_theme/footer.html b/sphinx_rtd_theme/footer.html index 448d14575..4c70d37f0 100644 --- a/sphinx_rtd_theme/footer.html +++ b/sphinx_rtd_theme/footer.html @@ -16,25 +16,24 @@

{%- if show_copyright %} {%- if hasdoc('copyright') %} - {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {% set path = pathto('copyright') %} + {% set copyright = copyright|e %} + © {% trans %}Copyright{% endtrans %} {{ copyright }}. {%- else %} - {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {% set copyright = copyright|e %} + © {% trans %}Copyright{% endtrans %} {{ copyright }}. {%- endif %} {%- endif %} {%- if build_id and build_url %} - {% trans build_url=build_url, build_id=build_id %} - - Build - {{ build_id }}. - - {% endtrans %} + + {% trans %}Build{% endtrans %} + {{ build_id }}. + {%- elif commit %} - {% trans commit=commit %} - - Revision {{ commit }}. - - {% endtrans %} + + {% trans %}Revision{% endtrans %} {{ commit }}. + {%- elif last_updated %} {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} {%- endif %} @@ -43,7 +42,9 @@ {%- if show_sphinx %} - {% trans %}Built with Sphinx using a theme provided by Read the Docs{% endtrans %}. + {% set sphinx_web = 'Sphinx' %} + {% set readthedocs_web = 'Read the Docs' %} + {% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %} {% trans %}theme{% endtrans %} {% trans %}provided by {{ readthedocs_web }}{% endtrans %}. {%- endif %} {%- block extrafooter %} {% endblock %} diff --git a/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po b/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po index 17a10389d..9cc82e5cb 100644 --- a/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po +++ b/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: sphinx_rtd_theme 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2018-04-16 18:43-0400\n" -"PO-Revision-Date: 2018-04-16 12:39-0400\n" +"POT-Creation-Date: 2018-04-18 17:43-0400\n" +"PO-Revision-Date: 2018-04-18 17:34-0400\n" "Last-Translator: Leonardo J. Caballero G. \n" "Language: es\n" "Language-Team: es\n" @@ -46,62 +46,37 @@ msgstr "Próximo" msgid "Previous" msgstr "Anterior" -#: sphinx_rtd_theme/footer.html:19 -#, python-format -msgid "© Copyright %(copyright)s." -msgstr "© Derechos de autor %(copyright)s." +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:70 +msgid "Copyright" +msgstr "Derechos de autor" -#: sphinx_rtd_theme/footer.html:21 -#, python-format -msgid "© Copyright %(copyright)s." -msgstr "© Derechos de autor %(copyright)s." +#: sphinx_rtd_theme/footer.html:30 +msgid "Build" +msgstr "Construido" -#: sphinx_rtd_theme/footer.html:26 -#, python-format -msgid "" -"\n" -" \n" -" Build\n" -" %(build_id)s.\n" -" \n" -" " -msgstr "" -"\n" -" \n" -" Construido\n" -" %(build_id)s.\n" -" \n" -" " - -#: sphinx_rtd_theme/footer.html:33 -#, python-format -msgid "" -"\n" -" \n" -" Revision %(commit)s.\n" -" \n" -" " -msgstr "" -"\n" -" \n" -" Revisión %(commit)s.\n" -" \n" -" " +#: sphinx_rtd_theme/footer.html:35 +msgid "Revision" +msgstr "Revisión" -#: sphinx_rtd_theme/footer.html:39 +#: sphinx_rtd_theme/footer.html:38 #, python-format msgid "Last updated on %(last_updated)s." msgstr "Actualizado por última vez en %(last_updated)s." -#: sphinx_rtd_theme/footer.html:46 -msgid "" -"Built with Sphinx using a theme provided by " -"Read the Docs" -msgstr "" -"Construido con Sphinx usando un tema proporcionado" -" por Read the Docs" +#: sphinx_rtd_theme/footer.html:47 +#, python-format +msgid "Built with %(sphinx_web)s using a" +msgstr "Construido con %(sphinx_web)s usando un" + +#: sphinx_rtd_theme/footer.html:47 +msgid "theme" +msgstr "tema" + +#: sphinx_rtd_theme/footer.html:47 +#, python-format +msgid "provided by %(readthedocs_web)s" +msgstr "proporcionado por %(readthedocs_web)s" #: sphinx_rtd_theme/layout.html:37 #, python-format @@ -120,21 +95,13 @@ msgstr "Índice" msgid "Search" msgstr "Búsqueda" -#: sphinx_rtd_theme/layout.html:70 -msgid "Copyright" -msgstr "Derechos de autor" - #: sphinx_rtd_theme/layout.html:107 msgid "Logo" msgstr "Logotipo" #: sphinx_rtd_theme/search.html:26 -msgid "" -"Please activate JavaScript to enable the search\n" -" functionality." -msgstr "" -"Por favor, active JavaScript para habilitar la funcionalidad\n" -" de búsqueda." +msgid "Please activate JavaScript to enable the search functionality." +msgstr "Por favor, active JavaScript para habilitar la funcionalidad de búsqueda." #: sphinx_rtd_theme/search.html:33 msgid "Search Results" @@ -174,10 +141,5 @@ msgid "Builds" msgstr "Construcciones" #: sphinx_rtd_theme/versions.html:32 -msgid "" -"Free document hosting provided by Read the Docs." -msgstr "" -"Alojamiento gratuito de documentos proporcionado por Read the Docs." - +msgid "Free document hosting provided by" +msgstr "Alojamiento gratuito de documentos proporcionado por" diff --git a/sphinx_rtd_theme/locale/sphinx.pot b/sphinx_rtd_theme/locale/sphinx.pot index 7e16098ef..53ea24257 100644 --- a/sphinx_rtd_theme/locale/sphinx.pot +++ b/sphinx_rtd_theme/locale/sphinx.pot @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: sphinx_rtd_theme 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2018-04-16 18:43-0400\n" +"POT-Creation-Date: 2018-04-18 17:43-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -46,47 +46,36 @@ msgstr "" msgid "Previous" msgstr "" -#: sphinx_rtd_theme/footer.html:19 -#, python-format -msgid "© Copyright %(copyright)s." +#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24 +#: sphinx_rtd_theme/layout.html:70 +msgid "Copyright" msgstr "" -#: sphinx_rtd_theme/footer.html:21 -#, python-format -msgid "© Copyright %(copyright)s." +#: sphinx_rtd_theme/footer.html:30 +msgid "Build" msgstr "" -#: sphinx_rtd_theme/footer.html:26 -#, python-format -msgid "" -"\n" -" \n" -" Build\n" -" %(build_id)s.\n" -" \n" -" " +#: sphinx_rtd_theme/footer.html:35 +msgid "Revision" msgstr "" -#: sphinx_rtd_theme/footer.html:33 +#: sphinx_rtd_theme/footer.html:38 #, python-format -msgid "" -"\n" -" \n" -" Revision %(commit)s.\n" -" \n" -" " +msgid "Last updated on %(last_updated)s." msgstr "" -#: sphinx_rtd_theme/footer.html:39 +#: sphinx_rtd_theme/footer.html:47 #, python-format -msgid "Last updated on %(last_updated)s." +msgid "Built with %(sphinx_web)s using a" msgstr "" -#: sphinx_rtd_theme/footer.html:46 -msgid "" -"Built with Sphinx using a theme provided by " -"Read the Docs" +#: sphinx_rtd_theme/footer.html:47 +msgid "theme" +msgstr "" + +#: sphinx_rtd_theme/footer.html:47 +#, python-format +msgid "provided by %(readthedocs_web)s" msgstr "" #: sphinx_rtd_theme/layout.html:37 @@ -106,18 +95,12 @@ msgstr "" msgid "Search" msgstr "" -#: sphinx_rtd_theme/layout.html:70 -msgid "Copyright" -msgstr "" - #: sphinx_rtd_theme/layout.html:107 msgid "Logo" msgstr "" #: sphinx_rtd_theme/search.html:26 -msgid "" -"Please activate JavaScript to enable the search\n" -" functionality." +msgid "Please activate JavaScript to enable the search functionality." msgstr "" #: sphinx_rtd_theme/search.html:33 @@ -155,8 +138,6 @@ msgid "Builds" msgstr "" #: sphinx_rtd_theme/versions.html:32 -msgid "" -"Free document hosting provided by Read the Docs." +msgid "Free document hosting provided by" msgstr "" diff --git a/sphinx_rtd_theme/search.html b/sphinx_rtd_theme/search.html index e3aa9b5c6..16bef015e 100644 --- a/sphinx_rtd_theme/search.html +++ b/sphinx_rtd_theme/search.html @@ -23,7 +23,7 @@

- {% trans %}Please activate JavaScript to enable the search + {% trans trimmed %}Please activate JavaScript to enable the search functionality.{% endtrans %}

diff --git a/sphinx_rtd_theme/versions.html b/sphinx_rtd_theme/versions.html index 4d78287ad..ef92ba592 100644 --- a/sphinx_rtd_theme/versions.html +++ b/sphinx_rtd_theme/versions.html @@ -29,7 +29,7 @@
- {% trans %}Free document hosting provided by Read the Docs.{% endtrans %} + {% trans %}Free document hosting provided by{% endtrans %} Read the Docs. From 9b0215ce6c93b51c48cf6a46c574f2d536f0e253 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Wed, 18 Apr 2018 17:54:38 -0400 Subject: [PATCH 22/35] Updated translation guite with the Pull request reviews --- docs/translations.rst | 49 ------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/docs/translations.rst b/docs/translations.rst index a3a1cf3ca..0c8e868bd 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -7,11 +7,6 @@ Translation Guide You can help to translate the Read the Docs Sphinx Theme. -Languages available: - -- Spanish contributed by Leonardo J. Caballero G. -- Your Language by YOUR NAME. - Installation ============ @@ -23,16 +18,6 @@ For translating the Read the Docs Sphinx Theme you will need to install the foll If the command has been correctly installed, a command should allow you to use the following command: -.. code:: bash - - $ pybabel subcommand options - -Execute the follow command for more options and follow these instructions to get details: - -.. code:: bash - - $ pybabel --help - Translating Applications with Babel ----------------------------------- @@ -42,16 +27,6 @@ alias ``_('str')`` or ``{% trans %}string 1, string 2, string 3, etc.{% endtran Then it’s time to create a .pot file. A .pot file contains all the strings and is the template for a .po file which contains the translated strings. The ``babel`` package can do all that for you. -.. note:: - The ``babel`` package install a command called ``pybabel``, please, check out for more options at - http://babel.pocoo.org/en/latest/cmdline.html - -Jinja2 HTML templates ---------------------- - -This Sphinx theme using a awesome modern and designer-friendly HTML templating language for Python -called ``Jinja2``. The ``Jinja2`` package is used for that. - Configuration ============= @@ -82,10 +57,6 @@ The translations files are based on ``gettext`` format and they are placed at th :file:`sphinx.po` This file is the **Portable Object** Gettext format to translate. -:file:`sphinx.mo` - This file is the **Machine Object** Gettext format generated later of translate - your :file:`sphinx.po` file via the catalog compilation. - Babel Configurations -------------------- @@ -134,13 +105,6 @@ Execute the follow command for more options and follow these instructions to get $ python ./setup.py --help-commands -.. seealso:: - - More details check out the following links: - - - `Writing the Setup Configuration File `_. - - `How setup this file for babel configurations `_. - Extraction Configurations ------------------------- @@ -229,16 +193,3 @@ command will compile catalog of PO files: $ python ./setup.py compile_catalog -d ./sphinx_rtd_theme/locale/ -Statistics about translations -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -For to print the statistics about the theme translations from his catalog. Running the following -command will printing the statistics: - -.. code:: bash - - $ pybabel compile -D sphinx -d sphinx_rtd_theme/locale/ -f --statistics - -.. tip:: - - More options for ``compile`` sub-command, please, check out http://babel.pocoo.org/en/latest/cmdline.html#compile From 50f7c8b2455c32843c3e5b8e5da2059700c2bdf7 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Wed, 18 Apr 2018 18:39:00 -0400 Subject: [PATCH 23/35] Revert the original value for pygments_style to default --- sphinx_rtd_theme/theme.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx_rtd_theme/theme.conf b/sphinx_rtd_theme/theme.conf index 09fd1d411..530c1cdc8 100644 --- a/sphinx_rtd_theme/theme.conf +++ b/sphinx_rtd_theme/theme.conf @@ -1,7 +1,7 @@ [theme] inherit = basic stylesheet = css/theme.css -pygments_style = sphinx +pygments_style = default [options] canonical_url = From 3b50dc09aa81337163ce25c50272c0387a9c5cfb Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Wed, 18 Apr 2018 18:42:23 -0400 Subject: [PATCH 24/35] Updated with more improvements translations guide --- docs/translations.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/translations.rst b/docs/translations.rst index 0c8e868bd..2fc3956ae 100644 --- a/docs/translations.rst +++ b/docs/translations.rst @@ -16,13 +16,11 @@ For translating the Read the Docs Sphinx Theme you will need to install the foll $ pip install babel Jinja2 -If the command has been correctly installed, a command should allow you to use the following command: - Translating Applications with Babel ----------------------------------- After you marked all the strings you want to translate in this Sphinx theme with the gettext function -alias ``_('str')`` or ``{% trans %}string 1, string 2, string 3, etc.{% endtrans %}`` blocks. +alias ``_('str')`` or ``{% trans %}string 1, string 2, string 3, etc.{% endtrans %}`` blocks. Then it’s time to create a .pot file. A .pot file contains all the strings and is the template for a .po file which contains the translated strings. The ``babel`` package can do all that for you. @@ -192,4 +190,3 @@ command will compile catalog of PO files: .. code:: bash $ python ./setup.py compile_catalog -d ./sphinx_rtd_theme/locale/ - From ae8debe101d533b2111c720ad867bc4e7f491420 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 1 May 2018 10:01:07 -0400 Subject: [PATCH 25/35] Added and enabled add_message_catalog for theme using Sphinx 1.8.0 --- docs/conf.py | 1 + sphinx_rtd_theme/__init__.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 36dd0d268..e052c6e73 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,6 +38,7 @@ 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'sphinxcontrib.httpdomain', + 'sphinx_rtd_theme', ] # Do not warn about external images (status badges in README.rst) diff --git a/sphinx_rtd_theme/__init__.py b/sphinx_rtd_theme/__init__.py index 684e26640..1387bddea 100644 --- a/sphinx_rtd_theme/__init__.py +++ b/sphinx_rtd_theme/__init__.py @@ -4,6 +4,7 @@ """ from os import path +import sphinx __version__ = '0.3.0' __version_full__ = __version__ @@ -17,3 +18,11 @@ def get_html_theme_path(): # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package def setup(app): app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__))) + + # for sphinx-1.8 or later + if sphinx.version_info[0:3] >= (1,8,0): + + rtd_locale_path = path.join(path.abspath(path.dirname(__file__)), 'locale') + + # See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog + app.add_message_catalog('sphinx', rtd_locale_path) From 2f190b61d959ecd28c952cbcd17cbdf3232ede03 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 1 May 2018 10:02:44 -0400 Subject: [PATCH 26/35] Updated Spanish translation --- sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po b/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po index 9cc82e5cb..74ee6758f 100644 --- a/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po +++ b/sphinx_rtd_theme/locale/es/LC_MESSAGES/sphinx.po @@ -8,11 +8,11 @@ msgstr "" "Project-Id-Version: sphinx_rtd_theme 0.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2018-04-18 17:43-0400\n" -"PO-Revision-Date: 2018-04-18 17:34-0400\n" +"PO-Revision-Date: 2018-04-30 23:31-0400\n" "Last-Translator: Leonardo J. Caballero G. \n" "Language: es\n" "Language-Team: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1)\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" @@ -40,7 +40,7 @@ msgstr "Ver página de código fuente" #: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5 msgid "Next" -msgstr "Próximo" +msgstr "Siguiente" #: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8 msgid "Previous" From 693454dd7860718f1b4c8d80b41be1cb1d881753 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 1 May 2018 12:51:17 -0400 Subject: [PATCH 27/35] Added Sphinx 1.8.0 support for the testing on Travis-CI --- requirements.txt | 2 ++ tox.ini | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..e0f8f6e43 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# sphinx 1.8.0 +-e git+https://github.com/sphinx-doc/sphinx@master#egg=sphinx diff --git a/tox.ini b/tox.ini index cf970daf0..e406fa9bb 100644 --- a/tox.ini +++ b/tox.ini @@ -12,12 +12,14 @@ setev = LANG=C deps = . + -r{toxinidir}/requirements.txt readthedocs-sphinx-ext pytest sphinx13: Sphinx < 1.4 sphinx14: Sphinx < 1.5 sphinx15: Sphinx < 1.6 sphinx16: Sphinx < 1.7 + sphinx17: Sphinx < 1.8 commands = py.test {posargs} From f955d331543b43965b82839fb4b7760ce7464c09 Mon Sep 17 00:00:00 2001 From: "Leonardo J. Caballero G" Date: Tue, 1 May 2018 20:03:44 -0400 Subject: [PATCH 28/35] Moved requirements install command from tox file into travis file and fixed url from requirements file --- .travis.yml | 1 + requirements.txt | 2 +- tox.ini | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ed49b7fa..83f1c06fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ matrix: sudo: false install: - pip install tox-travis + - pip install -r requirements.txt script: - tox diff --git a/requirements.txt b/requirements.txt index e0f8f6e43..7ce96f47e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ # sphinx 1.8.0 --e git+https://github.com/sphinx-doc/sphinx@master#egg=sphinx +-e git+https://github.com/sphinx-doc/sphinx.git@master#egg=sphinx diff --git a/tox.ini b/tox.ini index e406fa9bb..cf970daf0 100644 --- a/tox.ini +++ b/tox.ini @@ -12,14 +12,12 @@ setev = LANG=C deps = . - -r{toxinidir}/requirements.txt readthedocs-sphinx-ext pytest sphinx13: Sphinx < 1.4 sphinx14: Sphinx < 1.5 sphinx15: Sphinx < 1.6 sphinx16: Sphinx < 1.7 - sphinx17: Sphinx < 1.8 commands = py.test {posargs} From 71c6d8ecf760a847252a3cfd12399a8e39c8985e Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 5 Nov 2018 10:36:36 -0500 Subject: [PATCH 29/35] Requirements: Used numbered version --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7ce96f47e..7babb3f90 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -# sphinx 1.8.0 --e git+https://github.com/sphinx-doc/sphinx.git@master#egg=sphinx +Sphinx==1.8.1 From cd34154857f0b042748ee0649ccaeb955f58ecc9 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 5 Nov 2018 10:38:28 -0500 Subject: [PATCH 30/35] Update changelog.rst --- docs/changelog.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index fd9dfc3fe..54a161a20 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -3,6 +3,17 @@ Changelog ********* +Master +====== + +New Features +------------- + +* Added Spanish translation +* Added i18n support using Babel +* Added Translation Guide documentation + + v0.4.2 ====== @@ -51,10 +62,6 @@ when the theme is used on Read the Docs. New Features ------------- -* Added Spanish translation -* Added i18n support using Babel -* Added Translation Guide documentation - Fixes ----- From fffca44dced5887f220680f8e2beceaa0d7d10f3 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 5 Nov 2018 10:44:30 -0500 Subject: [PATCH 31/35] Remove bad import --- sphinx_rtd_theme/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sphinx_rtd_theme/__init__.py b/sphinx_rtd_theme/__init__.py index 0781f3c03..293df7851 100644 --- a/sphinx_rtd_theme/__init__.py +++ b/sphinx_rtd_theme/__init__.py @@ -4,7 +4,6 @@ """ from os import path -import sphinx __version__ = '0.4.2' __version_full__ = __version__ From ab89bb161fdff45eda3ba519dc0db7cd65887771 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 5 Nov 2018 10:49:31 -0500 Subject: [PATCH 32/35] Revert change Reverts fffca44dced5887f220680f8e2beceaa0d7d10f3 --- sphinx_rtd_theme/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sphinx_rtd_theme/__init__.py b/sphinx_rtd_theme/__init__.py index 293df7851..0781f3c03 100644 --- a/sphinx_rtd_theme/__init__.py +++ b/sphinx_rtd_theme/__init__.py @@ -4,6 +4,7 @@ """ from os import path +import sphinx __version__ = '0.4.2' __version_full__ = __version__ From 8ac46387ac21fc871b766b8b4a7f448701c4a395 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 6 Mar 2019 10:18:14 -0500 Subject: [PATCH 33/35] Delete requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 7babb3f90..000000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -Sphinx==1.8.1 From 8992188965b10a5a152d2f8dad26fd96449b2222 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 6 Mar 2019 10:18:50 -0500 Subject: [PATCH 34/35] Remove requirements file thats not needed --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 83f1c06fd..2ed49b7fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ matrix: sudo: false install: - pip install tox-travis - - pip install -r requirements.txt script: - tox From f9a2fe45d310653c02c42de8a2e4a64c253a2973 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 7 Mar 2019 09:46:56 -0500 Subject: [PATCH 35/35] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2d14f2301..0069f3ea1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ matrix: env: TOXENV=docs install: - pip install tox-travis + - pip install sphinx script: - tox