[openstreetmap/openstreetmap-website] Remove temporary "_only" suffixes from map key entries (PR #4475)
Anton Khorev
notifications at github.com
Fri Jan 12 13:13:04 UTC 2024
I checked if old entries exist in any locale, they don't.
```ruby
#!/usr/bin/env ruby
require "yaml"
LOCALES_PATH = File.expand_path("../../config/locales", __dir__)
KEYS = %w[tram runway apron orchard forest grass common lake school summit].freeze
Dir.glob("#{LOCALES_PATH}/*.yml").each do |filename|
lang = File.basename(filename, ".yml")
puts "=== checking #{lang} ==="
yml = YAML.load_file(filename)
entries = yml.dig lang, "site", "key", "table", "entry"
unless entries
puts "no map key table entries"
next
end
KEYS.each do |key|
key_only = "#{key}_only"
# puts "#{key}: #{entries.key? key} vs #{key_only}: #{entries.key? key_only}"
puts "outdated key #{key}" if entries.key?(key) && !entries.key?(key_only)
end
end
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4475#issuecomment-1889167008
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4475/c1889167008 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240112/c496d5e4/attachment.htm>
More information about the rails-dev
mailing list