mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-22 15:38:33 +00:00
push notification: remove IC_MSG and IM_MSG hack in translation which is actually not needed
This commit is contained in:
parent
1e764a04af
commit
4ced6b6e65
7 changed files with 4 additions and 20 deletions
|
|
@ -702,7 +702,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore *lc, const char
|
||||||
data->notification.repeatInterval = 0;
|
data->notification.repeatInterval = 0;
|
||||||
|
|
||||||
data->notification.alertBody =
|
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.alertAction = NSLocalizedString(@"Answer", nil);
|
||||||
data->notification.userInfo = @{ @"callId" : callId, @"timer" : [NSNumber numberWithInt:1] };
|
data->notification.userInfo = @{ @"callId" : callId, @"timer" : [NSNumber numberWithInt:1] };
|
||||||
data->notification.applicationIconBadgeNumber = 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) {
|
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8) {
|
||||||
notif.category = @"incoming_msg";
|
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.alertAction = NSLocalizedString(@"Show", nil);
|
||||||
notif.soundName = @"msg.caf";
|
notif.soundName = @"msg.caf";
|
||||||
notif.userInfo = @{ @"from" : address, @"from_addr" : remote_uri, @"call-id" : callID };
|
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) {
|
for (int i = 0; i < [tokenData length]; ++i) {
|
||||||
[tokenString appendFormat:@"%02X", (unsigned int)tokenBuffer[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
|
#ifdef USE_APN_DEV
|
||||||
#define APPMODE_SUFFIX @"dev"
|
#define APPMODE_SUFFIX @"dev"
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -31,24 +31,10 @@ fi
|
||||||
|
|
||||||
##### 1. Generate Localizable.strings from source files (.m)
|
##### 1. Generate Localizable.strings from source files (.m)
|
||||||
function generate_localizable_from_sources {
|
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..
|
# we are trying to modify an UTF-16 file which is not supported..
|
||||||
|
|
||||||
localizable_en=$root_directory/Resources/en.lproj/Localizable.strings
|
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)
|
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
|
##### 2. Generate .strings for all XIB files
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6bae96a3bffd89ea9ece0d7aa550589214b7d319
|
Subproject commit fe9b63d2e86193e7919dc5409e59eb5ffa2c0c17
|
||||||
Loading…
Add table
Reference in a new issue