Problem creating .resjson file type with SDL Studio 2011
Thread poster: Francesco Galardi
Francesco Galardi
Japan
Local time: 01:32
English to Italian
+ ...
Oct 18, 2013

Hello everyone,

I created a custom Regular Expression Delimited Text file type on Trados 2011
based on the following regular expression:

(?(?=^.*?(.comment))^.*?(:.*?").*?$|^.*?".*?".*?")

The file I need to translate has the following structure (it's a .resjson file):

"generic_splash_1" : "This computer is in use.",
"no_notifications_message" : "You have no notifications.",
// new strings for app hub
"_ec_title.comment" : "notification, title",

I put in bold the text I need to translate, and left 2 examples of strings that are to be left as they are.
(The 3rd and the 4th)

The regular expression will skip all the strings with ".comment",
and should use as text to be translated all the text after the 3rd quotation mark.

This works like a charm outside Trados, but for some reason,
there are some strings that don't get implemented in the file for translation,
even though the structure is exactly the same as the other strings.

I also checked the regular expression on RegEx Buddy with the .NET setting on
and it seems to catch all the strings as I would like to (including the ones Trados skips).

One of these strings is the following:

"welcome_video_caption_12" : "That's the power of Intel inside.",

As you can see, the structure of this string is pretty much the same
as the one I put in the first example, that get read by Trados without any problem.

Do you know why this problem happens?
Also, it would be nice if you could propose an alternative to the regex I posted.
(I am not an expert, so I am pretty sure there should be a better
regex that can do the same job as the one I mentioned)

Thanks in advance for your time!


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 18:32
English
Just a quick comment... Oct 18, 2013

... as this works for me in 2014 if I use your regex as the opening pattern and then this as the closing pattern;

",

Did you perhaps not set up the filetype correctly in Studio?

Regards

Paul


Direct link Reply with quote
 
Francesco Galardi
Japan
Local time: 01:32
English to Italian
+ ...
TOPIC STARTER
Thanks for your reply Oct 19, 2013

Hi Paul,

I have found the problem, but I don't know how to fix it:
the strings that don't get read have spaces after ", so that ", doesn't become the end ($) of the string.

I tried to put ",.*? as closing tag, but with this configuration, some other strings don't get read...

Do you have any idea on how I can fix this problem?

Thanks in advance for your time!


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 18:32
English
Try using exactly what I did... Oct 19, 2013

... this worked fine for me. I added a space to the end of some of the lines and this still worked. Sp opening patter of this:

(?(?=^.*?(.comment))^.*?(:.*?").*?$|^.*?".*?".*?")

Closing pattern of this:

",

If it still fails feel free to send me an email and I'll share my filetype settings with you.

Regards

Paul
pfilkin@sdl.com


Direct link Reply with quote
 
Francesco Galardi
Japan
Local time: 01:32
English to Italian
+ ...
TOPIC STARTER
Thanks for your support! Oct 19, 2013

I think I got the problem - I was using ",$ as closing tag, but the $ is not needed.
It seems it works OK as you pointed out in the comment above, thanks a lot for your help.

Best wishes


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Problem creating .resjson file type with SDL Studio 2011

Advanced search







PDF Translation - the Easy Way
TransPDF converts your PDFs to XLIFF ready for professional translation.

TransPDF converts your PDFs to XLIFF ready for professional translation. It also puts your translations back into the PDF to make new PDFs. Quicker and more accurate than hand-editing PDF. Includes free use of Infix PDF Editor with your translated PDFs.

More info »
SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search