From 31e783a5f7d1083603e38efad27866e54f6ce94d Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Sat, 27 May 2023 17:09:25 +0800 Subject: [PATCH] Localizes Theme headings for future use --- Mac/Resources/en-GB.lproj/Localizable.strings | 6 ++++++ Mac/Resources/en.lproj/Localizable.strings | 6 ++++++ Shared/ArticleStyles/ArticleThemesManager.swift | 11 +++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Mac/Resources/en-GB.lproj/Localizable.strings b/Mac/Resources/en-GB.lproj/Localizable.strings index e0db4abd2..a15770112 100644 --- a/Mac/Resources/en-GB.lproj/Localizable.strings +++ b/Mac/Resources/en-GB.lproj/Localizable.strings @@ -586,6 +586,12 @@ /* Subreddit */ "label.text.subreddit" = "Subreddit"; +/* Built-in */ +"label.text.themes-builtin" = "Built-in Themes"; + +/* Third Party */ +"label.text.themes-third-party" = "Other Themes"; + /* Third-Party Integration */ "label.text.third-party-integration" = "Third-Party Integration"; diff --git a/Mac/Resources/en.lproj/Localizable.strings b/Mac/Resources/en.lproj/Localizable.strings index 7984a8d95..cba3a859f 100644 --- a/Mac/Resources/en.lproj/Localizable.strings +++ b/Mac/Resources/en.lproj/Localizable.strings @@ -579,6 +579,12 @@ /* Subreddit */ "label.text.subreddit" = "Subreddit"; +/* Built-in */ +"label.text.themes-builtin" = "Built-in Themes"; + +/* Third Party */ +"label.text.themes-third-party" = "Other Themes"; + /* Third-Party Integration */ "label.text.third-party-integration" = "Third-Party Integration"; diff --git a/Shared/ArticleStyles/ArticleThemesManager.swift b/Shared/ArticleStyles/ArticleThemesManager.swift index 71d24842d..92e2554c7 100644 --- a/Shared/ArticleStyles/ArticleThemesManager.swift +++ b/Shared/ArticleStyles/ArticleThemesManager.swift @@ -167,8 +167,11 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging, Observable menu.addItem(defaultMenuItem) menu.addItem(NSMenuItem.separator()) - let rancheroHeading = NSMenuItem(title: "Built-in Themes", action: nil, keyEquivalent: "") - rancheroHeading.attributedTitle = NSAttributedString(string: "Built-in Themes", attributes: [NSAttributedString.Key.foregroundColor : NSColor.secondaryLabelColor, NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 12)]) + let rancheroString = NSLocalizedString("label.text.themes-builtin", comment: "Built-in Themes") + let otherString = NSLocalizedString("label.text.themes-builtin", comment: "Other Themes") + + let rancheroHeading = NSMenuItem(title: rancheroString, action: nil, keyEquivalent: "") + rancheroHeading.attributedTitle = NSAttributedString(string: rancheroString, attributes: [NSAttributedString.Key.foregroundColor : NSColor.secondaryLabelColor, NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 12)]) rancheroHeading.isEnabled = false menu.addItem(rancheroHeading) @@ -185,8 +188,8 @@ final class ArticleThemesManager: NSObject, NSFilePresenter, Logging, Observable menu.addItem(NSMenuItem.separator()) - let thirdPartyHeading = NSMenuItem(title: "Other Themes", action: nil, keyEquivalent: "") - thirdPartyHeading.attributedTitle = NSAttributedString(string: "Other Themes", attributes: [NSAttributedString.Key.foregroundColor : NSColor.secondaryLabelColor, NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 12)]) + let thirdPartyHeading = NSMenuItem(title: otherString, action: nil, keyEquivalent: "") + thirdPartyHeading.attributedTitle = NSAttributedString(string: otherString, attributes: [NSAttributedString.Key.foregroundColor : NSColor.secondaryLabelColor, NSAttributedString.Key.font: NSFont.boldSystemFont(ofSize: 12)]) thirdPartyHeading.isEnabled = false menu.addItem(thirdPartyHeading)