Project

General

Profile

Bug #15408

Feature #10034: Translation web platform

Consider forcing wrapping of po files at 79 chars per line

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

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

0%

QA Check:
Feature Branch:
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 about 2 months ago

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

#2 Updated by u about 2 months ago

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

#3 Updated by bertagaz 13 days ago

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

#4 Updated by u 6 days ago

This should go into check_po.sh

#5 Updated by u 6 days 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 5 days ago

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

#7 Updated by u 5 days ago

  • Type of work changed from Sysadmin to Code

#8 Updated by u 5 days ago

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

#9 Updated by u 5 days 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

Also available in: Atom PDF