Skip to content

Instantly share code, notes, and snippets.

@mdemare
Created May 9, 2015 11:04
Show Gist options
  • Save mdemare/53ae2e178931fa35def5 to your computer and use it in GitHub Desktop.
Save mdemare/53ae2e178931fa35def5 to your computer and use it in GitHub Desktop.
unused locale items
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