From 289201a54a5e0483811da8e43d8ba01fc7fa04f3 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Sat, 27 Jun 2015 14:34:02 +0300 Subject: [PATCH] Twine patch to correctly generate Norwegian. --- tools/twine/lib/twine/formatters/apple.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/twine/lib/twine/formatters/apple.rb b/tools/twine/lib/twine/formatters/apple.rb index b5b9bd3b62..5b77a7cce9 100644 --- a/tools/twine/lib/twine/formatters/apple.rb +++ b/tools/twine/lib/twine/formatters/apple.rb @@ -81,6 +81,13 @@ module Twine end def write_file(path, lang) + # This is a patch to correctly support Norwegian, when 'no' is specified in translations file, + # but by default XCode creates nb.lproj folder and 'no' translation is ignored. + # Strange that it works on Android even with values-nb folder name... + # If you change translation to nb, then it works for Apple, but stops working on Android. + if lang == "nb" + lang = "no" + end default_lang = @strings.language_codes[0] encoding = @options[:output_encoding] || 'UTF-8' File.open(path, "w:#{encoding}") do |f|