i18n: Keying the site (1/5) - Card/cardv2, misc, navbar, and providers #1510

Merged
djoate merged 32 commits from i18n-simple into i18n-simple 2019-11-25 19:53:36 +00:00
24 changed files with 3214 additions and 456 deletions
Showing only changes of commit 8b5226d388 - Show all commits

View File

@@ -19,8 +19,10 @@ module Weblate
class ID
def self.get(source_text)
source_text.nil? ? source_text
: source_text.strip[0..100].gsub(/[^\w\d\s\.\?\!]/, '').tr(' ', '_')
source_text.nil? or source_text.empty? ? source_text
: source_text.strip[0..100]
.gsub(/([^\w\d\s\.\?\!]|\n)/, '')
.tr(' ', '_') << "_KEY"
end
end