View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
13805Bug reportsTranslationpublic2018-08-07 17:01
Reporterimacat Assigned Tomarkusfluer 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.12.x 
Fixed in Version3.13.x 
Summary13805: Multi-line Text Messages Do Not Exist in Translation.
Description

Hi. I found that multi-line text messages do not exist in the translation PO files. The reason is that the xgettext tool from GNU gettext can only process multi-line source text messages in the C language format, to concatenate the text lines with spaces as in C, but not with the string concatenation operator in PHP (.). Hence several pieces of text in the tutorial do not appear in the PO file.

Steps To Reproduce

Search for "The most important settings of your survey can be reached from this sidebar:" in Pootle gets nothing:

https://translate.limesurvey.org/projects/limesurvey-3/zh-tw/traditional/?filters%5Bterm%5D=The+most+important+settings+of+your+survey+can+be+reached+from+this+sidebar%3A&filters%5Buser_login%5D=&filters%5Bstatus%5D=either&filter=Filter&sort%5Bby%5D=translation_date_added&sort%5Bhow%5D=asc

While it appears in application/core/LsDefaultDataSets.php line 464:

https://github.com/LimeSurvey/LimeSurvey/blob/master/application/core/LsDefaultDataSets.php#L464

Additional Information

I submit a pull request in github:

https://github.com/LimeSurvey/LimeSurvey/pull/1085

Please check if this works. Thank you.

TagsNo tags attached.
Attached Files
limesurvey-xgettext.diff.asc (11,000 bytes)   
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

diff --git a/application/core/LsDefaultDataSets.php b/application/core/LsDefaultDataSets.php
index d3491f22ce..7a64fd384a 100644
- --- a/application/core/LsDefaultDataSets.php
+++ b/application/core/LsDefaultDataSets.php
@@ -461,10 +461,7 @@ class LsDefaultDataSets
                 'title' => gT('The sidebar'),
                 'content' => gT('This is the sidebar.').'<br/>'
                 .gT('All important settings can be reached in this sidebar.').'<br/>'
- -                .gT('The most important settings of your survey can be reached from this sidebar: the survey settings menu and the survey structure menu.'
- -                .' You may resize it to fit your screen to easily navigate through the available options.'
- -                .' If the size of the sidebar is too small, the options get collapsed and the quick-menu is displayed.'
- -                .' If you wish to work from the quick-menu, either click on the arrow button or drag it to the left.'),
+                .gT('The most important settings of your survey can be reached from this sidebar: the survey settings menu and the survey structure menu. You may resize it to fit your screen to easily navigate through the available options. If the size of the sidebar is too small, the options get collapsed and the quick-menu is displayed. If you wish to work from the quick-menu, either click on the arrow button or drag it to the left.'),
                 'settings' => json_encode(array(
                     'path' => ['/admin/survey/sa/view', ['surveyid' => '[0-9]{4,25}']],
                     'element' => '#sidebar',
@@ -480,8 +477,7 @@ class LsDefaultDataSets
                 'teid' => 10,
                 'ordering' => 10,
                 'title' => gT('The settings tab with the survey menu'),
- -                'content' => gT('If you click on this tab, the survey settings menu will be displayed.'
- -                .' The most important settings of your survey are accessible from this menu.').'<br/>'
+                'content' => gT('If you click on this tab, the survey settings menu will be displayed. The most important settings of your survey are accessible from this menu.').'<br/>'
                 .gT('If you want to know more about them, check our manual.'),
                 'settings' => json_encode(array(
                     'element' => '#adminpanel__sidebar--selectorSettingsButton',
@@ -495,8 +491,7 @@ class LsDefaultDataSets
                 'ordering' => 11,
                 'title' => gT('The top bar'),
                 'content' => gT('This is the top bar.').'<br/>'
- -                .gT('This bar will change as you move through the functionalities.'
- -                .'The current bar corresponds to the "overview" tab. It contains the most important LimeSurvey functionalities such as preview and activate survey.'),
+                .gT('This bar will change as you move through the functionalities. The current bar corresponds to the "overview" tab. It contains the most important LimeSurvey functionalities such as preview and activate survey.'),
                 'settings' => json_encode(array(
                     'element' => '#surveybarid',
                     'path' => ['/admin/survey/sa/view', ['surveyid' => '[0-9]{4,25}']],
@@ -543,9 +538,7 @@ class LsDefaultDataSets
                 'teid' => 14,
                 'ordering' => 14,
                 'title' => gT('Enter a title for your first question group'),
- -                'content' => gT('The title of the question group is visible to your survey participants (this setting can be changed later and it cannot be empty). '
- -                .'Question groups are important because they allow the survey administrators to logically group the questions. '
- -                .'By default, each question group (including its questions) is shown on its own page (this setting can be changed later).'),
+                'content' => gT('The title of the question group is visible to your survey participants (this setting can be changed later and it cannot be empty). Question groups are important because they allow the survey administrators to logically group the questions. By default, each question group (including its questions) is shown on its own page (this setting can be changed later).'),
                 'settings' => json_encode(array(
                     'element' => '#group_name_en',
                     'path' => ['/admin/questiongroups/sa/add', ['surveyid' => '[0-9]{4,25}']],
@@ -619,8 +612,7 @@ class LsDefaultDataSets
                 'teid' => 19,
                 'ordering' => 19,
                 'title' => gT('The actual question text'),
- -                'content' => gT('The content of this box is the actual question text shown to your participants.'
- -                .' It may be empty, but that is not recommended. You may use all the power of our WYSIWYG editor to make your question shine.'),
+                'content' => gT('The content of this box is the actual question text shown to your participants. It may be empty, but that is not recommended. You may use all the power of our WYSIWYG editor to make your question shine.'),
                 'settings' => json_encode(array(
                     'element' => '#cke_question_en',
                     'path' => ['/admin/survey/sa/view', ['surveyid' => '[0-9]{4,25}', 'gid' => '[0-9]{1,25}', 'qid' => '[0-9]{4,25}']],
@@ -632,8 +624,7 @@ class LsDefaultDataSets
                 'teid' => 20,
                 'ordering' => 20,
                 'title' => gT('An additional help text for your question'),
- -                'content' => gT('You can add some additional help text to your question. '
- -                .'If you decide not to offer any additional question hints, then no help text will be displayed to your respondents.'),
+                'content' => gT('You can add some additional help text to your question. If you decide not to offer any additional question hints, then no help text will be displayed to your respondents.'),
                 'settings' => json_encode(array(
                     'element' => '#cke_help_en',
                     'path' => ['/admin/survey/sa/view', ['surveyid' => '[0-9]{4,25}', 'gid' => '[0-9]{1,25}', 'qid' => '[0-9]{4,25}']],
@@ -661,8 +652,7 @@ class LsDefaultDataSets
                 'ordering' => 22,
                 'title' => gT('Now save the created question'),
                 'content' => gT('Next, we will create subquestions and answer options.').'<br/>'
- -                    .gT('Please remember that in order to have a valid code, it must contain only letters and numbers, '
- -                    .'also please check that it starts with a letter.'),
+                    .gT('Please remember that in order to have a valid code, it must contain only letters and numbers, also please check that it starts with a letter.'),
                 'settings' => json_encode(array(
                     'element' => '#save-button',
                     'path' => ['/admin/survey/sa/view', ['surveyid' => '[0-9]{4,25}', 'gid' => '[0-9]{1,25}', 'qid' => '[0-9]{4,25}']],
@@ -719,8 +709,7 @@ class LsDefaultDataSets
                 'ordering' => 25,
                 'title' => gT('Edit subquestions'),
                 'content' => gT("You should add some subquestions for your question here.").'<br/>'
- -                .gT("Every row is one subquestion. We recommend the usage of logical or numerical codes for subquestions."
- -                ." Your participants cannot see the subquestion code, only the subquestion text itself.")
+                .gT("Every row is one subquestion. We recommend the usage of logical or numerical codes for subquestions. Your participants cannot see the subquestion code, only the subquestion text itself.")
                 ."<p class='bg-info alert'>".gT("Pro tip: The subquestion may even contain HTML code.").'</p>',
                 'settings' => json_encode(array(
                     'element' => '#rowcontainer',
diff --git a/application/views/admin/survey/surveybar_displayexport.php b/application/views/admin/survey/surveybar_displayexport.php
index 6c2ce23bd9..e9af56c005 100644
- --- a/application/views/admin/survey/surveybar_displayexport.php
+++ b/application/views/admin/survey/surveybar_displayexport.php
@@ -16,10 +16,8 @@
     $aExportItemsArray["surveystructure"] = [
         "key" => "surveystructure",
         "description" => "".gT("Survey structure (.lss)"),
- -        "detailpage" => "<p>".gT("This export will dump all the groups, questions, answers and conditions for your survey into a .LSS file"
- -        ."(which is basically an XML file). This dump file can be used with the 'Import survey' feature when creating a new survey.")."</p>"
- -        ."<p>".gT("A survey which uses a custom theme will import fine, but the template it refers to will not exist on the new server."
- -        ." In that case the system will use the global default theme.")."</p>"
+        "detailpage" => "<p>".gT("This export will dump all the groups, questions, answers and conditions for your survey into a .LSS file (which is basically an XML file). This dump file can be used with the 'Import survey' feature when creating a new survey.")."</p>"
+        ."<p>".gT("A survey which uses a custom theme will import fine, but the template it refers to will not exist on the new server. In that case the system will use the global default theme.")."</p>"
         ."<p><b>".gT("Please note: This file does not contain any collected responses.")."</b></p>",
         "href" => $this->createUrl("admin/export/sa/survey/action/exportstructurexml/surveyid/".$oSurvey->sid),
         "download" => true
@@ -84,8 +82,7 @@
         "detailpage" => "
         <p>".gT("This feature is designed to make it easy to use Excel to author and edit surveys.")."</p>
         <p>".gT("It completely eliminates the dependence upon SGQA codes.")."</p>
- -        <p>".gT("It also makes it easy to do bulk editing of your survey, such as find-replace, bulk-reordering, looping (repeating groups), "
- -        ."and testing (such as temporarily disabling mandatory or validation criteria).")."</p>
+        <p>".gT("It also makes it easy to do bulk editing of your survey, such as find-replace, bulk-reordering, looping (repeating groups), and testing (such as temporarily disabling mandatory or validation criteria).")."</p>
         <p><a href=\"https://manual.limesurvey.org/Excel_Survey_Structure\" target=\"_blank\" >".gT("Check out the dedicated documentation for this format.")." <i class=\"fa fa-external-link\"></i></a></p>
         ",
         "href" => $this->createUrl("admin/export/sa/survey/action/exportstructuretsv/surveyid/".$oSurvey->sid),
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQSBin4eTeP7OclnnAOL2C5vMLlLXAUCWyxM6wAKCRCL2C5vMLlL
XBTpAJ9m+geADnLxeAgXWhGyRm4/v48F2QCfRF0LtGCHw5f0yW4Xixxsa6jO7IE=
=QhrQ
-----END PGP SIGNATURE-----
limesurvey-xgettext.diff.asc (11,000 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)3.12.1+180616
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmariadb 10.1.26
Server OS (if known)Debian GNU/Linux 9.4 (stretch)
Webserver software & version (if known)apache 2.4.25
PHP Version7.0.27

Users monitoring this issue

There are no users monitoring this issue.

Activities

markusfluer

markusfluer

2018-07-09 15:50

administrator   ~48479

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=27615

markusfluer

markusfluer

2018-08-07 17:01

administrator   ~48724

Release 3.14.2+180807

Related Changesets

LimeSurvey: master 2f200be5

2018-07-09 15:50:11

imacat


Committer: markusfluer Details Diff
Fixed issue 13805: Multi-line Text Messages Do Not Exist in Translation. Affected Issues
13805
mod - application/core/LsDefaultDataSets.php Diff File
mod - application/views/admin/survey/surveybar_displayexport.php Diff File

Issue History

Date Modified Username Field Change
2018-06-22 03:11 imacat New Issue
2018-06-22 03:11 imacat File Added: limesurvey-xgettext.diff.asc
2018-06-25 10:21 LouisGac Assigned To => markusfluer
2018-06-25 10:21 LouisGac Status new => assigned
2018-07-09 15:50 markusfluer Changeset attached => LimeSurvey master 2f200be5
2018-07-09 15:50 markusfluer Note Added: 48479
2018-07-09 15:50 markusfluer Resolution open => fixed
2018-07-09 15:52 markusfluer Status assigned => resolved
2018-07-09 15:52 markusfluer Fixed in Version => 3.13.x
2018-08-07 17:01 markusfluer Status resolved => closed
2018-08-07 17:01 markusfluer Note Added: 48724