translatable-xblocks
####################
|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|
|license-badge| |status-badge|
Purpose
*******
Plugin for adding translation behavior to XBlocks. This plugin assumes:
1. Translations IDA is setup (https://github.com/edx/ai-translations).
2. Frontend plugin setup to add translation selector.
When present and enabled, requesting a ``src_lang`` and ``dest_lang`` as query params in a unit render
should request and return translated versions of those XBlocks' content.
**WARNING**: This replaces some native XBlocks from ``edx-platform`` and replaces them with custom versions.
While we only override small portions of functionality, there is a chance this will cause things to "spookily"
break. See `translatable_xblocks/apps.py <translatable_xblocks/apps.py>`_ for where we do this block replacement.
Guides
******
- `Quickstart`_.
- `How to test this repository`_.
- `How to deploy this repository`_.
.. _Quickstart: docs/quickstarts/index.rst
.. _How to test this repository: docs/how-tos/test_this_repo.rst
.. _How to deploy this repository: docs/how-tos/deploy_this_repo.rst
Getting Started with Development
********************************
See `quickstart guide`.
.. _quickstart guide: docs/quickstarts/index.rst
Conventions / Rules / Best Practices
====================================
1. Use conventional commits for making commits.
2. Format files with ``black``. Do this and other fixes automatically with ``make format``.
3. Squash commits when merging a PR.
Please see also the Open edX documentation for `guidance on Python development <https://docs.openedx.org/en/latest/developers/how-tos/get-ready-for-python-dev.html>`_ in this repo.
Testing
=======
See `how to test this repository`_.
.. _how to test this repository: docs/how-tos/test_this_repo.rst
Deploying
*********
See `how to deploy this repository`_.
.. _how to deploy this repository: docs/how-tos/deploy_this_repo.rst
Getting Help
************
Documentation
=============
PLACEHOLDER: Start by going through `the documentation`_. If you need more help see below.
.. _the documentation: https://docs.openedx.org/projects/translatable-xblocks
(TODO: `Set up documentation <https://openedx.atlassian.net/wiki/spaces/DOC/pages/21627535/Publish+Documentation+on+Read+the+Docs>`_)
More Help
=========
If you're having trouble, we have discussion forums at
https://discuss.openedx.org where you can connect with others in the
community.
Our real-time conversations are on Slack. You can request a `Slack
invitation`_, then join our `community Slack workspace`_.
For anything non-trivial, the best path is to open an issue in this
repository with as many details about the issue you are facing as you
can provide.
https://github.com/edx/translatable-xblocks/issues
For more information about these options, see the `Getting Help <https://openedx.org/getting-help>`__ page.
.. _Slack invitation: https://openedx.org/slack
.. _community Slack workspace: https://openedx.slack.com/
License
*******
The code in this repository is licensed under the AGPL 3.0 unless
otherwise noted.
Please see `LICENSE.txt <LICENSE.txt>`_ for details.
Contributing
************
Contributions are very welcome.
Please read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.
This project is currently accepting all types of contributions, bug fixes,
security fixes, maintenance work, or new features. However, please make sure
to have a discussion about your new feature idea with the maintainers prior to
beginning development to maximize the chances of your change being accepted.
You can start a conversation by creating a new issue on this repo summarizing
your idea.
The Open edX Code of Conduct
****************************
All community members are expected to follow the `Open edX Code of Conduct`_.
.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/
People
******
The assigned maintainers for this component and other project details may be
found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``
file in this repo.
.. _Backstage: https://backstage.openedx.org/catalog/default/component/translatable-xblocks
Reporting Security Issues
*************************
Please do not report security issues in public. Please email security@openedx.org.
.. |pypi-badge| image:: https://img.shields.io/pypi/v/translatable-xblocks.svg
:target: https://pypi.python.org/pypi/translatable-xblocks/
:alt: PyPI
.. |ci-badge| image:: https://github.com/edx/translatable-xblocks/workflows/Python%20CI/badge.svg?branch=main
:target: https://github.com/edx/translatable-xblocks/actions
:alt: CI
.. |codecov-badge| image:: https://codecov.io/github/edx/translatable-xblocks/coverage.svg?branch=main
:target: https://codecov.io/github/edx/translatable-xblocks?branch=main
:alt: Codecov
.. |doc-badge| image:: https://readthedocs.org/projects/translatable-xblocks/badge/?version=latest
:target: https://docs.openedx.org/projects/translatable-xblocks
:alt: Documentation
.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/translatable-xblocks.svg
:target: https://pypi.python.org/pypi/translatable-xblocks/
:alt: Supported Python versions
.. |license-badge| image:: https://img.shields.io/github/license/edx/translatable-xblocks.svg
:target: https://github.com/edx/translatable-xblocks/blob/main/LICENSE.txt
:alt: License
.. TODO: Choose one of the statuses below and remove the other status-badge lines.
.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Deprecated-orange
.. .. |status-badge| image:: https://img.shields.io/badge/Status-Unsupported-red
Change Log
##########
..
All enhancements and patches to translatable_xblocks will be documented
in this file. It adheres to the structure of https://keepachangelog.com/ ,
but in reStructuredText instead of Markdown (for ease of incorporation into
Sphinx documentation and the PyPI description).
This project adheres to Semantic Versioning (https://semver.org/).
.. There should always be an "Unreleased" section for changes pending release.
Unreleased
**********
*
0.1.0 – 2024-03-06
**********************************************
Added
=====
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/edx/translatable-xblocks",
"name": "translatable-xblocks",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "Python edx",
"author": "Nathan Sprenkle",
"author_email": "nsprenkle@2u.org",
"download_url": "https://files.pythonhosted.org/packages/25/30/7da6505b708fffe173fa207cf87f0f70693ea8dd0ebe571f771f95a32cbf/translatable_xblocks-1.3.2.tar.gz",
"platform": null,
"description": "translatable-xblocks\n####################\n\n|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge|\n|license-badge| |status-badge|\n\nPurpose\n*******\n\nPlugin for adding translation behavior to XBlocks. This plugin assumes:\n\n1. Translations IDA is setup (https://github.com/edx/ai-translations).\n\n2. Frontend plugin setup to add translation selector.\n\nWhen present and enabled, requesting a ``src_lang`` and ``dest_lang`` as query params in a unit render\nshould request and return translated versions of those XBlocks' content.\n\n**WARNING**: This replaces some native XBlocks from ``edx-platform`` and replaces them with custom versions.\nWhile we only override small portions of functionality, there is a chance this will cause things to \"spookily\"\nbreak. See `translatable_xblocks/apps.py <translatable_xblocks/apps.py>`_ for where we do this block replacement.\n\nGuides\n******\n\n- `Quickstart`_.\n- `How to test this repository`_.\n- `How to deploy this repository`_.\n\n.. _Quickstart: docs/quickstarts/index.rst\n.. _How to test this repository: docs/how-tos/test_this_repo.rst\n.. _How to deploy this repository: docs/how-tos/deploy_this_repo.rst\n\nGetting Started with Development\n********************************\n\nSee `quickstart guide`.\n\n.. _quickstart guide: docs/quickstarts/index.rst\n\n\nConventions / Rules / Best Practices\n====================================\n\n1. Use conventional commits for making commits.\n\n2. Format files with ``black``. Do this and other fixes automatically with ``make format``.\n\n3. Squash commits when merging a PR.\n\nPlease see also the Open edX documentation for `guidance on Python development <https://docs.openedx.org/en/latest/developers/how-tos/get-ready-for-python-dev.html>`_ in this repo.\n\nTesting\n=======\n\nSee `how to test this repository`_.\n\n.. _how to test this repository: docs/how-tos/test_this_repo.rst\n\nDeploying\n*********\n\nSee `how to deploy this repository`_.\n\n.. _how to deploy this repository: docs/how-tos/deploy_this_repo.rst\n\nGetting Help\n************\n\nDocumentation\n=============\n\nPLACEHOLDER: Start by going through `the documentation`_. If you need more help see below.\n\n.. _the documentation: https://docs.openedx.org/projects/translatable-xblocks\n\n(TODO: `Set up documentation <https://openedx.atlassian.net/wiki/spaces/DOC/pages/21627535/Publish+Documentation+on+Read+the+Docs>`_)\n\nMore Help\n=========\n\nIf you're having trouble, we have discussion forums at\nhttps://discuss.openedx.org where you can connect with others in the\ncommunity.\n\nOur real-time conversations are on Slack. You can request a `Slack\ninvitation`_, then join our `community Slack workspace`_.\n\nFor anything non-trivial, the best path is to open an issue in this\nrepository with as many details about the issue you are facing as you\ncan provide.\n\nhttps://github.com/edx/translatable-xblocks/issues\n\nFor more information about these options, see the `Getting Help <https://openedx.org/getting-help>`__ page.\n\n.. _Slack invitation: https://openedx.org/slack\n.. _community Slack workspace: https://openedx.slack.com/\n\nLicense\n*******\n\nThe code in this repository is licensed under the AGPL 3.0 unless\notherwise noted.\n\nPlease see `LICENSE.txt <LICENSE.txt>`_ for details.\n\nContributing\n************\n\nContributions are very welcome.\nPlease read `How To Contribute <https://openedx.org/r/how-to-contribute>`_ for details.\n\nThis project is currently accepting all types of contributions, bug fixes,\nsecurity fixes, maintenance work, or new features. However, please make sure\nto have a discussion about your new feature idea with the maintainers prior to\nbeginning development to maximize the chances of your change being accepted.\nYou can start a conversation by creating a new issue on this repo summarizing\nyour idea.\n\nThe Open edX Code of Conduct\n****************************\n\nAll community members are expected to follow the `Open edX Code of Conduct`_.\n\n.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/\n\nPeople\n******\n\nThe assigned maintainers for this component and other project details may be\nfound in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml``\nfile in this repo.\n\n.. _Backstage: https://backstage.openedx.org/catalog/default/component/translatable-xblocks\n\nReporting Security Issues\n*************************\n\nPlease do not report security issues in public. Please email security@openedx.org.\n\n.. |pypi-badge| image:: https://img.shields.io/pypi/v/translatable-xblocks.svg\n :target: https://pypi.python.org/pypi/translatable-xblocks/\n :alt: PyPI\n\n.. |ci-badge| image:: https://github.com/edx/translatable-xblocks/workflows/Python%20CI/badge.svg?branch=main\n :target: https://github.com/edx/translatable-xblocks/actions\n :alt: CI\n\n.. |codecov-badge| image:: https://codecov.io/github/edx/translatable-xblocks/coverage.svg?branch=main\n :target: https://codecov.io/github/edx/translatable-xblocks?branch=main\n :alt: Codecov\n\n.. |doc-badge| image:: https://readthedocs.org/projects/translatable-xblocks/badge/?version=latest\n :target: https://docs.openedx.org/projects/translatable-xblocks\n :alt: Documentation\n\n.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/translatable-xblocks.svg\n :target: https://pypi.python.org/pypi/translatable-xblocks/\n :alt: Supported Python versions\n\n.. |license-badge| image:: https://img.shields.io/github/license/edx/translatable-xblocks.svg\n :target: https://github.com/edx/translatable-xblocks/blob/main/LICENSE.txt\n :alt: License\n\n.. TODO: Choose one of the statuses below and remove the other status-badge lines.\n.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow\n.. .. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen\n.. .. |status-badge| image:: https://img.shields.io/badge/Status-Deprecated-orange\n.. .. |status-badge| image:: https://img.shields.io/badge/Status-Unsupported-red\n\n\nChange Log\n##########\n\n..\n All enhancements and patches to translatable_xblocks will be documented\n in this file. It adheres to the structure of https://keepachangelog.com/ ,\n but in reStructuredText instead of Markdown (for ease of incorporation into\n Sphinx documentation and the PyPI description).\n\n This project adheres to Semantic Versioning (https://semver.org/).\n\n.. There should always be an \"Unreleased\" section for changes pending release.\n\nUnreleased\n**********\n\n*\n\n0.1.0 \u2013 2024-03-06\n**********************************************\n\nAdded\n=====\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "AGPL 3.0",
"summary": "Plugin for adding translation behavior to XBlocks",
"version": "1.3.2",
"project_urls": {
"Homepage": "https://github.com/edx/translatable-xblocks"
},
"split_keywords": [
"python",
"edx"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0a9ffdaee3e28bcd38ec52d71cb852b84b4dac34db94b25dd1b97ef56ee2190c",
"md5": "aaa48e1382fb8e45e7909ca517398e1a",
"sha256": "e86510c13ccbac9a99c95d3e9b317a7c15cc4b707e8d65d25db0427b41e7fd0a"
},
"downloads": -1,
"filename": "translatable_xblocks-1.3.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "aaa48e1382fb8e45e7909ca517398e1a",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.11",
"size": 45932,
"upload_time": "2024-10-29T21:00:38",
"upload_time_iso_8601": "2024-10-29T21:00:38.137909Z",
"url": "https://files.pythonhosted.org/packages/0a/9f/fdaee3e28bcd38ec52d71cb852b84b4dac34db94b25dd1b97ef56ee2190c/translatable_xblocks-1.3.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "25307da6505b708fffe173fa207cf87f0f70693ea8dd0ebe571f771f95a32cbf",
"md5": "3e93bdf77a441f039f99fbd1677fd011",
"sha256": "8edbb70cd73e134bbe4f26052e446be6a1e0c3dbbcbc754368e3d80134a80986"
},
"downloads": -1,
"filename": "translatable_xblocks-1.3.2.tar.gz",
"has_sig": false,
"md5_digest": "3e93bdf77a441f039f99fbd1677fd011",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 50056,
"upload_time": "2024-10-29T21:00:39",
"upload_time_iso_8601": "2024-10-29T21:00:39.616135Z",
"url": "https://files.pythonhosted.org/packages/25/30/7da6505b708fffe173fa207cf87f0f70693ea8dd0ebe571f771f95a32cbf/translatable_xblocks-1.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-29 21:00:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "edx",
"github_project": "translatable-xblocks",
"github_not_found": true,
"lcname": "translatable-xblocks"
}