Project

General

Profile

Bug #15408

Feature #10034: Translation web platform

Consider forcing wrapping of po files at 79 chars per line

Added by u 10 months ago. Updated about 1 month ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
03/13/2018
Due date:
% Done:

100%

QA Check:
Ready for QA
Feature Branch:
tails.git:translation_platform_hooks
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

Whenever one opens a po file in poedit, lines may get rewrapped without any real change within the file. We should consider unifying at how many characters this should happen to avoid senseless commits.


Related issues

Related to Tails - Bug #15605: Make check_po.sh optionally accept a list of files In Progress 05/17/2018
Related to Tails - Bug #15819: Make sure ikiwiki generated PO files satisfy the requirements we want check_po to set Confirmed 08/19/2018
Related to Tails - Feature #16102: Merge translation_platform_hooks branch into tails.git:master In Progress 11/05/2018

History

#1 Updated by u 10 months ago

  • Related to Feature #15364: Create .gitattributes with merge strategy for po files added

#2 Updated by u 10 months ago

  • pre-commit git hook for people
  • main git pre-receive hook

#3 Updated by bertagaz 8 months ago

  • Target version changed from Tails_3.7 to Tails_3.8

#4 Updated by u 8 months ago

This should go into check_po.sh

#5 Updated by u 8 months ago

https://github.com/translate/translate/commit/5a484fffd26b83aa1bab299583cd17cf8576687a Translate-toolkit, as used by Weblate now supports telling it a width to wrap lines. We will need to do that whenever Weblate permits it to wrap to 79 chars in Weblate.

At the same time, we will want to verify this with check_po and allow translators who use Git to rewrap their files before committing them.

Furthermore, I believe we will need to patch Ikiwiki's Pot file generation to do that too, or make it happen within our own infrastructure. --> actually we will probably not need this.

#6 Updated by u 8 months ago

  • Related to deleted (Feature #15364: Create .gitattributes with merge strategy for po files)

#7 Updated by u 8 months ago

  • Type of work changed from Sysadmin to Code

#8 Updated by u 8 months ago

  • Related to Bug #15605: Make check_po.sh optionally accept a list of files added

#9 Updated by u 8 months ago

  • Status changed from Confirmed to In Progress

This needs to go into check_po.sh

#!/bin/sh
# Check that po files only have 79 chars per line
for FILENAME in FILELIST; do
    msgcat -w 79 $FILENAME -o "$FILENAME.new" 
    if ! diff -q $FILENAME "$FILENAME.new"; then
        echo "$FILENAME needs to be rewrapped to 79 chars." 
        exit 1
    fi
    rm "$FILENAME.new" 
done

#10 Updated by u 8 months ago

We've implemented this differently.

#11 Updated by u 8 months ago

  • % Done changed from 0 to 50
  • Feature Branch set to tails.git:translation_platform_hooks

#12 Updated by u 7 months ago

I've added this to unify_po_headers and it is already in check_po in the abovementioned branch. All of this is waiting for tester feedback currently.

#13 Updated by intrigeri 7 months ago

  • Target version changed from Tails_3.8 to Tails_3.9

#14 Updated by u 5 months ago

  • Target version changed from Tails_3.9 to Tails_3.10.1

Won't be able to do this in the next 48 hours (release of 3.9)

#15 Updated by intrigeri 3 months ago

  • Target version changed from Tails_3.10.1 to Tails_3.11

#16 Updated by u 3 months ago

  • Related to Bug #15819: Make sure ikiwiki generated PO files satisfy the requirements we want check_po to set added

#17 Updated by u 3 months ago

  • Assignee changed from u to hefee

@hefee would you be able to review this in order to move this forward?

#18 Updated by hefee 3 months ago

  • Related to Feature #16102: Merge translation_platform_hooks branch into tails.git:master added

#19 Updated by hefee 3 months ago

  • Status changed from In Progress to Fix committed
  • % Done changed from 50 to 100

It is implemented in check_po and unify_po and are checked correctly.

#20 Updated by CyrilBrulebois about 1 month ago

  • Status changed from Fix committed to Resolved

#21 Updated by hefee about 1 month ago

  • Status changed from Resolved to In Progress
  • Target version changed from Tails_3.11 to Tails_3.12
  • QA Check set to Ready for QA

I used Fix commited as status, as it is commit on a local branch, that will together with other task review together. I use now the more general "In Progress" for the moment.

#22 Updated by intrigeri 11 days ago

  • Blocks Feature #15082: Have the Weblate Git communicate with our main Git repository added

#23 Updated by intrigeri 11 days ago

  • Blocks deleted (Feature #15082: Have the Weblate Git communicate with our main Git repository)

Also available in: Atom PDF