Method: Translatomatic::String#type

Defined in:
lib/translatomatic/string.rb

#typeSymbol

Returns The type of string, corresponding to TMX segtype.

Returns:

  • (Symbol)

    The type of string, corresponding to TMX segtype.

See Also:



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