SDL Trados Studio
SDL Trados GroupShare
SDL Trados Business Manager
SDL Trados Live
SDL MultiTerm
SDL Passolo
SDL Speech to Text
SDL Managed Translation - Enterprise
SDL MultiTrans
SDL TMS
SDL WorldServer
Translation Management Connectors
SDL LiveContent S1000D
SDL Contenta S1000D
SDL XPP
SDL Tridion Docs
SDL Tridion Sites
SDL Content Assistant
SDL Machine Translation Cloud
SDL Machine Translation Connectors
SDL Machine Translation Edge
Language Developers
Tridion Developers
Tridion Docs Developers
Xopus Developers
Community Help
SDL User Experience
Language Products - GCS Internal Community
SDL Community Internal Group
SDL Access Customer Portal
SDL Professional Services
SDL Training & Certification
Style Guides
Language Technology Partner Group
SDL Academic Partners
SDL Approved Trainers
SDL Enterprise Technology Partners
XyUser Group
ETUG (European Trados User Group) Public Information
Machine Translation User Group
Nordic SDL Tridion Docs User Group
SDL Tridion UK Meetup
SDL Tridion User Group New England
SDL Tridion West Coast User Group
SDL WorldServer User Group
Tridion Docs Europe & APAC User Group
Tridion User Group Benelux
Tridion User Group Ohio Valley
SDL MultiTerm Ideas
SDL Passolo Ideas
SDL Trados GroupShare Ideas
SDL Trados Studio Ideas
SDL Machine Translation Cloud Ideas
SDL Machine Translation Edge Ideas
SDL Language Cloud TMS Ideas
SDL Language Cloud Terminology Ideas
SDL Language Cloud Online Editor Ideas
SDL Managed Translation - Enterprise Ideas
SDL TMS Ideas
SDL WorldServer Ideas
SDL Tridion Docs Ideas
SDL Tridion Sites Ideas
SDL LiveContent S1000D Ideas
SDL XPP Ideas
Events & Webinars
To SDL Documentation
To SDL Support
What's New in SDL
Detecting language please wait for.......
I'm trying to set up a Text File Type. In the file, lines starting with the character '!' are comment lines that must be excluded from the translation.
Example line that must not be translated:
! Note: Do Not Use "". Line will be cut.
The only option I seem to have is to define an Inline Tag that will set up " lines starting with the character '!' " as a placeholder.
I've tried various regexp, but none seem to work. The most basic one is:
^!.+$
I've also tried !.+ and a few others, but my lines starting with ! keep showing up as translatable. This may have to do with ! being a special character. But escaping the ! has no effect either: ^\!.+$
Triview Translations
Triview Translations said:So how do I get segmentation by line instead of by sentence?
As I said above, you can use paragraph segmentation. This is probably the best approach given…
In fact with one small change to your filetype rule because of the ! on its own:
^!.*$
You'll get this:
So quite simple in the end.
Here's a larger section of the file:
! Number 601-699 : SOFTWARE! Number 701-799 : TOOL! Number 801-899 : SPARE! Number 901-999 : SPARE! ***********************************************!TXTDATA! ***********************************************! Category : GENERAL! ***********************************************!-- Error - [1] ---------------------------------
Actions1.Check air pressure settings and pressure.2.Check if reed switch is working correctly.3.Check if cylinder is not blocked.4.Check electric/pneumatic circuits.
Each line should be 1 segment. Each line that starts with a ! must not be translated.
I've done more tests. The trouble starts with the segmentation rules:
If I set segment start = ^ and segment end =$, multiline off, each sentence becomes a segment:
!
Note:
Do Not Use "".
Line will be cut.
According to the regex references I have, '$' should be the end of a paragraph, not the end of a sentence. Or according to another reference (https://regexr.com/), it's the end of a string.
If I set segment start = ^ and segment end =\n, multiline off, the preview shows 0 segments. If I enable Multiline, each line is split into sentences again.
So how do I get segmentation by line instead of by sentence?
As I said above, you can use paragraph segmentation. This is probably the best approach given you said this:
Triview Translations said:Each line should be 1 segment.
This explains how to do this... it's on the TM and not on the file:
multifarious.filkin.com/.../
Thanks, that helped.