DOC SYSTEM

Crear en META-INF translation de plugin.
Al momento de habilitar un plugin, se revisara si cuenta con translations.php si cuenta con el archivo creara su .po y subira el archivo a META-INF.
-------------------------------------------
Workspace nace con configuracion de padre.
Ahora cuando se crea un nuevo workspace, nace con la configuracion Environment.
This commit is contained in:
Brayan Osmar Pereyra Suxo
2013-04-08 16:48:03 -04:00
parent 31bda297a6
commit c705cb8ba0
2 changed files with 42 additions and 0 deletions

View File

@@ -239,6 +239,7 @@ class PMPluginRegistry
$this->_aPlugins[$detail->sNamespace] = $oPlugin;
if (method_exists( $oPlugin, 'enable' )) {
$oPlugin->enable();
$this->verifyTranslation($detail->sNamespace);
}
return true;
}
@@ -1424,5 +1425,17 @@ class PMPluginRegistry
{
return get_object_vars( $this );
}
public function verifyTranslation ($namePlugin)
{
$language = new Language();
$pathPluginTranslations = PATH_PLUGINS . $namePlugin . PATH_SEP . 'translations' . PATH_SEP;
if (file_exists($pathPluginTranslations . 'translations.php')) {
if (!file_exists($pathPluginTranslations . $namePlugin . '.' . SYS_LANG . '.po')) {
$language->createLanguagePlugin($namePlugin, SYS_LANG);
}
$language->updateLanguagePlugin($namePlugin, SYS_LANG);
}
}
}