X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8f7ecf169a3f15e125ffce2f1da219a4ef878f16..dc5d88d93d4529169429c91a631b80cff7ca605a:/test/unit/i18n_test.rb diff --git a/test/unit/i18n_test.rb b/test/unit/i18n_test.rb index 73f893455..c1dacbff2 100644 --- a/test/unit/i18n_test.rb +++ b/test/unit/i18n_test.rb @@ -30,8 +30,10 @@ class I18nTest < ActiveSupport::TestCase value.each do |subkey,subvalue| # assert plural_keys.include?(subkey), "#{key}.#{subkey} is not a valid plural key" - subvalue.scan(/%\{(\w+)\}/) do - assert variables.include?($1), "#{key}.#{subkey} uses unknown interpolation variable #{$1}" + unless subvalue.nil? + subvalue.scan(/%\{(\w+)\}/) do + assert variables.include?($1), "#{key}.#{subkey} uses unknown interpolation variable #{$1}" + end end end else