[-] BO : fix #PSFV-870 : translations modules

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14677 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-04-17 09:51:55 +00:00
parent caf154c77d
commit 7e3e03b869
2 changed files with 5 additions and 4 deletions
@@ -57,7 +57,7 @@
<h3 style="padding:0;margin:0;">{l s='List of Themes - Click to access theme translation:'}</h3> <h3 style="padding:0;margin:0;">{l s='List of Themes - Click to access theme translation:'}</h3>
<ul style="list-style-type:none;padding:0;margin:0 0 10px 0;"> <ul style="list-style-type:none;padding:0;margin:0 0 10px 0;">
{foreach array_keys($modules_translations) as $theme} {foreach array_keys($modules_translations) as $theme}
<li><a href="#{$theme}" class="link">- {if $theme === 'default'}{l s='default'}{else}$theme{/if}</a></li> <li><a href="#{$theme}" class="link">- {if $theme === 'default'}{l s='default'}{else}{$theme}{/if}</a></li>
{/foreach} {/foreach}
</ul> </ul>
{/if} {/if}
@@ -1910,12 +1910,13 @@ class AdminTranslationsControllerCore extends AdminController
$arr_files = $this->getAllModuleFiles($modules, _PS_MODULE_DIR_, $lang, true); $arr_files = $this->getAllModuleFiles($modules, _PS_MODULE_DIR_, $lang, true);
$arr_find_and_fill = array_merge($arr_find_and_fill, $arr_files); $arr_find_and_fill = array_merge($arr_find_and_fill, $arr_files);
if (file_exists(_PS_THEME_DIR_.'/modules/')) if (file_exists(_PS_THEME_DIR_.'modules/'))
{ {
$modules = scandir(_PS_THEME_DIR_.'/modules/'); $modules = scandir(_PS_THEME_DIR_.'modules/');
$arr_files = $this->getAllModuleFiles($modules, _PS_THEME_DIR_.'modules/', $lang); $arr_files = $this->getAllModuleFiles($modules, _PS_THEME_DIR_.'modules/', $lang);
$arr_find_and_fill = array_merge($arr_find_and_fill, $arr_files); $arr_find_and_fill = array_merge($arr_find_and_fill, $arr_files);
} }
foreach ($arr_find_and_fill as $value) foreach ($arr_find_and_fill as $value)
$this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir'], $lang); $this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir'], $lang);