From 9a08449d83b7fb523cafb5a67c3b9496dec3829e Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 6 Feb 2017 12:36:55 -0500 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9Csignal=E2=80=9D=20copy=20to=20ca?= =?UTF-8?q?ll=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. */