How to parser these files in Studio 2014?

Hi,

How to parser these TXT files in one single project in Studio 2014 to extract the translatable content?

File #1:

IDT_EVENTNAME16                               "Error, Guest card overridden"   
IDT_EVENTNAME17                               "Error, Guest card overridden"   
IDT_EVENTNAME18                               "Error, Card not valid yet"      

 > The translatable content is between the quotes. So the flooding regex should work in the TXT filter configuration, right?

- Opening pattern: ^.*?(")

- Closing pattern: (")$

 Files #2:

       12000  "Guest" // "Guest"
       12001  "Staff" // "Staff"
       12002  "Emergency" // "Emergency"

> The translatable content is the one between the first quotes. All other content is comments, etc.

File #3:

IDS_ACCOUNT_CONFIRM=Confirm password:
IDS_ACCOUNT_TITLE=Select Account
IDS_ACCOUNT_MESSAGE=Please enter the account name and password for the components.

 > The translatable content is the one after the equal symbol.

File #4:

DESCRIPTION_CLIENT  Client  program files     
DESCRIPTION_DATABASE      Database     
DESCRIPTION_SERVER  Server program files  

> The translatable content here is the one after the tab space. It's a tab separated file. 

Thank you in advance for your help on this!

Best regards,

Carla

Parents
  • Hi Carla,

    Try these...

    File #1
    ^.*?"
    "$

    File #2
    ^.*?"
    "\s//.*

    File#3
    ^.*=
    $

    File#4
    ^.*?\t
    $

    I think these would do it.  Make sure you keep the filetype you create above the rest, especially for the last one as this will be confused with the tab delimited otherwise.

    Regards

    Paul

    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

  • Thanks Paul but I got an error message after clicking on the Prepare batch tasks: Problem during processing opening tags! Check the definitions of your opening tags.

    I created one Regular Expression Delimited Text file type for each regex you mentioned above, moved them at the top of the File Types list, created a project with the 4 source files and run the Prepare batch tasks... Then I got this error message.

    Any idea why?

    Thanks!

    Regards,

    Carla
  • Paul,

    Don't take into account my last reply, I just deleted the default regex that was already on each file type and Studio could process the batch task Prepare. Now, my problem is the content extraction:

    File #1: all the content is not extracted, only few of the strings


    File #2: all the content in quotes is extracted, even the comments. It appears as follow in the Editor view:
    Guest" // "Guest
    Staff" // "Staff
    Emergency" // "Emergency

    For the strings like this one, it's split into two segments in Studio:
    10002 "User group:" // Label "User group:"
    User group:"
    // Label "User group:


    File #3: all content is extracted properly! :-)


    File #4: all the content is not extracted, only two sentences.

    Thanks!

    Carla
  • Try them one at a time. You can't use these four filetypes in the same project unless you have some means of telling Studio which filetype to use for which file. Tricky when they are all txt files. So if you were able to group the files together and rename the extension then you could do it that way, otherwise you need to group the source files that are formatted the same way and prepare them with the appropriate filetype only.

    So you need four projects.

    Regards

    Paul

    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

  • Oki, I created the four projects and now I'm facing the following issues :-( (sorry about that):

    File #1: Only a small block of content (located in the middle of the file) was extracted :-(

    File #2: Studio extracted the content between the first pair of quotes and the one on the second pair of quotes. I only need the one on the first pair of quotes.

    File #3: All content was extracted properly! :-)

    File #4: All content was extracted properly!

    Thanks again for your help on this!

    Carla
Reply
  • Oki, I created the four projects and now I'm facing the following issues :-( (sorry about that):

    File #1: Only a small block of content (located in the middle of the file) was extracted :-(

    File #2: Studio extracted the content between the first pair of quotes and the one on the second pair of quotes. I only need the one on the first pair of quotes.

    File #3: All content was extracted properly! :-)

    File #4: All content was extracted properly!

    Thanks again for your help on this!

    Carla
Children