From c2f7c15f723ab610249f18d028d936ee0938c2e9 Mon Sep 17 00:00:00 2001 From: Nancy Mast Date: Wed, 18 Jul 2018 15:30:49 -0700 Subject: [PATCH 1/2] removed jsq strings, modified MULTIDEVICE_PAIRING_MAX_RECOVERY text and comment --- Signal/translations/bin/auto-genstrings | 17 -------------- .../translations/en.lproj/Localizable.strings | 23 +++---------------- .../src/Network/API/TSNetworkManager.m | 4 ++-- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/Signal/translations/bin/auto-genstrings b/Signal/translations/bin/auto-genstrings index c70f433cb..ba15e625c 100755 --- a/Signal/translations/bin/auto-genstrings +++ b/Signal/translations/bin/auto-genstrings @@ -27,12 +27,6 @@ fi done -JSQ_STRINGS_PATH="../JSQMessagesViewController/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Base.lproj/JSQMessages.strings" -if [ ! -f $JSQ_STRINGS_PATH ]; then - echo "[!] Error. Expected to find strings for JSQMessagesViewController at ${JSQ_STRINGS_PATH}" - exit 1 -fi - # Now that we've check all our pre-conditions, proceed with the work. # Search directories for .m & .h files and collect string definitions with genstrings @@ -58,14 +52,3 @@ echo "$OLDUTF8" | grep -Eo '^".*"' | \ if($2 ~ /"$/){$2 = $2";"}; \ print}' - <(echo "$NEWUTF8") > $STRINGFILE -# Copy in strings from JSQMessagesViewController -# -# We have a wider array of translators than JSQ, and it's easier for our -# translators to translate for us directly rather than to direct them to the -# now defunct JSQMessagesView project. - -echo "Copying strings from JSQMessagesViewController" -echo " -// Strings Copied in from JSQMessagesViewController" >> $STRINGFILE -cat $JSQ_STRINGS_PATH | grep -v "^//" >> $STRINGFILE - diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 1ad941623..f8cfdd135 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -1322,11 +1322,11 @@ /* notification title. Embeds {{caller's name or phone number}} */ "MSGVIEW_MISSED_CALL_WITH_NAME" = "Missed call from %@."; -/* No comment provided by engineer. */ +/* alert title: cannot link - reached max linked devices */ "MULTIDEVICE_PAIRING_MAX_DESC" = "You can not pair any more devices."; -/* No comment provided by engineer. */ -"MULTIDEVICE_PAIRING_MAX_RECOVERY" = "You have reached the maximum of devices you can currently pair with your account. Please remove a device or try again to pair it later."; +/* alert body: cannot link - reached max linked devices */ +"MULTIDEVICE_PAIRING_MAX_RECOVERY" = "You have reached the maximum of devices you can currently link with your account. Please remove a device or try again to link it later."; /* An explanation of the consequences of muting a thread. */ "MUTE_BEHAVIOR_EXPLANATION" = "You will not receive notifications for muted conversations."; @@ -2347,20 +2347,3 @@ /* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */ "YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@."; - -// Strings Copied in from JSQMessagesViewController - - -"load_earlier_messages" = "Load Earlier Messages"; - -"send" = "Send"; - -"new_message" = "New Message"; - -"text_message_accessibility_label" = "%@: %@"; - -"media_message_accessibility_label" = "%@: media message"; - -"accessory_button_accessibility_label" = "Share media"; - -"new_message_received_accessibility_announcement" = "New message received"; diff --git a/SignalServiceKit/src/Network/API/TSNetworkManager.m b/SignalServiceKit/src/Network/API/TSNetworkManager.m index 9ac53d739..d3c847838 100644 --- a/SignalServiceKit/src/Network/API/TSNetworkManager.m +++ b/SignalServiceKit/src/Network/API/TSNetworkManager.m @@ -205,9 +205,9 @@ typedef void (^failureBlock)(NSURLSessionDataTask *task, NSError *error); DDLogInfo(@"Multi-device pairing: %ld, %@, %@", (long)statusCode, networkError.debugDescription, request); failureBlock(task, [self errorWithHTTPCode:statusCode - description:NSLocalizedString(@"MULTIDEVICE_PAIRING_MAX_DESC", nil) + description:NSLocalizedString(@"MULTIDEVICE_PAIRING_MAX_DESC", @"alert title: cannot link - reached max linked devices") failureReason:networkError.localizedFailureReason - recoverySuggestion:NSLocalizedString(@"MULTIDEVICE_PAIRING_MAX_RECOVERY", nil) + recoverySuggestion:NSLocalizedString(@"MULTIDEVICE_PAIRING_MAX_RECOVERY", @"alert body: cannot link - reached max linked devices") fallbackError:networkError]); break; } From 4ab6892e27adae89d023780654d7d22e0185f202 Mon Sep 17 00:00:00 2001 From: Nancy Mast Date: Wed, 18 Jul 2018 16:23:22 -0700 Subject: [PATCH 2/2] changed string text for MULTIDEVICE_PAIRING_MAX_DESC, ATTACHMENT_PICKER_DOCUMENTS_PICKED_DIRECTORY_FAILED_ALERT_BODY, CONTACT_FIELD_ADDRESS_POSTCODE, END_CALL_RESPONDER_IS_BUSY. changed comment for SETTINGS_INVITE_TWITTER_TEXT --- Signal/src/ViewControllers/InviteFlow.swift | 2 +- Signal/translations/en.lproj/Localizable.strings | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Signal/src/ViewControllers/InviteFlow.swift b/Signal/src/ViewControllers/InviteFlow.swift index c4fbb5dcd..a2cb25c56 100644 --- a/Signal/src/ViewControllers/InviteFlow.swift +++ b/Signal/src/ViewControllers/InviteFlow.swift @@ -71,7 +71,7 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos return nil } - let tweetString = NSLocalizedString("SETTINGS_INVITE_TWITTER_TEXT", comment: "content of tweet when inviting via twitter") + let tweetString = NSLocalizedString("SETTINGS_INVITE_TWITTER_TEXT", comment: "content of tweet when inviting via twitter - please do not translate URL") twitterViewController.setInitialText(tweetString) let tweetUrl = URL(string: installUrl) diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index f8cfdd135..85fda9c3e 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -162,7 +162,7 @@ "ATTACHMENT_PICKER_DOCUMENTS_FAILED_ALERT_TITLE" = "Failed to choose document."; /* Alert body when picking a document fails because user picked a directory/bundle */ -"ATTACHMENT_PICKER_DOCUMENTS_PICKED_DIRECTORY_FAILED_ALERT_BODY" = "Signal can't handle that file as is. Try zipping it before sending."; +"ATTACHMENT_PICKER_DOCUMENTS_PICKED_DIRECTORY_FAILED_ALERT_BODY" = "Signal can't handle that file as is. Try compressing it before sending."; /* Alert title when picking a document fails because user picked a directory/bundle */ "ATTACHMENT_PICKER_DOCUMENTS_PICKED_DIRECTORY_FAILED_ALERT_TITLE" = "Unsupported File"; @@ -444,7 +444,7 @@ "CONTACT_FIELD_ADDRESS_POBOX" = "P.O. Box"; /* Label for the 'postcode' field of a contact's address. */ -"CONTACT_FIELD_ADDRESS_POSTCODE" = "Post Code"; +"CONTACT_FIELD_ADDRESS_POSTCODE" = "Postal Code"; /* Label for the 'region' field of a contact's address. */ "CONTACT_FIELD_ADDRESS_REGION" = "Region"; @@ -811,7 +811,7 @@ "ENABLE_2FA_VIEW_TITLE" = "Registration Lock"; /* Call setup status label */ -"END_CALL_RESPONDER_IS_BUSY" = "Busy."; +"END_CALL_RESPONDER_IS_BUSY" = "Busy"; /* Call setup status label */ "END_CALL_UNCATEGORIZED_FAILURE" = "Call Failed."; @@ -1323,7 +1323,7 @@ "MSGVIEW_MISSED_CALL_WITH_NAME" = "Missed call from %@."; /* alert title: cannot link - reached max linked devices */ -"MULTIDEVICE_PAIRING_MAX_DESC" = "You can not pair any more devices."; +"MULTIDEVICE_PAIRING_MAX_DESC" = "You cannot link any more devices."; /* alert body: cannot link - reached max linked devices */ "MULTIDEVICE_PAIRING_MAX_RECOVERY" = "You have reached the maximum of devices you can currently link with your account. Please remove a device or try again to link it later."; @@ -1985,7 +1985,7 @@ /* Settings table view cell label */ "SETTINGS_INVITE_TITLE" = "Invite Your Friends"; -/* content of tweet when inviting via twitter */ +/* content of tweet when inviting via twitter - please do not translate URL */ "SETTINGS_INVITE_TWITTER_TEXT" = "You can reach me using @signalapp. Get it now: https://signal.org/download/"; /* Label for settings view that allows user to change the notification sound. */