View Issue Details

IDProjectCategoryView StatusLast Update
14097Bug reports[All Projects] Translationpublic2019-02-11 13:26
ReportertbartAssigned Toc_schmitz 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.13.x 
Target VersionFixed in Version3.15.x 
Summary14097: "Upload files" button: Translatable msgid wrong (for all languages)
Description

The "Upload files" button does not get translated (although the used translation file has a 100% coverage).

That's because the string to be translated is not available in the .mo files.

application/views/survey/questions/answer/file_upload/answer.twig:

<span class='fa fa-upload'></span> {{ gT('Upload file') }}

"Upload file" is not part of the translation files, whereas "Upload file|Upload files" is.

I somehow cannot make the following work (as I am not able to access PHP variables in this location):
<span class='fa fa-upload'></span> {{ ngT('Upload file|Upload files', $aQuestionAttributes['max_num_of_files']) }}

but that would be the cleanest solution. Sorry, but I am no twig/PHP pro.

I fixed it for now by using
<span class='fa fa-upload'></span> {{ ngT('Upload file|Upload files', 2) }}

At least it translates it to the plural form now.

Steps To Reproduce

Choose any other language than English and fill a survey with an upload field. The button is called "Upload file" instead of the localized term. The modal after clicking the button has the correctly translated string.

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.14.9+180917
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionmySQL 5.5.60
Server OS (if known)debian
Webserver software & version (if known)apache 2.4.10
PHP Version5.6.36

Activities

tbart

tbart

2019-02-11 13:08

reporter   ~50493

This is somewhat solved in version 3.15.8+190130 (or probably earlier).

The string is now "Upload files" (or its translation) everywhere, regardless of whether it is one or more files. But that seems to be a design choice, so I think this can be closed, thanks!

Issue History

Date Modified Username Field Change
2018-09-25 14:07 tbart New Issue
2019-01-10 17:34 LouisGac Assigned To => c_schmitz
2019-01-10 17:34 LouisGac Status new => assigned
2019-02-11 13:08 tbart Note Added: 50493
2019-02-11 13:26 cdorin Status assigned => closed
2019-02-11 13:26 cdorin Resolution open => fixed
2019-02-11 13:26 cdorin Fixed in Version => 3.15.x