Class: Fame::LocalizableStringsEntry
- Inherits:
-
Struct
- Object
- Struct
- Fame::LocalizableStringsEntry
- Defined in:
- lib/fame/models.rb
Overview
node = LocalizedNode property = localizable element, e.g. text of a label value = localizable strings value (i.e. the translation)
Instance Attribute Summary collapse
-
#node ⇒ Object
Returns the value of attribute node.
-
#property ⇒ Object
Returns the value of attribute property.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#formatted_info ⇒ Object
The formatted info of this entry.
-
#formatted_strings_file_entry ⇒ Object
The formatted .strings file entry.
Instance Attribute Details
#node ⇒ Object
Returns the value of attribute node
15 16 17 |
# File 'lib/fame/models.rb', line 15 def node @node end |
#property ⇒ Object
Returns the value of attribute property
15 16 17 |
# File 'lib/fame/models.rb', line 15 def property @property end |
#value ⇒ Object
Returns the value of attribute value
15 16 17 |
# File 'lib/fame/models.rb', line 15 def value @value end |
Instance Method Details
#formatted_info ⇒ Object
The formatted info of this entry
25 26 27 |
# File 'lib/fame/models.rb', line 25 def formatted_info [node.vc_name, node.element_name, property].compact.join(" ") end |
#formatted_strings_file_entry ⇒ Object
The formatted .strings file entry
18 19 20 21 22 |
# File 'lib/fame/models.rb', line 18 def formatted_strings_file_entry comment = node.i18n_comment || "No comment provided by engineer." key = "#{node.original_id}.#{property}" ["/* #{formatted_info}: #{comment} */", "\"#{key}\" = \"#{value}\";"].join("\n") end |