From f1a329ac820e596eeffec159601857587edf10ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Vo=C3=9F?= Date: Wed, 4 Apr 2018 13:59:46 +0200 Subject: [PATCH] Add basic German localization --- PlayAlways.xcodeproj/project.pbxproj | 22 +++++++++++++++++++++ PlayAways/AppRouter.swift | 2 +- PlayAways/de.lproj/Localizable.strings | 27 ++++++++++++++++++++++++++ PlayAways/en.lproj/Localizable.strings | 27 ++++++++++++++++++++++++++ 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 PlayAways/de.lproj/Localizable.strings create mode 100644 PlayAways/en.lproj/Localizable.strings diff --git a/PlayAlways.xcodeproj/project.pbxproj b/PlayAlways.xcodeproj/project.pbxproj index 82fa21b..6434d3a 100644 --- a/PlayAlways.xcodeproj/project.pbxproj +++ b/PlayAlways.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 1F0878392074E51E00E3993C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F08783B2074E51E00E3993C /* Localizable.strings */; }; + 1F08783D2074F4BE00E3993C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F08783B2074E51E00E3993C /* Localizable.strings */; }; 9893205A1DFB6085003A20A3 /* PersistenceHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 989320591DFB6085003A20A3 /* PersistenceHelper.swift */; }; DD4F0B141DFC5BAC009C00DB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD4F0B131DFC5BAC009C00DB /* Cocoa.framework */; }; DD4F0B191DFC5BAC009C00DB /* SourceEditorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD4F0B181DFC5BAC009C00DB /* SourceEditorExtension.swift */; }; @@ -73,6 +75,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 1F08783A2074E51E00E3993C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 1F08783C2074F09500E3993C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; 989320591DFB6085003A20A3 /* PersistenceHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PersistenceHelper.swift; sourceTree = ""; }; DD4F0B111DFC5BAC009C00DB /* PlayAlways.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = PlayAlways.appex; sourceTree = BUILT_PRODUCTS_DIR; }; DD4F0B131DFC5BAC009C00DB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; @@ -182,6 +186,7 @@ DD7A4F291DF9FC0F0015054B /* Resources */, DD7A4F281DF9FBF90015054B /* Controllers */, DD7A4F271DF9FBEE0015054B /* Bootstrap */, + 1F08783B2074E51E00E3993C /* Localizable.strings */, ); name = PlayAlways; path = PlayAways; @@ -364,6 +369,7 @@ knownRegions = ( en, Base, + de, ); mainGroup = DD7A4F0B1DF9FBB80015054B; productRefGroup = DD7A4F151DF9FBB80015054B /* Products */; @@ -390,6 +396,7 @@ buildActionMask = 2147483647; files = ( DD7A4F311DF9FEF70015054B /* Application.xib in Resources */, + 1F0878392074E51E00E3993C /* Localizable.strings in Resources */, DD7A4F1C1DF9FBB80015054B /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -398,6 +405,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1F08783D2074F4BE00E3993C /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -453,6 +461,18 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 1F08783B2074E51E00E3993C /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 1F08783A2074E51E00E3993C /* en */, + 1F08783C2074F09500E3993C /* de */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ DD4F0B201DFC5BAC009C00DB /* Debug */ = { isa = XCBuildConfiguration; @@ -492,6 +512,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++"; @@ -542,6 +563,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/PlayAways/AppRouter.swift b/PlayAways/AppRouter.swift index abdc1a6..85b675c 100644 --- a/PlayAways/AppRouter.swift +++ b/PlayAways/AppRouter.swift @@ -45,7 +45,7 @@ final class AppRouter { if showOptions { let panel = NSSavePanel() - let titleFormat = NSLocalizedString("New %@ Playground", comment: "New [platform name] Playground") + let titleFormat = NSLocalizedString("New Playground", comment: "New [platform name] Playground") panel.title = String(format: titleFormat, platform.rawValue) panel.prompt = NSLocalizedString("Create", comment: "Create playground (button title)") diff --git a/PlayAways/de.lproj/Localizable.strings b/PlayAways/de.lproj/Localizable.strings new file mode 100644 index 0000000..bb5f359 --- /dev/null +++ b/PlayAways/de.lproj/Localizable.strings @@ -0,0 +1,27 @@ +/* + Localizable.strings + PlayAlways + + Created by Marcel Voß on 04.04.18. + Copyright © 2018 Guilherme Rambo. All rights reserved. +*/ + +"Quit" = "Beenden"; +"Set Path…" = "Pfad setzen…"; + +"New iOS Playground…" = "Neuer iOS Playground…"; +"New macOS Playground…" = "Neuer macOS Playground…"; +"New tvOS Playground…" = "Neuer tvOS Playground…"; + +"New iOS Playground" = "Neuer iOS Playground"; +"New macOS Playground" = "Neuer macOS Playground"; +"New tvOS Playground" = "Neuer tvOS Playground"; + +"Create" = "Erstellen"; +"New Playground" = "Neuer %@ Playground"; + +"Select" = "Auswählen"; +"Select a location to create playgrounds into" = "Wähle einen Ort, an welchem neue Playground abgelegt werden sollen"; + +"Unable to create playground at the specified location" = "Fehler beim Erstellen eines Playgrounds an dem angegebenen Ort"; +"Unable to process selection data" = "Fehler beim Verarbeiten der ausgewählten Daten"; diff --git a/PlayAways/en.lproj/Localizable.strings b/PlayAways/en.lproj/Localizable.strings new file mode 100644 index 0000000..0c55f1f --- /dev/null +++ b/PlayAways/en.lproj/Localizable.strings @@ -0,0 +1,27 @@ +/* + Localizable.strings + PlayAlways + + Created by Marcel Voß on 04.04.18. + Copyright © 2018 Guilherme Rambo. All rights reserved. +*/ + +"Quit" = "Quit"; +"Set Path…" = "Set Path…"; + +"New iOS Playground…" = "New iOS Playground…"; +"New macOS Playground…" = "New macOS Playground…"; +"New tvOS Playground…" = "New tvOS Playground…"; + +"New iOS Playground" = "New iOS Playground"; +"New macOS Playground" = "New macOS Playground"; +"New tvOS Playground" = "New tvOS Playground"; + +"Create" = "Create"; +"New Playground" = "New %@ Playground"; + +"Select" = "Select"; +"Select a location to create playgrounds into" = "Select a location to create playgrounds into"; + +"Unable to create playground at the specified location" = "Unable to create playground at the specified location"; +"Unable to process selection data" = "Unable to process selection data";