Remove translations

This commit is contained in:
weryques 2017-12-12 12:01:41 -02:00
parent f04fb3d81c
commit b9ef55c21f
3 changed files with 6 additions and 7 deletions

View File

@ -34,7 +34,7 @@ class Entity_Factory {
try { try {
if(empty($type)){ if(empty($type)){
throw new \InvalidArgumentException(__('The type can\'t be empty', 'tainacan')); throw new \InvalidArgumentException('The type can\'t be empty');
} elseif(!strrchr($type, '_')){ } elseif(!strrchr($type, '_')){
$type = ucfirst(strtolower($type)); $type = ucfirst(strtolower($type));
} else { } else {
@ -75,7 +75,7 @@ class Entity_Factory {
if ($this->entity->validate()) { if ($this->entity->validate()) {
$this->entity = $this->repository->insert($this->entity); $this->entity = $this->repository->insert($this->entity);
} else { } else {
throw new \ErrorException( __( 'The entity wasn\'t validated.', 'tainacan' ) ); throw new \ErrorException('The entity wasn\'t validated.');
} }
} elseif (!empty($args) && !$is_validated_and_in_db){ } elseif (!empty($args) && !$is_validated_and_in_db){
@ -112,12 +112,11 @@ class Entity_Factory {
if ($this->entity->validate()) { if ($this->entity->validate()) {
$this->entity = $this->repository->insert( $this->entity ); $this->entity = $this->repository->insert( $this->entity );
} else { } else {
throw new \ErrorException( __( 'The entity wasn\'t validated.', 'tainacan').print_r( $this->entity->get_errors(), true ) ); // TODO show this in a better way throw new \ErrorException('The entity wasn\'t validated.' . print_r( $this->entity->get_errors(), true));
throw new \ErrorException( __( 'The entity wasn\'t validated.', 'tainacan' ) );
} }
} else { } else {
throw new \InvalidArgumentException( __( 'One or more arguments are invalid.', 'tainacan' ) ); throw new \InvalidArgumentException('One or more arguments are invalid.');
} }
} catch (\Error $exception){ } catch (\Error $exception){
echo "\n" . $exception->getMessage() . "\n"; echo "\n" . $exception->getMessage() . "\n";

View File

@ -8,7 +8,7 @@ class Field_Factory {
public function create_field($type, $primitive_type = []){ public function create_field($type, $primitive_type = []){
if(empty($type)){ if(empty($type)){
throw new \InvalidArgumentException(__('The type can\'t be empty', 'tainacan')); throw new \InvalidArgumentException('The type can\'t be empty');
} elseif(!strrchr($type, '_')){ } elseif(!strrchr($type, '_')){
$type = ucfirst(strtolower($type)); $type = ucfirst(strtolower($type));
} else { } else {

View File

@ -8,7 +8,7 @@ class Filter_Factory {
public function create_filter($type, $supported_types = []){ public function create_filter($type, $supported_types = []){
if(empty($type)){ if(empty($type)){
throw new \InvalidArgumentException(__('The type can\'t be empty', 'tainacan')); throw new \InvalidArgumentException('The type can\'t be empty');
} elseif(!strrchr($type, '_')){ } elseif(!strrchr($type, '_')){
$type = ucfirst(strtolower($type)); $type = ucfirst(strtolower($type));
} else { } else {