Created
May 9, 2015 11:04
-
-
Save mdemare/53ae2e178931fa35def5 to your computer and use it in GitHub Desktop.
unused locale items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fname = ARGV[0] | |
missing = [] | |
lines = File.read(fname).lines.map(&:chomp).map {|l| l =~ /(\w+): .+/ && $1 }.compact.sort.uniq | |
for l in lines | |
puts l | |
q = `ag -w -s #{l} translators/app/`.lines.select do |x| | |
x =~ /#{l}['"]/ | |
end | |
if q.empty? | |
missing << l | |
end | |
end | |
puts "*"*88,missing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment