Method: MissingText::Writer#get_entry_for
- Defined in:
- lib/missing_text/writer.rb
#get_entry_for(entry, language) ⇒ Object
Takes in a locale code and returns the string for that language
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/missing_text/writer.rb', line 63 def get_entry_for(entry, language) if entry.length > 1 entry_string = get_entry_for_rec(entry[1..-1], language, hashes[language][entry[0]]) else entry_string = hashes[language][entry[0]] end if entry_string.kind_of?(Array) entry_string = entry_string.map(&:inspect).join(', ') end entry_string end |