virtaal icon indicating copy to clipboard operation
virtaal copied to clipboard

Stop changing comments

Open scootergrisen opened this issue 9 years ago • 5 comments

When i edit PO-files in Virtaal 0.7.1 it changes the comments the other people write in to header of the files which is annoying.

Lets say some people have write some lines with:

#
#    here is my comment
#

Then Virtaal will remove the "empty" comment lines and remove the spaces so there are only one after #.

# here is my comment

scootergrisen avatar Mar 08 '16 16:03 scootergrisen

Thank you for reporting this. I'm reasonably sure this is behaviour that comes form the PO support in the Translate Toolkit. I don't know how to move/reassign it to the Toolkit. Can someone help?

I don't remember a specific reason for this behaviour. We might just want to check the unit tests, but altering existing header comments doesn't sound right.

friedelwolff avatar Mar 08 '16 17:03 friedelwolff

First step is to actually replicate in some way this behavior, for example having some string with a PO file with empty comment lines in header, parse it with factory and check if the output keeps those empty comment lines or not.

unho avatar Mar 08 '16 21:03 unho

@friedelwolff there doesn't seem to be a way to shift issues. But I think testing replication in ttk would be the first step.

dwaynebailey avatar Mar 09 '16 10:03 dwaynebailey

I was unable to replicate this on TTK (see https://github.com/unho/translate/commit/363bcf52363037df4b86dff91d93fdf6bff3fa24). Perhaps I was doing something wrong?

unho avatar Mar 23 '16 09:03 unho

I have just testing the the Virtaal 1.0.0-beta1 i have build.

This:

# Danish translation for X
# Copyright (C) 2016 X
# This file is distributed under the same license as the X package.
#
# scootergrisen, 2016.
#
#
#
# test1
#  test2
#   test3
#    test4
#
#
#
msgid ""
msgstr ""

Becomes this:

# Danish translation for X
# Copyright (C) 2016 X
# This file is distributed under the same license as the X package.
# scootergrisen, 2016.
# test1
# test2
# test3
# test4
# scootergrisen <>, 2016.
msgid ""
msgstr ""

scootergrisen avatar Mar 23 '16 12:03 scootergrisen