Skip to main content

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

pip install wc-django-locales-collector

In settings.py:

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 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, and this project adheres to Semantic Versioning.

[Unreleased]

[0.1.0]

Initial version.

Metadata

Release files for wc-django-locales-collector 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wc-django-locales-collector 0.1.1
File Size Uploaded Provenance Actions
wc-django-locales-collector-0.1.1.tar.gz 6.6 kB Without provenance Details for wc-django-locales-collector-0.1.1.tar.gz

Release files / wc-django-locales-collector-0.1.1.tar.gz

Download URL wc-django-locales-collector-0.1.1.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b731bf4aa328367dd7efbdfddc133938864f15095193c04075da319de2c7278f
BLAKE2b-256 checksum
How to use checksums
8e68fc7edfaff856fb3bfa99bdb576d4c8a1ad0492e08400910281577eaea2ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for wc-django-locales-collector 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page