NEW [WIP] Add localization support with jekyll-simple-i18n #1509

Open
jonah wants to merge 76 commits from i18n-simple into master
94 changed files with 7156 additions and 1378 deletions
Showing only changes of commit e6ff8f3d7a - Show all commits

View File

@ -21,8 +21,11 @@ module Weblate
def self.get(source_text) def self.get(source_text)
source_text.nil? or source_text.empty? ? source_text source_text.nil? or source_text.empty? ? source_text
: source_text.strip[0..150] : source_text.strip[0..150]
.gsub(/([^\w\d\s\!]|\n)/, '') .gsub(/([^\w\d\s\.\?\!]|\n)/, '')
.tr(' ', '_') << "_KEY" .tr(' ', '_')
.tr('.', 'P')
.tr('?', 'Q')
.tr('!', 'E') << "_" << source_text.length.to_s << "_KEY"
end end
end end

File diff suppressed because it is too large Load Diff