pop_seps.rb

来自「A Hotel Management System based on Ruby 」· RB 代码 · 共 33 行

RB
33
字号
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 + =
减小字号Ctrl + -
显示快捷键?