View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
12351Bug reportsSurvey takingpublic2018-01-15 10:41
Reporterollehar Assigned ToLouisGac 
PriorityurgentSeverityminor 
Status closedResolutionfixed 
Summary12351: Non-translated string
Description

See pic.

TagsNo tags attached.
Attached Files
Selection_190.png (33,446 bytes)   
Selection_190.png (33,446 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)develop
I will donate to the project if issue is resolvedNo
Browser-
Database type & version-
Server OS (if known)-
Webserver software & version (if known)-
PHP Version7.1

Relationships

related to 12276 closedLouisGac Strange display of "There are x questions in this survey" 

Users monitoring this issue

There are no users monitoring this issue.

Activities

user14106

2017-07-20 21:28

  ~44122

https://github.com/LimeSurvey/LimeSurvey/blob/develop/templates/default/views/subviews/welcome.twig#L53

There should be a way (I think) to be able to send params to gT.
template logic should follow the native twig t(). This would mean something like:

{{ "There are {NUMBEROFQUESTIONS} questions in this survey."| t({'NUMBEROFQUESTIONS': aSurveyInfo.iTotalquestions})}}

This nicely fits into LS translations logic, but ...
currently the params are thrown into gT($sToTranslate, $sEscapeMode = 'html', $sLanguage = NULL) as $sEscapeMode.

I'm not familiar with how LS replaces the variables, but looking at how the yii's native t() works (and twigs) it would be logical to allow passing parameters as
gT('mystring with {myParam}',['myParam'=>'foo'])

I'm not sure how doable it is though ;)

ollehar

ollehar

2017-07-21 09:58

administrator   ~44123

Use sprintf?

c_schmitz

c_schmitz

2017-12-19 11:57

administrator   ~45337

Needs to be fixed in Twig template to properly use a printf variable. Maybe the string itself should not be in the template but a placeholder?

c_schmitz

c_schmitz

2018-01-15 10:41

administrator   ~45762

Version 3.0.3 released.

Issue History

Date Modified Username Field Change
2017-04-27 14:47 ollehar New Issue
2017-04-27 14:47 ollehar Status new => assigned
2017-04-27 14:47 ollehar Assigned To => LouisGac
2017-04-27 14:47 ollehar File Added: limesurvey_survey_349746.lss
2017-04-27 14:47 ollehar File Added: Selection_190.png
2017-07-20 21:28 user14106 Note Added: 44122
2017-07-21 09:58 ollehar Note Added: 44123
2017-10-23 11:15 LouisGac Priority none => urgent
2017-11-16 18:11 LouisGac Sticky Issue No => Yes
2017-11-16 18:11 LouisGac Relationship added related to 12276
2017-12-19 11:57 c_schmitz Note Added: 45337
2017-12-29 12:03 LouisGac Sticky Issue Yes => No
2017-12-29 12:03 LouisGac Status assigned => resolved
2017-12-29 12:03 LouisGac Resolution open => fixed
2018-01-15 10:41 c_schmitz Note Added: 45762
2018-01-15 10:41 c_schmitz Status resolved => closed