File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+
4+ ## v1.10.6
5+ - Translations now turns nl-NL to nl_NL for Flutter
6+
37## v1.10.5
48- Removed web-renderer from web build and run
59
Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ def parse(translations)
109109
110110 text = languageTranslation [ "value" ] || ""
111111 line = { 'key' => key , 'translation' => text }
112- filenameSuffix = locale
112+ # filenameSuffix = locale //TODO: test
113+ filenameSuffix = normalize_flutter_locale ( locale )
113114
114115 case type
115116 when "store"
@@ -196,7 +197,17 @@ def parse(translations)
196197
197198 return filesToWrite
198199 end
200+ def normalize_flutter_locale ( locale )
201+ return locale if locale . nil?
199202
203+ parts = locale . split ( /[-_]/ )
204+
205+ if parts . length == 1
206+ parts [ 0 ] . downcase
207+ else
208+ "#{ parts [ 0 ] . downcase } _#{ parts [ 1 ] . upcase } "
209+ end
210+ end
200211 def write ( files )
201212 puts colored :blue , "\n #{ CHAR_FLAG } Writing files"
202213
Original file line number Diff line number Diff line change 11module Flttr
2- VERSION = '1.10.5 '
2+ VERSION = '1.10.6 '
33end
You can’t perform that action at this time.
0 commit comments