Fix localization NSLocalizedString static values visibility
This commit is contained in:
parent
1d04958271
commit
9e270928d5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue