Class: AndroidStringsUpdater

Inherits:
StringsUpdater show all
Defined in:
lib/android_strings_updater.rb

Instance Method Summary collapse

Methods inherited from StringsUpdater

#get_document_id, #push_project, #read_settings, #working_dictionary

Instance Method Details

#add_comment(comment) ⇒ Object



15
16
17
# File 'lib/android_strings_updater.rb', line 15

def add_comment(comment)
  @document += "\n    <!-- #{comment} -->\n\n"
end

#add_translation(key, to) ⇒ Object



10
11
12
# File 'lib/android_strings_updater.rb', line 10

def add_translation(key, to)
  @document += "    <stringname=\"#{key}\">#{to}</string>\n"
end

#begin_documentObject



2
3
4
# File 'lib/android_strings_updater.rb', line 2

def begin_document
  @document  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n"
end

#end_documentObject



6
7
8
# File 'lib/android_strings_updater.rb', line 6

def end_document
  @document += "</resources>"
end