diff options
author | Valery Sizov <valery@gitlab.com> | 2015-12-11 13:10:00 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-12-11 13:17:12 +0200 |
commit | 72b7d1f59d4fb26fb9119c5a059528f0fc951904 (patch) | |
tree | 18faa50e9d67746be474577f395c720ff49df81b /lib | |
parent | cd97dba2a9a26e83818f7e111bc0b0185a7ced8a (diff) | |
download | gitlab-ce-72b7d1f59d4fb26fb9119c5a059528f0fc951904.tar.gz |
emoji aliases problem
Diffstat (limited to 'lib')
-rw-r--r-- | lib/award_emoji.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/award_emoji.rb b/lib/award_emoji.rb index d58a196c4ef..4d99164bc33 100644 --- a/lib/award_emoji.rb +++ b/lib/award_emoji.rb @@ -6,7 +6,42 @@ class AwardEmoji "ambulance", "anguished", "two_hearts", "wink" ] + ALIASES = { + pout: "rage", + satisfied: "laughing", + hankey: "shit", + poop: "shit", + collision: "boom", + thumbsup: "+1", + thumbsdown: "-1", + punch: "facepunch", + raised_hand: "hand", + running: "runner", + ng_woman: "no_good", + shoe: "mans_shoe", + tshirt: "shirt", + honeybee: "bee", + flipper: "dolphin", + paw_prints: "feet", + waxing_gibbous_moon: "moon", + telephone: "phone", + knife: "hocho", + envelope: "email", + pencil: "memo", + open_book: "book", + sailboat: "boat", + red_car: "car", + lantern: "izakaya_lantern", + uk: "gb", + heavy_exclamation_mark: "exclamation", + squirrel: "shipit" + }.with_indifferent_access + def self.path_to_emoji_image(name) "emoji/#{Emoji.emoji_filename(name)}.png" end + + def self.normilize_emoji_name(name) + ALIASES[name] || name + end end |