DEV: Remove `translate` API from plugin.

DEV: Remove translate API from plugin.

It appears to be completely unused at this point.

diff --git a/app/models/emoji.rb b/app/models/emoji.rb
index cfd121b..7222caf 100644
--- a/app/models/emoji.rb
+++ b/app/models/emoji.rb
@@ -126,7 +126,7 @@ class Emoji
   end
 
   def self.load_translations
-    db["translations"].merge(Plugin::CustomEmoji.translations)
+    db["translations"]
   end
 
   def self.base_directory
diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb
index 023b53e..13064a7 100644
--- a/lib/plugin/instance.rb
+++ b/lib/plugin/instance.rb
@@ -30,15 +30,6 @@ class Plugin::CustomEmoji
   def self.unregister(name, group = Emoji::DEFAULT_GROUP)
     emojis[group].delete(name)
   end
-
-  def self.translations
-    @@translations ||= {}
-  end
-
-  def self.translate(from, to)
-    @@cache_key = Digest::SHA1.hexdigest(cache_key + from)[0..10]
-    translations[from] = to
-  end
 end
 
 class Plugin::Instance
@@ -491,10 +482,6 @@ class Plugin::Instance
     Emoji.clear_cache
   end
 
-  def translate_emoji(from, to)
-    Plugin::CustomEmoji.translate(from, to)
-  end
-
   def automatic_assets
     css = styles.join("\n")
     js = javascripts.join("\n")

GitHub sha: b2e4ca96

1 Like