chore: Improve comments on certain strings

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <[email protected]>
This commit is contained in:
Marcel Müller committed 2026-08-02 13:16:57 +02:00
1 parent 7d9cd9bde2
commit c15b3597b8
27 files changed
+142 -117

No files matched your search

+1 -1
View File
@@ -250,7 +250,7 @@ class CallViewController: UIViewController,
self.toggleChatButton.accessibilityLabel = NSLocalizedString("Chat", comment: "")
self.toggleChatButton.accessibilityHint = NSLocalizedString("Double tap to show or hide chat view", comment: "")
self.toggleChatButton.accessibilityIdentifier = "toggleChatButton"
self.recordingButton.accessibilityLabel = NSLocalizedString("Recording", comment: "")
self.recordingButton.accessibilityLabel = NSLocalizedString("Recording", comment: "Accessibility label of the button shown while the call is being recorded")
self.recordingButton.accessibilityHint = NSLocalizedString("Double tap to stop recording", comment: "")
self.lowerHandButton.accessibilityLabel = NSLocalizedString("Lower hand", comment: "")
self.lowerHandButton.accessibilityHint = NSLocalizedString("Double tap to lower hand", comment: "")
@@ -994,7 +994,7 @@ import Toast
self.presentPollCreation()
}
let threadAction = UIAction(title: NSLocalizedString("Thread", comment: ""), image: UIImage(systemName: "bubble.left.and.bubble.right")) { [unowned self] _ in
let threadAction = UIAction(title: NSLocalizedString("Thread", comment: "Context menu action to reply to a message in a thread"), image: UIImage(systemName: "bubble.left.and.bubble.right")) { [unowned self] _ in
self.textView.resignFirstResponder()
self.presentThreadCreation()
}
@@ -594,7 +594,7 @@ class BaseChatTableViewCell: UITableViewCell, AudioPlayerViewDelegate, Reactions
let repliesString = String.localizedStringWithFormat(NSLocalizedString("%ld replies", comment: "Replies in a thread"), replies)
self.threadRepliesButton.setTitle(repliesString, for: .normal)
} else {
self.threadRepliesButton.setTitle(NSLocalizedString("Reply", comment: ""), for: .normal)
self.threadRepliesButton.setTitle(NSLocalizedString("Reply", comment: "Action to reply to a message"), for: .normal)
}
self.reactionPart.isHidden = false
@@ -12,7 +12,7 @@ import SwiftyAttributes
public func setupAbsence(withData absenceData: CurrentUserAbsence, inRoom room: NCRoom) {
title.text = String.localizedStringWithFormat(NSLocalizedString("%@ is out of office", comment: "'%@' is the name of a user"), room.displayName)
let dismissAction = UIAction(title: NSLocalizedString("Hide", comment: ""), image: UIImage(systemName: "eye.slash")) { [unowned self] _ in
let dismissAction = UIAction(title: NSLocalizedString("Hide", comment: "Context menu action to hide a banner, e.g. the out of office or pinned message banner"), image: UIImage(systemName: "eye.slash")) { [unowned self] _ in
self.removeFromSuperview()
}
@@ -52,7 +52,7 @@ import SwiftyAttributes
if let account = room.account, replacementUserId != account.userId, replacementUserId != absenceData.userId {
let talkIcon = UIImage(named: "talk-20")?.withRenderingMode(.alwaysTemplate)
menuActions.append(UIAction(title: NSLocalizedString("Talk to", comment: "Talk to a user") + " " + replacementUserDisplayname, image: talkIcon) { [unowned self] _ in
menuActions.append(UIAction(title: String(format: NSLocalizedString("Talk to %@", comment: "'Talk to Alice' - start a conversation with a user"), replacementUserDisplayname), image: talkIcon) { [unowned self] _ in
NotificationCenter.default.post(name: .NCChatViewControllerTalkToUserNotification, object: self, userInfo: ["actorId": replacementUserId])
})
}
@@ -340,9 +340,9 @@ import UIKit
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
if section == PollCreationSection.kPollCreationSectionQuestion.rawValue {
return NSLocalizedString("Question", comment: "")
return NSLocalizedString("Question", comment: "Section header for the question of a poll")
} else if section == PollCreationSection.kPollCreationSectionOptions.rawValue {
return NSLocalizedString("Answers", comment: "")
return NSLocalizedString("Answers", comment: "Section header for the answers of a poll")
} else if section == PollCreationSection.kPollCreationSectionSettings.rawValue {
return NSLocalizedString("Settings", comment: "")
}
+2 -2
View File
@@ -1088,7 +1088,7 @@ import SwiftUI
retentionView.leftButton.setTitle(NSLocalizedString("Delete now", comment: ""), for: .normal)
retentionView.leftButton.setButtonStyle(style: .destructive)
retentionView.leftButton.setButtonAction(target: self, selector: #selector(deleteNowButtonPressed))
retentionView.rightButton.setTitle(NSLocalizedString("Keep", comment: ""), for: .normal)
retentionView.rightButton.setTitle(NSLocalizedString("Keep", comment: "Button to keep a conversation instead of deleting it"), for: .normal)
retentionView.rightButton.setButtonStyle(style: .primary)
retentionView.rightButton.setButtonAction(target: self, selector: #selector(keepButtonPressed))
retentionView.alpha = 0
@@ -2607,7 +2607,7 @@ import SwiftUI
if let lastEditActorDisplayName = message.lastEditActorDisplayName, message.lastEditTimestamp > 0 {
let timestampDate = Date(timeIntervalSince1970: TimeInterval(message.lastEditTimestamp))
let editInfo = UIAction(title: NSLocalizedString("Edited by", comment: "A message was edited by ...") + " " + lastEditActorDisplayName, attributes: [.disabled], handler: {_ in })
let editInfo = UIAction(title: String(format: NSLocalizedString("Edited by %@", comment: "'Edited by Alice' - who last edited a message"), lastEditActorDisplayName), attributes: [.disabled], handler: {_ in })
editInfo.subtitle = NCUtils.readableTimeAndDate(fromDate: timestampDate)
informationalActions.append(editInfo)
@@ -213,8 +213,10 @@ import UIKit
if let translatedFrom = responseDict["from"] {
self.detectedFromLanguageCode = translatedFrom
self.selectedToLanguageCode = translatedFrom
let detectedText = from.isEmpty ? " (" + NSLocalizedString("detected", comment: "") + ")" : ""
let title = self.fromLanguageLabel(languageCode: translatedFrom) + detectedText
let languageLabel = self.fromLanguageLabel(languageCode: translatedFrom)
let title = from.isEmpty
? String(format: NSLocalizedString("%@ (detected)", comment: "'German (detected)' - the language of the original message was detected automatically"), languageLabel)
: languageLabel
self.configureFromButton(title: title, enabled: !from.isEmpty)
self.configureToButton(title: self.toButton.titleLabel?.text, enabled: true, fromLanguageCode: translatedFrom)
}
+1 -1
View File
@@ -402,7 +402,7 @@ import SwiftyAttributes
// For own messages
if ownMessage {
actorName = NSLocalizedString("You", comment: "")
actorName = NSLocalizedString("You", comment: "The user themselves as the author of a message")
}
// For guests
@@ -212,7 +212,7 @@ class DirectoryTableViewController: UITableViewController {
let confirmDialog = UIAlertController(title: name,
message: String(format: NSLocalizedString("Do you want to share '%@' in the conversation?", comment: ""), name),
preferredStyle: .alert)
confirmDialog.addAction(UIAlertAction(title: NSLocalizedString("Share", comment: ""), style: .default) { [weak self] _ in
confirmDialog.addAction(UIAlertAction(title: NSLocalizedString("Share", comment: "Button to share a file into the conversation"), style: .default) { [weak self] _ in
self?.shareFile(withPath: path)
})
confirmDialog.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel))
@@ -62,7 +62,7 @@ public class NCNotification: NSObject {
}
if let guestDict = subjectRichParameters["guest"] as? [AnyHashable: Any], let guestName = guestDict["name"] as? String {
return "\(guestName) (\(NSLocalizedString("guest", comment: "")))"
return String(format: NSLocalizedString("%@ (guest)", comment: "'Alice (guest)' - a participant who is not logged in"), guestName)
}
return NSLocalizedString("Guest", comment: "")
+3 -3
View File
@@ -47,12 +47,12 @@ class BotCell: UITableViewCell {
switch bot.state {
case .disabled:
self.enableButton.setTitle(NSLocalizedString("Enable", comment: ""), for: .normal)
self.enableButton.setTitle(NSLocalizedString("Enable", comment: "Generic 'Enable' button label, e.g. for a bot"), for: .normal)
self.enableButton.setButtonStyle(style: .secondary)
case .enabled:
self.enableButton.setTitle(NSLocalizedString("Disable", comment: ""), for: .normal)
self.enableButton.setTitle(NSLocalizedString("Disable", comment: "Generic 'Disable' button label, e.g. for a bot"), for: .normal)
case .noSetup:
self.enableButton.setTitle(NSLocalizedString("Enabled", comment: ""), for: .normal)
self.enableButton.setTitle(NSLocalizedString("Enabled", comment: "Label of a bot that is always enabled and cannot be turned off in the app"), for: .normal)
self.enableButton.isEnabled = false
default:
self.enableButton.setTitle(NSLocalizedString("Unknown", comment: ""), for: .normal)
+2 -2
View File
@@ -50,9 +50,9 @@ extension Array where Element == NCRoom {
case .mention:
levelString = NSLocalizedString("@-mentions only", comment: "")
case .never:
levelString = NSLocalizedString("Off", comment: "")
levelString = NSLocalizedString("Off", comment: "'Off' as the value of a setting, e.g. the notification level or message expiration")
default:
levelString = NSLocalizedString("Default", comment: "")
levelString = NSLocalizedString("Default", comment: "'Default' as a notification level, following the conversation setting")
}
return levelString
+3 -6
View File
@@ -135,20 +135,17 @@ public class NCRoomParticipant: NSObject {
// Moderator label
if canModerate {
let moderatorString = NSLocalizedString("moderator", comment: "")
detailedNameString = String(format: "%@ (%@)", detailedNameString, moderatorString)
detailedNameString = String(format: NSLocalizedString("%@ (moderator)", comment: "'Alice (moderator)' - a participant who can moderate the conversation"), detailedNameString)
}
// Bridge bot label
if isBridgeBotUser {
let botString = NSLocalizedString("bot", comment: "")
detailedNameString = String(format: "%@ (%@)", detailedNameString, botString)
detailedNameString = String(format: NSLocalizedString("%@ (bot)", comment: "'Alice (bot)' - a participant that is a bot, not a person"), detailedNameString)
}
// Guest label
if isGuest, !defaultGuestNameUsed {
let guestString = NSLocalizedString("guest", comment: "")
detailedNameString = String(format: "%@ (%@)", detailedNameString, guestString)
detailedNameString = String(format: NSLocalizedString("%@ (guest)", comment: "'Alice (guest)' - a participant who is not logged in"), detailedNameString)
}
return detailedNameString
@@ -214,11 +214,11 @@ import PassKit
case kSharedItemTypeFile:
return NSLocalizedString("Files", comment: "")
case kSharedItemTypeMedia:
return NSLocalizedString("Media", comment: "")
return NSLocalizedString("Media", comment: "Category of shared items in a conversation: images and videos")
case kSharedItemTypeLocation:
return NSLocalizedString("Locations", comment: "")
case kSharedItemTypeOther:
return NSLocalizedString("Others", comment: "")
return NSLocalizedString("Others", comment: "Category of shared items in a conversation, for everything without its own category")
case kSharedItemTypeVoice:
return NSLocalizedString("Voice messages", comment: "")
case kSharedItemTypePoll:
@@ -436,7 +436,7 @@ import PassKit
return nil
}, actionProvider: { _ in
UIMenu(children: [UIAction(title: NSLocalizedString("Open", comment: "")) { _ in
UIMenu(children: [UIAction(title: NSLocalizedString("Open", comment: "Context menu action to open a shared file")) { _ in
DispatchQueue.main.async {
self.presentPreviewChatViewController()
}
@@ -1514,7 +1514,7 @@ class RoomsTableViewController: UITableViewController, CCCertificateDelegate, UI
let confirmDialog = UIAlertController(title: title,
message: NSLocalizedString("Once a conversation is left, to rejoin a closed conversation, an invite is needed. An open conversation can be rejoined at any time.", comment: ""),
preferredStyle: .alert)
let confirmAction = UIAlertAction(title: NSLocalizedString("Leave", comment: ""), style: .destructive) { _ in
let confirmAction = UIAlertAction(title: NSLocalizedString("Leave", comment: "Button to leave a conversation"), style: .destructive) { _ in
NCLog.log("About to leave room with token \(room.token ?? "Unknown") and name '\(room.displayName ?? "Unknown")'")
NCUserInterfaceController.sharedInstance().presentConversationsList()
@@ -27,7 +27,7 @@ struct AbsenceLabelView: View {
if absenceStatus.hasReplacementSet {
// Make genstrings happy
let displayedString = NSLocalizedString("Replacement", comment: "Replacement in case of out of office") + ": " + absenceStatus.replacementName
let displayedString = String(format: NSLocalizedString("Replacement: %@", comment: "'Replacement: Alice' - who takes over while a user is out of office"), absenceStatus.replacementName)
Text(verbatim: displayedString)
.foregroundStyle(.primary)
}
@@ -563,7 +563,7 @@ class DiagnosticsTableViewController: UITableViewController {
cell.detailTextLabel?.text = readableBool(for: serverCapabilities.guestsAppEnabled)
case ServerSections.kServerSectionReachable.rawValue:
cell.textLabel?.text = NSLocalizedString("Reachable?", comment: "")
cell.textLabel?.text = NSLocalizedString("Reachable?", comment: "Diagnostics row asking whether the server can be reached")
cell.detailTextLabel?.text = "-"
if serverReachableIndicator.isAnimating {
@@ -13,7 +13,7 @@ class LogfilesTableViewController: UITableViewController, QLPreviewControllerDat
private let cellIdentifier = "LogfileCellIdentifier"
private lazy var selectBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Select", comment: ""), style: .plain, target: self, action: #selector(selectButtonPressed))
private lazy var selectBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Select", comment: "Button to start selecting entries of a list"), style: .plain, target: self, action: #selector(selectButtonPressed))
private lazy var exportBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(exportButtonPressed))
init() {
@@ -210,7 +210,7 @@ public class NCSettingsController: NSObject {
self.updateAlertControllerAccountId = accountId
if canOpenAppStore {
let updateButton = UIAlertAction(title: NSLocalizedString("Update", comment: ""), style: .default) { _ in
let updateButton = UIAlertAction(title: NSLocalizedString("Update", comment: "Button to update the app"), style: .default) { _ in
NCAPIController.sharedInstance().getAppStoreAppId { appId, _ in
if let appId, !appId.isEmpty, let appStoreURL = URL(string: "\(appStoreUrlString)\(appId)") {
UIApplication.shared.open(appStoreURL, options: [:], completionHandler: nil)
@@ -350,7 +350,7 @@ class SettingsTableViewController: UITableViewController, UITextFieldDelegate, U
setPhoneAction.isEnabled = false
setPhoneNumberDialog.addAction(setPhoneAction)
}
let cancelAction = UIAlertAction(title: NSLocalizedString("Skip", comment: ""), style: .default) { _ in
let cancelAction = UIAlertAction(title: NSLocalizedString("Skip", comment: "Button to skip setting a phone number"), style: .default) { _ in
self.refreshUserProfile()
}
setPhoneNumberDialog.addAction(cancelAction)
@@ -370,7 +370,7 @@ class SettingsTableViewController: UITableViewController, UITextFieldDelegate, U
message: alertMessage,
preferredStyle: .alert)
let retryAction = UIAlertAction(title: NSLocalizedString("Retry", comment: ""), style: .default) { _ in
let retryAction = UIAlertAction(title: NSLocalizedString("Retry", comment: "Button to retry a failed operation"), style: .default) { _ in
self.presentSetPhoneNumberDialog()
}
failedPhoneNumberDialog.addAction(retryAction)
@@ -653,7 +653,7 @@ class SettingsTableViewController: UITableViewController, UITextFieldDelegate, U
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
dateFormatter.timeStyle = .short
return NSLocalizedString("Last sync", comment: "") + ": " + dateFormatter.string(from: lastUpdate)
return String(format: NSLocalizedString("Last sync: %@", comment: "'Last sync: 12 May 2026' - when the contacts were last updated"), dateFormatter.string(from: lastUpdate))
}
}
@@ -35,7 +35,7 @@ extension UserProfileTableViewController {
let alertMessageAccountRemove = NSLocalizedString("Do you really want to remove this account?", comment: "")
let alertMessageAccountLogout = NSLocalizedString("Do you really want to log out from this account?", comment: "")
let alertMessage = multiAccountEnabled.boolValue ? alertMessageAccountRemove : alertMessageAccountLogout
let actionTitle = multiAccountEnabled.boolValue ? NSLocalizedString("Remove", comment: "") : NSLocalizedString("Log out", comment: "")
let actionTitle = multiAccountEnabled.boolValue ? NSLocalizedString("Remove", comment: "Generic 'Remove' button label, e.g. an account or a date") : NSLocalizedString("Log out", comment: "")
let confirmDialog = UIAlertController(title: alertTitle, message: alertMessage, preferredStyle: .alert)
let confirmAction = UIAlertAction(title: actionTitle, style: .destructive) { _ in
self.logout()
@@ -74,7 +74,7 @@ extension UserProfileTableViewController {
textField.tag = self.kPhoneTextFieldTag
}
}
setPhoneAction = UIAlertAction(title: NSLocalizedString("Set", comment: ""), style: .default, handler: { _ in
setPhoneAction = UIAlertAction(title: NSLocalizedString("Set", comment: "Button to set a phone number"), style: .default, handler: { _ in
let phoneNumber = setPhoneNumberDialog.textFields?[0].text
if let phoneNumber = phoneNumber {
self.setPhoneNumber(phoneNumber)
@@ -202,22 +202,22 @@ extension UserProfileTableViewController {
let privateOption = setupDetailedOption(identifier: UserProfileScope.private,
image: UIImage(systemName: "iphone")?.applyingSymbolConfiguration(iconConfiguration),
title: NSLocalizedString("Private", comment: ""),
title: NSLocalizedString("Private", comment: "Visibility scope of a profile field: only people matched by phone number"),
subtitle: NSLocalizedString("Only visible to people matched via phone number integration", comment: ""),
selected: currentValue == UserProfileScope.private)
let localOption = setupDetailedOption(identifier: UserProfileScope.local,
image: UIImage(systemName: "lock")?.applyingSymbolConfiguration(iconConfiguration),
title: NSLocalizedString("Local", comment: ""),
title: NSLocalizedString("Local", comment: "Visibility scope of a profile field: only people on this server and guests"),
subtitle: NSLocalizedString("Only visible to people on this instance and guests", comment: ""),
selected: currentValue == UserProfileScope.local)
let federatedOption = setupDetailedOption(identifier: UserProfileScope.federated,
image: UIImage(systemName: "person.2")?.applyingSymbolConfiguration(iconConfiguration),
title: NSLocalizedString("Federated", comment: ""),
title: NSLocalizedString("Federated", comment: "Visibility scope of a profile field: also synchronized to trusted servers"),
subtitle: NSLocalizedString("Only synchronize to trusted servers", comment: ""),
selected: currentValue == UserProfileScope.federated)
let publishedOption = setupDetailedOption(identifier: UserProfileScope.published,
image: UIImage(systemName: "network")?.applyingSymbolConfiguration(iconConfiguration),
title: NSLocalizedString("Published", comment: ""),
title: NSLocalizedString("Published", comment: "Visibility scope of a profile field: also synchronized to the public address book"),
subtitle: NSLocalizedString("Synchronize to trusted servers and the global and public address book", comment: ""),
selected: currentValue == UserProfileScope.published)
@@ -19,16 +19,16 @@ struct UserStatusAbsenceSwiftUIView: View {
List {
Section(header: Text("Details")) {
DatePicker(selection: $absenceStatus.firstDay, displayedComponents: .date) {
Text("First day")
Text("First day", comment: "First day of the absence")
}
DatePicker(selection: $absenceStatus.lastDay, in: absenceStatus.firstDay..., displayedComponents: .date) {
Text("Last day (inclusive)")
Text("Last day (inclusive)", comment: "Last day of the absence, the user is still absent on this day")
}
}
if replacementSupported {
Section(header: Text("Replacement (optional)", comment: "Replacement in case of out of office")) {
Section(header: Text("Replacement (optional)", comment: "Section header: the person who takes over while the user is out of office")) {
NavigationLink(destination: {
UserSelectionSwiftUIView(selectedUserId: $absenceStatus.replacementUserId, selectedUserDisplayName: $absenceStatus.replacementUserDisplayName)
}, label: {
@@ -40,7 +40,7 @@ struct UserStatusAbsenceSwiftUIView: View {
Text(absenceStatus.replacementName)
} else {
Text("Select a replacement", comment: "Replacement in case of out of office")
Text("Select a replacement", comment: "Opens a user picker to choose the person who takes over during the absence")
.foregroundStyle(.primary)
}
}
@@ -51,7 +51,7 @@ struct UserStatusAbsenceSwiftUIView: View {
absenceStatus.replacementUserId = nil
absenceStatus.replacementUserDisplayName = nil
} label: {
Text("Reset replacement", comment: "Replacement in case of out of office")
Text("Reset replacement", comment: "Button to clear the chosen replacement person again")
}
.foregroundStyle(.primary)
}
+18 -7
View File
@@ -21,7 +21,7 @@ import SwiftyAttributes
if isDeleted {
return NSLocalizedString("Deleted user", comment: "")
} else {
return NSLocalizedString("Guest", comment: "")
return NSLocalizedString("Guest", comment: "Display name used for an anonymous guest")
}
}
@@ -32,18 +32,29 @@ import SwiftyAttributes
/// This also appends a potential `cloudId` as `tertiaryLabel` in parentheses
public var attributedDisplayName: NSMutableAttributedString {
let displayName = self.displayName
let titleLabel = displayName.withTextColor(.secondaryLabel)
if let remoteServer = cloudId {
let titleLabel = displayName.withTextColor(.secondaryLabel)
let remoteServerString = " (\(String(remoteServer)))"
titleLabel.append(remoteServerString.withTextColor(.tertiaryLabel))
} else if isGuest, !rawDisplayName.isEmpty {
// Show guest indication only when we did not use the default "Guest" name
let guestString = " (\(NSLocalizedString("guest", comment: "")))"
titleLabel.append(guestString.withTextColor(.tertiaryLabel))
return titleLabel
}
return titleLabel
if isGuest, !rawDisplayName.isEmpty {
// Show guest indication only when we did not use the default "Guest" name
// Highlight the name after formatting, a translation may put it anywhere
let guestName = String(format: NSLocalizedString("%@ (guest)", comment: "'Alice (guest)' - a participant who is not logged in"), displayName)
let titleLabel = guestName.withTextColor(.tertiaryLabel)
if let nameRange = guestName.range(of: displayName) {
titleLabel.addAttribute(.foregroundColor, value: UIColor.secondaryLabel, range: NSRange(nameRange, in: guestName))
}
return titleLabel
}
return displayName.withTextColor(.secondaryLabel)
}
init(actorId: String? = nil, actorType: String? = nil, actorDisplayName: String? = nil) {
+63 -36
View File
@@ -25,6 +25,18 @@
/* Alice, Bob, Charlie and 1 other is typing… */
"%1$@, %2$@, %3$@ and 1 other is typing…" = "%1$@, %2$@, %3$@ and 1 other is typing…";
/* 'Alice (bot)' - a participant that is a bot, not a person */
"%@ (bot)" = "%@ (bot)";
/* 'German (detected)' - the language of the original message was detected automatically */
"%@ (detected)" = "%@ (detected)";
/* 'Alice (guest)' - a participant who is not logged in */
"%@ (guest)" = "%@ (guest)";
/* 'Alice (moderator)' - a participant who can moderate the conversation */
"%@ (moderator)" = "%@ (moderator)";
/* Alice and Bob will receive invitations */
"%@ and %@ will receive invitations" = "%1$@ and %2$@ will receive invitations";
@@ -457,7 +469,7 @@
/* 'Answer 1', 'Answer 2', … - placeholder numbering the answers of a poll */
"Answer %ld" = "Answer %ld";
/* No comment provided by engineer. */
/* Section header for the answers of a poll */
"Answers" = "Answers";
/* No comment provided by engineer. */
@@ -901,7 +913,7 @@
/* No comment provided by engineer. */
"Deck cards" = "Deck cards";
/* No comment provided by engineer. */
/* 'Default' as a notification level, following the conversation setting */
"Default" = "Default";
/* No comment provided by engineer. */
@@ -955,7 +967,7 @@
/* No comment provided by engineer. */
"Diagnostics" = "Diagnostics";
/* No comment provided by engineer. */
/* Generic 'Disable' button label, e.g. for a bot */
"Disable" = "Disable";
/* No comment provided by engineer. */
@@ -1123,6 +1135,9 @@
/* A message was edited by ... */
"Edited by" = "Edited by";
/* 'Edited by Alice' - who last edited a message */
"Edited by %@" = "Edited by %@";
/* No comment provided by engineer. */
"Editing Message" = "Editing Message";
@@ -1141,7 +1156,7 @@
/* No comment provided by engineer. */
"Empty summary response" = "Empty summary response";
/* No comment provided by engineer. */
/* Generic 'Enable' button label, e.g. for a bot */
"Enable" = "Enable";
/* No comment provided by engineer. */
@@ -1153,7 +1168,7 @@
/* No comment provided by engineer. */
"Enable speaker" = "Enable speaker";
/* No comment provided by engineer. */
/* Label of a bot that is always enabled and cannot be turned off in the app */
"Enabled" = "Enabled";
/* No comment provided by engineer. */
@@ -1216,7 +1231,7 @@
/* 'Favorites' meaning 'Favorite conversations' */
"Favorites" = "Favorites";
/* No comment provided by engineer. */
/* Visibility scope of a profile field: also synchronized to trusted servers */
"Federated" = "Federated";
/* No comment provided by engineer. */
@@ -1234,7 +1249,7 @@
/* Title for available conversations filters */
"Filters" = "Filters";
/* No comment provided by engineer. */
/* First day of the absence */
"First day" = "First day";
/* No comment provided by engineer. */
@@ -1291,7 +1306,7 @@
/* No comment provided by engineer. */
"guest" = "guest";
/* No comment provided by engineer. */
/* Display name used for an anonymous guest */
"Guest" = "Guest";
/* No comment provided by engineer. */
@@ -1306,7 +1321,7 @@
/* TRANSLATORS this is a video quality option (Video quality : HD) */
"HD" = "HD";
/* No comment provided by engineer. */
/* Context menu action to hide a banner, e.g. the out of office or pinned message banner */
"Hide" = "Hide";
/* TRANSLATORS this is a video quality option (Video quality : High) */
@@ -1411,10 +1426,10 @@
/* No comment provided by engineer. */
"Join video call" = "Join video call";
/* No comment provided by engineer. */
/* Button to keep a conversation instead of deleting it */
"Keep" = "Keep";
/* No comment provided by engineer. */
/* Last day of the absence, the user is still absent on this day */
"Last day (inclusive)" = "Last day (inclusive)";
/* Last subscription to the push notification server */
@@ -1423,10 +1438,13 @@
/* No comment provided by engineer. */
"Last sync" = "Last sync";
/* 'Last sync: 12 May 2026' - when the contacts were last updated */
"Last sync: %@" = "Last sync: %@";
/* Remind me later today about that message */
"Later today" = "Later today";
/* No comment provided by engineer. */
/* Button to leave a conversation */
"Leave" = "Leave";
/* No comment provided by engineer. */
@@ -1456,7 +1474,7 @@
/* No comment provided by engineer. */
"Lobby is still active and you're not a moderator" = "Lobby is still active and you're not a moderator";
/* No comment provided by engineer. */
/* Visibility scope of a profile field: only people on this server and guests */
"Local" = "Local";
/* No comment provided by engineer. */
@@ -1516,7 +1534,7 @@
/* No comment provided by engineer. */
"Match system contacts" = "Match system contacts";
/* No comment provided by engineer. */
/* Category of shared items in a conversation: images and videos */
"Media" = "Media";
/* No comment provided by engineer. */
@@ -1778,7 +1796,7 @@
/* Indicates an event happening right now */
"Now" = "Now";
/* No comment provided by engineer. */
/* 'Off' as the value of a setting, e.g. the notification level or message expiration */
"Off" = "Off";
/* No comment provided by engineer. */
@@ -1820,7 +1838,7 @@
/* No comment provided by engineer. */
"Only visible to people on this instance and guests" = "Only visible to people on this instance and guests";
/* No comment provided by engineer. */
/* Context menu action to open a shared file */
"Open" = "Open";
/* No comment provided by engineer. */
@@ -1850,7 +1868,7 @@
/* No comment provided by engineer. */
"Other participants" = "Other participants";
/* No comment provided by engineer. */
/* Category of shared items in a conversation, for everything without its own category */
"Others" = "Others";
/* No comment provided by engineer. */
@@ -1958,7 +1976,7 @@
/* No comment provided by engineer. */
"Privacy" = "Privacy";
/* No comment provided by engineer. */
/* Visibility scope of a profile field: only people matched by phone number */
"Private" = "Private";
/* Show private conversations before group ones */
@@ -1973,19 +1991,19 @@
/* No comment provided by engineer. */
"Promote to moderator" = "Promote to moderator";
/* No comment provided by engineer. */
/* Visibility scope of a profile field: also synchronized to the public address book */
"Published" = "Published";
/* No comment provided by engineer. */
"Push notifications" = "Push notifications";
/* No comment provided by engineer. */
/* Section header for the question of a poll */
"Question" = "Question";
/* No comment provided by engineer. */
"Raise hand" = "Raise hand";
/* No comment provided by engineer. */
/* Diagnostics row asking whether the server can be reached */
"Reachable?" = "Reachable?";
/* No comment provided by engineer. */
@@ -2003,7 +2021,7 @@
/* No comment provided by engineer. */
"Record voice message" = "Record voice message";
/* No comment provided by engineer. */
/* Accessibility label of the button shown while the call is being recorded */
"Recording" = "Recording";
/* No comment provided by engineer. */
@@ -2033,7 +2051,7 @@
/* No comment provided by engineer. */
"Remote server is unreachable" = "Remote server is unreachable";
/* No comment provided by engineer. */
/* Generic 'Remove' button label, e.g. an account or a date */
"Remove" = "Remove";
/* No comment provided by engineer. */
@@ -2063,10 +2081,14 @@
/* Replacement in case of out of office */
"Replacement" = "Replacement";
/* Replacement in case of out of office */
/* Replacement in case of out of office
Section header: the person who takes over while the user is out of office */
"Replacement (optional)" = "Replacement (optional)";
/* No comment provided by engineer. */
/* 'Replacement: Alice' - who takes over while a user is out of office */
"Replacement: %@" = "Replacement: %@";
/* Action to reply to a message */
"Reply" = "Reply";
/* No comment provided by engineer. */
@@ -2096,13 +2118,14 @@
/* Title for a section where different reset options are shown */
"Reset" = "Reset";
/* Replacement in case of out of office */
/* Button to clear the chosen replacement person again
Replacement in case of out of office */
"Reset replacement" = "Reset replacement";
/* Results of a poll */
"Results" = "Results";
/* No comment provided by engineer. */
/* Button to retry a failed operation */
"Retry" = "Retry";
/* Save conversation description */
@@ -2144,10 +2167,11 @@
/* No comment provided by engineer. */
"Search GIFs" = "Search GIFs";
/* No comment provided by engineer. */
/* Button to start selecting entries of a list */
"Select" = "Select";
/* Replacement in case of out of office */
/* Opens a user picker to choose the person who takes over during the absence
Replacement in case of out of office */
"Select a replacement" = "Select a replacement";
/* No comment provided by engineer. */
@@ -2156,7 +2180,7 @@
/* Copy a 'selection' of a message */
"Selection" = "Selection";
/* No comment provided by engineer. */
/* Button to send the shared content to a conversation */
"Send" = "Send";
/* No comment provided by engineer. */
@@ -2204,7 +2228,7 @@
/* No comment provided by engineer. */
"Server not found" = "Server not found";
/* No comment provided by engineer. */
/* Button to set a phone number */
"Set" = "Set";
/* No comment provided by engineer. */
@@ -2219,7 +2243,7 @@
/* No comment provided by engineer. */
"Settings" = "Settings";
/* No comment provided by engineer. */
/* Button to share a file into the conversation */
"Share" = "Share";
/* No comment provided by engineer. */
@@ -2267,7 +2291,7 @@
/* No comment provided by engineer. */
"SIP dial-in" = "SIP dial-in";
/* No comment provided by engineer. */
/* Button to skip setting a phone number */
"Skip" = "Skip";
/* No comment provided by engineer. */
@@ -2375,6 +2399,9 @@
/* Talk to a user */
"Talk to" = "Talk to";
/* 'Talk to Alice' - start a conversation with a user */
"Talk to %@" = "Talk to %@";
/* No comment provided by engineer. */
"Tap and hold to record a voice message" = "Tap and hold to record a voice message";
@@ -2471,7 +2498,7 @@
/* No comment provided by engineer. */
"This will impact the functionality of this app. Please review your settings." = "This will impact the functionality of this app. Please review your settings.";
/* No comment provided by engineer. */
/* Context menu action to reply to a message in a thread */
"Thread" = "Thread";
/* No comment provided by engineer. */
@@ -2597,7 +2624,7 @@
/* Calling is not supported */
"Unsupported" = "Unsupported";
/* No comment provided by engineer. */
/* Button to update the app */
"Update" = "Update";
/* No comment provided by engineer. */
@@ -2663,7 +2690,7 @@
/* No comment provided by engineer. */
"Yesterday" = "Yesterday";
/* No comment provided by engineer. */
/* The user themselves as the author of a message */
"You" = "You";
/* Please put {user0} and %ld placeholders in the correct position on the translated text but do not translate it */
@@ -65,7 +65,7 @@ import MBProgressHUD
// MARK: - UI Controls
private lazy var sendButton: UIBarButtonItem = {
let sendButton = UIBarButtonItem(title: NSLocalizedString("Send", comment: ""), style: .done, target: self, action: #selector(sendButtonPressed))
let sendButton = UIBarButtonItem(title: NSLocalizedString("Send", comment: "Button to send the shared content to a conversation"), style: .done, target: self, action: #selector(sendButtonPressed))
sendButton.accessibilityHint = NSLocalizedString("Double tap to share with selected conversations", comment: "")
return sendButton
}()
+14 -26
View File
@@ -5,19 +5,15 @@
# check-localizable-plurals.sh
#
# Checks that localized strings taking a number are set up for plurals:
# Checks that localized strings are set up so they can actually be translated:
#
# 1. Every string in en.lproj/Localizable.strings with an integer format
# specifier has a plural rule in en.lproj/Localizable.stringsdict.
# 2. Every string that has a plural rule is read with
# String.localizedStringWithFormat and not with String(format:), which
# passes no locale and therefore cannot pick the right plural category.
# 3. No localized string builds its key with string interpolation, which
# makes the key vary at runtime so it never matches a translation.
# 1. Every string taking a number has a plural rule in Localizable.stringsdict.
# 2. Plural strings are read with String.localizedStringWithFormat, not
# String(format:), which passes no locale and picks the wrong category.
# 3. No key is built with string interpolation, which makes it vary at runtime.
# 4. Every plural rule still corresponds to a string that exists.
#
# Run this after generate-localizable-strings-file.sh, so that
# Localizable.strings is up to date.
# Run this after generate-localizable-strings-file.sh.
set -uo pipefail
@@ -36,35 +32,29 @@ for file in "$STRINGS" "$STRINGSDICT"; do
fi
done
# Strings that take a number but intentionally have no plural rule, because no
# word in them agrees with that number.
# Strings that take a number but where no word agrees with it.
ALLOWED_WITHOUT_PLURAL=(
'Add (%lu)' # Parenthesised selection count on a button
'Answer %ld' # Numbers an answer of a poll, it is not a count
# Localizable.strings is generated from this branch and the stable branch
# together, so it still contains strings that only the stable branch uses.
# A plural rule added here would not reach that branch anyway.
# Only used by the stable branch, which the generated file also covers.
'%d replies'
'%@, %@, %@ and %ld others will receive invitations'
)
# An integer conversion, optionally positional ("%4$ld") and optionally with a
# length modifier ("%ld", "%lld"). Deliberately does not match "%@".
# An integer conversion like %d, %ld or %4$ld. Deliberately not %@.
INTEGER_SPECIFIER='%([0-9]+\$)?l{0,2}[diu]([^a-zA-Z]|$)'
SOURCES=(--include=*.swift --include=*.m --include=*.h)
EXCLUDES=(--exclude-dir=ThirdParty --exclude-dir=Pods --exclude-dir=node_modules
--exclude-dir=build --exclude-dir=DerivedData)
# generate-localizable-strings-file.sh clones the stable branch into the
# repository root and removes it again. Skip it if it is still lying around.
# Skip the stable branch clone, in case a previous generation run left it behind.
if [[ -r .tx/backport ]]; then
EXCLUDES+=(--exclude-dir="$(<.tx/backport)")
fi
# Source literals and .strings keys escape quotes and backslashes; the keys in
# the stringsdict are plain XML text. Compare them all in unescaped form.
# .strings and source keys are escaped, stringsdict keys are not. Compare unescaped.
unescape() {
sed -e 's|\\"|"|g' -e 's|\\\\|\\|g'
}
@@ -81,8 +71,7 @@ stringsdict_keys() {
| sed -e 's|&lt;|<|g' -e 's|&gt;|>|g' -e 's|&amp;|\&|g'
}
# Writes a newline separated list, without the trailing empty line that
# printf would produce for an empty list. comm reads these via <(...).
# A list for comm via <(...), without the empty line printf gives for an empty one.
list() {
[[ -n "$1" ]] && printf '%s\n' "$1"
}
@@ -134,9 +123,8 @@ while IFS= read -r line; do
fi
done <<< "$format_calls"
# 3. Keys built with string interpolation. genstrings records the literal
# "\(foo)", but at runtime the key contains the interpolated value, so the
# lookup always misses and the string is never translated.
# 3. Keys built with string interpolation: at runtime the key contains the
# interpolated value, so the lookup always misses.
interpolated=$(grep -rnoE 'NSLocalizedString\(@?"[^"]*\\\(' \
"${SOURCES[@]}" "${EXCLUDES[@]}" . 2>/dev/null | sed -E 's|^\./||')