Skip to content

Commit

Permalink
Dev: template => theme, in controllers and helpers eT/gT
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Nov 22, 2017
1 parent 2cff408 commit ab0584d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions application/controllers/admin/themes.php
Expand Up @@ -360,7 +360,7 @@ public function index($editfile = '', $screenname = 'welcome', $templatename = '
// This can happen if the global default template is deleted
if (!Template::checkIfTemplateExists($templatename)) {
// Redirect to the default template
Yii::app()->setFlashMessage(sprintf(gT('Template %s does not exist.'), htmlspecialchars($templatename, ENT_QUOTES)), 'error');
Yii::app()->setFlashMessage(sprintf(gT('Theme %s does not exist.'), htmlspecialchars($templatename, ENT_QUOTES)), 'error');
$this->getController()->redirect(array('admin/themes/sa/view/', 'templatename'=>'default'));
}

Expand Down Expand Up @@ -625,7 +625,7 @@ public function templatesavechanges()
in_array($relativePathEditfile, $cssfiles) === false &&
in_array($relativePathEditfile, $jsfiles) === false
) {
Yii::app()->user->setFlash('error', gT('Invalid template name'));
Yii::app()->user->setFlash('error', gT('Invalid theme name'));
$this->getController()->redirect(array("admin/themes/sa/upload"));
}

Expand Down Expand Up @@ -1065,7 +1065,7 @@ protected function _initialise($templatename, $screenname, $editfile, $showsumma
$myoutput = Yii::app()->twigRenderer->renderTemplateForTemplateEditor($sLayoutFile, array('aSurveyInfo'=>$thissurvey), $oEditedTemplate);
} catch (Twig_Error_Syntax $ex) {
$myoutput = sprintf(
gT('No Twig output due to error in Twig template: %s'),
gT('No Twig output due to error in Twig theme: %s'),
$ex->getMessage()
);
Yii::app()->user->setFlash(
Expand Down Expand Up @@ -1131,11 +1131,11 @@ protected function showIntroNotification()
$user = User::model()->findByPk(Yii::app()->session['loginID']);
$not = new UniqueNotification(array(
'user_id' => $user->uid,
'title' => gT('LimeSurvey 3.0 template editor'),
'title' => gT('LimeSurvey 3.0 theme editor'),
'markAsNew' => false,
'importance' => Notification::HIGH_IMPORTANCE,
'message' => sprintf(
gT('Welcome to the new template editor of LimeSurvey 3.0. To get an overview of new functionality and possibilities, please visit the %s LimeSurvey manual %s. For further questions and information, feel free to post your questions on the %s LimeSurvey forums %s.', 'unescaped'),
gT('Welcome to the new theme editor of LimeSurvey 3.0. To get an overview of new functionality and possibilities, please visit the %s LimeSurvey manual %s. For further questions and information, feel free to post your questions on the %s LimeSurvey forums %s.', 'unescaped'),
'<a target="_blank" href="http://manual.limesurvey.org/Templating">', '</a>',
'<a target="_blank" href="https://www.limesurvey.org/community/forums">', '</a>'
)
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -757,7 +757,7 @@ private function _refreshtemplates()
} catch (Exception $ex) {
Yii::app()->setFlashMessage(
sprintf(
gT('Could not save template %s: %s'),
gT('Could not save theme %s: %s'),
$tp,
$ex->getMessage()
),
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/questionHelper.php
Expand Up @@ -1567,8 +1567,8 @@ public static function getAttributesDefinitions()
'inputtype'=>'question_template',
'options'=>array(),
'default' => "core",
"help"=>gT('Use a customized question template for this question'),
"caption"=>gT('Question template')
"help"=>gT('Use a customized question theme for this question'),
"caption"=>gT('Question theme')
);

/**
Expand Down

0 comments on commit ab0584d

Please sign in to comment.