Improved the import feature to insure that we don't have language conflicts with multiple strings for one language.

This commit is contained in:
2017-04-08 14:44:41 +01:00
parent 1cf259a54d
commit 6bba258fec
203 changed files with 226 additions and 225 deletions

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.2
@build 7th April, 2017
@build 8th April, 2017
@created 30th April, 2015
@package Component Builder
@subpackage import_joomla_components.php
@ -1495,7 +1495,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$localTranslations = json_decode($item->localTranslation, true);
foreach ($localTranslations['translation'] as $nr => $value)
{
if (!in_array($value, $translations['translation']))
// only keep old translation if the new does not have this translation & language
if (!in_array($value, $translations['translation']) && !in_array($localTranslations['language'][$nr], $translations['language']))
{
$translations['translation'][] = $value;
$translations['language'][] = $localTranslations['language'][$nr];