Open bruvellu opened 1 month ago
Made the strings translatable in e5f1740938c56046310502e97eea8cf88eb1b191.
When clearing duplicated translations (#311), I found captions in English without a Portuguese version. Alvaro and Virginia helped to revise these entries on a spreadsheet, and I imported them to the database by parsing a TSV file and updating the models. See below:
>>> import csv
>>> data = []
>>> with open('caption_trans.tsv', 'r', newline='', encoding='utf-8') as tsv_files:
... tsv_reader = csv.DictReader(tsv_files, delimiter='\t')
... for row in tsv_reader:
... data.append(row)
...
>>> data
[
{'caption_en_old': '15-day-old medusa.', 'caption_en_new': '15-day-old medusa.', 'caption_pt_br': 'Medusa com 15 dias de vida.'},
{'caption_en_old': '18-chaetiger pelagic larva.', 'caption_en_new': '18-chaetiger pelagic larva.', 'caption_pt_br': 'Larva pelágica de 18 setígeros.'},
{'caption_en_old': '6-chaetiger pelagic larva.', 'caption_en_new': '6-chaetiger pelagic larva.', 'caption_pt_br': 'Larva pelágica de 6 setígeros.'},
(...)
]
>>> for d in data:
... Media.objects.filter(caption_en=d['caption_en_old']).update(caption_pt_br=d['caption_pt_br'])
... Media.objects.filter(caption_en=d['caption_en_old']).update(caption_en=d['caption_en_new'])
...
The translation string was too complicated. I simplified it in 6ed0e8f18d88ed1e794d736b5ad92e5d9657a981.
The last thing is to zero out the fuzzy and untranslated strings in Meta
to reach 100% progress.
The updated Portuguese fields are showing up as untranslated, but I'll synchronize these fields using the model_translator_sync_values
.
Synchronization worked quite well after 1fd98b32b2cd23db02bae23de9f61930d147faa1 where I resolved some issues with duplicated entries from Media fields on the pofile propagating to the database. Now what's left on Rosetta is mostly regular translations.
Almost finished the website strings on 461a6abfb64f5728616739a3432317bb6c6c0ab4. Most of the remaining strings are media titles and captions.
There are strings in the latest templates and code that are not yet translated. For example:
In addition, there are fields in
Media
and other models that have duplicated translations.This issue depends on addressing: