From 6ed301663c206e9da65498d2eec0bcd647e6cbb0 Mon Sep 17 00:00:00 2001 From: Victor Shabanov Date: Thu, 17 Oct 2019 18:54:39 +0300 Subject: [PATCH] Fix strings import script --- xcode/aux_scripts/import_strings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xcode/aux_scripts/import_strings.php b/xcode/aux_scripts/import_strings.php index 3f13353..52f79d6 100644 --- a/xcode/aux_scripts/import_strings.php +++ b/xcode/aux_scripts/import_strings.php @@ -38,10 +38,10 @@ '// swiftlint:disable line_length'.PHP_EOL. '// swiftlint:disable file_length'.PHP_EOL. '// swiftlint:disable identifier_name'.PHP_EOL.PHP_EOL. - 'extension String {'.PHP_EOL; + 'public 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".'public 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".'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);