Fix : translated product desc was overwriting desc even if text was added after (#26687)
This commit is contained in:
parent
4d0230a8d4
commit
ef1916f0db
1 changed files with 6 additions and 2 deletions
|
|
@ -1440,8 +1440,12 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
|
|||
} else {
|
||||
$textwasnotmodified = ($desc == $prodser->description);
|
||||
}
|
||||
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($textwasnotmodified || $translatealsoifmodified)) {
|
||||
$desc = $prodser->multilangs[$outputlangs->defaultlang]["description"];
|
||||
if (!empty($prodser->multilangs[$outputlangs->defaultlang]["description"])) {
|
||||
if ($textwasnotmodified) {
|
||||
$desc = str_replace($prodser->description, $prodser->multilangs[$outputlangs->defaultlang]["description"], $desc);
|
||||
} elseif ($translatealsoifmodified) {
|
||||
$desc = $prodser->multilangs[$outputlangs->defaultlang]["description"];
|
||||
}
|
||||
}
|
||||
|
||||
// Set note
|
||||
|
|
|
|||
Loading…
Reference in a new issue