Skip to content

Commit

Permalink
Fixed issue #15622: Theme Options are not available for translation
Browse files Browse the repository at this point in the history
Fixed issue #15644: Unable to translate theme options
  • Loading branch information
ptelu committed Dec 19, 2019
1 parent 27957d6 commit d8072e5
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 13 deletions.
53 changes: 53 additions & 0 deletions application/core/LsDefaultDataSets.php
Expand Up @@ -972,4 +972,57 @@ public static function getTutorialEntryData()

return $returnArray;
}

/**
* All translations that are used in files that can or should not be searched by the translation script.
* This function has no functionality except for being searchable by the translation script.
*/
public static function mockTranslateArrayContainer()
{
$translationArray = [
gT("Survey container"),
gT("Hide privacy info"),
gT("Show popups"),
gT("Popup"),
gT("On page"),
gT("Fix automatically numeric value"),
gT("For expression"),
gT("Brandlogo"),
gT("Brandlogo file"),
gT('Preview image'),
gT("Bootstrap theme"),
gT("Bootswatch theme"),
gT("Question borders"),
gT("Question shadow"),
gT("Zebra-striped questions"),
gT("Sticky array headers"),
gT("Dim answered array rows"),
gT("Hide privacy info"),
gT("Cross-hover in matrix questions"),
gT("Background color"),
gT("Font color"),
gT("Question background color"),
gT("Check icon"),
gT("Background image"),
gT("Background image file"),
gT("Logo"),
gT("Logo file"),
gT("Animate body"),
gT("Body animation"),
gT("Duration"),
gT("Animate question"),
gT("Question animation"),
gT("Animate alert"),
gT("Alert animation"),
gT("Animate checkbox"),
gT("Alert animation"),
gT("Animate radio buttons"),
gT("Radio button animation"),
gT("Select font:"),
gT("Select variation:"),
gT("Fruity fonts"),
gT("Fruity variations")

];
}
}
18 changes: 9 additions & 9 deletions application/models/TemplateConfiguration.php
Expand Up @@ -146,17 +146,17 @@ public function attributeLabels()
{
return array(
'id' => 'ID',
'template_name' => 'Templates Name',
'template_name' => gT('Templates Name'),
'sid' => 'Sid',
'gsid' => 'Gsid',
'files_css' => 'Files Css',
'files_js' => 'Files Js',
'files_print_css' => 'Files Print Css',
'options' => 'Options',
'cssframework_name' => 'Cssframework Name',
'cssframework_css' => 'Cssframework Css',
'cssframework_js' => 'Cssframework Js',
'packages_to_load' => 'Packages To Load',
'files_css' => gT('Files Css'),
'files_js' => gT('Files Js'),
'files_print_css' => gT('Files Print Css'),
'options' => gT('Options'),
'cssframework_name' => gT('Cssframework Name'),
'cssframework_css' => gT('Cssframework Css'),
'cssframework_js' => gT('Cssframework Js'),
'packages_to_load' => gT('Packages To Load'),
);
}

Expand Down
8 changes: 4 additions & 4 deletions themes/survey/bootswatch/options/options.twig
Expand Up @@ -237,7 +237,7 @@
<div class='col-sm-12 col-md-4'>
{# Brandlogo #}
<div class='form-group row'>
<label for='simple_edit_options_brandlogo' class='control-label'>Brandlogo</label>
<label for='simple_edit_options_brandlogo' class='control-label'>{{ gT("Brandlogo") }}</label>
<div class='col-sm-12'>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default">
Expand All @@ -262,7 +262,7 @@
<div class='col-sm-8 col-md-6'>
{# Brandlogo file selector #}
<div class='form-group row'>
<label for='simple_edit_options_brandlogofile' class='control-label'>Brandlogo file</label>
<label for='simple_edit_options_brandlogofile' class='control-label'>{{ gT("Brandlogo file")}}</label>
<div class='col-sm-12'>
<select class='form-control selector_option_value_field selector_radio_childfield selector_image_selector' data-parent="brandlogo" id='simple_edit_options_brandlogofile' name='brandlogofile'>
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
Expand Down Expand Up @@ -297,11 +297,11 @@
<div class='row'>
<div class='col-sm-12'>
<div class='panel panel-default'>
<div class='panel-heading'>Bootstrap theme</div>
<div class='panel-heading'>{{ gT("Bootstrap theme") }}</div>
<div class='panel-body'>
{# Bootstrap Bootswatch theme #}
<div class='form-group row'>
<label for='simple_edit_cssframework' class='control-label'>Bootswatch theme</label>
<label for='simple_edit_cssframework' class='control-label'>{{ gT("Bootswatch theme") }}</label>
<div class='col-sm-12'>
<select class='form-control selector_cssframework_value_field' id='simple_edit_cssframework' name='cssframework'>
{{bootswatchOption}}
Expand Down

0 comments on commit d8072e5

Please sign in to comment.