adium-1.4 3046:4fc410bdfaf4: When performing further localizatio...

commits at adium.im commits at adium.im
Mon Sep 20 03:40:34 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/4fc410bdfaf4
revision:	3046:4fc410bdfaf4
author:		Evan Schoenberg
date:		Sun Sep 19 22:40:24 2010 -0500

When performing further localization (to add a contact's name to the contextual menu item, for example) we must be sure to compare with the libpurple-localized version of the string, or we will fail to provide the substitution when not running in English.

Many thanks to Yann ("YR") Ricquebourg for his detailed and patient reporting of this problem.

diffs (65 lines):

diff -r 4aaa72b6565d -r 4fc410bdfaf4 Plugins/Purple Service/ESPurpleJabberAccount.m
--- a/Plugins/Purple Service/ESPurpleJabberAccount.m	Sun Sep 19 22:28:22 2010 -0500
+++ b/Plugins/Purple Service/ESPurpleJabberAccount.m	Sun Sep 19 22:40:24 2010 -0500
@@ -512,19 +512,19 @@
 #pragma mark Menu items
 - (NSString *)titleForContactMenuLabel:(const char *)label forContact:(AIListContact *)inContact
 {
-	if (strcmp(label, "Un-hide From") == 0) {
+	if (strcmp(label, _("Un-hide From")) == 0) {
 		return [NSString stringWithFormat:AILocalizedString(@"Un-hide From %@",nil),inContact.formattedUID];
 
-	} else if (strcmp(label, "Temporarily Hide From") == 0) {
+	} else if (strcmp(label, _("Temporarily Hide From")) == 0) {
 		return [NSString stringWithFormat:AILocalizedString(@"Temporarily Hide From %@",nil),inContact.formattedUID];
 
-	} else if (strcmp(label, "Unsubscribe") == 0) {
+	} else if (strcmp(label, _("Unsubscribe")) == 0) {
 		return [NSString stringWithFormat:AILocalizedString(@"Unsubscribe %@",nil),inContact.formattedUID];
 
-	} else if (strcmp(label, "(Re-)Request authorization") == 0) {
+	} else if (strcmp(label, _("(Re-)Request authorization")) == 0) {
 		return [NSString stringWithFormat:AILocalizedString(@"Re-request Authorization from %@",nil),inContact.formattedUID];
 
-	} else if (strcmp(label,  "Cancel Presence Notification") == 0) {
+	} else if (strcmp(label,  _("Cancel Presence Notification")) == 0) {
 		return [NSString stringWithFormat:AILocalizedString(@"Cancel Presence Notification to %@",nil),inContact.formattedUID];	
 		
 	} else if (strcmp(label,  _("Ping")) == 0) {
@@ -537,16 +537,16 @@
 
 - (NSString *)titleForAccountActionMenuLabel:(const char *)label
 {	
-	if (strcmp(label, "Set User Info...") == 0) {
+	if (strcmp(label, _("Set User Info...")) == 0) {
 		return [AILocalizedString(@"Set User Info", nil) stringByAppendingEllipsis];
 		
-	} else 	if (strcmp(label, "Search for Users...") == 0) {
+	} else 	if (strcmp(label, _("Search for Users...")) == 0) {
 		return [AILocalizedString(@"Search for Users", nil) stringByAppendingEllipsis];
 		
-	} else 	if (strcmp(label, "Set Mood...") == 0) {
+	} else 	if (strcmp(label, _("Set Mood...")) == 0) {
 		return [AILocalizedString(@"Set Mood", nil) stringByAppendingEllipsis];
 		
-	} else 	if (strcmp(label, "Set Nickname...") == 0) {
+	} else 	if (strcmp(label, _("Set Nickname...")) == 0) {
 		return [AILocalizedString(@"Set Nickname", nil) stringByAppendingEllipsis];
 	} 
 	
diff -r 4aaa72b6565d -r 4fc410bdfaf4 Plugins/Purple Service/ESPurpleMeanwhileAccount.m
--- a/Plugins/Purple Service/ESPurpleMeanwhileAccount.m	Sun Sep 19 22:28:22 2010 -0500
+++ b/Plugins/Purple Service/ESPurpleMeanwhileAccount.m	Sun Sep 19 22:40:24 2010 -0500
@@ -183,10 +183,10 @@
 #pragma mark Account Action Menu Items
 - (NSString *)titleForAccountActionMenuLabel:(const char *)label
 {
-	if (strcmp(label, "Import Sametime List...") == 0) {
+	if (strcmp(label, _("Import Sametime List...")) == 0) {
 		return AILocalizedString(@"Import Sametime List...",nil);
 
-	} else if (strcmp(label, "Export Sametime List...") == 0) {
+	} else if (strcmp(label, _("Export Sametime List...")) == 0) {
 		return AILocalizedString(@"Export Sametime List...",nil);
 	}
 




More information about the commits mailing list