Problem creating .resjson file type with SDL Studio 2011
Thread poster: Francesco Galardi

Francesco Galardi
Japan
Local time: 20:39
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!


 

SDL Community  Identity Verified
United Kingdom
Local time: 12:39
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


 

Francesco Galardi
Japan
Local time: 20:39
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!


 

SDL Community  Identity Verified
United Kingdom
Local time: 12:39
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


 

Francesco Galardi
Japan
Local time: 20:39
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


 


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







Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »
BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »



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