提交 538104bd 编写于 作者: B Bob Van Landuyt

Fetch all translation keys using a regex

上级 abe19872
......@@ -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
......
......@@ -106,7 +106,7 @@ describe Gitlab::I18n::PoLinter do
context 'with multiple plurals' do
let(:po_path) { 'spec/fixtures/multiple_plurals.po' }
it 'has no errors' do
it 'has errors' do
is_expected.not_to be_empty
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册