function __initialize($title = "", $body_class = false)
 {
     parent::__initialize($title, $body_class);
     if (!isset($GLOBALS['CONFIG']['translation']['sync']['poeditor_api_key']) || !$GLOBALS['CONFIG']['translation']['sync']['poeditor_api_key']) {
         WdfException::Raise("POEditor API key missing!");
     }
     if (!isset($GLOBALS['CONFIG']['translation']['sync']['poeditor_project_id']) || !$GLOBALS['CONFIG']['translation']['sync']['poeditor_project_id']) {
         WdfException::Raise("POEditor ProjectID missing!");
     }
 }
Ejemplo n.º 2
0
 function __initialize($title = "", $body_class = false)
 {
     parent::__initialize($title, $body_class);
     if (isset($GLOBALS['CONFIG']['translation']['sync']['scavix_datasource']) && $GLOBALS['CONFIG']['translation']['sync']['scavix_datasource']) {
         $this->ds = model_datasource($GLOBALS['CONFIG']['translation']['sync']['scavix_datasource']);
     } elseif (isset($GLOBALS['CONFIG']['translation']['sync']['datasource']) && $GLOBALS['CONFIG']['translation']['sync']['datasource']) {
         $this->ds = model_datasource($GLOBALS['CONFIG']['translation']['sync']['datasource']);
     } else {
         WdfException::Raise("ScavixTranslations datasource missing!");
     }
     $this->ds->ExecuteSql("CREATE TABLE IF NOT EXISTS `wdf_translations` (\n\t\t\t\t`lang` VARCHAR(10) NULL,\n\t\t\t\t`id` VARCHAR(100) NULL,\n\t\t\t\t`content` TEXT NULL,\n\t\t\t\tPRIMARY KEY (`lang`, `id`) );");
     $this->subnav('Translate', 'TranslationAdmin', 'Translate');
     $this->subnav('Import', 'TranslationAdmin', 'Import');
 }