$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);
}
}
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();