Studio 2014: Stripping out non-translatable text in JSON file
Thread poster: Ida Jonsson
Ida Jonsson
Sweden
Local time: 19:20
English to Swedish
+ ...
Mar 20, 2014

Hello,
I have received a few .json files from a client that contain a lot of text that is not supposed to be translated. I found some tips on how to add it to Studio on Proz - http://www.proz.com/forum/cat_tools_technical_help/250175-translating_json_file_with_which_cat_tool.html - but I still get quite a lot of strings that I'd like to strip out.

An example of the file structure:
{
"class": "not translatable",
"title": "TRANSLATABLE",
"modules": [
{
"class": "not translatable",
"menuBackgroundColor": "#ffffff"
},
{
"video": "non-translatable link",
"title": "TRANSLATABLE",
"text": "TRANSLATABLE"
}

etc. I added the following rule (from the link above)

^.*=\s"
"$

and all "class", "title" etc. are removed, but I still see all string values (#ffffff, etc) in Studio. Is there any way to define that I want to translate everything that comes in quotes after "title" and "text" instead?

Thank you in advance.

[Edited at 2014-03-20 09:02 GMT]


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 19:20
English
Your structure is different... Mar 20, 2014

... so try this instead:

"(title|text)":\s"
("|",)$

Regards

Paul


Direct link Reply with quote
 
Ida Jonsson
Sweden
Local time: 19:20
English to Swedish
+ ...
TOPIC STARTER
Still getting too much text Mar 20, 2014

Thank you for your reply, Paul! I'm still getting far too many strings in Studio - could this be because I'm using the file type setting for Java Resources? I have : and = set as delimiters already, but when I remove them I end up with a blank Editor window. My knowledge on regular expressions is quite limited.

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 »

Studio 2014: Stripping out non-translatable text in JSON file

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 Trados Studio 2017 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2017 helps translators increase translation productivity whilst ensuring quality. Combining translation memory, terminology management and machine translation in one simple and easy-to-use environment.

More info »



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