lektor-fixedlang


Namelektor-fixedlang JSON
Version 0.5 PyPI version JSON
download
home_pageNone
SummarySet fixed languages for patterns in Lektor.
upload_time2024-05-03 11:33:23
maintainerNone
docs_urlNone
authorNone
requires_python~=3.8
licenseCopyright 2024 H. Turgut Uyar <uyar@tekir.org> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords lektor plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            lektor-fixedlang
================

lektor-fixedlang is a plugin for the `Lektor`_ static site generator
that marks some patterns in output files with ``lang`` attributes.

Why?
----

It might be the case that a document contains words or phrases
that are in a language other than the current document's language.
If not marked properly, these parts will be processed
using an incorrect language's rules
(such as for case conversion and hyphenation),
and screen readers will pronounce them aloud incorrectly.
For example, in Turkish, the uppercase form for ``i`` is ``İ``,
and the lowercase form for ``I`` is ``ı``.
If you use the word "Wikipedia" in Turkish text,
a ``text-transform: uppercase`` CSS rule will cause it
to be displayed as "WİKİPEDİA".

To prevent this, such pieces of text have to be marked using a ``lang``
attribute, as in ``<span lang="en">Wikipedia</span>``.
This can of course be done manually when writing the content,
but that's going to be inconvenient for content writers,
and it can also be easily overlooked.

Installation
------------

To use the plugin, add it to your project::

  lektor plugin add lektor-fixedlang

The plugin can be configured using the ``configs/fixedlang.ini`` file.
Every section is the language code of the patterns in that section.
Keys are insignificant except that they have to be unique in their sections.

Example::

  [en]
  1 = Wikipedia

.. _Lektor: https://www.getlektor.com/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lektor-fixedlang",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": "lektor, plugin",
    "author": null,
    "author_email": "\"H. Turgut Uyar\" <uyar@tekir.org>",
    "download_url": "https://files.pythonhosted.org/packages/e1/b3/527cc82cda8893eb81dc562b0d6b90c5d93165bbd3e2a1d50e0da1b1d262/lektor_fixedlang-0.5.tar.gz",
    "platform": null,
    "description": "lektor-fixedlang\n================\n\nlektor-fixedlang is a plugin for the `Lektor`_ static site generator\nthat marks some patterns in output files with ``lang`` attributes.\n\nWhy?\n----\n\nIt might be the case that a document contains words or phrases\nthat are in a language other than the current document's language.\nIf not marked properly, these parts will be processed\nusing an incorrect language's rules\n(such as for case conversion and hyphenation),\nand screen readers will pronounce them aloud incorrectly.\nFor example, in Turkish, the uppercase form for ``i`` is ``\u0130``,\nand the lowercase form for ``I`` is ``\u0131``.\nIf you use the word \"Wikipedia\" in Turkish text,\na ``text-transform: uppercase`` CSS rule will cause it\nto be displayed as \"W\u0130K\u0130PED\u0130A\".\n\nTo prevent this, such pieces of text have to be marked using a ``lang``\nattribute, as in ``<span lang=\"en\">Wikipedia</span>``.\nThis can of course be done manually when writing the content,\nbut that's going to be inconvenient for content writers,\nand it can also be easily overlooked.\n\nInstallation\n------------\n\nTo use the plugin, add it to your project::\n\n  lektor plugin add lektor-fixedlang\n\nThe plugin can be configured using the ``configs/fixedlang.ini`` file.\nEvery section is the language code of the patterns in that section.\nKeys are insignificant except that they have to be unique in their sections.\n\nExample::\n\n  [en]\n  1 = Wikipedia\n\n.. _Lektor: https://www.getlektor.com/\n",
    "bugtrack_url": null,
    "license": "Copyright 2024 H. Turgut Uyar <uyar@tekir.org>  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Set fixed languages for patterns in Lektor.",
    "version": "0.5",
    "project_urls": {
        "repository": "https://github.com/uyar/lektor-fixedlang"
    },
    "split_keywords": [
        "lektor",
        " plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78af7979d2231215d1dac10f579efe55629d00389f9ec6cebf7e8b3ef879bb26",
                "md5": "ba854e9e649873540487cf7fe86eadd6",
                "sha256": "e6c0b0b49f0f15d0ad5d96cf30d84b96e993d9e70d9cae1b729f60e864dd7ed6"
            },
            "downloads": -1,
            "filename": "lektor_fixedlang-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ba854e9e649873540487cf7fe86eadd6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 5400,
            "upload_time": "2024-05-03T11:33:20",
            "upload_time_iso_8601": "2024-05-03T11:33:20.804911Z",
            "url": "https://files.pythonhosted.org/packages/78/af/7979d2231215d1dac10f579efe55629d00389f9ec6cebf7e8b3ef879bb26/lektor_fixedlang-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1b3527cc82cda8893eb81dc562b0d6b90c5d93165bbd3e2a1d50e0da1b1d262",
                "md5": "8d2b8a3c766717f8e6d58ef389c0049a",
                "sha256": "4669e1d8aa275c632e17f88f7aa3e3fb888d8d3e7853fcbc6d3b4541e358ec07"
            },
            "downloads": -1,
            "filename": "lektor_fixedlang-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8d2b8a3c766717f8e6d58ef389c0049a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 5553,
            "upload_time": "2024-05-03T11:33:23",
            "upload_time_iso_8601": "2024-05-03T11:33:23.977897Z",
            "url": "https://files.pythonhosted.org/packages/e1/b3/527cc82cda8893eb81dc562b0d6b90c5d93165bbd3e2a1d50e0da1b1d262/lektor_fixedlang-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 11:33:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "uyar",
    "github_project": "lektor-fixedlang",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "lektor-fixedlang"
}
        
Elapsed time: 0.30551s