View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
16214Bug reportsSurvey takingpublic2020-06-08 11:49
ReporterMazi Assigned ToDenisChenu  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.22.14 
Fixed in Version3.22.17 
Summary16214: date picker question didn't work with specific language
Description

At the first question page of a multilingual survey I can switch to a different language just fine. The page reloads with the new translation. But if I try switching to another language, the page doesn't reload anymore.

Steps To Reproduce
  1. Import the attached survey and activate.
  2. Start the survey and click NEXT at the welcome screen.
  3. At the first question screen switch to a different language like "zulu" top right.
  4. The new language loads fine.
  5. Now switch back to English or any other language
    -> The page doesn't reload anymore
TagsNo tags attached.
Bug heat8
Complete LimeSurvey version number (& build)Version 3.22.14+200423
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL 5
Server OS (if known)Ubuntu 18
Webserver software & version (if known)Apache 2
PHP Version7.3.5

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2020-04-30 17:08

updater   ~57502

Please unzip to get a test LSS file. It was too large to upload.

DenisChenu

DenisChenu

2020-04-30 19:50

developer   ~57512

1st page is OK,

Only after move next, right ?

DenisChenu

DenisChenu

2020-04-30 19:52

developer   ~57513

OK,

bootsrap-date-picker issue

Mazi

Mazi

2020-05-04 17:40

updater   ~57527

@cdorin, can you roughly outline a time line to get this fixed?

Mazi

Mazi

2020-05-08 16:00

updater   ~57633

It looks like only languages with codes CKB and PS and ZU and AM are affected. So rather exotic ones.

@DenisChenu, any idea how that may be related to the bootstrap date picker? Are we missing the languages there?

DenisChenu

DenisChenu

2020-05-08 17:35

developer   ~57637

@Mazi : see the screenshot : clearly related to bootsrap-date-picker :)

Mazi

Mazi

2020-05-08 18:11

updater   ~57640

@DenisChenu, I absolutely agree, but I have no idea why that is. What is your assumption?

Mazi

Mazi

2020-05-12 17:57

updater   ~57712

Update: "Carsten said it is either the language does not exist or is not mapped for these exotic languages"

DenisChenu

DenisChenu

2020-05-14 08:27

developer   ~57764

There are a function for language : https://github.com/LimeSurvey/LimeSurvey/blob/7092a6f600d2019811b0a722d09475101c37cd85/application/helpers/surveytranslator_helper.php#L1059

    $sLocale = str_replace('-informal', '', $sLocale);
    $aConversions = array(
        'ca-valencia'=>'ca',
        'hy'=>'hy-am',
        'zh-Hans'=>'zh-cn',
        'zh-Hant-HK'=>'zh-cn',
        'zh-Hant-TW'=>'zh-tw',
        'prs'=>'fa',
        'pa'=>'pa-in',
        'sr'=>'sr-cyrl',
        'es-AR'=>'es',
        'es-CL'=>'es',
        'es-MX'=>'es',
        'swh'=>'sw'
    );

*

But seems strange than bootsrap-date-picker have Afrikaans or Urdu ?

DenisChenu

DenisChenu

2020-05-14 09:02

developer   ~57765

@Mazi : tell me what language to get for CKB and PS and ZU and AM

In https://momentjs.com/

Mazi

Mazi

2020-05-14 09:44

updater   ~57768

@DenisChenu, these are the languages:
CKB = Kurdish (Sorani)
PS = Pashto
ZU = Zulu
AM = Amharic

But at momentjs I could only find the Kurdish one.

DenisChenu

DenisChenu

2020-05-14 10:18

developer   ~57770

I mean : what language to set :

CKB => ku it's OK
PS => ? Maybe english … i don't know …

I don't find a way to add local from a PHP file …

PS : i don't like moment.js …

Mazi

Mazi

2020-05-14 10:33

updater   ~57771

I will ask them which languages are the most similar one from momentjs.

DenisChenu

DenisChenu

2020-05-14 10:49

developer   ~57772

Else : https://momentjs.com/docs/#/i18n/adding-locale/

Sample on https://github.com/moment/moment/blob/develop/src/locale/af.js

ollehar

ollehar

2020-05-14 16:30

administrator   ~57790

Please update to the latest version and try again. Thank you.

Mazi

Mazi

2020-05-14 16:54

updater   ~57797

@ollehar, how should any of these two fixes at the update fix this given problem?

Please do not recommend updating just in case if people already use a rather new version.

FYI: The issue is NOT fixed after the update.

update.png (11,554 bytes)   
update.png (11,554 bytes)   
ollehar

ollehar

2020-05-14 16:59

administrator   ~57798

Please do not recommend updating just in case if people already use a rather new version.

I will always recommend updating. It saves brain energy. We can't keep track on all changes on every release, we can only ask people to always use the latest version.

FYI: The issue is NOT fixed after the update.

Good info.

ollehar

ollehar

2020-05-14 17:03

administrator   ~57799

Is this a regression from an earlier LS3 version?

Mazi

Mazi

2020-05-14 17:05

updater   ~57800

I think it is simply a new bug that didn't show up so far because those exotic languages are rarely used.

ollehar

ollehar

2020-05-14 17:06

administrator   ~57801

OK

DenisChenu

DenisChenu

2020-05-14 17:25

developer   ~57805

I can assign @Mazi to tester ?
Maybe it's bets if we can ?

DenisChenu

DenisChenu

2020-05-14 17:28

developer   ~57806

Confirm : need date + specific language There are more than this 3

Armenian : https://github.com/LimeSurvey/LimeSurvey/pull/1420/files#diff-fd7e1638b849ebd4dfc8692ff3e535c7R112
zh-Hant-HK and zh-Hant-TW have better translation than zh-cn
etc …

Mazi

Mazi

2020-05-14 17:33

updater   ~57807

First test: Looks good!

Mazi

Mazi

2020-05-18 16:47

updater   ~57886

The customer did some more testing and everything works like a charm. Thanks, DenisChenu!

Let's add this to the core of LS 3 and 4.

DenisChenu

DenisChenu

2020-05-18 16:48

developer   ~57887

I check to merge it tomorrow (at dev team)
And apply same to 4.X

DenisChenu

DenisChenu

2020-06-03 09:04

developer   ~58151

OK , last merge from 3LTS before merge … like to have Scrutinizer return.

DenisChenu

DenisChenu

2020-06-05 08:53

developer   ~58187

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

lime_release_bot

lime_release_bot

2020-06-08 11:49

administrator   ~58218

Fixed in Release 4.2.8+200608

Related Changesets

LimeSurvey: master 92a4e31f

2020-06-05 08:34:11

DenisChenu

Details Diff
Fixed issue 16214: date picker question didn't work with specific language
Dev: add momentjs param in supported language array
Dev: checked one by one … set to null if not found
Dev: more fix than Amharic, Kurdish, Pashto and Zulu
Dev: reorder supportedLanguages to find it
Affected Issues
16214
mod - application/helpers/surveytranslator_helper.php Diff File

Issue History

Date Modified Username Field Change
2020-04-30 17:07 Mazi New Issue
2020-04-30 17:08 Mazi Note Added: 57502
2020-04-30 17:08 Mazi File Added: limesurvey_survey_566183.zip
2020-04-30 19:50 DenisChenu Note Added: 57512
2020-04-30 19:52 DenisChenu Note Added: 57513
2020-04-30 19:52 DenisChenu File Added: Capture d’écran du 2020-04-30 19-52-05.png
2020-05-04 17:40 Mazi Note Added: 57527
2020-05-08 16:00 Mazi Note Added: 57633
2020-05-08 17:35 DenisChenu Note Added: 57637
2020-05-08 18:11 Mazi Note Added: 57640
2020-05-12 17:57 Mazi Note Added: 57712
2020-05-14 08:27 DenisChenu Note Added: 57764
2020-05-14 09:02 DenisChenu Note Added: 57765
2020-05-14 09:44 Mazi Note Added: 57768
2020-05-14 10:18 DenisChenu Note Added: 57770
2020-05-14 10:33 Mazi Note Added: 57771
2020-05-14 10:49 DenisChenu Note Added: 57772
2020-05-14 16:29 ollehar Priority none => normal
2020-05-14 16:30 ollehar Note Added: 57790
2020-05-14 16:54 Mazi Note Added: 57797
2020-05-14 16:54 Mazi File Added: update.png
2020-05-14 16:59 ollehar Note Added: 57798
2020-05-14 17:03 ollehar Note Added: 57799
2020-05-14 17:05 Mazi Note Added: 57800
2020-05-14 17:06 ollehar Note Added: 57801
2020-05-14 17:18 DenisChenu Summary Switching languages more than once stops the survey to re-load => date picker question didn't work with specific language
2020-05-14 17:18 DenisChenu Assigned To => DenisChenu
2020-05-14 17:18 DenisChenu Status new => assigned
2020-05-14 17:25 DenisChenu Status assigned => ready for testing
2020-05-14 17:25 DenisChenu Note Added: 57805
2020-05-14 17:28 DenisChenu Note Added: 57806
2020-05-14 17:33 Mazi Note Added: 57807
2020-05-18 16:47 Mazi Note Added: 57886
2020-05-18 16:48 DenisChenu Note Added: 57887
2020-06-03 09:04 DenisChenu Note Added: 58151
2020-06-05 08:53 DenisChenu Changeset attached => LimeSurvey master 92a4e31f
2020-06-05 08:53 DenisChenu Note Added: 58187
2020-06-05 08:53 DenisChenu Resolution open => fixed
2020-06-05 09:29 DenisChenu Status ready for testing => resolved
2020-06-05 09:29 DenisChenu Fixed in Version => 3.22.17
2020-06-08 11:49 lime_release_bot Note Added: 58218
2020-06-08 11:49 lime_release_bot Status resolved => closed