Skip to content

Commit

Permalink
Missing translation raised an exception. This didn't help in tracking…
Browse files Browse the repository at this point in the history
… it down.
  • Loading branch information
threedaymonk committed Dec 16, 2009
1 parent 0b8954d commit 76cc90a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/iplayer/translations.rb
Expand Up @@ -6,9 +6,9 @@ module Translations
:download_button => "Download ...",
:about_button => "About ...",
:status_waiting => "Waiting",
:status_stopped => "Stopped",
:pid_tool_tip => "Use either the short alphanumeric programme identifier or "+
"the URL of the viewing page on the iPlayer website.",
:status_waiting => "Waiting",
:no_pid_given => "You must specify a programme ID before I can download it.",
:save_dialog_title => "Save As",
:file_types => "iPlayer programmes",
Expand Down Expand Up @@ -52,6 +52,8 @@ def t(key, methods={})
[self.class.get_translation_namespace, key.to_s].flatten.compact.join(".").split(".").inject(STRINGS){ |hash, subkey|
hash[subkey.to_sym]
}.gsub(/\{\{([^\}]+)\}\}/){ methods[$1.to_sym] }
rescue
"MISSING TRANSLATION: #{key}"
end

def self.included(klass)
Expand Down

0 comments on commit 76cc90a

Please sign in to comment.