Skip to content

Instantly share code, notes, and snippets.

@simon04
Last active August 27, 2015 19:23
Embed
What would you like to do?
{
"dependencies": {
"lodash": "^3.10.1",
"yamljs": "^0.2.3"
}
}
YAML = require('yamljs');
_ = require('lodash');
en = YAML.load('/home/simon/src/openstreetmap-website/config/locales/en.yml').en;
// obtained using $ ag --nofilename 'flash\[.*='
danger = [
"message.delete.deleted"
,"message.new.limit_exceeded"
,"message.new.message_sent"
,"message.read.wrong_user"
,"message.reply.wrong_user"
,"oauth_clients.create.flash"
,"oauth_clients.destroy.flash"
,"oauth_clients.update.flash"
,"trace.create.trace_uploaded"
,"trace.delete.scheduled_for_deletion"
,"trace.trace_header.traces_waiting"
,"trace.view.trace_not_found"
,"trace.view.trace_not_found"
,"user.confirm_email.failure"
,"user.confirm_email.success"
,"user.confirm_email.unknown_token"
,"user.confirm_resend.failure"
,"user.confirm_resend.success"
,"user.go_public.flash success"
,"user.lost_password.notice email on way"
,"user.make_friend.already_a_friend"
,"user.make_friend.success"
,"user.new.terms accepted"
,"user.new.terms declined"
,"user.new.terms declined url"
,"user.remove_friend.not_a_friend"
,"user.remove_friend.success"
,"user.reset_password.flash changed"
,"user.reset_password.flash token bad"
,"user.terms.you need to accept or decline"
,"user_block.revoke.flash"
,"user_role.filter.not_an_administrator"
,"application.require_moderator.not_a_moderator"
,"oauth.revoke.flash"
,"redaction.create.flash"
,"redaction.destroy.error"
,"redaction.destroy.flash"
,"redaction.destroy.not_empty"
,"redaction.update.flash"
,"user.auth_failure"
,"user.confirm.already active"
,"user.confirm.success"
,"user.confirm.unknown token"
,"user.filter.not_an_administrator"
,"user.filter.not_an_administrator"
,"user_block.create.flash"
,"user_block.filter.block_expired"
,"user_block.filter.block_period"
,"user_block.update.only_creator_can_edit"
,"user_block.update.success"
,"user_role.filter.already_has_role"
,"user_role.filter.doesnt_have_role"
,"user_role.filter.not_a_role"
];
danger.map(function(d) {
var str = _.pluck([en], d.split(/\./));
if (/</.test(str)) console.log(d);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment