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.3.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.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for translation_strings_utility-0.1.3.tar.gz
Algorithm Hash digest
SHA256 075684e3b7c0e02ae321858d398624d990788e7a80a01e12c60a5f909454d0a3
MD5 f0be161013e77a13854b069ecaba5be9
BLAKE2b-256 7b8c9201d1ab49dba39a5e1c965c981b968b6024fb0c4801b457037fb546dda1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for translation_strings_utility-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d43fc6006d5365c73e47977c404b1ee9a65eec73a2ed9afa40d8b8b97630d346
MD5 7accb487e694dbe59b3196e94f58d6d2
BLAKE2b-256 bc257ed69c9b27c2b90ab353d1c4ea7f90d3b113c521f242aaf6a45f6f471717

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