Skip to content

Commit

Permalink
Fixed issue #9992: Instructions on question creation page can not be …
Browse files Browse the repository at this point in the history
…translated
  • Loading branch information
c-schmitz committed Oct 23, 2015
1 parent d04b8c8 commit 19fcb93
Show file tree
Hide file tree
Showing 23 changed files with 180 additions and 180 deletions.
4 changes: 2 additions & 2 deletions application/controllers/UploaderController.php
Expand Up @@ -295,8 +295,8 @@ function run($actionID)
errorMaxReached: '" . gT('The maximum number of files has been uploaded. You may return back to survey.','js') . "',
errorTooMuch: '" . gT('The maximum number of files has been uploaded. You may return back to survey.','js') . "',
errorNeedMoreConfirm: '" . gT("You need to upload %s more files for this question.\nAre you sure you want to exit?",'js') . "',
deleteFile : '".gt('Delete','js') . "',
editFile : '".gt('Edit','js') . "',
deleteFile : '".gT('Delete','js') . "',
editFile : '".gT('Edit','js') . "',
};
";
$aSurveyInfo=getSurveyInfo($surveyid, $sLanguage);
Expand Down
64 changes: 32 additions & 32 deletions application/controllers/admin/ExpressionValidate.php
Expand Up @@ -83,7 +83,7 @@ public function quota($iSurveyId,$quota,$lang=null)
'aExpressions'=>$aExpressions,
);
$this->getController()->layout=$this->layout;
$this->getController()->pageTitle=gt("Validate quota");
$this->getController()->pageTitle=gT("Validate quota");

$this->getController()->render("/admin/expressions/validationList", $aData);
}
Expand All @@ -107,61 +107,61 @@ public function email($iSurveyId,$lang)
'invitation'=>array(
'subject'=>array(
'attribute'=>'surveyls_email_invite_subj',
'title'=>gt('Invitation email subject'),
'title'=>gT('Invitation email subject'),
),
'message'=>array(
'attribute'=>'surveyls_email_invite',
'title'=>gt('Invitation email body'),
'title'=>gT('Invitation email body'),
),
),
'reminder'=>array(
'subject'=>array(
'attribute'=>'surveyls_email_remind_subj',
'title'=>gt('Reminder email subject'),
'title'=>gT('Reminder email subject'),
),
'message'=>array(
'attribute'=>'surveyls_email_remind',
'title'=>gt('Reminder email body'),
'title'=>gT('Reminder email body'),
),
),
'confirmation'=>array(
'subject'=>array(
'attribute'=>'surveyls_email_confirm_subj',
'title'=>gt('Confirmation email subject'),
'title'=>gT('Confirmation email subject'),
),
'message'=>array(
'attribute'=>'surveyls_email_confirm',
'title'=>gt('Confirmation email body'),
'title'=>gT('Confirmation email body'),
),
),
'registration'=>array(
'subject'=>array(
'attribute'=>'surveyls_email_register_subj',
'title'=>gt('Registration email subject'),
'title'=>gT('Registration email subject'),
),
'message'=>array(
'attribute'=>'surveyls_email_register',
'title'=>gt('Registration email body'),
'title'=>gT('Registration email body'),
),
),
'admin_notification'=>array(
'subject'=>array(
'attribute'=>'email_admin_notification_subj',
'title'=>gt('Basic admin notification subject'),
'title'=>gT('Basic admin notification subject'),
),
'message'=>array(
'attribute'=>'email_admin_notification',
'title'=>gt('Basic admin notification body'),
'title'=>gT('Basic admin notification body'),
),
),
'admin_detailed_notification'=>array(
'subject'=>array(
'attribute'=>'email_admin_responses_subj',
'title'=>gt('Detailed admin notification subject'),
'title'=>gT('Detailed admin notification subject'),
),
'message'=>array(
'attribute'=>'email_admin_responses',
'title'=>gt('Detailed admin notification body'),
'title'=>gT('Detailed admin notification body'),
),
),
);
Expand All @@ -176,12 +176,12 @@ public function email($iSurveyId,$lang)
$aReplacement["SURVEYDESCRIPTION"] = gT("Description of the survey");
// Replaced when sending email with Survey
$aAttributes = getTokenFieldsAndNames($iSurveyId,true);
$aReplacement["TOKEN"] = gt("Token code for this participant");
$aReplacement["TOKEN:EMAIL"] = gt("Email from the token");
$aReplacement["TOKEN:FIRSTNAME"] = gt("First name from token");
$aReplacement["TOKEN:LASTNAME"] = gt("Last name from token");
$aReplacement["TOKEN:TOKEN"] = gt("Token code for this participant");
$aReplacement["TOKEN:LANGUAGE"] = gt("language of token");
$aReplacement["TOKEN"] = gT("Token code for this participant");
$aReplacement["TOKEN:EMAIL"] = gT("Email from the token");
$aReplacement["TOKEN:FIRSTNAME"] = gT("First name from token");
$aReplacement["TOKEN:LASTNAME"] = gT("Last name from token");
$aReplacement["TOKEN:TOKEN"] = gT("Token code for this participant");
$aReplacement["TOKEN:LANGUAGE"] = gT("language of token");
foreach ($aAttributes as $sAttribute=>$aAttribute)
{
$aReplacement['TOKEN:'.strtoupper($sAttribute).'']=sprintf(gT("Token attribute: %s"), $aAttribute['description']);
Expand All @@ -193,23 +193,23 @@ public function email($iSurveyId,$lang)
case 'reminder' :
case 'registration' :
// Replaced when sending email (registration too ?)
$aReplacement["EMAIL"] = gt("Email from the token");
$aReplacement["FIRSTNAME"] = gt("First name from token");
$aReplacement["LASTNAME"] = gt("Last name from token");
$aReplacement["LANGUAGE"] = gt("language of token");
$aReplacement["OPTOUTURL"] = gt("URL for a respondent to opt-out of this survey");
$aReplacement["OPTINURL"] = gt("URL for a respondent to opt-in to this survey");
$aReplacement["SURVEYURL"] = gt("URL of the survey");
$aReplacement["EMAIL"] = gT("Email from the token");
$aReplacement["FIRSTNAME"] = gT("First name from token");
$aReplacement["LASTNAME"] = gT("Last name from token");
$aReplacement["LANGUAGE"] = gT("language of token");
$aReplacement["OPTOUTURL"] = gT("URL for a respondent to opt-out of this survey");
$aReplacement["OPTINURL"] = gT("URL for a respondent to opt-in to this survey");
$aReplacement["SURVEYURL"] = gT("URL of the survey");
foreach ($aAttributes as $sAttribute=>$aAttribute)
{
$aReplacement['' . strtoupper($sAttribute) . ''] = sprintf(gT("Token attribute: %s"), $aAttribute['description']);
}
break;
case 'confirmation' :
$aReplacement["EMAIL"] = gt("Email from the token");
$aReplacement["FIRSTNAME"] = gt("First name from token");
$aReplacement["LASTNAME"] = gt("Last name from token");
$aReplacement["SURVEYURL"] = gt("URL of the survey");
$aReplacement["EMAIL"] = gT("Email from the token");
$aReplacement["FIRSTNAME"] = gT("First name from token");
$aReplacement["LASTNAME"] = gT("Last name from token");
$aReplacement["SURVEYURL"] = gT("URL of the survey");
foreach ($aAttributes as $sAttribute=>$aAttribute)
{
$aReplacement['' . strtoupper($sAttribute) . ''] = sprintf(gT("Token attribute: %s"), $aAttribute['description']);
Expand All @@ -226,7 +226,7 @@ public function email($iSurveyId,$lang)
// $moveResult = LimeExpressionManager::NavigateForwards(); // Seems OK without, nut need $LEM::StartSurvey
break;
default:
throw new CHttpException(400,gt('Invalid type.'));
throw new CHttpException(400,gT('Invalid type.'));
break;
}

Expand All @@ -245,7 +245,7 @@ public function email($iSurveyId,$lang)
}
$aData['aExpressions']=$aExpressions;
$this->getController()->layout=$this->layout;
$this->getController()->pageTitle=sprintf(gt("Validate expression in email : %s"),$sType);
$this->getController()->pageTitle=sprintf(gT("Validate expression in email : %s"),$sType);

$this->getController()->render("/admin/expressions/validationList", $aData);
}
Expand Down
4 changes: 2 additions & 2 deletions application/controllers/admin/conditionsaction.php
Expand Up @@ -816,8 +816,8 @@ function index($subaction, $iSurveyID=null, $gid=null, $qid=null)
$attr = getQuestionAttributeValues($rows['qid']);
$sLanguage=Survey::model()->findByPk($iSurveyID)->language;
// dualscale_header are allways set, but can be empty
$label1 = empty($attr['dualscale_headerA'][$sLanguage]) ? gt('Scale 1') : $attr['dualscale_headerA'][$sLanguage];
$label2 = empty($attr['dualscale_headerB'][$sLanguage]) ? gt('Scale 2') : $attr['dualscale_headerB'][$sLanguage];
$label1 = empty($attr['dualscale_headerA'][$sLanguage]) ? gT('Scale 1') : $attr['dualscale_headerA'][$sLanguage];
$label2 = empty($attr['dualscale_headerB'][$sLanguage]) ? gT('Scale 2') : $attr['dualscale_headerB'][$sLanguage];
$shortanswer = "{$arows['title']}: [" . strip_tags($arows['question']) . "][$label1]";
$shortquestion = $rows['title'].":$shortanswer ".strip_tags($rows['question']);
$cquestions[] = array($shortquestion, $rows['qid'], $rows['type'], $rows['sid'].$X.$rows['gid'].$X.$rows['qid'].$arows['title']."#0");
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/printablesurvey.php
Expand Up @@ -733,7 +733,7 @@ function index($surveyid, $lang = null)
if ($deqrow['other'] == 'Y')
{
if(trim($qidattributes["other_replace_text"][$sLanguageCode])=='')
{$qidattributes["other_replace_text"][$sLanguageCode]=gt("Other");}
{$qidattributes["other_replace_text"][$sLanguageCode]=gT("Other");}
// $printablesurveyoutput .="\t".$wrapper['item-start']."\t\t".self::_input_type_image('radio' , gT("Other"))."\n\t\t\t".gT("Other")."\n\t\t\t<input type='text' size='30' readonly='readonly' />\n".$wrapper['item-end'];
$question['ANSWER'] .= $wrapper['item-start-other'].self::_input_type_image('radio',gT($qidattributes["other_replace_text"][$sLanguageCode])).' '.gT($qidattributes["other_replace_text"][$sLanguageCode]).self::_addsgqacode(" (-oth-)")."\n\t\t\t".self::_input_type_image('other').self::_addsgqacode(" (".$deqrow['sid']."X".$deqrow['gid']."X".$deqrow['qid']."other)")."\n".$wrapper['item-end'];
}
Expand Down
20 changes: 10 additions & 10 deletions application/controllers/admin/responses.php
Expand Up @@ -249,7 +249,7 @@ public function view($iSurveyID, $iId, $sBrowseLang = '')
switch ($metadata)
{
case "size":
$answervalue = sprintf(gt("%s KB"),intval($phparray[$index][$metadata]));
$answervalue = sprintf(gT("%s KB"),intval($phparray[$index][$metadata]));
break;
case "name":
$answervalue = CHtml::link(
Expand Down Expand Up @@ -363,7 +363,7 @@ function browse($iSurveyId)
'width' => '100',
'resizable' => true,
'align' => 'left',
'label' => gt("Actions"),
'label' => gT("Actions"),
'search' => false,
'hidedlg'=>true,
);
Expand Down Expand Up @@ -402,16 +402,16 @@ function browse($iSurveyId)
'stype'=>'select',
'editoptions'=>array(
'value'=>array(
""=>gt("All"),
"Y"=>gt("Yes"),
"N"=>gt("No"),
""=>gT("All"),
"Y"=>gT("Yes"),
"N"=>gT("No"),
),
),
'sortable'=>true,
'hidden'=>$bHidden,
'width'=>'100',
'align'=>'center',
'label' => gt("Completed"),
'label' => gT("Completed"),
);
// defaultSearch is the default search done before send request in json. Actually : completed and token only. Can be extended ( js is ready) ?
$defaultSearch=array();
Expand All @@ -436,7 +436,7 @@ function browse($iSurveyId)
'sorttype'=>'string',
'sortable'=>true, 'width'=>'100',
'align'=>'left',
'title'=>gt('Token')
'title'=>gT('Token')
);
$column_model[] = array(
'name'=>'firstname',
Expand All @@ -445,7 +445,7 @@ function browse($iSurveyId)
'sortable'=>true,
'width'=>'100',
'align'=>'left',
'title'=>gt('First name'),
'title'=>gT('First name'),
);
$column_model[] = array(
'name'=>'lastname',
Expand All @@ -454,7 +454,7 @@ function browse($iSurveyId)
'sortable'=>true,
'width'=>'100',
'align'=>'left',
'title'=>gt('Last Name'),
'title'=>gT('Last Name'),
);
$column_model[] = array(
'name'=>'email',
Expand All @@ -463,7 +463,7 @@ function browse($iSurveyId)
'sortable'=>true,
'width'=>'100',
'align'=>'left',
'title'=>gt('Email'),
'title'=>gT('Email'),
);
// If token exist, test if token is set in params, add it to defaultSearch
if($sTokenSearch= Yii::app()->request->getQuery('token'))
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/surveyadmin.php
Expand Up @@ -910,7 +910,7 @@ public function copy()
$aImportResults=importSurveyFile($sFullFilepath,(isset($_POST['translinksfields'])));
if (is_null($aImportResults) || !empty($aImportResults['error']))
{
$aData['sErrorMessage']=isset($aImportResults['error']) ? $aImportResults['error'] : gt("Unknow error.");
$aData['sErrorMessage']=isset($aImportResults['error']) ? $aImportResults['error'] : gT("Unknow error.");
$aData['bFailed'] = true;
}
}
Expand Down

0 comments on commit 19fcb93

Please sign in to comment.