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.0.tar.gz (2.9 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.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for translation_strings_utility-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e53c7827ae1d99ec17f20b5dd78baa97ec9b9cf4e21138b87f83c0ec0c4a85a
MD5 b13356fdecb0cab90162c7fcaf8e1187
BLAKE2b-256 293e6646b0d4080c6488933f691ceaf6d976023c02ea41de74e9f55838f1c55b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for translation_strings_utility-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e943726cf8bd4b8b121168821439779d495c7292bfbda7dc78ee7528691550e
MD5 6276f91ee4f3ce62c2025ccc8bb9ea4f
BLAKE2b-256 d8f74f92777abe5095cb84743465f58a16f9b13d750c5e9bf2940dd5a9e93a44

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