From 9a08449d83b7fb523cafb5a67c3b9496dec3829e Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 6 Feb 2017 12:36:55 -0500 Subject: [PATCH 1/2] =?UTF-8?q?Add=20=E2=80=9Csignal=E2=80=9D=20copy=20to?= =?UTF-8?q?=20call=20view.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/view controllers/CallViewController.swift | 11 +++++++++-- Signal/translations/en.lproj/Localizable.strings | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Signal/src/view controllers/CallViewController.swift b/Signal/src/view controllers/CallViewController.swift index b304b4bee..f6256fd59 100644 --- a/Signal/src/view controllers/CallViewController.swift +++ b/Signal/src/view controllers/CallViewController.swift @@ -549,7 +549,10 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R func updateCallStatusLabel(callState: CallState) { assert(Thread.isMainThread) - self.callStatusLabel.text = localizedTextForCallState(callState) + + let text = String(format:NSLocalizedString("CALL_STATUS_FORMAT", comment: "Format for call status label"), + localizedTextForCallState(callState)) + self.callStatusLabel.text = text } func updateCallUI(callState: CallState) { @@ -672,7 +675,11 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R guard let call = self.call else { Logger.error("\(TAG) call was unexpectedly nil. Terminating call.") - self.callStatusLabel.text = NSLocalizedString("END_CALL_UNCATEGORIZED_FAILURE", comment: "Call setup status label") + + let text = String(format:NSLocalizedString("CALL_STATUS_FORMAT", comment: "Format for call status label"), + NSLocalizedString("END_CALL_UNCATEGORIZED_FAILURE", comment: "Call setup status label")) + self.callStatusLabel.text = text + DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) { self.dismiss(animated: true) } diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index a1fb8d6b9..e45f98c42 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -73,6 +73,9 @@ /* Accessibilty label for placing call button */ "CALL_LABEL" = "Call"; +/* Format for call status label */ +"CALL_STATUS_FORMAT" = "Signal: %@"; + /* notification action */ "CALLBACK_BUTTON_TITLE" = "Call back"; @@ -711,7 +714,7 @@ /* Alert body after invite succeeded */ "SEND_INVITE_SUCCESS" = "You've invited your friend to use Signal!"; -/* Text for button to send a Signal invite via SMS */ +/* Text for button to send a Signal invite via SMS. %@ is placeholder for the receipient's phone number. */ "SEND_INVITE_VIA_SMS_BUTTON_FORMAT" = "Send Invite via SMS to: %@"; /* No comment provided by engineer. */ From 80963d88f090b18e087404b96627907f6ad97160 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 6 Feb 2017 15:43:14 -0500 Subject: [PATCH 2/2] Respond to CR. Remove colon from call view status prefix. // FREEBIE --- Signal/translations/en.lproj/Localizable.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index e45f98c42..277a8dfcf 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -74,7 +74,7 @@ "CALL_LABEL" = "Call"; /* Format for call status label */ -"CALL_STATUS_FORMAT" = "Signal: %@"; +"CALL_STATUS_FORMAT" = "Signal %@"; /* notification action */ "CALLBACK_BUTTON_TITLE" = "Call back";