diff --git a/Ring/Ring.xcodeproj/project.pbxproj b/Ring/Ring.xcodeproj/project.pbxproj index 9c56ed596a4274764c7649e519168cbf2158c8aa..958db50f3b17c667a9ef588639ceee2878599077 100644 --- a/Ring/Ring.xcodeproj/project.pbxproj +++ b/Ring/Ring.xcodeproj/project.pbxproj @@ -101,6 +101,7 @@ 04399B141D1C341A00E99CD9 /* libx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04399AE21D1C341A00E99CD9 /* libx264.a */; }; 04399B151D1C341A00E99CD9 /* libyaml-cpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04399AE31D1C341A00E99CD9 /* libyaml-cpp.a */; }; 5516C29F1E71CEFF009D3D2D /* AccountModelHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5516C29E1E71CEFF009D3D2D /* AccountModelHelper.swift */; }; + 564C44591E8D7F8F000F92B1 /* LocalizedStringTableNames.swift in Sources */ = {isa = PBXBuildFile; fileRef = 564C44581E8D7F8F000F92B1 /* LocalizedStringTableNames.swift */; }; 56AC64D51E7C7F4000EA1AA9 /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AC64D41E7C7F4000EA1AA9 /* WelcomeViewController.swift */; }; 5557FD4A1E81AE850043E394 /* AccountModelHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5557FD491E81AE850043E394 /* AccountModelHelperTests.swift */; }; 5557FD4B1E81AECF0043E394 /* AccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02B22DFA1DF755BB000358C9 /* AccountModel.swift */; }; @@ -109,6 +110,7 @@ 5557FD4E1E81B1F20043E394 /* AccountModelHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5516C29E1E71CEFF009D3D2D /* AccountModelHelper.swift */; }; 5557FD4F1E81B2990043E394 /* AccountCredentialsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DD80C91E1EAF1A009A3510 /* AccountCredentialsModel.swift */; }; 557086521E8ADB9D001A7CE4 /* SystemAdapter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 557086511E8ADB9D001A7CE4 /* SystemAdapter.mm */; }; + 56AC64D91E8012CA00EA1AA9 /* Walkthrough.strings in Resources */ = {isa = PBXBuildFile; fileRef = 56AC64DB1E8012CA00EA1AA9 /* Walkthrough.strings */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -237,10 +239,12 @@ 04399AE21D1C341A00E99CD9 /* libx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx264.a; path = ../fat/lib/libx264.a; sourceTree = "<group>"; }; 04399AE31D1C341A00E99CD9 /* libyaml-cpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libyaml-cpp.a"; path = "../fat/lib/libyaml-cpp.a"; sourceTree = "<group>"; }; 5516C29E1E71CEFF009D3D2D /* AccountModelHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AccountModelHelper.swift; path = Account/AccountModelHelper.swift; sourceTree = "<group>"; }; + 564C44581E8D7F8F000F92B1 /* LocalizedStringTableNames.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizedStringTableNames.swift; sourceTree = "<group>"; }; 56AC64D41E7C7F4000EA1AA9 /* WelcomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = "<group>"; }; 5557FD491E81AE850043E394 /* AccountModelHelperTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountModelHelperTests.swift; sourceTree = "<group>"; }; 557086501E8ADB9D001A7CE4 /* SystemAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemAdapter.h; path = Bridging/SystemAdapter.h; sourceTree = "<group>"; }; 557086511E8ADB9D001A7CE4 /* SystemAdapter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SystemAdapter.mm; path = Bridging/SystemAdapter.mm; sourceTree = "<group>"; }; + 56AC64DA1E8012CA00EA1AA9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Walkthrough.strings; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -478,6 +482,8 @@ 043999F51D1C2D9D00E99CD9 /* Ring */ = { isa = PBXGroup; children = ( + 564C44571E8D7F68000F92B1 /* Constants */, + 56AC64D61E80121200EA1AA9 /* Internationalization */, 0273C3021E0C689600CF00BA /* Walkthrough */, 02EFCACF1E0C3DD600FD8ED1 /* Bridging */, 02E1A0271DDE4C3900D75B59 /* Account */, @@ -589,6 +595,22 @@ name = SYS_DEPS; sourceTree = "<group>"; }; + 564C44571E8D7F68000F92B1 /* Constants */ = { + isa = PBXGroup; + children = ( + 564C44581E8D7F8F000F92B1 /* LocalizedStringTableNames.swift */, + ); + name = Constants; + sourceTree = "<group>"; + }; + 56AC64D61E80121200EA1AA9 /* Internationalization */ = { + isa = PBXGroup; + children = ( + 56AC64DB1E8012CA00EA1AA9 /* Walkthrough.strings */, + ); + name = Internationalization; + sourceTree = "<group>"; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -698,6 +720,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 56AC64D91E8012CA00EA1AA9 /* Walkthrough.strings in Resources */, 02B22E031DF755F7000358C9 /* WalkthroughStoryboard.storyboard in Resources */, 04399A061D1C2D9D00E99CD9 /* LaunchScreen.storyboard in Resources */, 04399A031D1C2D9D00E99CD9 /* Assets.xcassets in Resources */, @@ -768,6 +791,7 @@ 04399AAD1D1C304300E99CD9 /* DRingAdapter.mm in Sources */, 0273C2FF1E0C438F00CF00BA /* AccountAdapterDelegate.swift in Sources */, 02B22DFF1DF755DB000358C9 /* AccountsService.swift in Sources */, + 564C44591E8D7F8F000F92B1 /* LocalizedStringTableNames.swift in Sources */, 56AC64D51E7C7F4000EA1AA9 /* WelcomeViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -832,6 +856,14 @@ name = LaunchScreen.storyboard; sourceTree = "<group>"; }; + 56AC64DB1E8012CA00EA1AA9 /* Walkthrough.strings */ = { + isa = PBXVariantGroup; + children = ( + 56AC64DA1E8012CA00EA1AA9 /* Base */, + ); + name = Walkthrough.strings; + sourceTree = "<group>"; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -839,6 +871,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -887,6 +920,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; diff --git a/Ring/Ring/Base.lproj/Walkthrough.strings b/Ring/Ring/Base.lproj/Walkthrough.strings new file mode 100644 index 0000000000000000000000000000000000000000..a1bb3595a41ed8e14492e13c6c040c7511d466fc --- /dev/null +++ b/Ring/Ring/Base.lproj/Walkthrough.strings @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017 Savoir-faire Linux Inc. + * + * Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +//Welcome Screen + +"WelcomeTitle" = "Welcome to Ring"; +"WelcomeText" = "A Ring account allows you to reach people securely in peer to peer through fully distributed network"; +"LinkDeviceButton" = "Link this device to an account"; +"CreateAccount" = "Create a Ring account"; diff --git a/Ring/Ring/LocalizedStringTableNames.swift b/Ring/Ring/LocalizedStringTableNames.swift new file mode 100644 index 0000000000000000000000000000000000000000..72818c081736bc82d82f339adc6586615243d9e3 --- /dev/null +++ b/Ring/Ring/LocalizedStringTableNames.swift @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2017 Savoir-faire Linux Inc. + * + * Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +import Foundation + +struct LocalizedStringTableNames { + static let walkthrough = "Walkthrough" +} diff --git a/Ring/Ring/WelcomeViewController.swift b/Ring/Ring/WelcomeViewController.swift index 01e1d8bce631bdd6cf02323f61d0ecd4ef3e61e0..1ad6b463acc41050abbf762b7c0c65b200c18b4e 100644 --- a/Ring/Ring/WelcomeViewController.swift +++ b/Ring/Ring/WelcomeViewController.swift @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Savoir-faire Linux Inc. + * Copyright (C) 2017 Savoir-faire Linux Inc. * * Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com> * @@ -30,6 +30,11 @@ class WelcomeViewController: UIViewController { let createProfileSegueIdentifier = "CreateProfileSegue" let linkDeviceToAccountSegueIdentifier = "LinkDeviceToAccountSegue" + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.navigationController?.setNavigationBarHidden(true, animated: true) @@ -54,4 +59,20 @@ class WelcomeViewController: UIViewController { override func prepare(for segue: UIStoryboardSegue, sender: Any?) { self.navigationController?.setNavigationBarHidden(false, animated: true) } + + func setupUI() { + + self.welcomeLabel.text = NSLocalizedString("WelcomeTitle", + tableName: LocalizedStringTableNames.walkthrough, + comment: "") + self.descriptionLabel.text = NSLocalizedString("WelcomeText", + tableName: LocalizedStringTableNames.walkthrough, + comment: "") + self.linkDeviceButton.setTitle(NSLocalizedString("LinkDeviceButton", + tableName: LocalizedStringTableNames.walkthrough, + comment: ""), for: .normal) + self.createAccountButton.setTitle(NSLocalizedString("CreateAccount", + tableName: LocalizedStringTableNames.walkthrough, + comment: ""), for: .normal) + } }