l10n support enhanced in core

This commit is contained in:
Thomas Mueller 2013-02-07 16:49:36 +01:00
parent e0212c1174
commit 5f92d269dc
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ debug(print_r($category, true));
$categories = new OC_VCategories($type);
if($categories->hasCategory($category)) {
bailOut(OC_Contacts_App::$l10n->t('This category already exists: '.$category));
bailOut($l->t('This category already exists: %s', array($category)));
} else {
$categories->add($category, true);
}

View File

@ -27,12 +27,12 @@ if(is_null($type)) {
}
if(is_null($id)) {
bailOut($l->t('%s ID not provided.', $type));
bailOut($l->t('%s ID not provided.', array($type)));
}
$categories = new OC_VCategories($type);
if(!$categories->removeFromFavorites($id, $type)) {
bailOut($l->t('Error removing %s from favorites.', $id));
bailOut($l->t('Error removing %s from favorites.', array($id)));
}
OC_JSON::success();