Files in .md format

I would like to share some info I received by the Sdl team so to make everything available to other users too.
I was experiencing some issues with some .md files and although I could see the file type settings in my Trados, the content was not opened correctly.
In fact, I could see the keys and other non translatable text but only needed the text relating to a precise list of keys:
  • title
  • keywords
  • description
  • og:title
  • og:description
  • og:type
  • menu
  • tournaments
  • special
  • release_date
  • message
  • tag
  • free text after ---- at the bottom of the file

First option made available to me:

- use the embedded content processor to exclude the parts you don’t want to extract

Trados Studio screenshot showing file type settings with the embedded content processor option selected.

At a closer look the files showed a problem:

_______

"Your code blocks are created by indenting with four spaces, which is acceptable for some markdown files.  However, Studio only seems to support the use of “fenced code blocks”.

 

This difference is important because the embedded processor actually works on what Studio considers valid code blocks (as my markdown editor sees them too).  So these rules will not work on your files.  But they will work on an amended version using “Fenced code blocks”.  This means that for the time being your best bet to handle these files if you can’t get them written using “Fenced code blocks” is to use a combination of segmentation rules and something like the SDL Data Protection Suite from the appstore where you can tag the unwanted content after the project has been created.

 the absence of a clear and common specification for markdown the rules we work to are defined here:

 

https://spec.commonmark.org/

 

This section clarifies why we use this over other documents:

 

https://spec.commonmark.org/0.29/#why-is-a-spec-needed-

 

And in this part you can see why there is a problem with your files:

 

https://spec.commonmark.org/0.29/#indented-code-blocks

 

So your solution is to use one of these things:

 

  1. Add a paragraph break after the metadata.
  2. Use back ticks instead of the spaces
  3. Use Tildes instead of spaces

In any of these solutions you need to either change the files yourself, or go back to your customer and explain the problem.  That will allow you to achieve the best solution.  But if this isn’t satisfactory for you then you can use something like the SD Data Protection Suite to tag the words you wish to hide after the project has been created.



Generated Image Alt-Text
[edited by: Trados AI at 11:12 PM (GMT 0) on 28 Feb 2024]
emoji
Parents Reply Children
No Data