You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: helpers.rb
    path of file: ./repos/discourse/lib/pretty_text
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module PrettyText
  module Helpers
    extend self

  
    
    def t(key, opts)
      key = "js." + key
      return I18n.t(key) if opts.blank?
      str = I18n.t(key, Hash[opts.entries].symbolize_keys).dup
      opts.each { |k, v| str.gsub!("{{#{k}}}", v.to_s) }
      str
    end