mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Localises IconImage descriptions
- Deletes UIKit Timeline customizer
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
Account.strings
|
||||
NetNewsWire
|
||||
|
||||
Created by Stuart Breckenridge on 16/12/2022.
|
||||
Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
*/
|
||||
|
||||
/* Account Section */
|
||||
"ACCOUNT_NAME" = "Name";
|
||||
"CLOUDKIT" = "iCloud";
|
||||
"LOCAL_ACCOUNT_NAME_PHONE" = "On My iPhone";
|
||||
"LOCAL_ACCOUNT_NAME_PAD" = "On My iPad";
|
||||
"ACCOUNT_EMAIL_ADDRESS_PROMPT" = "Email Address";
|
||||
"ACCOUNT_USERNAME_OR_EMAIL_PROMPT" = "Username or Email";
|
||||
"ACCOUNT_PASSWORD_PROMPT" = "Password";
|
||||
|
||||
|
||||
/* Explainers */
|
||||
"LOCAL_FOOTER_EXPLAINER" = "Local accounts do not sync your feeds across devices";
|
||||
"BAZQUX_FOOTER_EXPLAINER" = "Sign in to your BazQux account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a BazQux account? [Sign Up Here](https://bazqux.com)";
|
||||
"INOREADER_FOOTER_EXPLAINER" = "Sign in to your InoReader account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have an InoReader account? [Sign Up Here](https://www.inoreader.com)";
|
||||
"OLDREADER_FOOTER_EXPLAINER" = "Sign in to your The Old Reader account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a The Old Reader account? [Sign Up Here](https://theoldreader.com)";
|
||||
"FRESHRSS_FOOTER_EXPLAINER" = "Sign in to your FreshRSS instance and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have an FreshRSS instance? [Sign Up Here](https://freshrss.org)";
|
||||
"CLOUDKIT_FOOTER_EXPLAINER" = "NetNewsWire will use your iCloud account to sync your subscriptions across your Mac and iOS devices.";
|
||||
"FEEDBIN_FOOTER_EXPLAINER" = "Sign in to your Feedbin account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a Feedbin account? [Sign Up Here](https://feedbin.com/signup)";
|
||||
"NEWSBLUR_FOOTER_EXPLAINER" = "Sign in to your NewsBlur account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a NewsBlur account? [Sign Up Here](https://newsblur.com)";
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
Inspector.strings
|
||||
NetNewsWire
|
||||
|
||||
Created by Stuart Breckenridge on 15/12/2022.
|
||||
Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
*/
|
||||
|
||||
/* Account Inspector */
|
||||
"ACCOUNT_NAME_FIELD" = "Account Name";
|
||||
"ACTIVE" = "Active";
|
||||
"CLOUDKIT_LIMITATIONS_LINK" = "[iCloud Syncing Limitations & Solutions](https://netnewswire.com/help/iCloud)";
|
||||
"REMOVE_ACCOUNT_TITLE" = "Remove Account";
|
||||
"REMOVE_FEEDLY_MESSAGE" = "Are you sure you want to remove this account? NetNewsWire will no longer be able to access articles and feeds unless the account is added again.";
|
||||
"REMOVE_ACCOUNT_MESSAGE" = "Are you sure you want to remove this account? This cannot be undone.";
|
||||
"REMOVE_ACCOUNT_TITLE" = "Remove Account";
|
||||
|
||||
|
||||
"NOTIFY_ABOUT_NEW_ARTICLES" = "Notify About New Articles";
|
||||
"ALWAYS_SHOW_READER_VIEW" = "Always Show Reader View";
|
||||
"HOME_PAGE" = "Home Page";
|
||||
"FEED_URL" = "Feed URL";
|
||||
@@ -1,96 +0,0 @@
|
||||
/*
|
||||
Settings.strings
|
||||
NetNewsWire
|
||||
|
||||
Created by Stuart Breckenridge on 14/12/2022.
|
||||
Copyright © 2022 Ranchero Software. All rights reserved.
|
||||
*/
|
||||
|
||||
/* Settings */
|
||||
|
||||
"SETTINGS_TITLE" = "Settings";
|
||||
"DEVICE_PERMISSIONS_HEADER" = "Device Permissions";
|
||||
"DEVICE_PERMISSIONS_FOOTER" = "Configure NetNewsWire's access to Siri, background app refresh, mobile data, and more.";
|
||||
"ACCOUNTS_EXTENSIONS_HEADER" = "Accounts & Extensions";
|
||||
"ACCOUNTS_EXTENSIONS_FOOTER" = "Add, delete, enable, or disable accounts and extensions.";
|
||||
"APPEARANCE_HEADER" = "Appearance";
|
||||
"APPEARANCE_FOOTER" = "Manage the look, feel, and behavior of NetNewsWire.";
|
||||
"DISPLAY_BEHAVIORS_HEADER" = "Display & Behaviors";
|
||||
|
||||
/* Settings Rows */
|
||||
|
||||
"OPEN_SYSTEM_SETTINGS" = "Open System Settings";
|
||||
"NEW_ARTICLE_NOTIFICATIONS" = "New Article Notifications";
|
||||
"MANAGE_ACCOUNTS" = "Manage Accounts";
|
||||
"MANAGE_EXTENSIONS" = "Manage Extensions";
|
||||
"IMPORT_SUBSCRIPTIONS" = "Import Subscriptions";
|
||||
"EXPORT_SUBSCRIPTIONS" = "Export Subscriptions";
|
||||
"ABOUT" = "About NetNewsWire";
|
||||
"NETNEWSWIRE_HELP" = "NetNewsWire Help Guide";
|
||||
"NETNEWSWIRE_WEBSITE" = "NewNewsWire Website";
|
||||
|
||||
/* Display & Behaviors */
|
||||
|
||||
"APPLICATION_HEADER" = "Application";
|
||||
"TIMELINE_HEADER" = "Timeline";
|
||||
"ARTICLE_HEADER" = "Article";
|
||||
"ALWAYS_DARK_MODE" = "Always Dark";
|
||||
"ALWAYS_LIGHT_MODE" = "Always Light";
|
||||
"USE_SYSTEM_DISPLAY_MODE" = "Use System";
|
||||
"SORT_OLDEST_NEWEST" = "Sort Oldest to Newest";
|
||||
"GROUP_BY_FEED" = "Group by Feed";
|
||||
"REFRESH_TO_CLEAR_READ_ARTICLES" = "Refresh to Clear Articles";
|
||||
"TIMELINE_LAYOUT" = "Timeline Layout";
|
||||
"ICON_SIZE" = "Icon Size";
|
||||
"NUMBER_OF_LINES" = "Number of Lines";
|
||||
"ARTICLE_THEME" = "Article Theme";
|
||||
"CONFIRM_MARK_ALL_AS_READ" = "Confirm Mark All as Read";
|
||||
"OPEN_LINKS_IN_APP" = "Open Links in NetNewsWire";
|
||||
|
||||
/* Account Management */
|
||||
"ADD_ACCOUNT" = "Add Account";
|
||||
"NO_INACTIVE_ACCOUNT_FOOTER" = "There are no inactive accounts.";
|
||||
"ACCOUNT_REMOVE %@" = "Are you sure you want to remove “%@”?";
|
||||
"REMOVE_FEEDLY_CONFIRMATION" = "Are you sure you want to remove this account? NetNewsWire will no longer be able to access articles and feeds unless the account is added again.";
|
||||
"REMOVE_ACCOUNT_CONFIRMATION" = "Are you sure you want to remove this account? This cannot be undone.";
|
||||
"ACTIVE_ACCOUNTS_HEADER" = "Active Accounts";
|
||||
"INACTIVE_ACCOUNTS_HEADER" = "Inactive Accounts";
|
||||
|
||||
/* Extension Management */
|
||||
"DEACTIVATE" = "Deactivate";
|
||||
"DEACTIVATE_EXTENSION_TITLE" = "Deactivate Extension";
|
||||
"DEACTIVATE_EXTENSION %@" = "Are you sure you want to deactivate the “%@” extension?";
|
||||
"ACTIVE_EXTENSIONS" = "Active Extensions";
|
||||
"FEED_PROVIDER_HEADER" = "Feed Provider";
|
||||
"FEED_PROVIDER_FOOTER" = "Feed Providers allow you to subscribe to some pages as if they were RSS Feeds.";
|
||||
"ADD_EXTENSIONS_TITLE" = "Add Extension";
|
||||
|
||||
/* New Article Notifications */
|
||||
"NEW_ARTICLE_NOTIFICATIONS_TITLE" = "New Article Notifications";
|
||||
|
||||
/* About */
|
||||
"ABOUT_TITLE" = "About";
|
||||
"PRIMARY_CONTRIBUTORS" = "Primary Contributors";
|
||||
"ADDITIONAL_CONTRIBUTORS" = "Additional Contributors";
|
||||
"THANKS" = "Thanks";
|
||||
"BYLINE" = "By Brent Simmons and the Ranchero Software team.";
|
||||
|
||||
/* Add Account */
|
||||
"ADD_LOCAL_ACCOUNT_HEADER" = "Local";
|
||||
"ADD_LOCAL_ACCOUNT_FOOTER" = "Local accounts do not sync your feeds across devices";
|
||||
"ADD_CLOUDKIT_ACCOUNT_HEADER" = "iCloud";
|
||||
"ADD_CLOUDKIT_ACCOUNT_FOOTER" = "Your iCloud account syncs your feeds across your Mac and iOS devices";
|
||||
"ADD_WEB_ACCOUNT_HEADER" = "Web";
|
||||
"ADD_WEB_ACCOUNT_FOOTER" = "Web accounts sync your feeds across all your devices";
|
||||
"ADD_SELFHOSTED_ACCOUNT_HEADER" = "Self-hosted";
|
||||
"ADD_SELFHOSTED_ACCOUNT_FOOTER" = "Self-hosted accounts sync your feeds across all your devices";
|
||||
|
||||
|
||||
/* Alerts */
|
||||
"IMPORT_OPML_CONFIRMATION" = "Choose an account to receive the imported feeds and folders";
|
||||
"IMPORT_OPML_SUCCESS_TITLE" = "Imported Successfully";
|
||||
"IMPORT_OPML_SUCCESS_MESSAGE %@" = "Subscriptions have been imported to your %@ account.";
|
||||
"EXPORT_OPML_CONFIRMATION" = "Choose an account with the subscriptions to export";
|
||||
"EXPORT_OPML_SUCCESS_TITLE" = "Exported Successfully";
|
||||
"EXPORT_OPML_SUCCESS_MESSAGE" = "Your OPML file has been successfully exported.";
|
||||
"ERROR_TITLE" = "Error";
|
||||
@@ -1,106 +0,0 @@
|
||||
//
|
||||
// TimelineCustomizerViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Maurice Parker on 11/8/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import SwiftUI
|
||||
import RSCore
|
||||
|
||||
struct TimelineCustomizerWrapper: UIViewControllerRepresentable {
|
||||
public func makeUIViewController(context: Context) -> TimelineCustomizerViewController {
|
||||
let controller = UIStoryboard.settings.instantiateController(ofType: TimelineCustomizerViewController.self)
|
||||
return controller
|
||||
}
|
||||
|
||||
public func updateUIViewController(_ uiViewController: TimelineCustomizerViewController, context: Context) {
|
||||
//
|
||||
}
|
||||
|
||||
public typealias UIViewControllerType = TimelineCustomizerViewController
|
||||
}
|
||||
|
||||
|
||||
class TimelineCustomizerViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var iconSizeSliderContainerView: UIView!
|
||||
@IBOutlet weak var iconSizeSlider: TickMarkSlider!
|
||||
@IBOutlet weak var numberOfLinesSliderContainerView: UIView!
|
||||
@IBOutlet weak var numberOfLinesSlider: TickMarkSlider!
|
||||
|
||||
@IBOutlet weak var previewWidthConstraint: NSLayoutConstraint!
|
||||
@IBOutlet weak var previewHeightConstraint: NSLayoutConstraint!
|
||||
|
||||
@IBOutlet weak var previewContainerView: UIView!
|
||||
var previewController: TimelinePreviewTableViewController {
|
||||
return children.first as! TimelinePreviewTableViewController
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
iconSizeSliderContainerView.layer.cornerRadius = 10
|
||||
iconSizeSlider.value = Float(AppDefaults.shared.timelineIconSize.rawValue)
|
||||
iconSizeSlider.addTickMarks()
|
||||
|
||||
numberOfLinesSliderContainerView.layer.cornerRadius = 10
|
||||
numberOfLinesSlider.value = Float(AppDefaults.shared.timelineNumberOfLines)
|
||||
numberOfLinesSlider.addTickMarks()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
updatePreviewBorder()
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
updatePreviewBorder()
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
@IBAction func iconSizeChanged(_ sender: Any) {
|
||||
guard let iconSize = IconSize(rawValue: Int(iconSizeSlider.value.rounded())) else { return }
|
||||
AppDefaults.shared.timelineIconSize = iconSize
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
@IBAction func numberOfLinesChanged(_ sender: Any) {
|
||||
AppDefaults.shared.timelineNumberOfLines = Int(numberOfLinesSlider.value.rounded())
|
||||
updatePreview()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private extension TimelineCustomizerViewController {
|
||||
|
||||
func updatePreview() {
|
||||
let previewWidth: CGFloat = {
|
||||
if traitCollection.userInterfaceIdiom == .phone {
|
||||
return view.bounds.width
|
||||
} else {
|
||||
return view.bounds.width / 1.5
|
||||
}
|
||||
}()
|
||||
|
||||
previewWidthConstraint.constant = previewWidth
|
||||
previewHeightConstraint.constant = previewController.heightFor(width: previewWidth)
|
||||
|
||||
previewController.reload()
|
||||
}
|
||||
|
||||
func updatePreviewBorder() {
|
||||
if traitCollection.userInterfaceStyle == .dark {
|
||||
previewContainerView.layer.borderColor = UIColor.black.cgColor
|
||||
previewContainerView.layer.borderWidth = 1
|
||||
} else {
|
||||
previewContainerView.layer.borderWidth = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// TimelinePreviewTableViewController.swift
|
||||
// NetNewsWire-iOS
|
||||
//
|
||||
// Created by Maurice Parker on 11/8/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Articles
|
||||
import SwiftUI
|
||||
|
||||
struct TimelinePreviewWrapper: UIViewControllerRepresentable {
|
||||
|
||||
func makeUIViewController(context: Context) -> TimelinePreviewTableViewController {
|
||||
let controller = UIStoryboard.settings.instantiateViewController(withIdentifier: "TimelinePreviewTableViewController") as! TimelinePreviewTableViewController
|
||||
return controller
|
||||
}
|
||||
|
||||
func updateUIViewController(_ uiViewController: TimelinePreviewTableViewController, context: Context) {
|
||||
//
|
||||
}
|
||||
|
||||
typealias UIViewControllerType = TimelinePreviewTableViewController
|
||||
|
||||
}
|
||||
|
||||
|
||||
class TimelinePreviewTableViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
|
||||
|
||||
@IBOutlet weak var tableView: UITableView!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
|
||||
}
|
||||
|
||||
func heightFor(width: CGFloat) -> CGFloat {
|
||||
if UIApplication.shared.preferredContentSizeCategory.isAccessibilityCategory {
|
||||
let layout = MasterTimelineAccessibilityCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
|
||||
return layout.height
|
||||
} else {
|
||||
let layout = MasterTimelineDefaultCellLayout(width: width, insets: tableView.safeAreaInsets, cellData: prototypeCellData)
|
||||
return layout.height
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Table view data source
|
||||
|
||||
func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! MasterTimelineTableViewCell
|
||||
cell.cellData = prototypeCellData
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
|
||||
}
|
||||
// MARK: API
|
||||
|
||||
func reload() {
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private extension TimelinePreviewTableViewController {
|
||||
|
||||
var prototypeCellData: MasterTimelineCellData {
|
||||
let longTitle = "Enim ut tellus elementum sagittis vitae et. Nibh praesent tristique magna sit amet purus gravida quis blandit. Neque volutpat ac tincidunt vitae semper quis lectus nulla. Massa id neque aliquam vestibulum morbi blandit. Ultrices vitae auctor eu augue. Enim eu turpis egestas pretium aenean pharetra magna. Eget gravida cum sociis natoque. Sit amet consectetur adipiscing elit. Auctor eu augue ut lectus arcu bibendum. Maecenas volutpat blandit aliquam etiam erat velit. Ut pharetra sit amet aliquam id diam maecenas ultricies. In hac habitasse platea dictumst quisque sagittis purus sit amet."
|
||||
|
||||
let prototypeID = "prototype"
|
||||
let status = ArticleStatus(articleID: prototypeID, read: false, starred: false, dateArrived: Date())
|
||||
let prototypeArticle = Article(accountID: prototypeID, articleID: prototypeID, webFeedID: prototypeID, uniqueID: prototypeID, title: longTitle, contentHTML: nil, contentText: nil, url: nil, externalURL: nil, summary: nil, imageURL: nil, datePublished: nil, dateModified: nil, authors: nil, status: status)
|
||||
|
||||
let iconImage = IconImage(AppAssets.faviconTemplateImage.withTintColor(AppAssets.secondaryAccentColor))
|
||||
|
||||
return MasterTimelineCellData(article: prototypeArticle, showFeedName: .feed, feedName: "Feed Name", byline: nil, iconImage: iconImage, showIcon: true, featuredImage: nil, numberOfLines: AppDefaults.shared.timelineNumberOfLines, iconSize: AppDefaults.shared.timelineIconSize, hideSeparator: false)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user