'No matching file type' -- although I set one up
Thread poster: Ben Jones

Ben Jones
United Kingdom
Local time: 19:57
Japanese to English
+ ...
Aug 8, 2013

A potential client has sent me some software needing localization. The files needing to be translated appear to consist of a few XHTML files (no problem there), and some strings files, unsurprisingly called XYZ.strings and similar. The internal structure of these looks as follows:

---------------------------------------------------------------------
/* Class = "NSTextFieldCell"; title = "Do something"; ObjectID = "123"; */

123.title = "Do something";


/* Class = "NSTextFieldCell"; title = "Do something else"; ObjectID = "124"; */

124.title = "Do something else";
---------------------------------------------------------------------

When I created the project in Studio 2011 (using the default template), I tried to set these up by adding a new 'Regular Expression Delimited Text' file type I called 'Strings', with File dialog wildcard expression *.strings, and then edited the 'Document structure' inside file type Strings to have Opening pattern .title=" and Closing pattern "; with Multiline set to Off.

However, when I add the files they are detected as 'Reference' and trying to set them to 'Translatable' merely results in the error 'no matching file type could be found'.

Any ideas what I am doing wrong, and how to fix it?

TIA
Ben


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:57
English
At a guess... Aug 8, 2013

... your opening pattern finds nothing at all so the file doesn't match. Instead of this:

.title="

Try this;

.title = "

Note the spaces either side of the equals sign. You don't really need the dot before title either but it will work anyway.

Regards

Paul


 

Ben Jones
United Kingdom
Local time: 19:57
Japanese to English
+ ...
TOPIC STARTER
Multiple matches Aug 9, 2013

Thanks Paul, that works... for some files.

Some still fail, and I've noticed that they have a different structure - they're just lists of strings like:

Do Something = "Do Something";
Do Something Else = "Do Something Else";

Obviously it would be easy to set these up separately, but the problem is that they're also called XYZ.strings. Am I right to think there is no way to tell Suite that these are a different type, as it classifies them based on the filename extension? So would the only way to get around this be (somehow) to extract a list of the files that have failed, rename them to e.g. XYZ.strings2 and create a new file type?

Ben


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:57
English
No the easiest way would be to write... Aug 9, 2013

... a rule that captured them all. Maybe something like this?

Opening

^(?:/\* Class =|).*?= "

Closing
";.*$

Maybe that will do the job... there's a fair amount of guess work going on here because you're drip feeding me information!

Regards

Paul


 

Remy Blaettler
Local time: 20:57
German to English
+ ...
Try out our regex easy Aug 9, 2013

I've created a little regex fiddle:

http://refiddle.com/grs

Unfortunately, if only recognizes one line, but you can just copy & paste all your different situations to try them out.
Much easier than restarting trados everytime.


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:57
English
Very neat! Aug 9, 2013

Hi Remy,

I like it. I prefer to use RegexBuddy but if you don't have this (or some other tool), or a text editor that supports regex, then it's a great way to verify what you are doing.

Thanks

Paul


 

Ben Jones
United Kingdom
Local time: 19:57
Japanese to English
+ ...
TOPIC STARTER
Solved Aug 9, 2013

Sorry Paul for the drip-feed but I didn't want to swamp you (or others) and am also cautious re confidentiality.

In my case the lines including Class etc. are just comments, so the 'title' text inside them should be left untranslated. Hence I think I have three types of line to be processed (depending on the file):

1) /* Class = "NSTextFieldCell"; title = "Do something"; ObjectID = "123"; */
2) 123.title = "Do something";
3) Do Something = "Do Something";

Following your advice, I need a RegExp which matches 2) and 3) but ignores 1). In plain language, this would be an opening match where the line contains = " but doesn't start with /.

This should do it quite simply: ^[^/]* = " and indeed, it works on my files. I tried this before spotting Remy's answer, but it does check out and it looks like a great resource for similar situations in the future.

Many thanks for your help.

Ben


 


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


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

'No matching file type' -- although I set one up

Advanced search







SDL Trados Studio 2017 only €435 / $519
Get the cheapest prices for SDL Trados Studio 2017 on ProZ.com

Join this translator’s group buy brought to you by ProZ.com and buy SDL Trados Studio 2017 Freelance for only €435 / $519 / £345 / ¥63000 You will also receive FREE access to Studio 2019 when released.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »



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