📄 pop_seps.rb
字号:
ENV["RAILS_ENV"] = 'development'
require 'config/environment'
require 'date'
include Globalize
files = Dir.glob("D:/projects/temp/old-mlr/lib/globalize/locales/country-data/*.rb")
files.each do |fp|
sections = fp.split '/'
fn = sections.last
code, ext = fn.split '.'
code.upcase!
country = Country.pick(code)
if !country
puts "ERROR: can't find #{code}"
next
end
str = File.read(fp)
eval str
country.thousands_sep = @country_data[:mon_thousands_sep]
country.decimal_sep = @country_data[:mon_decimal_point]
country.save!
puts "updated #{country.english_name}"
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -