Ensure that always the identical transliteration is used no matter what I18n locale the current user has set.

pull/6038/head
Wieland Lindenthal 7 years ago
parent 19b0c15508
commit f9dca0efc5
  1. 4
      lib/open_project/full_text_search.rb

@ -32,12 +32,12 @@ module OpenProject
# This module provides utility methods to work with PostgreSQL's full-text capabilities (TSVECTOR)
module FullTextSearch
def self.normalize_text(text)
I18n.transliterate(text.to_s.downcase)
I18n.with_locale(:en) { I18n.transliterate(text.to_s.downcase) }
end
def self.normalize_filename(filename)
name_in_words = to_words filename.to_s.downcase
I18n.transliterate(name_in_words)
I18n.with_locale(:en) { I18n.transliterate(name_in_words) }
end
def self.to_words(text)

Loading…
Cancel
Save