Bug #15191

Automate keeping the list of Core pages up-to-date in Weblate

Added by emmapeel 2018-01-17 20:01:35 . Updated 2020-03-26 18:41:22 .

Status:
Resolved
Priority:
Normal
Assignee:
zen
Category:
Target version:
Start date:
2018-01-17
Due date:
% Done:

0%

Feature Branch:
https://salsa.debian.org/hefee/puppet-tails:hefee/update_core_pages
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Translation Platform
Deliverable for:

Description

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()[0]                                    

# 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.


Subtasks


History

#1 Updated by emmapeel 2018-01-17 20:02:23

  • blocks Feature #15079: Integrate the platform with our Git and ikiwiki infrastructure added

#2 Updated by emmapeel 2018-02-09 18:19:49

  • Description updated

#3 Updated by Anonymous 2018-03-01 08:53:38

  • Assignee set to emmapeel
  • QA Check set to Info Needed

Should admins receive an email if there are core pages missing?

Should we add this piece of code to the translateserver doc?

#4 Updated by emmapeel 2018-03-01 13:15:35

u wrote:
> 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?

#5 Updated by Anonymous 2018-03-13 14:26:24

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?

#6 Updated by Anonymous 2018-03-13 14:28:47

emmapeel wrote:
> u wrote:
> > 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 2018-04-28 15:20:02

u wrote:
> 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’:

https://translate.tails.boum.org/#list-core

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 Anonymous 2018-08-16 12:28:56

  • Priority changed from Normal to Low
  • QA Check deleted (Info Needed)

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 Bug #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.

#9 Updated by intrigeri 2019-06-27 07:54:05

  • Affected tool set to Translation Platform

#10 Updated by intrigeri 2019-06-27 07:54:55

  • Subject changed from Core pages in weblate to Automate keeping the list of Core pages up-to-date in Weblate
  • Assignee deleted (emmapeel)

We’ll automate this if there’s budget left once more critical pieces are in place.

#11 Updated by intrigeri 2019-06-27 17:11:51

  • blocked by deleted (Feature #15079: Integrate the platform with our Git and ikiwiki infrastructure)

#12 Updated by intrigeri 2019-09-13 10:12:37

  • Priority changed from Low to Normal

#13 Updated by hefee 2019-12-24 14:19:19

  • Assignee set to zen
  • Feature Branch set to https://salsa.debian.org/hefee/puppet-tails:hefee/update_core_pages

I created a script to update the core pages.

#14 Updated by hefee 2020-01-01 16:08:44

  • Status changed from Confirmed to Needs Validation

#15 Updated by zen 2020-03-26 18:41:22

  • Status changed from Needs Validation to Resolved

I have reviewed, tested, improved documentation a bit, and merged. It seems to be working fine. :-)