Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Privacy Pro translations #3656

Merged
merged 25 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3157ba9
Add module for Subsctiption UserText strings
miasma13 Dec 2, 2024
97fe5a5
Support translations for SubscriptionUI package
miasma13 Dec 2, 2024
1dbc9c9
Add support for localising NetworkProtectionUI
miasma13 Dec 2, 2024
3cbdff4
Generate localizcles for NetworkProtectionUI
miasma13 Dec 2, 2024
51437d6
Extract missing VPN strings
miasma13 Dec 2, 2024
59cd892
Remove dead xcstrings reference from the project file.
samsymons Dec 2, 2024
f1cf08f
Fix how we build subscription renewal or expiry caption to better sup…
miasma13 Dec 5, 2024
f56912a
Import translations
miasma13 Dec 6, 2024
d3132d8
Make privacy pro alerts localizable
miasma13 Dec 6, 2024
702d708
Localize UserText+NetworkProtection
miasma13 Dec 6, 2024
e410efa
Split VPN copy used by main app and shared with VPN targets
miasma13 Dec 6, 2024
fbcdef2
Add Localizables for DuckDuckGoVPN target
miasma13 Dec 6, 2024
0b02e4b
Fix duplicated string identifiers
miasma13 Dec 6, 2024
b0ce5ab
Localize Notifications target
miasma13 Dec 6, 2024
bc7af06
Fix duplicated string ids
miasma13 Dec 6, 2024
7034f65
Update the export script
miasma13 Dec 6, 2024
7a4a930
Revert translating infoplist
miasma13 Dec 6, 2024
dde59d6
Merge branch 'release/1.118.0' into michal/update-pp-translations
miasma13 Dec 10, 2024
3206da5
Fix whitespace
miasma13 Dec 10, 2024
f6bc31a
Import translations
miasma13 Dec 11, 2024
b8689ca
Add localizable strings exclude for sandbox-test-tool
miasma13 Dec 11, 2024
4752b97
Remove stale strings
miasma13 Dec 11, 2024
9a67373
Make DBP strings localizable
miasma13 Dec 11, 2024
36435d5
Add en-US to module string catalogs to mitigate potential issue with …
miasma13 Dec 11, 2024
d30b5d5
Import PIR translations
miasma13 Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@
1EA7B8D52B7E078C000330A4 /* Subscription in Frameworks */ = {isa = PBXBuildFile; productRef = 1EA7B8D42B7E078C000330A4 /* Subscription */; };
1EB028332C91C754005343F6 /* Common in Frameworks */ = {isa = PBXBuildFile; productRef = 1EB028322C91C754005343F6 /* Common */; };
1EB028352C91C75A005343F6 /* Common in Frameworks */ = {isa = PBXBuildFile; productRef = 1EB028342C91C75A005343F6 /* Common */; };
1EC711502D033D200009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7114F2D033D200009EB5C /* UserText+NetworkProtection+Shared.swift */; };
1EC711512D033D200009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7114F2D033D200009EB5C /* UserText+NetworkProtection+Shared.swift */; };
1EC711522D033D280009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7114F2D033D200009EB5C /* UserText+NetworkProtection+Shared.swift */; };
1EC711532D033D280009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7114F2D033D200009EB5C /* UserText+NetworkProtection+Shared.swift */; };
1EC711552D03421B0009EB5C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1EC711542D03421B0009EB5C /* Localizable.xcstrings */; };
1EC711562D03421B0009EB5C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1EC711542D03421B0009EB5C /* Localizable.xcstrings */; };
1EC711582D035BC30009EB5C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1EC711572D035BC30009EB5C /* Localizable.xcstrings */; };
1EC711592D035BC30009EB5C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1EC711572D035BC30009EB5C /* Localizable.xcstrings */; };
1EC7115A2D035BC30009EB5C /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1EC711572D035BC30009EB5C /* Localizable.xcstrings */; };
1ED910D52B63BFB300936947 /* IdentityTheftRestorationPagesUserScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED910D42B63BFB300936947 /* IdentityTheftRestorationPagesUserScript.swift */; };
1ED910D62B63BFB300936947 /* IdentityTheftRestorationPagesUserScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED910D42B63BFB300936947 /* IdentityTheftRestorationPagesUserScript.swift */; };
1EEB2D7A2C986A40000D908B /* SubscriptionPagesUseSubscriptionFeatureTestsForStripe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EEB2D792C986A40000D908B /* SubscriptionPagesUseSubscriptionFeatureTestsForStripe.swift */; };
Expand Down Expand Up @@ -1857,8 +1866,6 @@
7BA7CC542AD11FCE0042E5CE /* Bundle+VPN.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D605E2A0B29FA00BCD287 /* Bundle+VPN.swift */; };
7BA7CC552AD11FFB0042E5CE /* NetworkProtectionOptionKeyExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D605F2A0B29FA00BCD287 /* NetworkProtectionOptionKeyExtension.swift */; };
7BA7CC562AD11FFB0042E5CE /* NetworkProtectionOptionKeyExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D605F2A0B29FA00BCD287 /* NetworkProtectionOptionKeyExtension.swift */; };
7BA7CC582AD1203A0042E5CE /* UserText+NetworkProtection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D60D22A0C84F700BCD287 /* UserText+NetworkProtection.swift */; };
7BA7CC592AD1203B0042E5CE /* UserText+NetworkProtection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D60D22A0C84F700BCD287 /* UserText+NetworkProtection.swift */; };
7BA7CC5C2AD120C30042E5CE /* EventMapping+NetworkProtectionError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D60722A0B29FA00BCD287 /* EventMapping+NetworkProtectionError.swift */; };
7BA7CC5D2AD120C30042E5CE /* EventMapping+NetworkProtectionError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D60722A0B29FA00BCD287 /* EventMapping+NetworkProtectionError.swift */; };
7BA7CC5F2AD1210C0042E5CE /* Networking in Frameworks */ = {isa = PBXBuildFile; productRef = 7BA7CC5E2AD1210C0042E5CE /* Networking */; };
Expand Down Expand Up @@ -3528,6 +3535,9 @@
1E7E2E8F29029A2A00C01B54 /* ContentBlockingRulesUpdateObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlockingRulesUpdateObserver.swift; sourceTree = "<group>"; };
1E7E2E932902AC0E00C01B54 /* PrivacyDashboardPermissionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacyDashboardPermissionHandler.swift; sourceTree = "<group>"; };
1E862A882A9FC01200F84D4B /* SubscriptionUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = SubscriptionUI; sourceTree = "<group>"; };
1EC7114F2D033D200009EB5C /* UserText+NetworkProtection+Shared.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserText+NetworkProtection+Shared.swift"; sourceTree = "<group>"; };
1EC711542D03421B0009EB5C /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
1EC711572D035BC30009EB5C /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
1ED910D42B63BFB300936947 /* IdentityTheftRestorationPagesUserScript.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdentityTheftRestorationPagesUserScript.swift; sourceTree = "<group>"; };
1EEB2D792C986A40000D908B /* SubscriptionPagesUseSubscriptionFeatureTestsForStripe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionPagesUseSubscriptionFeatureTestsForStripe.swift; sourceTree = "<group>"; };
31031EB62CC94C6C00684340 /* AIChatRemoteSettingsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AIChatRemoteSettingsTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6368,6 +6378,7 @@
isa = PBXGroup;
children = (
4B4D607C2A0B29FA00BCD287 /* UserText+NetworkProtectionExtensions.swift */,
1EC711572D035BC30009EB5C /* Localizable.xcstrings */,
);
path = NetworkExtensionAndNotificationTargets;
sourceTree = "<group>";
Expand Down Expand Up @@ -7157,6 +7168,7 @@
EE34245D2BA0853900173B1B /* VPNUninstaller.swift */,
7BA7CC112AD11DC80042E5CE /* TunnelControllerIPCService.swift */,
7BA7CC172AD11DC80042E5CE /* UserText.swift */,
1EC711542D03421B0009EB5C /* Localizable.xcstrings */,
7BA7CC122AD11DC80042E5CE /* Assets.xcassets */,
7BA7CC162AD11DC80042E5CE /* DuckDuckGoVPN.entitlements */,
7BA7CC182AD11DC80042E5CE /* DuckDuckGoVPNDebug.entitlements */,
Expand Down Expand Up @@ -8262,6 +8274,7 @@
children = (
AA80EC53256BE3BC007083E7 /* UserText.swift */,
4B4D60D22A0C84F700BCD287 /* UserText+NetworkProtection.swift */,
1EC7114F2D033D200009EB5C /* UserText+NetworkProtection+Shared.swift */,
31A83FB42BE28D7D00F74E67 /* UserText+DBP.swift */,
);
path = Localizables;
Expand Down Expand Up @@ -10623,6 +10636,13 @@
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
1E6525E72D030964003B89C8 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
3706FCB1293F65D500E42796 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -10736,6 +10756,7 @@
files = (
BDE981DA2BBD10D600645880 /* vpn-light-mode.json in Resources */,
7BA7CC482AD11E5C0042E5CE /* Assets.xcassets in Resources */,
1EC711552D03421B0009EB5C /* Localizable.xcstrings in Resources */,
BDE981D92BBD10D600645880 /* vpn-dark-mode.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -10746,6 +10767,7 @@
files = (
BDADBDCD2BD2BC5700421B9B /* vpn-light-mode.json in Resources */,
7BA7CC472AD11E5C0042E5CE /* Assets.xcassets in Resources */,
1EC711562D03421B0009EB5C /* Localizable.xcstrings in Resources */,
BDADBDCC2BD2BC4D00421B9B /* vpn-dark-mode.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -10754,6 +10776,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1EC711582D035BC30009EB5C /* Localizable.xcstrings in Resources */,
4B4BEC482A11B61F001D9AC5 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -10769,6 +10792,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1EC7115A2D035BC30009EB5C /* Localizable.xcstrings in Resources */,
1D85BCCA2BA982FC0065BA04 /* InfoPlist.xcstrings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -10777,6 +10801,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1EC711592D035BC30009EB5C /* Localizable.xcstrings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -11320,6 +11345,7 @@
F1D43AEF2B98D8DF00BAB743 /* MainMenuActions+VanillaBrowser.swift in Sources */,
56BA1E8B2BB1CB5B001CF69F /* CertificateTrustEvaluator.swift in Sources */,
B6E1491129A5C30A00AAFBE8 /* FBProtectionTabExtension.swift in Sources */,
1EC711502D033D200009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */,
3706FAC4293F65D500E42796 /* PrintingUserScript.swift in Sources */,
1D01A3D92B88DF8B00FE8150 /* PreferencesSyncView.swift in Sources */,
9D9AE86C2AA76D1B0026E7DC /* LoginItemsManager.swift in Sources */,
Expand Down Expand Up @@ -12636,7 +12662,6 @@
B6F92BA22A691580002ABA6B /* UserDefaultsWrapper.swift in Sources */,
7BA7CC3A2AD11E2D0042E5CE /* DuckDuckGoVPNAppDelegate.swift in Sources */,
7BAF9E4C2A8A3CCA002D3B6E /* UserDefaults+NetworkProtectionShared.swift in Sources */,
7BA7CC592AD1203B0042E5CE /* UserText+NetworkProtection.swift in Sources */,
7BD7B0032C19D3830039D20A /* VPNIPCResources.swift in Sources */,
7B22D86F2CCFD7B7006A76E1 /* TipKitController.swift in Sources */,
F1DA51942BF6081E00CF29FA /* AttributionPixelHandler.swift in Sources */,
Expand Down Expand Up @@ -12669,6 +12694,7 @@
4BF0E5072AD2551A00FFEC9E /* NetworkProtectionPixelEvent.swift in Sources */,
F1DA518A2BF607D200CF29FA /* SubscriptionAttributionPixelHandler.swift in Sources */,
7BA7CC442AD11E490042E5CE /* UserText.swift in Sources */,
1EC711522D033D280009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */,
7BDBAD222CBFF97E000379B7 /* TipKitDebugOptionsUIActionHandling.swift in Sources */,
4BF0E5142AD25A2600FFEC9E /* DuckDuckGoUserAgent.swift in Sources */,
F1FDC93C2BF51F41006B1435 /* VPNSettings+Environment.swift in Sources */,
Expand All @@ -12695,7 +12721,6 @@
4B0EF7292B5780EB009D6481 /* VPNAppEventsHandler.swift in Sources */,
4BF0E5082AD2551A00FFEC9E /* NetworkProtectionPixelEvent.swift in Sources */,
02FDA6602C764E220024CD8B /* VPNPrivacyConfigurationManager.swift in Sources */,
7BA7CC582AD1203A0042E5CE /* UserText+NetworkProtection.swift in Sources */,
7BA7CC4B2AD11EC60042E5CE /* NetworkProtectionControllerErrorStore.swift in Sources */,
EE3424612BA0853900173B1B /* VPNUninstaller.swift in Sources */,
7B4D8A242BDA857300852966 /* VPNOperationErrorRecorder.swift in Sources */,
Expand All @@ -12717,6 +12742,7 @@
F1DA518B2BF607D200CF29FA /* SubscriptionAttributionPixelHandler.swift in Sources */,
7BA7CC3D2AD11E380042E5CE /* TunnelControllerIPCService.swift in Sources */,
4BA7C4DA2B3F639800AFE511 /* NetworkProtectionTunnelController.swift in Sources */,
1EC711532D033D280009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */,
7BDBAD232CBFF97E000379B7 /* TipKitDebugOptionsUIActionHandling.swift in Sources */,
F1FDC93D2BF51F41006B1435 /* VPNSettings+Environment.swift in Sources */,
7BA7CC432AD11E480042E5CE /* UserText.swift in Sources */,
Expand Down Expand Up @@ -12913,6 +12939,7 @@
1D4B03D72CA4432000224E99 /* BookmarkUrlExtension.swift in Sources */,
85D0327B2B8E3D090041D1FB /* HistoryCoordinatorExtension.swift in Sources */,
AA80EC54256BE3BC007083E7 /* UserText.swift in Sources */,
1EC711512D033D200009EB5C /* UserText+NetworkProtection+Shared.swift in Sources */,
B61EF3EC266F91E700B4D78F /* WKWebView+Download.swift in Sources */,
311B262728E73E0A00FD181A /* TabShadowConfig.swift in Sources */,
BB7B5F982C4ED73800BA4AF8 /* BookmarksSearchAndSortMetrics.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//
// UserText+NetworkProtection+Shared.swift
//
// Copyright © 2024 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import Foundation

///
/// Copy related to VPN used by both main app targets and both VPN targets
///
extension UserText {

// MARK: Location formatter

static let locationFormatterNearestLocation = NSLocalizedString("network.protection.vpn.location.formatter.nearest.location", value: "Nearest Location", comment: "Nearest available location setting description")

static let locationFormatterNearestLocationDescriptor = NSLocalizedString("network.protection.vpn.location.formatter.nearest.location.descriptor", value: "(Nearest)", comment: "Description added after the nearest location in the VPN status view")

// "network.protection.vpn.location.subtitle.formatted.city.and.country" - Subtitle for the preferred location item that formats a city and country. E.g Chicago, United States
static func locationFormatterLocationFormattedCityAndCountry(city: String, country: String) -> String {
return "\(city), \(country)"
}

// MARK: -

static let networkProtectionTunnelName = NSLocalizedString("network.protection.tunnel.name", value: "DuckDuckGo VPN", comment: "The name of the NetP VPN that will be visible in the system to the user")

// MARK: - System Extension Installation Messages

// Dynamically selected based on macOS version, not directly convertible to static string
static var networkProtectionSystemSettings: String {
if #available(macOS 13.0, *) {
return networkProtectionSystemSettingsModern
} else {
return networkProtectionSystemSettingsLegacy
}
}

private static let networkProtectionSystemSettingsLegacy = NSLocalizedString("network.protection.configuration.system-settings.legacy", value: "Go to Security & Privacy in System Preferences to allow DuckDuckGo VPN to activate", comment: "Text for a label in the VPN popover, displayed after attempting to enable the VPN for the first time while using macOS 12 and below")
private static let networkProtectionSystemSettingsModern = NSLocalizedString("network.protection.configuration.system-settings.modern", value: "Go to Privacy & Security in System Settings to allow DuckDuckGo VPN to activate", comment: "Text for a label in the VPN popover, displayed after attempting to enable the VPN for the first time while using macOS 13 and above")

static let networkProtectionUnknownActivationError = NSLocalizedString("network.protection.system.extension.unknown.activation.error", value: "There was an unexpected error. Please try again.", comment: "Message shown to users when they try to enable NetP and there is an unexpected activation error.")

static let networkProtectionPleaseReboot = NSLocalizedString("network.protection.system.extension.please.reboot", value: "VPN update available. Restart your Mac to reconnect.", comment: "Message shown to users when they try to enable NetP and they need to reboot the computer to complete the installation")
}
Loading
Loading