View Issue Details

IDProjectCategoryView StatusLast Update
0001401bareos-core[All Projects] webuipublic2021-11-18 09:50
ReporterArmandAssigned Tobruno-at-bareos 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version20.0.2 
Fixed in Version 
Summary0001401: No data display on /bareos-webui/media/details/_volume_name_ for french translation
DescriptionWhen we are logged to webui with french language, the Volumes details are not displayed due to an issue with French translation

During translation to french we can have some quote (') as in french sometimes we replace letter a / e with a single quote. Exemple "The application" is translate to "L'application" and not to "La application"
Unfortunately, quote is also a string separator in javascript, and we could not have a quote inside a single quote string. To solve this we need to put the string inside a double quote (") or we need to escape the quote 'this is a string with a single quote \' escaped to be valide'

In the file /usr/share/bareos-webui/module/Media/view/media/media/details.phtml we have this issue between line 315 and 445 : inside function detailFormatterVol(index, row) {...}

One solution could be :
  between line 315 and 445,
    replace all : <?php echo $this->translate("XXXXXX"); ?>
    with : <?php echo str_replace("'","\'",$this->translate("XXXXXX")); ?>
  This will replace single quote by escaped single quote

PS: see attache file, including this solution
Steps To Reproducelog to webui with language = French
go to menu : STOCKAGES
go in tab : Volumes
select a volume in the list (My volumes are all DLT tapes)

we expect to see the volume information + the jobs saved on this volume
 
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Relationships

duplicate of 0001235 resolvedfrank Special characters not escaped in translations 

Activities

Armand

Armand

2021-11-16 15:14

reporter  

details.phtml (17,122 bytes)
Armand

Armand

2021-11-16 15:22

reporter   ~0004340

Juste saw, this is the same as issue 0001235 ;-/ sorry
bruno-at-bareos

bruno-at-bareos

2021-11-18 09:50

developer   ~0004345

I will close this as duplicate of 1235.
It is fixed and published in 20.0.3 (available for customer with a affordable subscription) and you can cherry pick the commit which fix this.

Issue History

Date Modified Username Field Change
2021-11-16 15:14 Armand New Issue
2021-11-16 15:14 Armand File Added: details.phtml
2021-11-16 15:22 Armand Note Added: 0004340
2021-11-18 09:49 bruno-at-bareos Assigned To => bruno-at-bareos
2021-11-18 09:49 bruno-at-bareos Status new => assigned
2021-11-18 09:50 bruno-at-bareos Status assigned => resolved
2021-11-18 09:50 bruno-at-bareos Resolution open => duplicate
2021-11-18 09:50 bruno-at-bareos Note Added: 0004345
2021-11-18 09:50 bruno-at-bareos Relationship added duplicate of 0001235