Method: Translatomatic::String#type
- Defined in:
- lib/translatomatic/string.rb
#type ⇒ Symbol
Returns The type of string, corresponding to TMX segtype.
55 56 57 58 59 60 61 62 |
# File 'lib/translatomatic/string.rb', line 55 def type if sentences.length >= 2 :paragraph else script = script_data @value.strip.match(/#{script.delimiter}\s*$/) ? :sentence : :phrase end end |