From e49e20ca5193dfe2a84ce69b1dcd634b34913235 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sun, 10 Feb 2019 18:42:46 +0530 Subject: [PATCH] Info.plist: Localize with InfoPlist.strings --- WireGuard/WireGuard.xcodeproj/project.pbxproj | 14 ++++++++++++++ WireGuard/WireGuard/Base.lproj/InfoPlist.strings | 7 +++++++ WireGuard/WireGuard/UI/iOS/Info.plist | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 WireGuard/WireGuard/Base.lproj/InfoPlist.strings diff --git a/WireGuard/WireGuard.xcodeproj/project.pbxproj b/WireGuard/WireGuard.xcodeproj/project.pbxproj index 0c53150..4dd14ff 100644 --- a/WireGuard/WireGuard.xcodeproj/project.pbxproj +++ b/WireGuard/WireGuard.xcodeproj/project.pbxproj @@ -63,6 +63,8 @@ 6F6899A62180447E0012E523 /* x25519.c in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A52180447E0012E523 /* x25519.c */; }; 6F6899A8218044FC0012E523 /* Curve25519.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A7218044FC0012E523 /* Curve25519.swift */; }; 6F693A562179E556008551C1 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F693A552179E556008551C1 /* Endpoint.swift */; }; + 6F70E20E221058E1008BDFB4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6F70E20C221058DF008BDFB4 /* InfoPlist.strings */; }; + 6F70E20F221058E1008BDFB4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6F70E20C221058DF008BDFB4 /* InfoPlist.strings */; }; 6F7774E1217181B1006A79B3 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774DF217181B1006A79B3 /* MainViewController.swift */; }; 6F7774E2217181B1006A79B3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E0217181B1006A79B3 /* AppDelegate.swift */; }; 6F7774E421718281006A79B3 /* TunnelsListTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E321718281006A79B3 /* TunnelsListTableViewController.swift */; }; @@ -277,6 +279,7 @@ 6F6899A52180447E0012E523 /* x25519.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = x25519.c; sourceTree = ""; }; 6F6899A7218044FC0012E523 /* Curve25519.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Curve25519.swift; sourceTree = ""; }; 6F693A552179E556008551C1 /* Endpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Endpoint.swift; sourceTree = ""; }; + 6F70E20D221058DF008BDFB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = WireGuard/Base.lproj/InfoPlist.strings; sourceTree = ""; }; 6F7774DF217181B1006A79B3 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 6F7774E0217181B1006A79B3 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 6F7774E321718281006A79B3 /* TunnelsListTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TunnelsListTableViewController.swift; sourceTree = ""; }; @@ -619,6 +622,7 @@ 6FF4AC0B211EC46F002C96EB = { isa = PBXGroup; children = ( + 6F70E20C221058DF008BDFB4 /* InfoPlist.strings */, 6FE1765421C90BBE002690EA /* Localizable.strings */, 6F5D0C432183B4A4000F85AD /* Shared */, 6FF4AC16211EC46F002C96EB /* WireGuard */, @@ -874,6 +878,7 @@ buildActionMask = 2147483647; files = ( 6FB1BD6221D2607E00A991BF /* Assets.xcassets in Resources */, + 6F70E20F221058E1008BDFB4 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -889,6 +894,7 @@ buildActionMask = 2147483647; files = ( 6F919ED9218C65C50023B400 /* wireguard_doc_logo_22x29.png in Resources */, + 6F70E20E221058E1008BDFB4 /* InfoPlist.strings in Resources */, 6FE1765621C90BBE002690EA /* Localizable.strings in Resources */, 6FF4AC22211EC472002C96EB /* LaunchScreen.storyboard in Resources */, 6F919EDA218C65C50023B400 /* wireguard_doc_logo_44x58.png in Resources */, @@ -1291,6 +1297,14 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 6F70E20C221058DF008BDFB4 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 6F70E20D221058DF008BDFB4 /* Base */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; 6FE1765421C90BBE002690EA /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( diff --git a/WireGuard/WireGuard/Base.lproj/InfoPlist.strings b/WireGuard/WireGuard/Base.lproj/InfoPlist.strings new file mode 100644 index 0000000..b7ba394 --- /dev/null +++ b/WireGuard/WireGuard/Base.lproj/InfoPlist.strings @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. + +// iOS permission prompts + +NSCameraUsageDescription = "Camera is used for scanning QR codes for importing WireGuard configurations"; +NSFaceIDUsageDescription = "Face ID is used for authenticating viewing and exporting of private keys"; diff --git a/WireGuard/WireGuard/UI/iOS/Info.plist b/WireGuard/WireGuard/UI/iOS/Info.plist index 0c2d8b0..de4c4d0 100644 --- a/WireGuard/WireGuard/UI/iOS/Info.plist +++ b/WireGuard/WireGuard/UI/iOS/Info.plist @@ -77,7 +77,7 @@ LSSupportsOpeningDocumentsInPlace NSCameraUsageDescription - Camera is used for scanning QR codes for importing WireGuard configurations + Localized UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -123,7 +123,7 @@ NSFaceIDUsageDescription - Face ID is used for authenticating viewing and exporting of private keys + Localized com.wireguard.ios.app_group_id group.$(APP_ID_IOS)