virtaal icon indicating copy to clipboard operation
virtaal copied to clipboard

Virtaal changes some things in ts file (" becomes ", etc.)

Open scootergrisen opened this issue 8 years ago • 6 comments

When saving a .ts file in Virtaal...

This:

<translation></translation>

Becomes:

<translation/>

And:

&quot; becomes ".
&apos; becomes '.

And:

<?xml version="1.0" encoding="utf-8"?>

Becomes:

<?xml version='1.0' encoding='utf-8'?>

Or the line is removed...

Maybe this i done by some tool Virtaal is using and not Virtaal it self. Maybe there is an option to avoid it.

scootergrisen avatar Sep 14 '16 15:09 scootergrisen

@scootergrisen Does this still happen? I've never seen this, but I've never translated .ts in Virtaal.

rffontenelle avatar Jan 14 '20 18:01 rffontenelle

Yes. I just updated the first post since the website was not showing it as intended.

It seems now this line is removed instead of changed:

<?xml version="1.0" encoding="utf-8"?>

So maybe its not Virtaal making the change but a tool that Virtaal is using.

scootergrisen avatar Jan 14 '20 18:01 scootergrisen

Here is an example from a .ts file. Notice the &apos; and '

Before saving in Virtaal:

<message>
    <source>Error registering documentation file &apos;%1&apos;: %2</source>
    <translation>Fejl ved registrering af dokumentationsfilen &apos;%1&apos;: %2</translation>
</message>

After saving in Virtaal:

<message>
    <source>Error registering documentation file '%1': %2</source>
    <translation>Fejl ved registrering af dokumentationsfilen '%1': %2</translation>
</message>

I am not saying if one if better then the other. But i prefer to not change things in the file that might be unwanted by the user.

scootergrisen avatar Jan 14 '20 18:01 scootergrisen

Thanks for the confirmation. Which version of virtaal and translate-toolkit did you use? Also, Windows ou Linux?

rffontenelle avatar Jan 14 '20 18:01 rffontenelle

I think i have been using Virtaal 0.7.1 all the time. Windows 7. How do i check translate-toolkit version in Windows?

scootergrisen avatar Jan 14 '20 19:01 scootergrisen

How do i check translate-toolkit version in Windows?

I don't know. I'll try to set up Virtaal in Windows to check that.

rffontenelle avatar Jan 15 '20 00:01 rffontenelle