Skip to main content

No project description provided

Project description

1. Load and Sort Message JSONs

  • Load all JSON files from ./messages/*.json
  • Sort them recursively at every level
  • Write back sorted JSONs

2. Flatten All Language Messages

  • Create flatten_messages() function for dot notation
  • Load all language JSONs into messages dict
  • Flatten each language's messages into keys_{lang} dicts

3. Create Union and Find Differences

  • Create union set of all keys (all_keys)
  • Find missing keys for each language (missing_by_lang)

4. Create Master Translation Dictionary

  • Build master_translations with all keys and available translations
  • Mark missing translations with '[MISSING]'
  • Sort master_translations by key

5. Get Missing Translations from Claude

  • Set up Claude API client
  • Process translations in batches
  • Update master_translations with responses

6. Create Individual Language Files

  • Create flattened files for each language
  • Unflatten back to nested structure
  • Write updated JSONs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

translation_strings_utility-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

translation_strings_utility-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file translation_strings_utility-0.1.1.tar.gz.

File metadata

File hashes

Hashes for translation_strings_utility-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4143d638b4f3be73c0fe4dfa7e0237eaad46ba707803df9bf7092c64d5725cf7
MD5 cf7010566c9781ba1d6b117ce61ab436
BLAKE2b-256 15854e8cf8fd9f73d2e6c93e763210a44b3540b0d42cb78bfbb5b517257d5b33

See more details on using hashes here.

File details

Details for the file translation_strings_utility-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for translation_strings_utility-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 673e83a7c74d659bdfcd1601169823f2baada9684eefcf735bdd4e681e508e21
MD5 5af3266affdd148a9bb4158cec648c07
BLAKE2b-256 88627439f2cceb5830d18a31e762b0cedbe1bf3b8f646afa9d7cc8ddec1f6728

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page