mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 00:13:24 +00:00
Monotone-Parent: 908dd2a01c372da7b97236bb48618ef438a60982
Monotone-Revision: 48dcb8712cd5e36fe33ea44dde50cad68d94f5c3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-26T19:23:08 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Celular:";
|
||||
"Pager:" = "Pager:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Título:";
|
||||
"Service:" = "Serviço:";
|
||||
"Company:" = "Empresa:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Mòbil:";
|
||||
"Pager:" = "Cercapersones:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Títol:";
|
||||
"Service:" = "Servei:";
|
||||
"Company:" = "Companyia:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Mobilní telefon:";
|
||||
"Pager:" = "Pager:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Pozice:";
|
||||
"Service:" = "Služba:";
|
||||
"Company:" = "Společnost:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Mobiel:";
|
||||
"Pager:" = "Pieper:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Titel:";
|
||||
"Service:" = "Service:";
|
||||
"Company:" = "Company:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Mobile:";
|
||||
"Pager:" = "Pager:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Title:";
|
||||
"Service:" = "Service:";
|
||||
"Company:" = "Company:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Portable :";
|
||||
"Pager:" = "Téléavertisseur :";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Ami, Client, Collègue, Concurrent, Famille, Fournisseur, Partenaire d'affaire, Presse, VIP";
|
||||
"Categories" = "Catégories";
|
||||
"New category" = "Nouvelle catégorie";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Fonction :";
|
||||
"Service:" = "Service:";
|
||||
"Company:" = "Company:";
|
||||
|
||||
@@ -95,6 +95,12 @@
|
||||
"Mobile:" = "Mobil:";
|
||||
"Pager:" = "Pager:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Geschäftspartner, Familie, Freund, Kollegin, Konkurrenten, Kunden, Lieferant, Presse, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Titel:";
|
||||
"Service:" = "Service:";
|
||||
"Company:" = "Firma:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Mobil:";
|
||||
"Pager:" = "Személyhívó:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Cím:";
|
||||
"Service:" = "Szolgáltatás:";
|
||||
"Company:" = "Vállalat:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Cellulare:";
|
||||
"Pager:" = "Cerca Persone:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Titolo:";
|
||||
"Service:" = "Service:";
|
||||
"Company:" = "Società:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Telefon kom.:";
|
||||
"Pager:" = "Pager:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Tytuł:";
|
||||
"Service:" = "Usługa:";
|
||||
"Company:" = "Firma:";
|
||||
|
||||
@@ -84,6 +84,12 @@
|
||||
"Mobile: " = "Mobile: ";
|
||||
"Pager: " = "Pager: ";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title: " = "Title: ";
|
||||
"Service: " = "Service: ";
|
||||
"Company: " = "Company: ";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Móvil:";
|
||||
"Pager:" = "Busca:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Título:";
|
||||
"Service:" = "Service:";
|
||||
"Company:" = "Company:";
|
||||
|
||||
@@ -96,6 +96,12 @@
|
||||
"Mobile:" = "Mobiltelefon:";
|
||||
"Pager:" = "Personsökare:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Titel:";
|
||||
"Service:" = "Befattning:";
|
||||
"Company:" = "Företag:";
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
NSMutableArray *photosURL;
|
||||
NSMutableDictionary *snapshot; /* contains the values for editing */
|
||||
SOGoContactFolder *componentAddressBook;
|
||||
NSArray *contactCategories;
|
||||
}
|
||||
|
||||
- (void) setAddressBookItem: (id) _item;
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
#import <NGCards/NGVCardPhoto.h>
|
||||
#import <NGCards/NSArray+NGCards.h>
|
||||
|
||||
#import <SOGo/NSArray+Utilities.h>
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
#import <Contacts/SOGoContactFolder.h>
|
||||
#import <Contacts/SOGoContactFolders.h>
|
||||
#import <Contacts/SOGoContactObject.h>
|
||||
@@ -54,6 +59,11 @@
|
||||
snapshot = [[NSMutableDictionary alloc] initWithCapacity: 16];
|
||||
preferredEmail = nil;
|
||||
photosURL = nil;
|
||||
addressBookItem = nil;
|
||||
item = nil;
|
||||
card = nil;
|
||||
componentAddressBook = nil;
|
||||
contactCategories = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -64,6 +74,10 @@
|
||||
[snapshot release];
|
||||
[preferredEmail release];
|
||||
[photosURL release];
|
||||
[addressBookItem release];
|
||||
[item release];
|
||||
[componentAddressBook release];
|
||||
[contactCategories release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@@ -216,7 +230,6 @@
|
||||
ASSIGN (componentAddressBook, _componentAddressBook);
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) addressBookDisplayName
|
||||
{
|
||||
NSString *fDisplayName;
|
||||
@@ -232,6 +245,80 @@
|
||||
return fDisplayName;
|
||||
}
|
||||
|
||||
- (void) setContactCategories: (NSString *) jsonCategories
|
||||
{
|
||||
NSArray *newCategories;
|
||||
|
||||
newCategories = [jsonCategories objectFromJSONString];
|
||||
if ([newCategories isKindOfClass: [NSArray class]])
|
||||
ASSIGN (contactCategories, newCategories);
|
||||
}
|
||||
|
||||
- (NSString *) contactCategories
|
||||
{
|
||||
NSString *jsonCats;
|
||||
|
||||
if (!contactCategories)
|
||||
ASSIGN (contactCategories, [card categories]);
|
||||
jsonCats = [contactCategories jsonRepresentation];
|
||||
if (!jsonCats)
|
||||
jsonCats = @"[]";
|
||||
|
||||
return jsonCats;
|
||||
}
|
||||
|
||||
- (NSArray *) _languageContactsCategories
|
||||
{
|
||||
NSArray *categoryLabels;
|
||||
|
||||
categoryLabels = [[self labelForKey: @"contacts_category_labels"]
|
||||
componentsSeparatedByString: @","];
|
||||
if (!categoryLabels)
|
||||
categoryLabels = [NSArray array];
|
||||
|
||||
return [categoryLabels trimmedComponents];
|
||||
}
|
||||
|
||||
- (NSArray *) _fetchAndCombineCategoriesList: (NSArray *) contactCats
|
||||
{
|
||||
NSString *ownerLogin;
|
||||
SOGoUserDefaults *ud;
|
||||
NSArray *cats, *newCats;
|
||||
|
||||
ownerLogin = [[self clientObject] ownerInContext: context];
|
||||
ud = [[SOGoUser userWithLogin: ownerLogin] userDefaults];
|
||||
cats = [ud contactsCategories];
|
||||
if (!cats)
|
||||
cats = [self _languageContactsCategories];
|
||||
|
||||
if (contactCats)
|
||||
{
|
||||
newCats = [cats mergedArrayWithArray: contactCats];
|
||||
if ([newCats count] != [cats count])
|
||||
{
|
||||
cats = [newCats sortedArrayUsingSelector:
|
||||
@selector (localizedCaseInsensitiveCompare:)];
|
||||
[ud setContactsCategories: cats];
|
||||
[ud synchronize];
|
||||
}
|
||||
}
|
||||
|
||||
return cats;
|
||||
}
|
||||
|
||||
- (NSString *) contactCategoriesList
|
||||
{
|
||||
NSArray *cats;
|
||||
NSString *list;
|
||||
|
||||
cats = [self _fetchAndCombineCategoriesList: [card categories]];
|
||||
list = [cats jsonRepresentation];
|
||||
if (!list)
|
||||
list = @"[]";
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/* actions */
|
||||
|
||||
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
|
||||
@@ -735,6 +822,8 @@
|
||||
{
|
||||
// [self _fixupSnapshot];
|
||||
[self _saveSnapshot];
|
||||
[card setCategories: contactCategories];
|
||||
[self _fetchAndCombineCategoriesList: contactCategories];
|
||||
[contact save];
|
||||
|
||||
if (componentAddressBook && componentAddressBook != [self componentAddressBook])
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
"Mobile:" = "Мобільний:";
|
||||
"Pager:" = "Пейджер:";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Посада:";
|
||||
"Service:" = "Служба:";
|
||||
"Company:" = "Організація:";
|
||||
|
||||
@@ -85,6 +85,12 @@
|
||||
"Mobile:" = "Symudol: ";
|
||||
"Pager:" = "Peiriant galw: ";
|
||||
|
||||
/* categories */
|
||||
"contacts_category_labels" = "Colleague, Competitor, Customer, Friend, Family, Business Partner, Provider, Press, VIP";
|
||||
"Categories" = "Categories";
|
||||
"New category" = "New category";
|
||||
|
||||
/* adresses */
|
||||
"Title:" = "Teitl: ";
|
||||
"Service:" = "Gwasanaeth: ";
|
||||
"Company:" = "Cwmni: ";
|
||||
|
||||
Reference in New Issue
Block a user