From 9e270928d532d8c40dcabafd149736b34075a30e Mon Sep 17 00:00:00 2001 From: Victor Shabanov Date: Thu, 17 Oct 2019 15:50:28 +0300 Subject: [PATCH] Fix localization NSLocalizedString static values visibility --- xcode/aux_scripts/import_strings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcode/aux_scripts/import_strings.php b/xcode/aux_scripts/import_strings.php index 814928a..3f13353 100644 --- a/xcode/aux_scripts/import_strings.php +++ b/xcode/aux_scripts/import_strings.php @@ -41,7 +41,7 @@ 'extension String {'.PHP_EOL; foreach ($json as $key=>$value) { $value_without_linefeed = preg_replace("/\r|\n/", " ", $value); - $ios_swift_strings .= "\t/// ".$value_without_linefeed."\n\t".'static let '.preg_replace_callback('/_(.?)/', function ($m) { return strtoupper($m[1]); }, $key).' = NSLocalizedString("'.$key.'", comment: "")'."\n".PHP_EOL; + $ios_swift_strings .= "\t/// ".$value_without_linefeed."\n\t".'public static let '.preg_replace_callback('/_(.?)/', function ($m) { return strtoupper($m[1]); }, $key).' = NSLocalizedString("'.$key.'", comment: "")'."\n".PHP_EOL; } $ios_swift_strings .= '}'.PHP_EOL; file_put_contents($localization.'String+Localization.swift', $ios_swift_strings);