diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-mkdocs-mdpo-plugin.spec | 402 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 404 insertions, 0 deletions
@@ -0,0 +1 @@ +/mkdocs_mdpo_plugin-0.0.27.linux-x86_64.tar.gz diff --git a/python-mkdocs-mdpo-plugin.spec b/python-mkdocs-mdpo-plugin.spec new file mode 100644 index 0000000..7cd76ba --- /dev/null +++ b/python-mkdocs-mdpo-plugin.spec @@ -0,0 +1,402 @@ +%global _empty_manifest_terminate_build 0 +Name: python-mkdocs-mdpo-plugin +Version: 0.0.27 +Release: 1 +Summary: Mkdocs plugin for translations using PO files. +License: BSD-3-Clause +URL: https://github.com/mondeja/mkdocs-mdpo-plugin +Source0: https://mirrors.aliyun.com/pypi/web/packages/85/d3/f03b3bd0e3a4c1b8163731c525c41b342ed6fc891adf5d843f3de61e53fc/mkdocs_mdpo_plugin-0.0.27.linux-x86_64.tar.gz +BuildArch: noarch + + +%description +# mkdocs-mdpo-plugin + +[](https://pypi.org/project/mkdocs-mdpo-plugin) +[](https://pypistats.org/packages/mkdocs-mdpo-plugin) +[](https://github.com/mondeja/mkdocs-mdpo-plugin/actions?query=workflow%3ACI) +[](https://mkdocs-mdpo.ga) +[](https://github.com/mondeja/mkdocs-mdpo-plugin/actions/workflows/website-check.yml) + +<!--description-start--> + +Translations for Mkdocs using PO files, fully customizable. +Compatible with [mkdocs-material](https://squidfunk.github.io/mkdocs-material), +based on [mdpo][mdpo-docs]. + +<!--description-end--> + +## Documentation: [en](https://mkdocs-mdpo.ga) - [es](https://mkdocs-mdpo.ga/es/) + +<!--intro-start--> + +## Install + +``` +pip install mkdocs-mdpo-plugin +``` + +## Usage + +Enable the plugin in your `mkdocs.yml`: + +```yaml +plugins: + - mdpo +``` + +### Minimal configuration + +#### With [mkdocs-material](https://squidfunk.github.io/mkdocs-material) + +```yaml +theme: + name: material + language: en + +extra: + alternate: + - name: English + lang: en + - name: EspaΓ±ol + link: es + lang: es + +plugins: + - mdpo +``` + +#### Standalone + +<!-- mdpo-include-codeblock --> +```yaml +plugins: + - mdpo: + languages: + - en # first language is the original + - es +``` + +Both previous configurations will create the same layout of files building the +documentation. Given the next layout in a `docs/` directory: + +``` +π docs +βββ π index.md +``` + +After the build, you will get: + +``` +π docs +βββ π es +βΒ Β βββ π index.md.po +βββ π index.md +``` + +Just translate the strings in `docs/es/index.md.po` into Spanish, build again +with `mkdocs build` and the `site/` directory will look like: + +``` +π site +βββ π 404.html +βββ π assets +βΒ Β βββ π images +βΒ Β βββ π javascripts +βΒ Β βββ π stylesheets +βββ π es +βΒ Β βββ π index.html +βββ π index.html +βββ π sitemap.xml +βββ π sitemap.xml.gz +``` + +<!--intro-end--> + +Simple and easy. The extraction of messages process and the produced +layout are fully customizable, you can even translate code blocks! +[Check the full documentation here](https://mkdocs-mdpo.ga). + +[mdpo-docs]: https://mdpo.readthedocs.io + + + + +%package -n python3-mkdocs-mdpo-plugin +Summary: Mkdocs plugin for translations using PO files. +Provides: python-mkdocs-mdpo-plugin +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-mkdocs-mdpo-plugin +# mkdocs-mdpo-plugin + +[](https://pypi.org/project/mkdocs-mdpo-plugin) +[](https://pypistats.org/packages/mkdocs-mdpo-plugin) +[](https://github.com/mondeja/mkdocs-mdpo-plugin/actions?query=workflow%3ACI) +[](https://mkdocs-mdpo.ga) +[](https://github.com/mondeja/mkdocs-mdpo-plugin/actions/workflows/website-check.yml) + +<!--description-start--> + +Translations for Mkdocs using PO files, fully customizable. +Compatible with [mkdocs-material](https://squidfunk.github.io/mkdocs-material), +based on [mdpo][mdpo-docs]. + +<!--description-end--> + +## Documentation: [en](https://mkdocs-mdpo.ga) - [es](https://mkdocs-mdpo.ga/es/) + +<!--intro-start--> + +## Install + +``` +pip install mkdocs-mdpo-plugin +``` + +## Usage + +Enable the plugin in your `mkdocs.yml`: + +```yaml +plugins: + - mdpo +``` + +### Minimal configuration + +#### With [mkdocs-material](https://squidfunk.github.io/mkdocs-material) + +```yaml +theme: + name: material + language: en + +extra: + alternate: + - name: English + lang: en + - name: EspaΓ±ol + link: es + lang: es + +plugins: + - mdpo +``` + +#### Standalone + +<!-- mdpo-include-codeblock --> +```yaml +plugins: + - mdpo: + languages: + - en # first language is the original + - es +``` + +Both previous configurations will create the same layout of files building the +documentation. Given the next layout in a `docs/` directory: + +``` +π docs +βββ π index.md +``` + +After the build, you will get: + +``` +π docs +βββ π es +βΒ Β βββ π index.md.po +βββ π index.md +``` + +Just translate the strings in `docs/es/index.md.po` into Spanish, build again +with `mkdocs build` and the `site/` directory will look like: + +``` +π site +βββ π 404.html +βββ π assets +βΒ Β βββ π images +βΒ Β βββ π javascripts +βΒ Β βββ π stylesheets +βββ π es +βΒ Β βββ π index.html +βββ π index.html +βββ π sitemap.xml +βββ π sitemap.xml.gz +``` + +<!--intro-end--> + +Simple and easy. The extraction of messages process and the produced +layout are fully customizable, you can even translate code blocks! +[Check the full documentation here](https://mkdocs-mdpo.ga). + +[mdpo-docs]: https://mdpo.readthedocs.io + + + + +%package help +Summary: Development documents and examples for mkdocs-mdpo-plugin +Provides: python3-mkdocs-mdpo-plugin-doc +%description help +# mkdocs-mdpo-plugin + +[](https://pypi.org/project/mkdocs-mdpo-plugin) +[](https://pypistats.org/packages/mkdocs-mdpo-plugin) +[](https://github.com/mondeja/mkdocs-mdpo-plugin/actions?query=workflow%3ACI) +[](https://mkdocs-mdpo.ga) +[](https://github.com/mondeja/mkdocs-mdpo-plugin/actions/workflows/website-check.yml) + +<!--description-start--> + +Translations for Mkdocs using PO files, fully customizable. +Compatible with [mkdocs-material](https://squidfunk.github.io/mkdocs-material), +based on [mdpo][mdpo-docs]. + +<!--description-end--> + +## Documentation: [en](https://mkdocs-mdpo.ga) - [es](https://mkdocs-mdpo.ga/es/) + +<!--intro-start--> + +## Install + +``` +pip install mkdocs-mdpo-plugin +``` + +## Usage + +Enable the plugin in your `mkdocs.yml`: + +```yaml +plugins: + - mdpo +``` + +### Minimal configuration + +#### With [mkdocs-material](https://squidfunk.github.io/mkdocs-material) + +```yaml +theme: + name: material + language: en + +extra: + alternate: + - name: English + lang: en + - name: EspaΓ±ol + link: es + lang: es + +plugins: + - mdpo +``` + +#### Standalone + +<!-- mdpo-include-codeblock --> +```yaml +plugins: + - mdpo: + languages: + - en # first language is the original + - es +``` + +Both previous configurations will create the same layout of files building the +documentation. Given the next layout in a `docs/` directory: + +``` +π docs +βββ π index.md +``` + +After the build, you will get: + +``` +π docs +βββ π es +βΒ Β βββ π index.md.po +βββ π index.md +``` + +Just translate the strings in `docs/es/index.md.po` into Spanish, build again +with `mkdocs build` and the `site/` directory will look like: + +``` +π site +βββ π 404.html +βββ π assets +βΒ Β βββ π images +βΒ Β βββ π javascripts +βΒ Β βββ π stylesheets +βββ π es +βΒ Β βββ π index.html +βββ π index.html +βββ π sitemap.xml +βββ π sitemap.xml.gz +``` + +<!--intro-end--> + +Simple and easy. The extraction of messages process and the produced +layout are fully customizable, you can even translate code blocks! +[Check the full documentation here](https://mkdocs-mdpo.ga). + +[mdpo-docs]: https://mdpo.readthedocs.io + + + + +%prep +%autosetup -n mkdocs_mdpo_plugin.linux-x86_64-0.0.27 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-mkdocs-mdpo-plugin -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.27-1 +- Package Spec generated @@ -0,0 +1 @@ +83cecb27c412a148314e517836d68bbd mkdocs_mdpo_plugin-0.0.27.linux-x86_64.tar.gz |