Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Orsay <juan.orsay@avature.net>2017-08-03 23:19:07 +0300
committerJuan Pablo Orsay <juan.orsay@avature.net>2017-08-03 23:19:07 +0300
commitc6a9424f5ab986f283c642447dd29770e4127d4a (patch)
tree9180b75cceaa261183fdeff454a7c83f64b12a22
parentcd28717f92ce20106bc822f5c9e11a83657dcb23 (diff)
Android folder should have the region code preceded by lowercase "r"
-rw-r--r--lib/twine/formatters/android.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/twine/formatters/android.rb b/lib/twine/formatters/android.rb
index 0108de8..9b207ae 100644
--- a/lib/twine/formatters/android.rb
+++ b/lib/twine/formatters/android.rb
@@ -32,7 +32,7 @@ module Twine
# The language is defined by a two-letter ISO 639-1 language code, optionally followed by a two letter ISO 3166-1-alpha-2 region code (preceded by lowercase "r").
# see http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
match = /^values-([a-z]{2}(-r[a-z]{2})?)$/i.match(segment)
-
+
return match[1].sub('-r', '-') if match
end
end
@@ -41,7 +41,7 @@ module Twine
end
def output_path_for_language(lang)
- "values-#{lang}"
+ "values-#{lang}".gsub(/-(\p{Lu})/, '-r\1')
end
def set_translation_for_key(key, lang, value)