Skip to content

Commit

Permalink
fixed contacts strings (no technical stuff in the interface, don't sc…
Browse files Browse the repository at this point in the history
…ream at people, ...), ready for translation
  • Loading branch information
jancborchardt committed Sep 23, 2011
1 parent b73f72f commit d3fedc1
Show file tree
Hide file tree
Showing 47 changed files with 4,487 additions and 105 deletions.
29 changes: 29 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,32 @@ trans.sr@latin = l10n/sr@latin/media.po
trans.sv = l10n/sv/media.po
trans.zh_CN = l10n/zh_CN/media.po

[owncloud.contacts]
file_filter = translations/owncloud.contacts/<lang>.po
host = http://www.transifex.net
source_file = l10n/templates/contacts.pot
source_lang = en
trans.bg_BG = l10n/bg_BG/contacts.po
trans.ca = l10n/ca/contacts.po
trans.cs_CZ = l10n/cs_CZ/contacts.po
trans.da = l10n/da/contacts.po
trans.de = l10n/de/contacts.po
trans.el = l10n/el/contacts.po
trans.es = l10n/es/contacts.po
trans.et_EE = l10n/et_EE/contacts.po
trans.fr = l10n/fr/contacts.po
trans.id = l10n/id/contacts.po
trans.it = l10n/it/contacts.po
trans.lb = l10n/lb/contacts.po
trans.ms_MY = l10n/ms_MY/contacts.po
trans.nb_NO = l10n/nb_NO/contacts.po
trans.nl = l10n/nl/contacts.po
trans.pl = l10n/pl/contacts.po
trans.pt_BR = l10n/pt_BR/contacts.po
trans.pt_PT = l10n/pt_PT/contacts.po
trans.ro = l10n/ro/contacts.po
trans.ru = l10n/ru/contacts.po
trans.sr = l10n/sr/contacts.po
trans.sr@latin = l10n/sr@latin/contacts.po
trans.sv = l10n/sv/contacts.po
trans.zh_CN = l10n/zh_CN/contacts.po
4 changes: 2 additions & 2 deletions apps/contacts/ajax/addcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $aid );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your addressbook!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your addressbook.')))); // Same here (as with the contact error). Could this error be improved?
exit();
}

Expand Down
8 changes: 4 additions & 4 deletions apps/contacts/ajax/addproperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

$vcard = OC_Contacts_VCard::parse($card['carddata']);
// Check if the card is valid
if(is_null($vcard)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('vCard could not be read.'))));
exit();
}

Expand Down
4 changes: 2 additions & 2 deletions apps/contacts/ajax/deletebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $id );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

Expand Down
6 changes: 3 additions & 3 deletions apps/contacts/ajax/deletecard.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}


$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

Expand Down
10 changes: 5 additions & 5 deletions apps/contacts/ajax/deleteproperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}


$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

$vcard = OC_Contacts_VCard::parse($card['carddata']);
// Check if the card is valid
if(is_null($vcard)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('vCard could not be read.'))));
exit();
}

Expand All @@ -62,7 +62,7 @@
}
}
if(is_null($line)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Information about vCard is incorrect. Please reload page!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Information about vCard is incorrect. Please reload the page.'))));
exit();
}

Expand Down
8 changes: 4 additions & 4 deletions apps/contacts/ajax/getdetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,27 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}


$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

$vcard = OC_Contacts_VCard::parse($card['carddata']);
// Check if the card is valid
if(is_null($vcard)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('vCard could not be read.'))));
exit();
}

Expand Down
10 changes: 5 additions & 5 deletions apps/contacts/ajax/setproperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

$vcard = OC_Contacts_VCard::parse($card['carddata']);
// Check if the card is valid
if(is_null($vcard)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('vCard could not be read.'))));
exit();
}

Expand All @@ -59,7 +59,7 @@
}
}
if(is_null($line)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Information about vCard is incorrect. Please reload page!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Information about vCard is incorrect. Please reload the page.'))));
exit();
}

Expand Down
2 changes: 1 addition & 1 deletion apps/contacts/ajax/showaddcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

Expand Down
6 changes: 3 additions & 3 deletions apps/contacts/ajax/showaddproperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

Expand Down
10 changes: 5 additions & 5 deletions apps/contacts/ajax/showsetproperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('You need to log in.'))));
exit();
}

$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Can not find Contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Contact could not be found.'))));
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('This is not your contact.'))));
exit();
}

$vcard = OC_Contacts_VCard::parse($card['carddata']);
// Check if the card is valid
if(is_null($vcard)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('vCard could not be read.'))));
exit();
}

Expand All @@ -59,7 +59,7 @@
}
}
if(is_null($line)){
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Information about vCard is incorrect. Please reload page!'))));
echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Information about vCard is incorrect. Please reload the page.'))));
exit();
}

Expand Down
9 changes: 9 additions & 0 deletions apps/contacts/l10n/de.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php $TRANSLATIONS = array(
"Mobile" => "Mobil",
"Text" => "Text",
"Fax" => "Fax",
"Video" => "Video",
"Pager" => "Pager",
"Birthday" => "Geburtstag",
"Edit" => "Bearbeiten"
);
38 changes: 38 additions & 0 deletions apps/contacts/l10n/it.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php $TRANSLATIONS = array(
"You need to log in." => "Bisogna effettuare il login.",
"This is not your addressbook." => "Questa non è la tua rubrica.",
"Contact could not be found." => "Il contatto non può essere trovato",
"This is not your contact." => "Questo non è un tuo contatto.",
"vCard could not be read." => "La vCard non può essere letta",
"Information about vCard is incorrect. Please reload the page." => "Informazioni sulla vCard incorrette. Ricaricare la pagina.",
"This card is not RFC compatible." => "Questa card non è compatibile con il protocollo RFC.",
"This card does not contain a photo." => "Questa card non contiene una foto.",
"Add Contact" => "Aggiungi contatto",
"Group" => "Gruppo",
"Name" => "Nome",
"Create Contact" => "Crea contatto",
"Address" => "Indirizzo",
"Telephone" => "Telefono",
"Email" => "Email",
"Organization" => "Organizzazione",
"Work" => "Lavoro",
"Home" => "Casa",
"PO Box" => "PO Box",
"Extended" => "Estendi",
"Street" => "Via",
"City" => "Città",
"Region" => "Regione",
"Zipcode" => "CAP",
"Country" => "Stato",
"Mobile" => "Cellulare",
"Text" => "Testo",
"Voice" => "Voce",
"Fax" => "Fax",
"Video" => "Video",
"Pager" => "Pager",
"Delete" => "Cancella",
"Add Property" => "Aggiungi proprietà",
"Birthday" => "Compleanno",
"Phone" => "Telefono",
"Edit" => "Modifica"
);
10 changes: 5 additions & 5 deletions apps/contacts/photo.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@

// Check if we are a user
if( !OC_User::isLoggedIn()){
echo $l10n->t('You need to log in!');
echo $l10n->t('You need to log in.');
exit();
}


$card = OC_Contacts_VCard::find( $id );
if( $card === false ){
echo $l10n->t('Can not find Contact!');
echo $l10n->t('Contact could not be found.');
exit();
}

$addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
echo $l10n->t('This is not your contact!');
echo $l10n->t('This is not your contact.'); // This is a weird error, why would it come up? (Better feedback for users?)
exit();
}

$content = OC_Contacts_VCard::parse($card['carddata']);

// invalid vcard
if( is_null($content)){
echo $l10n->t('This card is not RFC compatible!');
echo $l10n->t('This card is not RFC compatible.');
exit();
}
// Photo :-)
Expand Down Expand Up @@ -87,4 +87,4 @@
}

// Not found :-(
echo $l10n->t('This card does not contain photo data!');
echo $l10n->t('This card does not contain a photo.');
Loading

0 comments on commit d3fedc1

Please sign in to comment.