Merge remote-tracking branch 'origin/master'

pull/5268/head
Angel Fernando Quiroz Campos 8 months ago
commit 7f23b2c1b9
  1. 4
      assets/vue/components/layout/Sidebar.vue
  2. 12
      src/CoreBundle/Migrations/Schema/V200/Version20240122221400.php

@ -4,8 +4,8 @@
<h3 class="app-sidebar__top">
{{ t("Menu") }}
</h3>
<div class="app-sidebar__panel">
<PanelMenu :model="menuItems" @click.native="handlePanelHeaderClick" />
<div class="app-sidebar__panel" @click="handlePanelHeaderClick">
<PanelMenu :model="menuItems" />
</div>
<div class="app-sidebar__bottom">
<PageList category-title="footer_private" />

@ -88,9 +88,9 @@ final class Version20240122221400 extends AbstractMigrationChamilo
$kernel = $container->get('kernel');
$rootPath = $kernel->getProjectDir();
$langPath = $rootPath.'/public/main/lang/'.$englishName.'/trad4all.inc.php';
$langPath = $rootPath.'/var/translations/import/'.$englishName.'/trad4all.inc.php';
$destinationFilePath = $rootPath.'/var/translations/messages.'.$isocode.'.po';
$originalFile = $rootPath.'/public/main/lang/english/trad4all.inc.php';
$originalFile = $rootPath.'/var/translations/import/english/trad4all.inc.php';
if (!file_exists($langPath)) {
error_log("Original file not found: $langPath");
@ -118,6 +118,8 @@ final class Version20240122221400 extends AbstractMigrationChamilo
$langPath,
true
);
$termsInLanguage = [];
foreach ($originalTermsInLanguage as $id => $content) {
if (!isset($termsInLanguage[$id])) {
$termsInLanguage[$id] = trim(rtrim($content, ';'), '"');
@ -131,10 +133,8 @@ final class Version20240122221400 extends AbstractMigrationChamilo
continue;
}
$doneTranslations[$englishTranslation] = true;
$translatedTerm = '';
if (!empty($termsInLanguage[$term])) {
$translatedTerm = $termsInLanguage[$term];
}
$translatedTerm = $termsInLanguage[$term] ?? '';
// Here we apply a little correction to avoid unterminated strings
// when a string ends with a \"
if (preg_match('/\\\$/', $englishTranslation)) {

Loading…
Cancel
Save