Automate keeping the list of Core pages up-to-date in Weblate
To integrate the translation platform on our working system, we need to automate the
adding of the files in wiki/src/contribute/l10n_tricks/core_po_files.txt to the list at https://translate.tails.boum.org/#list-core
from the weblate shell:
from weblate.trans.models import ComponentList corepages = ComponentList.objects.all() # Find out if all the core pages are on the core pages component list in weblate corefiles = open("/var/lib/weblate/repositories/vcs/tails/index/wiki/src/contribute/l10n_tricks/core_po_files.txt", "r") for page in corefiles.readlines(): compos = corepages.components.filter(filemask__contains=page[2:-2]) if (compos.count() == 0): page
Gives a list of the lines that cannot be found in the component list in weblate.
#6 Updated by u over 1 year ago
Should admins receive an email if there are core pages missing?
Yeah that would be sweet, or maybe just add it to the list, and some automatic call to translate to tail-l10n when there is a new core file?
Actually I think that
- this will rarely happen
- when it happens, all we have to do is to surveil commits to wiki/src/contribute/l10n_tricks/core_po_files.txt
But in the end I don't think it's worth to automate this.
#7 Updated by emmapeel over 1 year ago
Actually, we plan to automatically add all new mdwn files as components in weblate. Thus, I don't understand why we should bother doing it for core pages separately?
The Core pages are accesible in weblate as a 'component list', a group of pages. You can browse them, or add them as default view on your Dashboard. I used to suggest to the Spanish translators to configure the Dashboard to show the core pages when we were not finished with them, and it is still now easy to navigate them with this 'component list':
We also used other component lists, like for example 'persistence' because one translator also wanted to work on persistence. Those are done manually.
But the list of core pages changes a bit from my POV. I did an update the other day and there were some files already gone from the core pages, and some new ones too.
#8 Updated by u about 1 year ago
- Priority changed from Normal to Low
- QA Check deleted (
Ok. I guess this would be a nice addon, but it's not indispensable for the platform launch. We could add this as a cronjob from time to time, or even integrate it with the scripts in #15185. Please ask hefee about this, but let's make it clear that this is not part of the sponsor deliverable, so has low prio.