From 60fb280395231dd058be7157c0e4bb71a4dfad32 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Wed, 18 Dec 2024 11:03:26 -0800 Subject: [PATCH 1/6] Add US entry into the DuckDuckGoVPN localizations file. --- DuckDuckGo.xcodeproj/project.pbxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index a7372a325d..0297d90caf 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10626,6 +10626,7 @@ pl, pt, ru, + "en-US", ); mainGroup = AA585D75248FD31100E9A3E2; packageReferences = ( From 8bb5e437d0ed3de7a197df8eba4a35add57bd2fc Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Wed, 18 Dec 2024 11:22:40 -0800 Subject: [PATCH 2/6] Add a string to ensure that the translation is used. --- DuckDuckGoVPN/Localizable.xcstrings | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DuckDuckGoVPN/Localizable.xcstrings b/DuckDuckGoVPN/Localizable.xcstrings index c18410e568..43636be9c4 100644 --- a/DuckDuckGoVPN/Localizable.xcstrings +++ b/DuckDuckGoVPN/Localizable.xcstrings @@ -557,6 +557,12 @@ "value" : "DuckDuckGo VPN" } }, + "en-US" : { + "stringUnit" : { + "state" : "translated", + "value" : "DuckDuckGo VPN" + } + }, "es" : { "stringUnit" : { "state" : "translated", From cf3308d5aa31c64180d747c966c51b58378def40 Mon Sep 17 00:00:00 2001 From: Michal Smaga Date: Wed, 18 Dec 2024 22:32:30 +0100 Subject: [PATCH 3/6] Add translated strings to otherwise empty en-US language variants --- DuckDuckGo/Localizable.xcstrings | 6 ++++++ .../Localizable.xcstrings | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/DuckDuckGo/Localizable.xcstrings b/DuckDuckGo/Localizable.xcstrings index ba0c0a8fe9..bd1db7f69f 100644 --- a/DuckDuckGo/Localizable.xcstrings +++ b/DuckDuckGo/Localizable.xcstrings @@ -606,6 +606,12 @@ "value" : "DuckDuckGo" } }, + "en-US" : { + "stringUnit" : { + "state" : "translated", + "value" : "DuckDuckGo" + } + }, "es" : { "stringUnit" : { "state" : "translated", diff --git a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionAndNotificationTargets/Localizable.xcstrings b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionAndNotificationTargets/Localizable.xcstrings index a4d7368f52..b3cab01392 100644 --- a/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionAndNotificationTargets/Localizable.xcstrings +++ b/DuckDuckGo/NetworkProtection/NetworkExtensionTargets/NetworkExtensionAndNotificationTargets/Localizable.xcstrings @@ -557,6 +557,12 @@ "value" : "Reconnect" } }, + "en-US" : { + "stringUnit" : { + "state" : "translated", + "value" : "Reconnect" + } + }, "es" : { "stringUnit" : { "state" : "translated", From 1e45b02d3313bca7d1ab86b3fa0a030f489467db Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Wed, 18 Dec 2024 15:07:35 -0800 Subject: [PATCH 4/6] Remove unnecessary line. --- DuckDuckGo.xcodeproj/project.pbxproj | 1 - 1 file changed, 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 0297d90caf..a7372a325d 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10626,7 +10626,6 @@ pl, pt, ru, - "en-US", ); mainGroup = AA585D75248FD31100E9A3E2; packageReferences = ( From 56e98a5e3501289ffdb7a23223aa20854b7d7427 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Wed, 18 Dec 2024 15:30:32 -0800 Subject: [PATCH 5/6] Update onboarding test. This change has been tested locally using English and Spanish. --- UnitTests/Onboarding/OnboardingManagerTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnitTests/Onboarding/OnboardingManagerTests.swift b/UnitTests/Onboarding/OnboardingManagerTests.swift index 660259c345..17b8356089 100644 --- a/UnitTests/Onboarding/OnboardingManagerTests.swift +++ b/UnitTests/Onboarding/OnboardingManagerTests.swift @@ -69,7 +69,7 @@ class OnboardingManagerTests: XCTestCase { exclude: [], order: "v3", env: "development", - locale: "en", + locale: "en-US", platform: .init(name: "macos") ) From 533ab4a69ba9b2f096750475ed9afdf1756b582e Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Wed, 18 Dec 2024 16:10:24 -0800 Subject: [PATCH 6/6] Test undoing localization change. --- DuckDuckGo/Localizable.xcstrings | 6 ------ UnitTests/Onboarding/OnboardingManagerTests.swift | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/DuckDuckGo/Localizable.xcstrings b/DuckDuckGo/Localizable.xcstrings index bd1db7f69f..ba0c0a8fe9 100644 --- a/DuckDuckGo/Localizable.xcstrings +++ b/DuckDuckGo/Localizable.xcstrings @@ -606,12 +606,6 @@ "value" : "DuckDuckGo" } }, - "en-US" : { - "stringUnit" : { - "state" : "translated", - "value" : "DuckDuckGo" - } - }, "es" : { "stringUnit" : { "state" : "translated", diff --git a/UnitTests/Onboarding/OnboardingManagerTests.swift b/UnitTests/Onboarding/OnboardingManagerTests.swift index 17b8356089..660259c345 100644 --- a/UnitTests/Onboarding/OnboardingManagerTests.swift +++ b/UnitTests/Onboarding/OnboardingManagerTests.swift @@ -69,7 +69,7 @@ class OnboardingManagerTests: XCTestCase { exclude: [], order: "v3", env: "development", - locale: "en-US", + locale: "en", platform: .init(name: "macos") )