Bug #15408

Consider forcing wrapping of po files at 79 chars per line

Added by Anonymous 2018-03-13 15:36:05 . Updated 2019-06-27 17:16:56 .

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

100%

Feature Branch:
tails.git:translation_platform_hooks
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:
309

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.


Subtasks


Related issues

Related to Tails - Bug #15605: Make check_po optionally accept a list of files Resolved 2018-05-17
Related to Tails - Bug #15819: Make sure ikiwiki generated PO files satisfy the requirements we want check_po to set Resolved 2018-08-19
Related to Tails - Feature #16102: List of potential checks we might want to do on PO files Resolved 2018-11-05

History

#1 Updated by Anonymous 2018-04-06 10:20:45

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

#2 Updated by Anonymous 2018-04-06 10:23:14

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

#3 Updated by bertagaz 2018-05-10 11:09:13

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

#4 Updated by Anonymous 2018-05-17 08:44:51

This should go into check_po.sh

#5 Updated by Anonymous 2018-05-17 10:50:33

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 Anonymous 2018-05-17 14:08:22

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

#7 Updated by Anonymous 2018-05-17 14:09:32

  • Type of work changed from Sysadmin to Code

#8 Updated by Anonymous 2018-05-17 14:14:45

  • related to Bug #15605: Make check_po optionally accept a list of files added

#9 Updated by Anonymous 2018-05-17 14:54:15

  • 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 Anonymous 2018-05-29 09:39:37

We’ve implemented this differently.

#11 Updated by Anonymous 2018-05-29 09:39:59

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

#12 Updated by Anonymous 2018-06-12 13:01:58

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 2018-06-26 16:27:51

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

#14 Updated by Anonymous 2018-09-03 17:54:39

  • 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 2018-10-24 17:03:35

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

#16 Updated by Anonymous 2018-10-29 16:13:46

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

#17 Updated by Anonymous 2018-10-29 16:14:59

  • Assignee set to hefee

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

#18 Updated by hefee 2018-11-05 15:57:25

  • related to Feature #16102: List of potential checks we might want to do on PO files added

#19 Updated by hefee 2018-11-05 15:57:49

  • 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 2018-12-16 13:21:38

  • Status changed from Fix committed to Resolved

#21 Updated by hefee 2018-12-17 19:43:11

  • 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 2019-01-08 16:19:01

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

#23 Updated by intrigeri 2019-01-08 17:05:03

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

#24 Updated by anonym 2019-01-30 11:59:14

  • Target version changed from Tails_3.12 to Tails_3.13

#25 Updated by Anonymous 2019-02-07 15:29:47

@hefee: is this ticket still needed? if yes, please assign to enrico for review, making sure the branches are up to date with current master. thanks.

#26 Updated by hefee 2019-02-08 17:24:31

  • Status changed from In Progress to Rejected
  • Assignee deleted (hefee)
  • QA Check deleted (Ready for QA)

We won’t need to force users to wrap to 79 characters anymore, so I’ll close this.