Class: Pseudolocalization::I18n::Pseudolocalizer

Inherits:
Object
  • Object
show all
Defined in:
lib/pseudolocalization/pseudolocalizer.rb

Constant Summary collapse

ESCAPED_REGEX =
Regexp.new("(#{
  [
    "<.*?>",
    "{{.*?}}",
    "%{.*?}",
    "https?:\/\/\\S+",
    "&\\S*?;"
  ].join('|')
})")
VOWELS =
%w(a e i o u y A E I O U Y)
LETTERS =
{
  'a' => 'α',
  'b' => '',
  'c' => 'ͼ',
  'd' => '',
  'e' => '',
  'f' => 'ϝ',
  'g' => '',
  'h' => '',
  'i' => '',
  'j' => 'ĵ',
  'k' => '',
  'l' => '',
  'm' => '',
  'n' => '',
  'o' => '',
  'p' => '',
  'q' => 'ʠ',
  'r' => '',
  's' => '',
  't' => '',
  'u' => '',
  'v' => '',
  'w' => '',
  'x' => '',
  'y' => '',
  'z' => '',
  'A' => '',
  'B' => '',
  'C' => '',
  'D' => '',
  'E' => '',
  'F' => '',
  'G' => '',
  'H' => '',
  'I' => '',
  'J' => 'Ĵ',
  'K' => '',
  'L' => '',
  'M' => '',
  'N' => '',
  'O' => '',
  'P' => '',
  'Q' => 'Ǫ',
  'R' => '',
  'S' => '',
  'T' => '',
  'U' => '',
  'V' => '',
  'W' => 'Ŵ',
  'X' => '',
  'Y' => 'Ŷ',
  'Z' => 'Ż',
}.freeze

Class Method Summary collapse

Class Method Details

.pseudolocalize(object) ⇒ Object



72
73
74
# File 'lib/pseudolocalization/pseudolocalizer.rb', line 72

def pseudolocalize(object)
  translate_object(object)
end