From 4ced6b6e65356212cc4c795d4e676cbcc16464e2 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 7 Oct 2015 11:38:41 +0200 Subject: [PATCH] push notification: remove IC_MSG and IM_MSG hack in translation which is actually not needed --- Classes/LinphoneManager.m | 6 ++---- Resources/ar.lproj/Localizable.strings | Bin 30238 -> 30304 bytes Resources/en.lproj/Localizable.strings | Bin 31018 -> 31084 bytes Resources/fr.lproj/Localizable.strings | Bin 32336 -> 32402 bytes Resources/ru.lproj/Localizable.strings | Bin 31446 -> 31512 bytes Tools/i18n_generate_strings_files.sh | 16 +--------------- submodules/linphone | 2 +- 7 files changed, 4 insertions(+), 20 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index a332440b7..d17cca506 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -702,7 +702,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore *lc, const char data->notification.repeatInterval = 0; data->notification.alertBody = - [NSString stringWithFormat:NSLocalizedString(@"IC_MSG", nil), address]; + [NSString stringWithFormat:NSLocalizedString(@"Incoming call from %@", nil), address]; data->notification.alertAction = NSLocalizedString(@"Answer", nil); data->notification.userInfo = @{ @"callId" : callId, @"timer" : [NSNumber numberWithInt:1] }; data->notification.applicationIconBadgeNumber = 1; @@ -976,7 +976,7 @@ static void linphone_iphone_popup_password_request(LinphoneCore *lc, const char if ([[UIDevice currentDevice].systemVersion floatValue] >= 8) { notif.category = @"incoming_msg"; } - notif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"IM_MSG", nil), address]; + notif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"Incoming message from %@", nil), address]; notif.alertAction = NSLocalizedString(@"Show", nil); notif.soundName = @"msg.caf"; notif.userInfo = @{ @"from" : address, @"from_addr" : remote_uri, @"call-id" : callID }; @@ -2043,8 +2043,6 @@ static void audioRouteChangeListenerCallback(void *inUserData, // 1 for (int i = 0; i < [tokenData length]; ++i) { [tokenString appendFormat:@"%02X", (unsigned int)tokenBuffer[i]]; } -// NSLocalizedString(@"IC_MSG", nil); // Fake for genstrings -// NSLocalizedString(@"IM_MSG", nil); // Fake for genstrings #ifdef USE_APN_DEV #define APPMODE_SUFFIX @"dev" #else diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index c6362341a2c29d66319cc167a609fd2c51bc5358..a16b264e9f7381b14ceceb4243066be3a031a35d 100644 GIT binary patch delta 53 zcmbRDhVj80#tm6IlUL|VOkR*LHTjJb-{u}23r3)T0B5-#tm6IoX!mK489D(4DOpJ>I5=!`og*VdVwAQ1IP;) diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index b4d50ae97bf142ed319ec4cb135c437bded00e9b..a47243281300aed8ef01465dd287573034796e06 100644 GIT binary patch delta 47 xcmZ4WiSf-R#tja-lf!hiCI=L8OkQRnwK-4Mfe|PmF!_p}0#s0F^A)`?F96SO5>WsE delta 55 zcmaF!iE-5@#tja-oX!mK489D(4DOTf8mMmW(REsj$zv5ID;3QzA%~1#fI{}0NKzG A=l}o! diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index dbe715f2ffefb52808f2845764f4eed0a773fac6..95d4318c19abfd5f32582022f023b957e7936f54 100644 GIT binary patch delta 43 zcmccim2t*5#tm(HlTR2*O#W3YwRx6a6eEx$Fj>k#VKPq%$K+XhLYt)w_ILpRtospo delta 43 tcmbR7jq%!7#tm(HoX!mK489D(4DOTd4P-Z;((_>C^o0p+wl}!x1pq(&4MqR} diff --git a/Tools/i18n_generate_strings_files.sh b/Tools/i18n_generate_strings_files.sh index 6c18305cb..0af7fccc6 100755 --- a/Tools/i18n_generate_strings_files.sh +++ b/Tools/i18n_generate_strings_files.sh @@ -31,24 +31,10 @@ fi ##### 1. Generate Localizable.strings from source files (.m) function generate_localizable_from_sources { - #WARNING: in case of sed issue "extra characters at the end of g command", it means that + #WARNING: sed issue "extra characters at the end of g command" means that # we are trying to modify an UTF-16 file which is not supported.. - localizable_en=$root_directory/Resources/en.lproj/Localizable.strings - # The 2 only specific cases of the application: since we are length limited for push - # notifications, the ID is not matching the English translation... so we must keep - # the translations! - iconv -f utf-16 -t utf-8 $localizable_en > $localizable_en.tmp - IC_MSG_EN=$(sed -nE 's/"IC_MSG" = "(.*)";/\1/p' $localizable_en.tmp) - IM_MSG_EN=$(sed -nE 's/"IM_MSG" = "(.*)";/\1/p' $localizable_en.tmp) - rm -f $localizable_en $localizable_en.tmp - find $root_directory/Classes -name '*.m' | xargs genstrings -u -a -o $(dirname $localizable_en) - iconv -f utf-16LE -t utf-8 $localizable_en > $localizable_en.tmp - sed -i.bak "s/= \"IC_MSG\";/= \"$IC_MSG_EN\";/" $localizable_en.tmp - sed -i.bak "s/= \"IM_MSG\";/= \"$IM_MSG_EN\";/" $localizable_en.tmp - iconv -f utf-8 -t utf-16LE $localizable_en.tmp > $localizable_en - rm $localizable_en.tmp.bak $localizable_en.tmp } ##### 2. Generate .strings for all XIB files diff --git a/submodules/linphone b/submodules/linphone index 6bae96a3b..fe9b63d2e 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 6bae96a3bffd89ea9ece0d7aa550589214b7d319 +Subproject commit fe9b63d2e86193e7919dc5409e59eb5ffa2c0c17