way into sdlxliff, sdlproj and sdltm files?
Thread poster: Mpoma
Mpoma  Identity Verified
United Kingdom
Local time: 23:25
French to English
May 10, 2015

Hi,

I have SDL Studio 2014 and loathe it.

I intend initially to write a utility function (in Java or rather Jython) to at least change the "segment status" of multiple segments in a less clunky way than is possible using the app itself: I have a file with 3500 segments and changing all the segments' statuses takes AAAGES to select them all, and then AAAGES to change the statuses... I am doing this because I want to reread the whole lot of them.

But I'm having difficulty getting into these files... particularly sdlxliff. I am aware I can export to "external review"... and potentially the statuses could be changed by reading in the docx file and manipulating it. However, my initial experiments tend to show that this docx file is rather fragile: it is not possible to open in LibreOffice, mess around and then save again as a docx: Studio will then refuse to import the thing back in.

It appears one is constrained to use M$ software therefore. Well done, SDL: what a lovely pairing, M$ and $DL.

My 7zip app says that sdlxliff files are "not archives"... even when I change the extension to .zip... and yet some googling tends to suggest they are... anyone had any success with this?

More generally, can anyone give me a pointer (URL for example) to the structure of these files and how to dig into them?

Thanks!


Direct link Reply with quote
 

Roy Oestensen  Identity Verified
Norway
Local time: 00:25
Member (2010)
English to Norwegian (Bokmal)
+ ...
Are you selecting all in one sergment in one go or one at a time? May 10, 2015

It sounds to me like you are selecting one segment at a time and then change the status of it. That would take ages indeed.

If you choose all the segments in one go, my experience is that it doesn't take much time at all, neither does it to change them all.

If you want to choose all segments, click in the the leftmost column to the left of the first segment to select it. Then scroll down to the last, and click to the left of the last segment while you press the Shift key, and all the segments will be chosen.

Right click, and choose Change segment status.

If this takes ages on your PC, it must be something on your machine that is the problem, because Studio 2104 is reasonably fast on my PC, i.e. this does only take a few seconds to finish.

Roy


Direct link Reply with quote
 
Mpoma  Identity Verified
United Kingdom
Local time: 23:25
French to English
TOPIC STARTER
thanks for the suggestion May 10, 2015

Thanks... in fact this business of selecting the first segment, scrolling and selecting the last is indeed what I'm talking about...

It's a fast machine... are we talking about the same size of file: 3,500 segments? Or what about the repetitiveness? This particular job is an .xlsx with multiple identical segments... maybe the propagation mechanism (a grand word for something that's been 20 years in the development) is the cause of the slowness.

Could be some SDL setting I suppose... another reason I hate this app is because it's all over the place: thousands of different stupid little icons, in these vile ribbons, without (usually) the possibility of using hotkeys, menu mnemonics, etc. to accomplish what you want.

I am sure once I crack a way of manipulating these files programmatically I can get a lot done more easily and ergonomically than this amateurish crapp-app which I was effectively forced to buy because my clients (bless 'em) think it's so wonderful.


Direct link Reply with quote
 

Roy Oestensen  Identity Verified
Norway
Local time: 00:25
Member (2010)
English to Norwegian (Bokmal)
+ ...
You are not limited to use SDL Studio May 10, 2015

If you have another CAT tool that you prefer, you could just import the sdlxliff files into that CAT tool, translate them there, and then copy the translated sdlxliff files back to the target folder for Studio. I still think it's a good investment, though, since I can check that everything is fine before returning the translation back to the customer.

Direct link Reply with quote
 

Dominique Pivard  Identity Verified
Local time: 01:25
Finnish to French
documents vs. containers May 10, 2015

Mpoma wrote:
My 7zip app says that sdlxliff files are "not archives"... even when I change the extension to .zip... and yet some googling tends to suggest they are... anyone had any success with this?

SDLXLIFF is the internal format for Studio's documents. As the name suggests, the format is XLIFF, with SDL's proprietary extensions to it (XLIFF allows such extensions). It's not an archive, it's a plain text format that you should be able to open in any text editor.

You are probably confusing them with SDLPPX (and SDLRPX), which is the extension for Studio's packages. These are indeed zip files by another name: if you change the extension to ZIP, you will be able to open this files in 7zip.

As to "success", several tools offer various levels of support for SDL's file formats: some can only read SDLXLIFF files, others can convert SDLTM files, some can open SDLPPX packages, fewer can create the "return" packages (SDLRPX) etc. No doubt hundreds of hours have been spent to achieve this, so I'm not sure a single person would want to do it all over again, reinventing a poorer wheel. I think memoQ currently has the most extensive support for everything SDL.


Direct link Reply with quote
 
Mpoma  Identity Verified
United Kingdom
Local time: 23:25
French to English
TOPIC STARTER
May 10, 2015

delete this posting???

[Edited at 2015-05-10 18:51 GMT]


Direct link Reply with quote
 
Mpoma  Identity Verified
United Kingdom
Local time: 23:25
French to English
TOPIC STARTER
thanks again Dominique May 10, 2015

Dominique Pivard wrote:

SDLXLIFF is the internal format for Studio's documents. As the name suggests, the format is XLIFF, with SDL's proprietary extensions to it (XLIFF allows such extensions). It's not an archive, it's a plain text format that you should be able to open in any text editor.


Thanks Dominique, once again.

Yes, I was misled when I opened it by a tag called <internal-file form="base64">... this appears to contain binary code... but after that there are indeed regular xml tags... I was able to edit the target text of a segment this in Textpad and then save, open in Studio... and my edit is right there.

I also appear to have identified the segment status: "<sdl:seg id="73" conf="Draft" ..." or "<sdl:seg id="105" conf="Translated" ... etc. Pretty straightforward stuff!

Use of other CAT tools: the only acceptable one to me would be OmegaT as I'm far too much of a tightwad (FR: radin) ... it may well be possible to translate sdlxliff files into some other format with OmegaT... but with your help I appear to have found the way to manipulate these files. Hurrah!


Direct link Reply with quote
 
Mpoma  Identity Verified
United Kingdom
Local time: 23:25
French to English
TOPIC STARTER
example Jython code May 10, 2015

haha... this is easy with Jython... snippet which lets you choose an sdlxliff file and list all the ids and "segment statuses" of each "sdl:seg" XML tag, changing "Translated" to "Draft", and then saving over the original file...


class SetFileAsAllDraft( AbstractAction ):
....def actionPerformed( self, action_event ):
........chooser = JFileChooser()
........filter = filechooser.FileNameExtensionFilter( "SDL Studio files", [ "sdlxliff" ] )
........chooser.fileFilter = filter
........return_val = chooser.showOpenDialog( main_frame )
........if return_val == JFileChooser.APPROVE_OPTION:
............logger.info( "=== chose %s" % chooser.selectedFile.name )
............from xml.dom import minidom
............# TODO NB takes some time - use SwingWorker...
............xmldoc = minidom.parse( chooser.selectedFile.absolutePath )
............itemlist = xmldoc.getElementsByTagName( "sdl:seg" )
............logger.info( "=== number of sdl:seg segs: %d" % len(itemlist) )
............for s in itemlist:
................logger.info( " === id attr %s, conf attr %s" % ( s.attributes['id'].value, s.attributes['conf'].value ))
................if s.attributes['conf'].value == "Translated":
....................s.attributes[ 'conf' ].value = "Draft"
............import codecs
............with codecs.open( chooser.selectedFile.absolutePath, "w", "utf-8" ) as out:
................xmldoc.writexml( out )
# adding item to menu
set_as_all_draft_jmi = JMenuItem( SetFileAsAllDraft(), text = "Set file as all draft" )
gen_menu.add( set_as_all_draft_jmi )




[Edited at 2015-05-10 22:23 GMT]


Direct link Reply with quote
 

Fi2 n Co  Identity Verified
Portugal
Local time: 23:25
Member (2013)
English to French
+ ...
Workaround for handling SDL packages outside Trados Jul 21

Mpoma wrote:


My 7zip app says that sdlxliff files are "not archives"... even when I change the extension to .zip... and yet some googling tends to suggest they are... anyone had any success with this?

More generally, can anyone give me a pointer (URL for example) to the structure of these files and how to dig into them?

Thanks!


Hello Mpoma,

I stumbled on your thread while I was working on a similar subject, and after a lot of work, I’ve worked out a way to produce an SDL Return package outside of Trados.

I’ve made a video about it here: https://youtu.be/a4ZGeAjTl2M

I had also started a thread about CAT-tools interoperability here: http://www.proz.com/forum/cat_tools_technical_help/316807-working_on_projects_where_your_pm_has_a_different_cat_tool_than_yours_ie_sdl_vs_wordfast_etc.html

If you have any suggestions and if this gives you any ideas, feel free to post them here or there.

My bests 😊


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 »

way into sdlxliff, sdlproj and sdltm files?

Advanced search







Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »



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