Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-08-31 20:00:29 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-08-31 22:13:02 +0300
commit538104bdd1f8f8905e2bc514bc5f94d564e3bbef (patch)
tree8c0c66404943d64958be0aca521ec2e5c690539c /lib/gitlab/i18n
parentabe198723d76cea1b7f151a15789d26a3d22ad4d (diff)
Fetch all translation keys using a regex
Diffstat (limited to 'lib/gitlab/i18n')
-rw-r--r--lib/gitlab/i18n/translation_entry.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/i18n/translation_entry.rb b/lib/gitlab/i18n/translation_entry.rb
index 75d5aa0cfe1..8d4fec0decd 100644
--- a/lib/gitlab/i18n/translation_entry.rb
+++ b/lib/gitlab/i18n/translation_entry.rb
@@ -67,11 +67,7 @@ module Gitlab
private
def translation_keys
- @translation_keys ||= if has_plural?
- entry_data.keys.select { |key| key =~ /msgstr\[\d+\]/ }
- else
- [:msgstr]
- end
+ @translation_keys ||= entry_data.keys.select { |key| key.to_s =~ /\Amsgstr(\[\d+\])?\z/ }
end
end
end