diff --git a/ChangeLog b/ChangeLog index c4bf5ef35..1f25020b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2009-10-28 Francis Lachapelle + + * UI/WebServerResources/UIxMailToSelection.js: removed duplicated + functionality in addressFieldLostFocus. Removed the ability to set + an auto-completion text field to read-only. + + * UI/WebServerResources/UIxListEditor.js: refactoring. + + * UI/WebServerResources/ContactsUI.js: Improved text of import + cards dialog. + + * UI/WebServerResources/SchedulerUI.js: Improved text of import + events dialog. + + * UI/Contacts/UIxListEditor.m (-setReferencesValue:): rewrote + method since only the contacts IDs are received from the web + interface. The names and emails are retrieve from the addressbook. + + * SoObjects/Contacts/SOGoContactGCSFolder.m + (-lookupContactWithName): new method that returns a dictionary + with the attributes of a contact. + + * SoObjects/Appointments/SOGoAppointmentObject.m + (-changeParticipationStatus:withDelegate:forRecurrenceId:): added + exception when delegated user is the organizer. + 2009-10-28 Ludovic Marcotte * UI/MailPartViewers/UIxMailPartICalActions.m @@ -21,7 +47,6 @@ * We now correctly lowercase the SOGoLDAPContactInfoAttribute attribute everywhere. - 2009-10-26 Francis Lachapelle * UI/WebServerResources/ContactsUI.js diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index dbf11562f..cd4e39bfc 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -820,7 +820,7 @@ { [delegates addObject: otherDelegate]; - delegatedUID = [otherDelegate uid]; + delegatedUID = [otherDelegate uid]; if (delegatedUID) // Delegated attendee is a local user; remove event from his calendar [self _removeEventFromUID: delegatedUID @@ -1336,11 +1336,12 @@ iCalEvent *event; iCalPerson *attendee; NSException *ex; - SOGoUser *ownerUser; - NSString *recurrenceTime; + SOGoUser *ownerUser, *delegatedUser; + NSString *recurrenceTime, *delegatedUid; event = nil; ex = nil; + delegatedUser = nil; calendar = [self calendar: NO secure: NO]; if (calendar) @@ -1374,6 +1375,12 @@ if (delegate && ![[delegate email] isEqualToString: [attendee delegatedTo]]) { + delegatedUid = [delegate uid]; + if (delegatedUid) + delegatedUser = [SOGoUser userWithLogin: delegatedUid]; + if (delegatedUser != nil && [event userIsOrganizer: delegatedUser]) + ex = [NSException exceptionWithHTTPStatus: 403 + reason: @"delegate is organizer"]; if ([event isParticipant: [[delegate email] rfc822Email]]) ex = [NSException exceptionWithHTTPStatus: 403 reason: @"delegate is a participant"]; diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.h b/SoObjects/Contacts/SOGoContactGCSFolder.h index b6d4d1df1..db1270541 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.h +++ b/SoObjects/Contacts/SOGoContactGCSFolder.h @@ -33,6 +33,7 @@ @interface SOGoContactGCSFolder : SOGoGCSFolder - (void) fixupContactRecord: (NSMutableDictionary *) contactRecord; +- (NSDictionary *) lookupContactWithName: (NSString *) aName; @end diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index 5873d0583..e32a6ba8b 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -224,6 +224,36 @@ return newRecords; } +- (NSDictionary *) lookupContactWithName: (NSString *) aName +{ + NSArray *fields, *dbRecords, *records; + NSDictionary *record; + EOQualifier *qualifier; + NSString *qs; + + fields = folderListingFields; + record = nil; + + if (aName && [aName length] > 0) + { + aName = [[aName stringByReplacingString: @"\\" withString: @"\\\\"] + stringByReplacingString: @"'" withString: @"\\'\\'"]; + qs = [NSString stringWithFormat: @"(c_name isCaseInsensitiveLike: '%@')", aName]; + qualifier = [EOQualifier qualifierWithQualifierFormat: qs]; + + dbRecords = [[self ocsFolder] fetchFields: fields + matchingQualifier: qualifier]; + + if ([dbRecords count] > 0) + { + records = [self _flattenedRecords: dbRecords]; + record = [records lastObject]; + } + } + + return record; +} + - (NSArray *) lookupContactsWithFilter: (NSString *) filter sortBy: (NSString *) sortKey ordering: (NSComparisonResult) sortOrdering diff --git a/UI/Common/BrazilianPortuguese.lproj/Localizable.strings b/UI/Common/BrazilianPortuguese.lproj/Localizable.strings index 23c697877..8375e6758 100644 --- a/UI/Common/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/Common/BrazilianPortuguese.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Você não tem os privilégios requeridos para realizar esta operação."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Czech.lproj/Localizable.strings b/UI/Common/Czech.lproj/Localizable.strings index 554c3a8cf..4ac57ca30 100644 --- a/UI/Common/Czech.lproj/Localizable.strings +++ b/UI/Common/Czech.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Nemáte dostatečná práva k provedení této operace."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Dutch.lproj/Localizable.strings b/UI/Common/Dutch.lproj/Localizable.strings index 5bd3b6cc7..ee15cab2e 100644 --- a/UI/Common/Dutch.lproj/Localizable.strings +++ b/UI/Common/Dutch.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Voor deze actie heeft u niet de benodigde rechten."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/English.lproj/Localizable.strings b/UI/Common/English.lproj/Localizable.strings index 1e33021c6..184baf4fc 100644 --- a/UI/Common/English.lproj/Localizable.strings +++ b/UI/Common/English.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "You don't have the required privileges to perform the operation."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/French.lproj/Localizable.strings b/UI/Common/French.lproj/Localizable.strings index e49494da4..937293ab3 100644 --- a/UI/Common/French.lproj/Localizable.strings +++ b/UI/Common/French.lproj/Localizable.strings @@ -52,9 +52,10 @@ "You don't have the required privileges to perform the operation." = "Vous n'avez pas les privilèges requis pour compléter l'opération."; -"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; -"delegate is a participant" = "The delegate is already a participant."; -"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; +"noEmailForDelegation" = "Vous devez spécifier l'adresse de la personne à qui vous voulez déléguez votre invitation."; +"delegate is organizer" = "L'adresse spécifiée correspond à l'organisateur. Veuillez entrer un autre délégué."; +"delegate is a participant" = "Le délégué est déjà un participant."; +"delegate is a group" = "L'adresse spécifiée correspond à un groupe. Vous ne pouvez déléguer qu'à une personne."; /* alarms */ "Reminder:" = "Rappel :"; diff --git a/UI/Common/German.lproj/Localizable.strings b/UI/Common/German.lproj/Localizable.strings index 08e142725..5a9c087f5 100644 --- a/UI/Common/German.lproj/Localizable.strings +++ b/UI/Common/German.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Sie haben nicht die benötigte Berechtigung für diesen Befehl."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Hungarian.lproj/Localizable.strings b/UI/Common/Hungarian.lproj/Localizable.strings index 2ba446a72..d8b9c418d 100644 --- a/UI/Common/Hungarian.lproj/Localizable.strings +++ b/UI/Common/Hungarian.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Önnek nincs jogosultsága ehhez a művelethez."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Italian.lproj/Localizable.strings b/UI/Common/Italian.lproj/Localizable.strings index 6521a1763..ede6794df 100644 --- a/UI/Common/Italian.lproj/Localizable.strings +++ b/UI/Common/Italian.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Non disponi dei privilegi richiesti per eseguire questa operazione."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Russian.lproj/Localizable.strings b/UI/Common/Russian.lproj/Localizable.strings index 2d4e7c134..2799366a7 100644 --- a/UI/Common/Russian.lproj/Localizable.strings +++ b/UI/Common/Russian.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "У Вас нет права производить эту операцию."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Spanish.lproj/Localizable.strings b/UI/Common/Spanish.lproj/Localizable.strings index 1d10b610a..ee6049168 100644 --- a/UI/Common/Spanish.lproj/Localizable.strings +++ b/UI/Common/Spanish.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "You don't have the required privileges to perform the operation."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Common/Welsh.lproj/Localizable.strings b/UI/Common/Welsh.lproj/Localizable.strings index 42ad149ad..8eb8c9c19 100644 --- a/UI/Common/Welsh.lproj/Localizable.strings +++ b/UI/Common/Welsh.lproj/Localizable.strings @@ -53,6 +53,7 @@ = "Nid oes gennych y breintiau gofynnol i berfformio'r gweithrediad."; "noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation."; +"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate."; "delegate is a participant" = "The delegate is already a participant."; "delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person."; diff --git a/UI/Contacts/BrazilianPortuguese.lproj/Localizable.strings b/UI/Contacts/BrazilianPortuguese.lproj/Localizable.strings index e67874eb7..c842cdff2 100644 --- a/UI/Contacts/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/Contacts/BrazilianPortuguese.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/Czech.lproj/Localizable.strings b/UI/Contacts/Czech.lproj/Localizable.strings index afa9c1c85..99b601463 100644 --- a/UI/Contacts/Czech.lproj/Localizable.strings +++ b/UI/Contacts/Czech.lproj/Localizable.strings @@ -178,13 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Exportovat"; "Import Cards" = "Importovat kontakty"; -"Select LDIF or vCard file..." = "Zvolte LDIF nebo vCard soubor..."; +"Select a vCard or LDIF file." = "Zvolte LDIF nebo vCard soubor."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "Při importu došlo k chybě."; - -"Imported contacts:" = "Importováno kontaktů:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/Dutch.lproj/Localizable.strings b/UI/Contacts/Dutch.lproj/Localizable.strings index 387e23e66..dc9538db8 100644 --- a/UI/Contacts/Dutch.lproj/Localizable.strings +++ b/UI/Contacts/Dutch.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select LDIF or vCard file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/English.lproj/Localizable.strings b/UI/Contacts/English.lproj/Localizable.strings index ba1fdb410..b5eae6add 100644 --- a/UI/Contacts/English.lproj/Localizable.strings +++ b/UI/Contacts/English.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/French.lproj/Localizable.strings b/UI/Contacts/French.lproj/Localizable.strings index 5250431ec..95471bc14 100644 --- a/UI/Contacts/French.lproj/Localizable.strings +++ b/UI/Contacts/French.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Ajouter"; "Lists can't be moved or copied." = "Les listes ne peuvent pas être déplacées ou copiées."; - "Export" = "Exporter"; "Import Cards" = "Importer des contacts"; -"Select LDIF or vCard file..." = "Sélectionner un fichier. LDIF ou vCard.."; +"Select a vCard or LDIF file." = "Sélectionner un fichier. LDIF ou vCard."; "Upload" = "Ajouter"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Terminer"; "An error occured while importing contacts." = "Une erreur s'est produite lors de l'importation."; -"Imported contacts:" = "Contacts importés:"; +"No card was imported." = "Aucun contact n'a été importé."; +"A total of %{0} cards were imported in the addressbook." = "Un total de %{0} contacts ont été importés dans le carnet."; diff --git a/UI/Contacts/German.lproj/Localizable.strings b/UI/Contacts/German.lproj/Localizable.strings index cf60670ee..b3908b0b9 100644 --- a/UI/Contacts/German.lproj/Localizable.strings +++ b/UI/Contacts/German.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/Hungarian.lproj/Localizable.strings b/UI/Contacts/Hungarian.lproj/Localizable.strings index eb6064a0b..2e084b31e 100644 --- a/UI/Contacts/Hungarian.lproj/Localizable.strings +++ b/UI/Contacts/Hungarian.lproj/Localizable.strings @@ -181,9 +181,9 @@ "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file."" = "Select LDIF or vCard file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/Italian.lproj/Localizable.strings b/UI/Contacts/Italian.lproj/Localizable.strings index bd7f8f9c2..a7d9c58d9 100644 --- a/UI/Contacts/Italian.lproj/Localizable.strings +++ b/UI/Contacts/Italian.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/Russian.lproj/Localizable.strings b/UI/Contacts/Russian.lproj/Localizable.strings index e49acfb4b..5d04d2f5b 100644 --- a/UI/Contacts/Russian.lproj/Localizable.strings +++ b/UI/Contacts/Russian.lproj/Localizable.strings @@ -166,9 +166,9 @@ "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/Spanish.lproj/Localizable.strings b/UI/Contacts/Spanish.lproj/Localizable.strings index 680492416..d4dad0ac2 100644 --- a/UI/Contacts/Spanish.lproj/Localizable.strings +++ b/UI/Contacts/Spanish.lproj/Localizable.strings @@ -178,12 +178,11 @@ "Contacts" = "Contacts"; "Add" = "Add"; "Lists can't be moved or copied." = "Lists can't be moved or copied."; - "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; diff --git a/UI/Contacts/UIxListEditor.m b/UI/Contacts/UIxListEditor.m index 953d571a9..162614c5a 100644 --- a/UI/Contacts/UIxListEditor.m +++ b/UI/Contacts/UIxListEditor.m @@ -90,57 +90,53 @@ - (void) setReferencesValue: (NSString *) value { - NSData *data; - NSDictionary *references; - NSArray *values, *initialReferences; - NSString *error, *currentReference; - NSPropertyListFormat format; + NSDictionary *values; + NSArray *references, *initialReferences; + NSString *currentReference; int i, count; NGVCardReference *cardReference; + SOGoContactGCSFolder *folder; + + references = [value componentsSeparatedByString: @","]; + if ([references count]) + { + folder = [[self clientObject] container]; - data = [value dataUsingEncoding: NSUTF8StringEncoding]; - references = [NSPropertyListSerialization propertyListFromData: data - mutabilityOption: NSPropertyListImmutable - format: &format - errorDescription: &error]; - if(!references) - { - NSLog(error); - [error release]; - } - else - { - // Remove from list + // Remove from the list the cards that were deleted initialReferences = [list cardReferences]; count = [initialReferences count]; - + for (i = 0; i < count; i++) { cardReference = [initialReferences objectAtIndex: i]; - if (![[references allKeys] containsObject: [cardReference reference]]) + if (![references containsObject: [cardReference reference]]) [list deleteCardReference: cardReference]; } - - // Add new objects - initialReferences = [list cardReferences]; - count = [[references allKeys] count]; - + + // Add new cards + count = [references count]; + for (i = 0; i < count; i++) { - currentReference = [[references allKeys] objectAtIndex: i]; + currentReference = [references objectAtIndex: i]; if (![self cardReferences: initialReferences contain: currentReference]) { - NSLog (@"Adding a new cardRef"); - values = [references objectForKey: currentReference]; - cardReference = [NGVCardReference elementWithTag: @"card"]; - [cardReference setFn: [values objectAtIndex: 0]]; - [cardReference setEmail: [values objectAtIndex: 1]]; - [cardReference setReference: currentReference]; - [list addCardReference: cardReference]; - } - } - } + // Search contact + values = [folder lookupContactWithName: currentReference]; + if (values) + { + + cardReference = [NGVCardReference elementWithTag: @"card"]; + [cardReference setFn: [values objectForKey: @"c_cn"]]; + [cardReference setEmail: [values objectForKey: @"c_mail"]]; + [cardReference setReference: currentReference]; + + [list addCardReference: cardReference]; + } + } + } + } } - (BOOL) cardReferences: (NSArray *) references contain: (NSString *) ref diff --git a/UI/Contacts/Welsh.lproj/Localizable.strings b/UI/Contacts/Welsh.lproj/Localizable.strings index 6e015ebbe..152dbae43 100644 --- a/UI/Contacts/Welsh.lproj/Localizable.strings +++ b/UI/Contacts/Welsh.lproj/Localizable.strings @@ -165,9 +165,9 @@ "Export" = "Export"; "Import Cards" = "Import Cards"; -"Select LDIF or vCard file..." = "Select LDIF or vCard file..."; +"Select a vCard or LDIF file." = "Select a vCard or LDIF file."; "Upload" = "Upload"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing contacts." = "An error occured while importing contacts."; -"Imported contacts:" = "Imported contacts:"; +"No card was imported." = "No card was imported."; +"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook."; \ No newline at end of file diff --git a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings index 9508e8ddd..171b6c8f3 100644 --- a/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings +++ b/UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Compartilhamento..."; "Export Calendar..." = "Exportar Calendário..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Publicar Calendário..."; "Reload Remote Calendars" = "Recarregar Calendários Remotos"; "Properties" = "Propriedades"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Compor E-Mail para Todos os Participantes"; "Compose E-Mail to Undecided Attendees" = "Compor E-Mail para os Participantes não confirmados"; diff --git a/UI/Scheduler/Czech.lproj/Localizable.strings b/UI/Scheduler/Czech.lproj/Localizable.strings index aeeeed1d0..bfdd59e0f 100644 --- a/UI/Scheduler/Czech.lproj/Localizable.strings +++ b/UI/Scheduler/Czech.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Sdílení..."; "Export Calendar..." = "Exportovat kalendář..."; "Import Events..." = "Importovat události..."; -"Select iCalendar file (*.ics)..." = "Zvolte iCalendar soubor (*.ics)..."; +"Import Events" = "Importovat události"; +"Select an iCalendar file (.ics)." = "Zvolte iCalendar soubor (*.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Publikovat kalendář..."; "Reload Remote Calendars" = "Nahrát vzdálené kalendáře"; "Properties" = "Vlastnosti"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "Při importu událostí došlo k chybě."; -"Imported events:" = "Importováno událostí:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Vytvořit e-mail pro všechny účastníky"; "Compose E-Mail to Undecided Attendees" = "Vytvořit e-mail pro nerozhodnuté účastníky"; diff --git a/UI/Scheduler/Dutch.lproj/Localizable.strings b/UI/Scheduler/Dutch.lproj/Localizable.strings index ae926a3f0..49cf3c41b 100644 --- a/UI/Scheduler/Dutch.lproj/Localizable.strings +++ b/UI/Scheduler/Dutch.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Delen..."; "Export Calendar..." = "Agenda exporteren..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Agenda publiceren..."; "Reload Remote Calendars" = "Externe agenda vernieuwen"; "Properties" = "Instellingen"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "E-mail aan alle deelnemers opstellen"; "Compose E-Mail to Undecided Attendees" = "E-mail aan deelnemers opstellen die nog niet hebben gereageerd"; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index 48550f9c0..c0b558ef3 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Sharing..."; "Export Calendar..." = "Export Calendar..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Publish Calendar..."; "Reload Remote Calendars" = "Reload Remote Calendars"; "Properties" = "Properties"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Compose E-Mail to All Attendees"; "Compose E-Mail to Undecided Attendees" = "Compose E-Mail to Undecided Attendees"; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index f0f49cdb1..2f57af28a 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Partage..."; "Export Calendar..." = "Exporter l'agenda..."; "Import Events..." = "Importer des événements..."; -"Select iCalendar file (*.ics)..." = "Sélectionner un fichier. iCalendar (*.ics)..."; +"Import Events" = "Importer des événements"; +"Select an iCalendar file (.ics)." = "Sélectionner un fichier. iCalendar (*.ics)."; "Upload" = "Ajouter"; "Publish Calendar..." = "Publier l'agenda..."; "Reload Remote Calendars" = "Recharger les agendas distants"; "Properties" = "Propriétés"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Terminer"; "An error occured while importing calendar." = "Une erreur s'est produite lors de l'importation."; -"Imported events:" = "Événements importés:"; +"No event was imported." = "Aucun événement n'a été importé."; +"A total of %{0} events were imported in the calendar." = "Un total de %{0} événements ont été importés dans le calendrier."; "Compose E-Mail to All Attendees" = "Rédiger un courriel pour tous les participants"; "Compose E-Mail to Undecided Attendees" = "Rédiger un courriel pour les participants indécis"; diff --git a/UI/Scheduler/German.lproj/Localizable.strings b/UI/Scheduler/German.lproj/Localizable.strings index 32da31e3b..9b1d8de3a 100644 --- a/UI/Scheduler/German.lproj/Localizable.strings +++ b/UI/Scheduler/German.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Benutzerrechte..."; "Export Calendar..." = "Kalender exportieren..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Kalender publizieren..."; "Reload Remote Calendars" = "Externe Kalender neu laden"; "Properties" = "Einstellungen"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "E-Mail an alle Teilnehmer erstellen"; "Compose E-Mail to Undecided Attendees" = "E-Mail an unentschlossene Teilnehmer erstellen"; diff --git a/UI/Scheduler/Hungarian.lproj/Localizable.strings b/UI/Scheduler/Hungarian.lproj/Localizable.strings index c7ca806dc..184df8859 100644 --- a/UI/Scheduler/Hungarian.lproj/Localizable.strings +++ b/UI/Scheduler/Hungarian.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Megosztás..."; "Export Calendar..." = "Naptár exportálása..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Naptár közzététele..."; "Reload Remote Calendars" = "Távoli naptárak frissítése"; "Properties" = "Tulajdonságok"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Üzenet küldése az összes résztvevőnek"; "Compose E-Mail to Undecided Attendees" = "Üzenet küldése az bizonytalan résztvevőnek"; diff --git a/UI/Scheduler/Italian.lproj/Localizable.strings b/UI/Scheduler/Italian.lproj/Localizable.strings index 1d2dab9f6..af6fcc2cd 100644 --- a/UI/Scheduler/Italian.lproj/Localizable.strings +++ b/UI/Scheduler/Italian.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Condivisione"; "Export Calendar..." = "Esporta calendario..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Pubblica calendario..."; "Reload Remote Calendars" = "Aggiorna calendari remoti"; "Properties" = "Proprietà"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Invia Email a tutti gli invitati"; "Compose E-Mail to Undecided Attendees" = "Invia Email agli invitati indecisi"; diff --git a/UI/Scheduler/Russian.lproj/Localizable.strings b/UI/Scheduler/Russian.lproj/Localizable.strings index a810e916c..243acea5d 100644 --- a/UI/Scheduler/Russian.lproj/Localizable.strings +++ b/UI/Scheduler/Russian.lproj/Localizable.strings @@ -106,15 +106,17 @@ "Sharing..." = "Sharing..."; "Export Calendar..." = "Экспортировать календарь..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Опубликовать календарь..."; "Reload Remote Calendars" = "Обновить удаленные календари"; "Properties" = "Свойства"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; + "Compose E-Mail to All Attendees" = "Составить сообщение ко всем приглашенным"; "Compose E-Mail to Undecided Attendees" = "Составить сообщение ко всем не решившим приглашенным"; diff --git a/UI/Scheduler/Spanish.lproj/Localizable.strings b/UI/Scheduler/Spanish.lproj/Localizable.strings index caefb71ab..ad4f7440f 100644 --- a/UI/Scheduler/Spanish.lproj/Localizable.strings +++ b/UI/Scheduler/Spanish.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Compartir..."; "Export Calendar..." = "Exportar calendario..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Publicar calendario..."; "Reload Remote Calendars" = "Recargar calendarios remotos"; "Properties" = "Propiedades"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Crear correo para todos los asistentes"; "Compose E-Mail to Undecided Attendees" = "Crear correo para todos los asistentes indecisos (sin confirmación)"; diff --git a/UI/Scheduler/Welsh.lproj/Localizable.strings b/UI/Scheduler/Welsh.lproj/Localizable.strings index 93ce2883b..f513ef641 100644 --- a/UI/Scheduler/Welsh.lproj/Localizable.strings +++ b/UI/Scheduler/Welsh.lproj/Localizable.strings @@ -106,15 +106,16 @@ "Sharing..." = "Rhannu..."; "Export Calendar..." = "Allfudo Calendr..."; "Import Events..." = "Import Events..."; -"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)..."; +"Import Events" = "Import Events"; +"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics)."; "Upload" = "Upload"; "Publish Calendar..." = "Cyhoeddi Calendr..."; "Reload Remote Calendars" = "Ail-lwytho Calendrau Anghysbell"; "Properties" = "Dewisiadau"; -"Import" = "Import"; -"OK" = "OK"; +"Done" = "Done"; "An error occured while importing calendar." = "An error occured while importing calendar."; -"Imported events:" = "Imported events:"; +"No event was imported." = "No event was imported."; +"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar."; "Compose E-Mail to All Attendees" = "Cyfansoddi Ebost i bawb sy'n mynychu"; "Compose E-Mail to Undecided Attendees" = "Cyfansoddi Ebost i bawb sydd heb benderfynu"; diff --git a/UI/Templates/ContactsUI/UIxContactFoldersView.wox b/UI/Templates/ContactsUI/UIxContactFoldersView.wox index 7b99e064b..ceda245fa 100644 --- a/UI/Templates/ContactsUI/UIxContactFoldersView.wox +++ b/UI/Templates/ContactsUI/UIxContactFoldersView.wox @@ -27,13 +27,14 @@