Method: Translatomatic::Text#type

Defined in:
lib/translatomatic/text.rb

#typeSymbol

Returns The type of text, corresponding to TMX segtype.

Returns:

  • (Symbol)

    The type of text, corresponding to TMX segtype.

See Also:



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