Project

General

Profile

Bug #15191

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

Added by emmapeel over 1 year ago. Updated 9 days ago.

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

0%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Translation Platform

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.

History

#1 Updated by emmapeel over 1 year ago

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

#2 Updated by emmapeel over 1 year ago

  • Description updated (diff)

#3 Updated by u over 1 year ago

  • 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 over 1 year ago

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

#6 Updated by u over 1 year ago

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 over 1 year ago

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 u about 1 year ago

  • 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 #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 3 months ago

  • Affected tool set to Translation Platform

#10 Updated by intrigeri 3 months ago

  • 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 3 months ago

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

#12 Updated by intrigeri 9 days ago

  • Priority changed from Low to Normal

Also available in: Atom PDF