Method: Translatomatic::Text#type
- Defined in:
- lib/translatomatic/text.rb
#type ⇒ Symbol
Returns The type of text, corresponding to TMX segtype.
87 88 89 90 91 92 93 94 |
# File 'lib/translatomatic/text.rb', line 87 def type if sentences.length >= 2 :paragraph else script = script_data @value.strip =~ /#{script.delimiter}\s*$/ ? :sentence : :phrase end end |