From 6b0e4deffa104295a6a4c4892af5bbcd2a22c27d Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 6 Apr 2022 15:51:32 +0100 Subject: [PATCH] =?UTF-8?q?Use=20SwiftGen=20to=20update=20VectorL10n=20?= =?UTF-8?q?=F0=9F=A4=A6=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Riot/Generated/Strings.swift | 3 +-- Tools/SwiftGen/Templates/Strings/flat-swift4-vector.stencil | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index a09e12287..e20180e33 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -8006,7 +8006,7 @@ public class VectorL10n: NSObject { extension VectorL10n { static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String { - let format = NSLocalizedString(key, tableName: table, bundle: Bundle(for: BundleToken.self), comment: "") + let format = NSLocalizedString(key, tableName: table, bundle: Bundle.app, comment: "") let locale: Locale if let providedLocale = LocaleProvider.locale { locale = providedLocale @@ -8018,4 +8018,3 @@ extension VectorL10n { } } -private final class BundleToken {} diff --git a/Tools/SwiftGen/Templates/Strings/flat-swift4-vector.stencil b/Tools/SwiftGen/Templates/Strings/flat-swift4-vector.stencil index f76780d24..3e3e6f594 100644 --- a/Tools/SwiftGen/Templates/Strings/flat-swift4-vector.stencil +++ b/Tools/SwiftGen/Templates/Strings/flat-swift4-vector.stencil @@ -64,7 +64,7 @@ import Foundation extension {{className}} { static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String { - let format = NSLocalizedString(key, tableName: table, bundle: Bundle(for: BundleToken.self), comment: "") + let format = NSLocalizedString(key, tableName: table, bundle: Bundle.app, comment: "") let locale: Locale if let providedLocale = LocaleProvider.locale { @@ -77,7 +77,6 @@ extension {{className}} { } } -private final class BundleToken {} {% else %} // No string found {% endif %}