From 8264621ae6bd7256ddf20af467da1c85ffdacb72 Mon Sep 17 00:00:00 2001 From: Levin Li Date: Thu, 31 Dec 2020 16:24:31 +0800 Subject: [PATCH] Localize Info.plist --- MobileCelestia.xcodeproj/project.pbxproj | 17 +++++++++++++++++ .../Resources/en.lproj/InfoPlist.strings | 9 +++++++++ .../Resources/zh_CN.lproj/InfoPlist.strings | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 MobileCelestia/Resources/en.lproj/InfoPlist.strings create mode 100644 MobileCelestia/Resources/zh_CN.lproj/InfoPlist.strings diff --git a/MobileCelestia.xcodeproj/project.pbxproj b/MobileCelestia.xcodeproj/project.pbxproj index ef9dff36..b9c06aec 100644 --- a/MobileCelestia.xcodeproj/project.pbxproj +++ b/MobileCelestia.xcodeproj/project.pbxproj @@ -77,6 +77,7 @@ EA934C90251D90C500DD284C /* MainSceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA934C8F251D90C500DD284C /* MainSceneDelegate.swift */; }; EA934C9A251D92AD00DD284C /* PanelSceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA934C99251D92A700DD284C /* PanelSceneDelegate.swift */; }; EA982BFF25496B6D00CDC642 /* BaseTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA982BFE25496B6D00CDC642 /* BaseTableViewController.swift */; }; + EAA5A7A1259DBFE6001AFA82 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EAA5A7A3259DBFE6001AFA82 /* InfoPlist.strings */; }; EAA6C4CB253B5CD200ED1D60 /* InstalledResourceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAA6C4CA253B5CD200ED1D60 /* InstalledResourceViewController.swift */; }; EABC245D248E162000205B5A /* FontHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = EABC245A248E162000205B5A /* FontHelper.m */; }; EABDE367247170F000E0A5FA /* SettngSliderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EABDE366247170F000E0A5FA /* SettngSliderCell.swift */; }; @@ -218,6 +219,8 @@ EA934C8F251D90C500DD284C /* MainSceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainSceneDelegate.swift; sourceTree = ""; }; EA934C99251D92A700DD284C /* PanelSceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelSceneDelegate.swift; sourceTree = ""; }; EA982BFE25496B6D00CDC642 /* BaseTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableViewController.swift; sourceTree = ""; }; + EAA5A7A2259DBFE6001AFA82 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + EAA5A7A7259DC062001AFA82 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/InfoPlist.strings; sourceTree = ""; }; EAA6C4CA253B5CD200ED1D60 /* InstalledResourceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstalledResourceViewController.swift; sourceTree = ""; }; EABC245A248E162000205B5A /* FontHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FontHelper.m; sourceTree = ""; }; EABC245C248E162000205B5A /* FontHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontHelper.h; sourceTree = ""; }; @@ -293,6 +296,7 @@ children = ( EA28CA5124A2F399004B011E /* Fonts */, 97143F1623FFAEFD00F35D87 /* defaults.plist */, + EAA5A7A3259DBFE6001AFA82 /* InfoPlist.strings */, ); path = Resources; sourceTree = ""; @@ -679,6 +683,7 @@ knownRegions = ( en, Base, + zh_CN, ); mainGroup = 979D2F7123FEB1A6005D2592; packageReferences = ( @@ -723,6 +728,7 @@ 979D2F8723FEB1A8005D2592 /* Assets.xcassets in Resources */, 97143F1823FFAEFD00F35D87 /* defaults.plist in Resources */, EA28CA5324A2F399004B011E /* Fonts in Resources */, + EAA5A7A1259DBFE6001AFA82 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -906,6 +912,15 @@ name = LaunchScreen.storyboard; sourceTree = ""; }; + EAA5A7A3259DBFE6001AFA82 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + EAA5A7A2259DBFE6001AFA82 /* en */, + EAA5A7A7259DC062001AFA82 /* zh_CN */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -913,6 +928,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -975,6 +991,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; diff --git a/MobileCelestia/Resources/en.lproj/InfoPlist.strings b/MobileCelestia/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 00000000..7a726801 --- /dev/null +++ b/MobileCelestia/Resources/en.lproj/InfoPlist.strings @@ -0,0 +1,9 @@ +/* + InfoPlist.strings + MobileCelestia + + Created by Levin Li on 2020/12/31. + Copyright © 2020 Celestia Development Team. All rights reserved. +*/ + +"NSPhotoLibraryAddUsageDescription" = "Permission is needed to save screenshots to Photo Library."; diff --git a/MobileCelestia/Resources/zh_CN.lproj/InfoPlist.strings b/MobileCelestia/Resources/zh_CN.lproj/InfoPlist.strings new file mode 100644 index 00000000..453343bc --- /dev/null +++ b/MobileCelestia/Resources/zh_CN.lproj/InfoPlist.strings @@ -0,0 +1,9 @@ +/* + InfoPlist.strings + MobileCelestia + + Created by Levin Li on 2020/12/31. + Copyright © 2020 Celestia Development Team. All rights reserved. +*/ + +"NSPhotoLibraryAddUsageDescription" = "将截图保存到图片资源库需要权限。";