lib/phrase/tool/formats/xml.rb in phrase-0.3.1 vs lib/phrase/tool/formats/xml.rb in phrase-0.3.2
- old
+ new
@@ -11,10 +11,14 @@
end
def self.filename_for_locale(locale)
"strings.xml"
end
+
+ def self.target_directory
+ "res/"
+ end
def self.extract_locale_name_from_file_path(file_path)
return default_locale_name if file_path.scan(/\/values\/strings.xml/i).first
locale_part = file_path.scan(/\/values-([a-zA-Z\-_]*)\/strings.xml/i).first.try(:first)
if locale_part and locale_part.include?("-r")
@@ -22,17 +26,16 @@
else
locale_part
end
end
- def self.default_locale_name
- Phrase::Tool::Locale.find_default_locale.try(:name)
+ def self.locale_aware?
+ true
end
- private_class_method :default_locale_name
def self.formatted(name)
return name unless name.include?("-")
parts = name.split("-")
"#{parts.first}-r#{parts.last.upcase}"
end
private_class_method :formatted
-end
\ No newline at end of file
+end