Class: Translatomatic::ResourceFile::RESW
- Defined in:
- lib/translatomatic/resource_file/resw.rb
Overview
Windows resources file (XML)
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.extensions ⇒ Array<String>
File extensions supported by this resource file.
-
.is_key_value? ⇒ boolean
True if the file format consists of keys and values.
Instance Method Summary collapse
-
#locale_path(locale) ⇒ Pathname
Create a path for the current resource file with a given locale.
Methods inherited from XML
Methods inherited from Base
#create_variable, enabled?, #format, #get, #initialize, #save, #sentences, #set, supports_variable_interpolation?, #to_s, #type, #variable_regex
Constructor Details
This class inherits a constructor from Translatomatic::ResourceFile::Base
Class Method Details
.extensions ⇒ Array<String>
Returns File extensions supported by this resource file.
6 7 8 |
# File 'lib/translatomatic/resource_file/resw.rb', line 6 def self.extensions %w{resw resx} end |
.is_key_value? ⇒ boolean
Returns True if the file format consists of keys and values.
11 12 13 |
# File 'lib/translatomatic/resource_file/resw.rb', line 11 def self.is_key_value? true end |
Instance Method Details
#locale_path(locale) ⇒ Pathname
Create a path for the current resource file with a given locale
16 17 18 19 20 |
# File 'lib/translatomatic/resource_file/resw.rb', line 16 def locale_path(locale) # e.g. strings/en-US/resources.resw dir = path.dirname dir.parent + locale.to_s + path.basename end |