You are currently working on UAT 

TXT setting

Hi,

I have to translate a .txt file which have this content:

<!DOCTYPE QPH>
<QPH sourcelanguage="en" language="sv">
<phrase>
    <source>Enable management inverted</source>
    <target></target>
</phrase>
<phrase>
    <source>Digital IO missconfigured</source>
    <target></target>
</phrase>
<phrase>
    <source>Command disabled</source>
    <target></target>
</phrase>

 

The translation has to be inserted between <target></target>.

Beside, in the file there are several numbers that should not be touched:

<phrase>
    <source>Internal Error Code = %1</source>
    <target></target>
</phrase>

 

Furthermore, there must not be translated:

<phrase>
    <source>Command result: &quot;%1&quot;</source>
    <target></target>
</phrase>

<phrase>
    <source>You don&apos;t have sufficient privileges to complete the operation</source>
    <target></target>

 

Any idea how to set the txt file type?

Thanks

  • Hi  

    I guess you have a few options that I can think of...  might have a few more as I think he was used to dealing with sort of stuff (reluctantly!  I think I'd go with this method:

    1. Convert the file to XML by replacing the <!DOCTYPE QPH> with <?xml version="1.0" encoding="UTF-8"?> and then copy the source to the target
      1. by copying source to target in Studio and save the target file, or
      2. use a little regex in a text editor
    2. Then create a custom XML filetype to translate the target elements
    3. Finally save the translated target file and put the declaration back

    Or, go back and ask your client if they provide you with the file in a different way?

    Or, you could create a regex based filetype for this but I think this would be more problematic and you'd still need to get the original source content into the target segment anyway.

    Or, if you have access to a developer (and all LSPs and Corporates should consider this today) you could create a custom filetype just for the files as they are.  Probably a fairly trivial task given the examples in the SDL already.

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub