From dc9ffe40e51f533982602a3c2a2341d46983bd44 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 7 Feb 2017 11:26:33 -0500 Subject: [PATCH] Better translation comments in response to some confusion received from translators // FREEBIE --- Signal/src/UserInterface/Strings.swift | 1 + Signal/src/view controllers/CallViewController.swift | 6 +++--- Signal/translations/en.lproj/Localizable.strings | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Signal/src/UserInterface/Strings.swift b/Signal/src/UserInterface/Strings.swift index 02ceeef35..1419ff4ee 100644 --- a/Signal/src/UserInterface/Strings.swift +++ b/Signal/src/UserInterface/Strings.swift @@ -11,4 +11,5 @@ import Foundation static let callBackButtonTitle = NSLocalizedString("CALLBACK_BUTTON_TITLE", comment: "notification action") static let missedCallNotificationBody = NSLocalizedString("MISSED_CALL", comment: "notification title") static let missedCallNotificationBodyWithCallerName = NSLocalizedString("MSGVIEW_MISSED_CALL", comment: "notification title. Embeds {{Caller's Name}}") + static let callStatusFormat = NSLocalizedString("CALL_STATUS_FORMAT", comment: "embeds {{Call Status}} in call screen label. For ongoing calls, {{Call Status}} is a seconds timer like 01:23, otherwise {{Call Status}} is a short text like 'Ringing', 'Busy', or 'Failed Call'") } diff --git a/Signal/src/view controllers/CallViewController.swift b/Signal/src/view controllers/CallViewController.swift index 073be50d3..98b99fe47 100644 --- a/Signal/src/view controllers/CallViewController.swift +++ b/Signal/src/view controllers/CallViewController.swift @@ -560,8 +560,8 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R func updateCallStatusLabel(callState: CallState) { assert(Thread.isMainThread) - let text = String(format:NSLocalizedString("CALL_STATUS_FORMAT", comment: "Format for call status label"), - localizedTextForCallState(callState)) + let text = String(format: CallStrings.callStatusFormat, + localizedTextForCallState(callState)) self.callStatusLabel.text = text } @@ -686,7 +686,7 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R guard let call = self.call else { Logger.error("\(TAG) call was unexpectedly nil. Terminating call.") - let text = String(format:NSLocalizedString("CALL_STATUS_FORMAT", comment: "Format for call status label"), + let text = String(format: CallStrings.callStatusFormat, NSLocalizedString("END_CALL_UNCATEGORIZED_FAILURE", comment: "Call setup status label")) self.callStatusLabel.text = text diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 277a8dfcf..0ed38407e 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -73,7 +73,7 @@ /* Accessibilty label for placing call button */ "CALL_LABEL" = "Call"; -/* Format for call status label */ +/* embeds {{Call Status}} in call screen label. For ongoing calls, {{Call Status}} is a seconds timer like 01:23, otherwise {{Call Status}} is a short text like 'Ringing', 'Busy', or 'Failed Call' */ "CALL_STATUS_FORMAT" = "Signal %@"; /* notification action */