Project

General

Profile

Bug #15408

Feature #10034: Translation web platform

Consider forcing wrapping of po files at 79 chars per line

Added by u 5 months ago. Updated about 2 months ago.

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

50%

QA Check:
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

History

#1 Updated by u 4 months ago

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

#2 Updated by u 4 months ago

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

#3 Updated by bertagaz 3 months ago

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

#4 Updated by u 3 months ago

This should go into check_po.sh

#5 Updated by u 3 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 3 months ago

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

#7 Updated by u 3 months ago

  • Type of work changed from Sysadmin to Code

#8 Updated by u 3 months ago

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

#9 Updated by u 3 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 3 months ago

We've implemented this differently.

#11 Updated by u 3 months ago

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

#12 Updated by u 2 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 about 2 months ago

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

Also available in: Atom PDF