Skip to content
Permalink
Browse files

FIxed #017574: ezi18n() was depcreated, now removed (4.5) - still in …

…use in extensions
  • Loading branch information...
Christian Pfeffer Gjengedal
Christian Pfeffer Gjengedal committed Nov 1, 2010
1 parent 953c090 commit 319b81359f0be006cc907fe4c34da978eda9f3de
@@ -56,7 +56,7 @@ class eZSurveyType extends eZDataType
*/
function eZSurveyType()
{
$this->eZDataType( self::DATA_TYPE_STRING, ezi18n( 'ezsurvey/datatypes', 'Survey', 'Datatype name' ) );
$this->eZDataType( self::DATA_TYPE_STRING, ezpI18n::tr( 'ezsurvey/datatypes', 'Survey', 'Datatype name' ) );
}
/*!
@@ -175,7 +175,7 @@ function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute
if ( isset( $validation['error'] ) and $validation['error'] === true )
{
$isValid = eZInputValidator::STATE_INVALID;
$contentObjectAttribute->setValidationError( ezi18n( 'kernel/classes/datatypes',
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
'Missing survey input.' ) );
$contentObjectAttribute->setHasValidationError();
}
@@ -172,7 +172,7 @@
// $Result = array();
// $Result['content'] = $tpl->fetch( 'design:survey/action.tpl' );
// $Result['path'] = array( array( 'url' => false,
// 'text' => ezi18n( 'survey', 'Survey' ) ) );
// 'text' => ezpI18n::tr( 'survey', 'Survey' ) ) );
}
if ( is_object( $Module ) )
$Module->redirectTo( $node->attribute( 'url_alias' ) );
@@ -495,7 +495,7 @@ function validateEditActions( &$validation, $params )
if ( !$http->hasPostVariable( $postSurveyID ) )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'The survey is not valid. Survey ID is missing' ) );
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'The survey is not valid. Survey ID is missing' ) );
return false;
}
@@ -508,7 +508,7 @@ function validateEditActions( &$validation, $params )
( $http->hasPostVariable( $postValidFromHidden ) and !is_numeric( $http->postVariable( $postValidFromHidden ) ) ) )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'All values in Valid from need to be numeric.' ) );
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'All values in Valid from need to be numeric.' ) );
}
}
@@ -520,7 +520,7 @@ function validateEditActions( &$validation, $params )
( $http->hasPostVariable( $postValidToHidden ) and !is_numeric( $http->postVariable( $postValidToHidden ) ) ) )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'All values in Valid to need to be numeric.' ) );
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'All values in Valid to need to be numeric.' ) );
}
}
@@ -718,7 +718,7 @@ function processEditActions( &$validation, $params )
if ( !$http->hasPostVariable( $postSurveyID ) )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'The survey is not valid. Survey ID is missing' ) );
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'The survey is not valid. Survey ID is missing' ) );
return false;
}
@@ -58,7 +58,7 @@ function processViewActions( &$validation, $params )
if ( $this->attribute( 'mandatory' ) == 1 and strlen( $answer ) == 0 )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Please answer the question %number as well!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Please answer the question %number as well!', null,
array( '%number' => $this->questionNumber() ) ),
'question_number' => $this->questionNumber(),
'code' => 'email_answer_question',
@@ -67,7 +67,7 @@ function processViewActions( &$validation, $params )
else if ( strlen( $answer ) != 0 && !eZMail::validate( $answer ) )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Entered text in the question %number is not a valid email address!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Entered text in the question %number is not a valid email address!', null,
array( '%number' => $this->questionNumber() ) ),
'question_number' => $this->questionNumber(),
'code' => 'email_email_not_valid',
@@ -104,6 +104,6 @@ function answer()
}
}
eZSurveyQuestion::registerQuestionType( ezi18n( 'survey', 'Email Entry' ), 'EmailEntry' );
eZSurveyQuestion::registerQuestionType( ezpI18n::tr( 'survey', 'Email Entry' ), 'EmailEntry' );
?>
@@ -54,7 +54,7 @@ function processViewActions( &$validation, $params )
if ( $this->attribute( 'mandatory' ) == 1 and strlen( trim ( $http->postVariable( $postSurveyAnswer ) ) ) == 0 )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Please answer the question %number as well!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Please answer the question %number as well!', null,
array( '%number' => $this->questionNumber() ) ),
'question_number' => $this->questionNumber(),
'code' => 'general_answer_number_as_well',
@@ -109,7 +109,7 @@ function processViewActions( &$validation, $params )
if ( $this->validateEmail( $variableArray['answer'] ) === false )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Entered text in the question %number is not a valid email address!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Entered text in the question %number is not a valid email address!', null,
array( '%number' => $this->questionNumber() ) ),
'question_number' => $this->questionNumber(),
'code' => 'feedbackfield_email_not_valid',
@@ -316,6 +316,6 @@ public function executeBeforeLastRedirect( $node )
}
eZSurveyQuestion::registerQuestionType( ezi18n( 'survey', 'Feedback field' ), 'FeedbackField' );
eZSurveyQuestion::registerQuestionType( ezpI18n::tr( 'survey', 'Feedback field' ), 'FeedbackField' );
?>
@@ -320,7 +320,7 @@ function processViewActions( &$validation, $params )
$this->attribute( 'num' ) != 4 ) // 4 - checkboxes in a column
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Please answer the question %number as well!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Please answer the question %number as well!', null,
array( '%number' => $this->questionNumber() ) ),
'question_number' => $this->questionNumber(),
'code' => 'mc_answer_question',
@@ -446,7 +446,7 @@ function validateEditActions( &$validation, $params )
if ( strlen( $option['value'] ) == 0 )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'You must enter the value for an option in the question with id %question!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'You must enter the value for an option in the question with id %question!', null,
array( '%question' => $this->ID ) ),
'question_id' => $this->ID,
'code' => 'mc_value_for_option',
@@ -468,7 +468,7 @@ function validateEditActions( &$validation, $params )
if ( strlen( $optionValue ) === 0 )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Options in the question with id %question must have unique values!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Options in the question with id %question must have unique values!', null,
array( '%question' => $this->ID ) ),
'question_id' => $this->ID,
'code' => 'mc_option_unique_value',
@@ -488,7 +488,7 @@ function validateEditActions( &$validation, $params )
if ( in_array( $optionValue, $optionValues ) or strlen( $optionValue ) === 0 )
{
$validation['error'] = true;
$validation['errors'][] = array( 'message' => ezi18n( 'survey', 'Options in the question with id %question must have unique values!', null,
$validation['errors'][] = array( 'message' => ezpI18n::tr( 'survey', 'Options in the question with id %question must have unique values!', null,
array( '%question' => $this->ID ) ),
'question_id' => $this->ID,
'code' => 'mc_option_unique_value',
@@ -997,7 +997,7 @@ function isSingleQuestion()
var $ExtraInfoID = 0;
}
eZSurveyQuestion::registerQuestionType( ezi18n( 'survey', 'Single/Multiple Choice' ),
eZSurveyQuestion::registerQuestionType( ezpI18n::tr( 'survey', 'Single/Multiple Choice' ),
'MultipleChoice' );
?>
Oops, something went wrong.

0 comments on commit 319b813

Please sign in to comment.
You can’t perform that action at this time.