Name | wc-django-locales-collector JSON |
Version |
0.1.3
JSON |
| download |
home_page | |
Summary | Django app that collect thirdparty translations into local folder. |
upload_time | 2023-07-03 09:02:29 |
maintainer | |
docs_url | None |
author | WebCase |
requires_python | >=3.6 |
license | MIT License |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# WebCase locales collector
Collects locales from any python third parties to some local folder. It's useful for a more easier local translations management.
## Installation
```sh
pip install wc-django-locales-collector
```
In `settings.py`:
```python
INSTALLED_APPS += [
'wcd_locales_collector',
]
WCD_LOCALES_COLLECTOR = {
# List of modules for which locales will be collected.
'MODULES': [
# For example:
'rest_framework',
],
# Path to save collected locales.
'PATH' = BASE_ROOT / 'exported_locale'
}
# All root options could also be provided as standalone ones(for overriding, etc.):
WCD_LOCALES_COLLECTOR_PATH = BASE_ROOT / 'replaced_locale'
# ...
# Your static `LOCALE_PATHS` config should be wrapped by paths extender.
# If it's not, then all exported locales will not be applied.
from wcd_locales_collector.helpers import locale_paths_extender
LOCALE_PATHS = locale_paths_extender(LOCALE_PATHS)
# OR!
# If you have some issues with that approach - you can extend `LOCALE_PATHS`
# manually:
from wcd_locales_collector.services import pathifier
LOCALE_PATHS = LOCALE_PATHS + pathifier.get_modules_result_paths(
WCD_LOCALES_COLLECTOR['MODULES'], WCD_LOCALES_COLLECTOR_PATH
)
```
## Usage
```python
python manage.py collectlocales
```
That's it. You have collected all locales from all provided apps into a separate folder.
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.3]
### Added
- Automatic mo2po sources conversion if library doesn't have po files but ships with compiled mo files.
## [0.1.2]
### Fixed
- Initial merge issue with unicode symbols.
## [0.1.0]
Initial version.
Raw data
{
"_id": null,
"home_page": "",
"name": "wc-django-locales-collector",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "WebCase",
"author_email": "info@webcase.studio",
"download_url": "https://files.pythonhosted.org/packages/cb/db/5f870a19c2b8feed219d47b02d131418e0959a16e48f31c9ef5c6e58c4fb/wc-django-locales-collector-0.1.3.tar.gz",
"platform": null,
"description": "# WebCase locales collector\n\nCollects locales from any python third parties to some local folder. It's useful for a more easier local translations management.\n\n## Installation\n\n```sh\npip install wc-django-locales-collector\n```\n\nIn `settings.py`:\n\n```python\n\nINSTALLED_APPS += [\n 'wcd_locales_collector',\n]\n\nWCD_LOCALES_COLLECTOR = {\n # List of modules for which locales will be collected.\n 'MODULES': [\n # For example:\n 'rest_framework',\n ],\n # Path to save collected locales.\n 'PATH' = BASE_ROOT / 'exported_locale'\n}\n\n# All root options could also be provided as standalone ones(for overriding, etc.):\nWCD_LOCALES_COLLECTOR_PATH = BASE_ROOT / 'replaced_locale'\n\n# ...\n\n# Your static `LOCALE_PATHS` config should be wrapped by paths extender.\n# If it's not, then all exported locales will not be applied.\nfrom wcd_locales_collector.helpers import locale_paths_extender\n\nLOCALE_PATHS = locale_paths_extender(LOCALE_PATHS)\n\n# OR!\n# If you have some issues with that approach - you can extend `LOCALE_PATHS`\n# manually:\nfrom wcd_locales_collector.services import pathifier\n\nLOCALE_PATHS = LOCALE_PATHS + pathifier.get_modules_result_paths(\n WCD_LOCALES_COLLECTOR['MODULES'], WCD_LOCALES_COLLECTOR_PATH\n)\n```\n\n## Usage\n\n```python\npython manage.py collectlocales\n```\n\nThat's it. You have collected all locales from all provided apps into a separate folder.\n# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [Unreleased]\n\n## [0.1.3]\n### Added\n- Automatic mo2po sources conversion if library doesn't have po files but ships with compiled mo files.\n\n## [0.1.2]\n### Fixed\n- Initial merge issue with unicode symbols.\n\n## [0.1.0]\nInitial version.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Django app that collect thirdparty translations into local folder.",
"version": "0.1.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cbdb5f870a19c2b8feed219d47b02d131418e0959a16e48f31c9ef5c6e58c4fb",
"md5": "5597e9c0bc3e5f4ff0878998b15c0318",
"sha256": "4fe92d654ae250a1450d2bf4bf1934628d09f35dbbfddef43659d5a01149fe2f"
},
"downloads": -1,
"filename": "wc-django-locales-collector-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "5597e9c0bc3e5f4ff0878998b15c0318",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6792,
"upload_time": "2023-07-03T09:02:29",
"upload_time_iso_8601": "2023-07-03T09:02:29.170068Z",
"url": "https://files.pythonhosted.org/packages/cb/db/5f870a19c2b8feed219d47b02d131418e0959a16e48f31c9ef5c6e58c4fb/wc-django-locales-collector-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-03 09:02:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "wc-django-locales-collector"
}