diff --git a/src/mibew/libs/classes/Mibew/Controller/Localization/TranslationImportController.php b/src/mibew/libs/classes/Mibew/Controller/Localization/TranslationImportController.php index c2c4b2a1..3c4ab6ff 100644 --- a/src/mibew/libs/classes/Mibew/Controller/Localization/TranslationImportController.php +++ b/src/mibew/libs/classes/Mibew/Controller/Localization/TranslationImportController.php @@ -41,6 +41,8 @@ class TranslationImportController extends AbstractController $target = get_current_locale(); } + $override = (bool)$request->request->get('override', false); + $page = array( // Use errors list stored in the request. We need to do so to have // an ability to pass the request from other actions. @@ -60,6 +62,7 @@ class TranslationImportController extends AbstractController $page['stored'] = $request->query->has('stored'); $page['localesList'] = $locales_list; $page['formtarget'] = $target; + $page['formoverride'] = $override; $page['title'] = getlocal('Translations import'); $page['menuid'] = 'translation'; $page = array_merge($page, prepare_menu($operator)); @@ -87,6 +90,8 @@ class TranslationImportController extends AbstractController $target = get_current_locale(); } + $override = (bool)$request->request->get('override', false); + // Validate uploaded file $file = $request->files->get('translation_file'); if ($file) { @@ -107,7 +112,7 @@ class TranslationImportController extends AbstractController if (count($errors) == 0) { try { // Try to import new messages. - import_messages($target, $file->getRealPath()); + import_messages($target, $file->getRealPath(), $override); // The file is not needed any more. Remove it. unlink($file->getRealPath()); diff --git a/src/mibew/styles/pages/default/templates_src/server_side/translation_import.handlebars b/src/mibew/styles/pages/default/templates_src/server_side/translation_import.handlebars index 78b2fac9..8cc4c6da 100644 --- a/src/mibew/styles/pages/default/templates_src/server_side/translation_import.handlebars +++ b/src/mibew/styles/pages/default/templates_src/server_side/translation_import.handlebars @@ -35,6 +35,15 @@