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

widget wordings #2486

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions DcWidget/DcWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct DcShortcutWidgetView: View {

var body: some View {
if entry.shortcuts.isEmpty {
Text(String.localized("ios_widget_no_apps"))
Text(String.localized("shortcuts_widget_description"))
} else {
let rows = [GridItem(.fixed(56)), GridItem(.fixed(56))]
LazyHGrid(rows: rows) {
Expand Down Expand Up @@ -79,8 +79,8 @@ struct DcWidget: Widget {
}
}
.supportedFamilies([.systemSmall, .systemMedium])
.configurationDisplayName(String.localized("ios_widget_apps_title"))
.description(String.localized("ios_widget_apps_description"))
.configurationDisplayName(String.localized("shortcuts_widget_title"))
.description(String.localized("shortcuts_widget_description"))
}
}

Expand Down
4 changes: 2 additions & 2 deletions deltachat-ios/Controller/ChatListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1053,12 +1053,12 @@ extension ChatListViewController: ChatListEditingBarDelegate {
let chatPresentInHomescreenWidget = allHomescreenChatsIds.contains(chatId)
let action: UIAlertAction
if chatPresentInHomescreenWidget {
action = UIAlertAction(title: String.localized("ios_remove_from_home_screen"), style: .default) { [weak self] _ in
action = UIAlertAction(title: String.localized("remove_from_widget"), style: .default) { [weak self] _ in
guard let self else { return }
userDefaults.removeChatFromHomescreenWidget(accountId: self.dcContext.id, chatId: chatId)
}
} else {
action = UIAlertAction(title: String.localized("ios_add_to_home_screen"), style: .default) { [weak self] _ in
action = UIAlertAction(title: String.localized("add_to_widget"), style: .default) { [weak self] _ in
guard let self else { return }

userDefaults.addChatToHomescreenWidget(accountId: self.dcContext.id, chatId: chatId)
Expand Down
8 changes: 4 additions & 4 deletions deltachat-ios/Controller/ContactDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class ContactDetailViewController: UITableViewController {

let isOnHomescreen = chatIdsOnHomescreen.contains(viewModel.chatId)
if isOnHomescreen {
cell.actionTitle = String.localized("ios_remove_from_home_screen")
cell.actionTitle = String.localized("remove_from_widget")
} else {
cell.actionTitle = String.localized("ios_add_to_home_screen")
cell.actionTitle = String.localized("add_to_widget")
}
cell.actionColor = UIColor.systemBlue
return cell
Expand Down Expand Up @@ -462,9 +462,9 @@ class ContactDetailViewController: UITableViewController {

let onHomescreen = viewModel.toggleChatInHomescreenWidget()
if onHomescreen {
homescreenWidgetCell.actionTitle = String.localized("ios_remove_from_home_screen")
homescreenWidgetCell.actionTitle = String.localized("remove_from_widget")
} else {
homescreenWidgetCell.actionTitle = String.localized("ios_add_to_home_screen")
homescreenWidgetCell.actionTitle = String.localized("add_to_widget")
}
}

Expand Down
4 changes: 2 additions & 2 deletions deltachat-ios/Controller/FilesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ extension FilesViewController: UITableViewDelegate, UITableViewDataSource {
if isOnHomescreen {
children.append(
UIAction.menuAction(
localizationKey: "ios_remove_from_home_screen",
localizationKey: "remove_from_widget",
systemImageName: "rectangle.on.rectangle.slash",
indexPath: indexPath,
action: { _ in
Expand All @@ -221,7 +221,7 @@ extension FilesViewController: UITableViewDelegate, UITableViewDataSource {
} else {
children.append(
UIAction.menuAction(
localizationKey: "ios_add_to_home_screen",
localizationKey: "add_to_widget",
systemImageName: "plus.rectangle.on.rectangle",
indexPath: indexPath,
action: { _ in
Expand Down
8 changes: 4 additions & 4 deletions deltachat-ios/Controller/GroupChatDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ class GroupChatDetailViewController: UIViewController {

let isOnHomescreen = chatIdsOnHomescreen.contains(chatId)
if isOnHomescreen {
cell.actionTitle = String.localized("ios_remove_from_home_screen")
cell.actionTitle = String.localized("remove_from_widget")
} else {
cell.actionTitle = String.localized("ios_add_to_home_screen")
cell.actionTitle = String.localized("add_to_widget")
}
cell.actionColor = UIColor.systemBlue
return cell
Expand Down Expand Up @@ -362,9 +362,9 @@ class GroupChatDetailViewController: UIViewController {
}

if onHomescreen {
homescreenWidgetCell.actionTitle = String.localized("ios_remove_from_home_screen")
homescreenWidgetCell.actionTitle = String.localized("remove_from_widget")
} else {
homescreenWidgetCell.actionTitle = String.localized("ios_add_to_home_screen")
homescreenWidgetCell.actionTitle = String.localized("add_to_widget")
}
}

Expand Down
4 changes: 2 additions & 2 deletions deltachat-ios/Controller/WebxdcViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,13 @@ class WebxdcViewController: WebViewViewController {

let homescreenAction: UIAlertAction
if isOnHomescreen {
homescreenAction = UIAlertAction(title: String.localized("ios_remove_from_home_screen"), style: .default) { [weak self] _ in
homescreenAction = UIAlertAction(title: String.localized("remove_from_widget"), style: .default) { [weak self] _ in
guard let self else { return }

userDefaults.removeWebxdcFromHomescreen(accountId: accountId, messageId: messageId)
}
} else {
homescreenAction = UIAlertAction(title: String.localized("ios_add_to_home_screen"), style: .default) { [weak self] _ in
homescreenAction = UIAlertAction(title: String.localized("add_to_widget"), style: .default) { [weak self] _ in
guard let self else { return }

userDefaults.addWebxdcToHomescreenWidget(accountId: accountId, messageId: messageId)
Expand Down
12 changes: 4 additions & 8 deletions deltachat-ios/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1065,11 +1065,7 @@
"backup_successful_explain_ios" = "You can find the backup in the \"Delta Chat\" folder using the \"Files\" app.\n\nMove the backup out of this folder to keep it when deleting Delta Chat.";
"location_denied" = "Location access denied";
"location_denied_explain_ios" = "In the system settings, enable \"Privacy/Location Services\" and set \"Delta Chat/Location\" to \"Always\" and \"Precise\".";
"widget_no_apps" = "In-Chat Utilities or Games will be shown here";
"widget_most_recent_apps_title" = "Shortcuts";
"widget_most_recent_apps_description" = "Shows the most recent In-Chat Utilities and Games";
"ios_widget_no_apps" = "In-Chat Utilities or Games will be shown here";
"ios_widget_apps_title" = "Shortcuts";
"ios_widget_apps_description" = "Shortcuts to In-Chat Utilities and Games";
"ios_remove_from_home_screen" = "Remove from Homescreen";
"ios_add_to_home_screen" = "Add to Homescreen";
"shortcuts_widget_title" = "Shortcuts";
"shortcuts_widget_description" = "Use Delta Chat's \"Add To Widget\" to add items";
"remove_from_widget" = "Remove from Widget";
"add_to_widget" = "Add to Widget";
12 changes: 4 additions & 8 deletions scripts/untranslated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
<string name="backup_successful_explain_ios">You can find the backup in the \"Delta Chat\" folder using the \"Files\" app.\n\nMove the backup out of this folder to keep it when deleting Delta Chat.</string>
<string name="location_denied">Location access denied</string>
<string name="location_denied_explain_ios">In the system settings, enable \"Privacy/Location Services\" and set \"Delta Chat/Location\" to \"Always\" and \"Precise\".</string>
<string name="widget_no_apps">In-Chat Utilities or Games will be shown here</string>
<string name="widget_most_recent_apps_title">Shortcuts</string>
<string name="widget_most_recent_apps_description">Shows the most recent In-Chat Utilities and Games</string>
<string name="ios_widget_no_apps">In-Chat Utilities or Games will be shown here</string>
<string name="ios_widget_apps_title">Shortcuts</string>
<string name="ios_widget_apps_description">Shortcuts to In-Chat Utilities and Games</string>
<string name="ios_remove_from_home_screen">Remove from Homescreen</string>
<string name="ios_add_to_home_screen">Add to Homescreen</string>
<string name="shortcuts_widget_title">Shortcuts</string>
<string name="shortcuts_widget_description">Use Delta Chat's \"Add to Widget\" to add items</string>
<string name="remove_from_widget">Remove from Widget</string>
<string name="add_to_widget">Add to Widget</string>
</resources>
Loading