mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-21 10:20:05 +00:00
fix translation test
This commit is contained in:
parent
c63d91facc
commit
50d88fc970
2 changed files with 2 additions and 2 deletions
|
@ -538,7 +538,7 @@ class Cli
|
||||||
|
|
||||||
File.open(file, 'w') {|f| f << data.to_yaml}
|
File.open(file, 'w') {|f| f << data.to_yaml}
|
||||||
|
|
||||||
puts "#{I18n.t('export.valid', file)}".green
|
puts "#{I18n.t('form.export.valid', file)}".green
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
puts "#{I18n.t('display.error')} #17: #{e}".red
|
puts "#{I18n.t('display.error')} #17: #{e}".red
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,7 +11,7 @@ class TestTranslate < Test::Unit::TestCase
|
||||||
lang = File.basename(yaml, '.yml')
|
lang = File.basename(yaml, '.yml')
|
||||||
translate = YAML.load_file(yaml)
|
translate = YAML.load_file(yaml)
|
||||||
|
|
||||||
`grep -r -o "I18n.t('.*')" bin/ lib/ | cut -d"'" -f2`.each_line do |line|
|
`grep -r -o "I18n.t('.*)" bin/ lib/ | cut -d"'" -f2`.each_line do |line|
|
||||||
begin
|
begin
|
||||||
t = translate[lang]
|
t = translate[lang]
|
||||||
line.strip.split('.').each do |v|
|
line.strip.split('.').each do |v|
|
||||||
|
|
Loading…
Add table
Reference in a new issue