Commit 23fe3947c710516b84dd048bb291493d8892b38c

Authored by Adriano Vieira
1 parent a2aadf9a
Exists in master and in 1 other branch 3.1

Gerente "trunk" atualizado

- melhorias na internacionalização do instalador

git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@277 fecfc0c7-e812-0410-ae72-849f08638ee7
instalador/classes/install.ajax.php
... ... @@ -359,7 +359,7 @@ class InstallAjax {
359 359 $versao = $oDB->version();
360 360 if(!(version_compare($versao,CACIC_DBVERSION,'>='))) {
361 361 $connOk = false;
362   - $msg .= '<br><span class="Erro">Versão do Servidor MySQL-Server inválida!</span>';
  362 + $msg = '<br><span class="Erro">Versão do Servidor MySQL-Server inválida!</span>';
363 363 $msg .= '<br>Requerida: <span class="Aviso">'.CACIC_DBVERSION.'</span>';
364 364 $msg .= '<br>Instalada: <span class="Nao">'.$versao.'</span>';
365 365 }
... ...
instalador/classes/install.php
... ... @@ -69,7 +69,7 @@ class Install {
69 69 /*
70 70 * instacia objetos de classes externas
71 71 */
72   - $this->oTmpl = new Template($oTranslator);
  72 + $this->oTmpl = new Template($this->oLang);
73 73 $this->oTmpl->header();
74 74 $this->oTmpl->body();
75 75 }
... ... @@ -108,7 +108,6 @@ class Install {
108 108 * Verifica os requisitos e as recomendações para instalação
109 109 */
110 110 function checkInstall() {
111   - global $oTranslator;
112 111 /*
113 112 * por padrao poderá continuar o processo de installação
114 113 */
... ... @@ -120,13 +119,13 @@ class Install {
120 119 */
121 120 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CACIC_PHPVERSION', CACIC_PHPVERSION);
122 121 if(version_compare(phpversion(),CACIC_PHPVERSION,'>=')) {
123   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_STATUS', $oTranslator->_('kciq_msg yes')." (".phpversion().")");
  122 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_STATUS', $this->oLang->_('kciq_msg yes')." (".phpversion().")");
124 123 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_CLASS', "SimImg");
125 124 }
126 125 else {
127   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_STATUS', $oTranslator->_('kciq_msg no')." (".phpversion().")");
  126 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_STATUS', $this->oLang->_('kciq_msg no')." (".phpversion().")");
128 127 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_CLASS', "NaoImg");
129   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_HELP', $oTranslator->_('kciq_msg phpversion_help'));
  128 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPVERSION_HELP', $this->oLang->_('kciq_msg phpversion_help'));
130 129 $lCouldContinue = false;
131 130 }
132 131  
... ... @@ -134,13 +133,13 @@ class Install {
134 133 * verifica se o biblioteca GD está instalada; testando se a função imagegd existe
135 134 */
136 135 if (extension_loaded('gd') || function_exists('imagegd')) {
137   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_STATUS', $oTranslator->_('kciq_msg yes'));
  136 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_STATUS', $this->oLang->_('kciq_msg yes'));
138 137 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_CLASS', "SimImg");
139 138 }
140 139 else {
141   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_STATUS', $oTranslator->_('kciq_msg no'));
  140 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_STATUS', $this->oLang->_('kciq_msg no'));
142 141 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_CLASS', "NaoImg");
143   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_HELP', $oTranslator->_('kciq_msg phpgd_help'));
  142 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPGD_HELP', $this->oLang->_('kciq_msg phpgd_help'));
144 143 $lCouldContinue = false;
145 144 }
146 145  
... ... @@ -148,13 +147,13 @@ class Install {
148 147 * verifica suporte a mCrypt; testando se a função mcrypt_generic existe
149 148 */
150 149 if (function_exists('mcrypt_generic')) {
151   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_STATUS', $oTranslator->_('kciq_msg yes'));
  150 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_STATUS', $this->oLang->_('kciq_msg yes'));
152 151 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_CLASS', "SimImg");
153 152 }
154 153 else {
155   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_STATUS', $oTranslator->_('kciq_msg no'));
  154 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_STATUS', $this->oLang->_('kciq_msg no'));
156 155 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_CLASS', "NaoImg");
157   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_HELP', $oTranslator->_('kciq_msg phpmcrypt_help'));
  156 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMCRYPT_HELP', $this->oLang->_('kciq_msg phpmcrypt_help'));
158 157 $lCouldContinue = false;
159 158 }
160 159  
... ... @@ -162,13 +161,13 @@ class Install {
162 161 * verifica suporte a FTP; testando se a função ftp_connect existe
163 162 */
164 163 if (function_exists('ftp_connect')) {
165   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_STATUS', $oTranslator->_('kciq_msg yes'));
  164 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_STATUS', $this->oLang->_('kciq_msg yes'));
166 165 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_CLASS', "SimImg");
167 166 }
168 167 else {
169   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_STATUS', $oTranslator->_('kciq_msg no'));
  168 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_STATUS', $this->oLang->_('kciq_msg no'));
170 169 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_CLASS', "NaoImg");
171   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_HELP', $oTranslator->_('kciq_msg phpftp_help'));
  170 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPFTP_HELP', $this->oLang->_('kciq_msg phpftp_help'));
172 171 $lCouldContinue = false;
173 172 }
174 173  
... ... @@ -177,14 +176,14 @@ class Install {
177 176 */
178 177 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CACIC_MYSQLVERSION', CACIC_DBVERSION);
179 178 if (function_exists('mysql_get_client_info') and (version_compare(mysql_get_client_info(),CACIC_DBVERSION,'>='))) {
180   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_STATUS', $oTranslator->_('kciq_msg yes')." ".mysql_get_client_info());
  179 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_STATUS', $this->oLang->_('kciq_msg yes')." ".mysql_get_client_info());
181 180 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_CLASS', "SimImg");
182 181 }
183 182 else {
184 183 $mysql_version = function_exists('mysql_get_client_info') ? mysql_get_client_info() : "< 4";
185   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_STATUS', $oTranslator->_('kciq_msg no')." ".$mysql_version);
  184 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_STATUS', $this->oLang->_('kciq_msg no')." ".$mysql_version);
186 185 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_CLASS', "NaoImg");
187   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_HELP', $oTranslator->_('kciq_msg phpmysql_help'));
  186 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMYSQL_HELP', $this->oLang->_('kciq_msg phpmysql_help'));
188 187 $lCouldContinue = false;
189 188 }
190 189  
... ... @@ -193,14 +192,14 @@ class Install {
193 192 */
194 193 if ((is_writable(CACIC_CFGFILE_PATH) and !file_exists(CACIC_CFGFILE_PATH.CACIC_DS."config.php")) or
195 194 (file_exists(CACIC_CFGFILE_PATH.CACIC_DS."config.php") and is_writable(CACIC_CFGFILE_PATH.CACIC_DS."config.php"))) {
196   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_STATUS', $oTranslator->_('kciq_msg yes'));
  195 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_STATUS', $this->oLang->_('kciq_msg yes'));
197 196 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_CLASS', "SimImg");
198 197 $_SESSION['saveCfgFile'] = true;
199 198 }
200 199 else {
201   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_STATUS', $oTranslator->_('kciq_msg no'));
  200 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_STATUS', $this->oLang->_('kciq_msg no'));
202 201 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_CLASS', "AvisoImg");
203   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_HELP', $oTranslator->_('kciq_msg phpcfgfile_help'));
  202 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CFGFILE_HELP', $this->oLang->_('kciq_msg phpcfgfile_help'));
204 203 $_SESSION['saveCfgFile'] = false;
205 204 }
206 205  
... ... @@ -219,7 +218,7 @@ class Install {
219 218 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CACIC_PHPRG', $cacicRG);
220 219 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRG_STATUS', $phpRGStatus);
221 220 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRG_CLASS', "NaoImg");
222   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRG_HELP', $oTranslator->_('kciq_msg php_flag_on'));
  221 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRG_HELP', $this->oLang->_('kciq_msg php_flag_on'));
223 222 $lCouldContinue = false;
224 223 }
225 224  
... ... @@ -238,13 +237,13 @@ class Install {
238 237 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'CACIC_PHPRLA', $cacicRLA);
239 238 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_STATUS', $phpRLAStatus);
240 239 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_CLASS', "NaoImg");
241   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_HELP', $oTranslator->_('kciq_msg php_flag_on'));
  240 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_HELP', $this->oLang->_('kciq_msg php_flag_on'));
242 241 $lCouldContinue = false;
243 242 }
244 243 }
245 244 else {
246 245 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_CLASS', "AvisoImg");
247   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_HELP', $oTranslator->_('kciq_msg php_flag_on_advise'));
  246 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPRLA_HELP', $this->oLang->_('kciq_msg php_flag_on_advise'));
248 247 }
249 248  
250 249 /*
... ... @@ -258,12 +257,12 @@ class Install {
258 257 else {
259 258 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMEM_STATUS', ini_get('memory_limit'));
260 259 $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMEM_CLASS', "AvisoImg");
261   - $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMEM_HELP', $oTranslator->_('kciq_msg php_memory_help'));
  260 + $this->oTmpl->addVar('tmplNavBarCheckInstall', 'PHPMEM_HELP', $this->oLang->_('kciq_msg php_memory_help'));
262 261 }
263   - $msgLegenda .= $oTranslator->_('kciq_msg legenda').': <span class="SimImg"> </span> &nbsp;- '.
264   - $oTranslator->_('kciq_msg check_ok').' &nbsp;&nbsp;';
265   - $msgLegenda .= '<span class="NaoImg"> </span> &nbsp;- '.$oTranslator->_('kciq_msg check_notok').' &nbsp;&nbsp;';
266   - $msgLegenda .= '<span class="AvisoImg"> </span> &nbsp;- '.$oTranslator->_('kciq_msg check_advise');
  262 + $msgLegenda .= $this->oLang->_('kciq_msg legenda').': <span class="SimImg"> </span> &nbsp;- '.
  263 + $this->oLang->_('kciq_msg check_ok').' &nbsp;&nbsp;';
  264 + $msgLegenda .= '<span class="NaoImg"> </span> &nbsp;- '.$this->oLang->_('kciq_msg check_notok').' &nbsp;&nbsp;';
  265 + $msgLegenda .= '<span class="AvisoImg"> </span> &nbsp;- '.$this->oLang->_('kciq_msg check_advise');
267 266  
268 267 /*
269 268 * caso possa continuar o processo mostra botao proximo
... ... @@ -271,7 +270,7 @@ class Install {
271 270 if($lCouldContinue)
272 271 $this->oTmpl->addVar('tmplNavBarCheckInstallContinue', 'continuar', true);
273 272 else
274   - $msgLegenda .= '<br /><br /><span class="erro">'.$oTranslator->_('kciq_msg fix_requiriment_help').'</span>';
  273 + $msgLegenda .= '<br /><br /><span class="erro">'.$this->oLang->_('kciq_msg fix_requiriment_help').'</span>';
275 274  
276 275 $this->oTmpl->addVar('tmplStatusBar', 'MSG_STATUS', $msgLegenda);
277 276  
... ... @@ -389,10 +388,10 @@ class Install {
389 388 $buildDBOK = false;
390 389  
391 390 if(!isset($_SESSION['configFileSaved']) or !($_SESSION['configFileSaved']))
392   - $msg .= "<span class='Erro'>Gravação do arquivo de configurações não realizada adequadamente!</span><br>";
  391 + $msg .= "<span class='Erro'>'.$this->oLang->_('kciq_msg inst config file saved').'</span><br>";
393 392 else {
394 393 if(!is_readable($cfgFileName) or ! @include_once($cfgFileName))
395   - $msg .= "<span class='Erro'>Não foi possível ler o arquivo de configurações:</span><br>".$cfgFileName;
  394 + $msg .= "<span class='Erro'>'.$this->oLang->_('kciq_msg inst config file read').':</span><br>".$cfgFileName;
396 395 else
397 396 $cfgFileOk = true;
398 397 }
... ... @@ -400,12 +399,12 @@ class Install {
400 399 if( isset($_SESSION['buildDBOK']) )
401 400 $buildDBOK = $_SESSION['buildDBOK'];
402 401 if(!$buildDBOK)
403   - $msg .= "<span class='Erro'>Construção do banco de dados para o CACIC não realizada adequadamente!</span><br>";
  402 + $msg .= "<span class='Erro'>'.$this->oLang->_('kciq_msg inst database build fail').'</span><br>";
404 403  
405 404 if($cfgFileOk) {
406 405 $oDB = new ADO();
407 406 if (!$oDB->conecta( $ip_servidor, $usuario_bd, $senha_usuario_bd, $nome_bd ))
408   - $msg .= "<span class='Erro'>Não é possível conectar ao banco de dados com os dados do arquivo de configurações!</span><br>";
  407 + $msg .= "<span class='Erro'>'.$this->oLang->_('kciq_msg inst database connect fail').'</span><br>";
409 408 else
410 409 $dbConected = true;
411 410 }
... ...
language/pt_BR/language.pt_BR.inc.php
... ... @@ -15,6 +15,7 @@ pt_BR kciq_msg admin mgm verify pass help
15 15 pt_BR kciq_msg verify geral info Confirmação
16 16 pt_BR kciq_msg build bd instaladorinfo Construir BD
17 17 pt_BR kciq_msg new help instaladorinfo Construir o banco de dados para uma nova instalação do CACIC.
  18 +pt_BR kciq_msg inst database build fail instaladorinfo Construção do banco de dados para o CACIC não realizada adequadamente!
18 19 pt_BR kciq_msg build bd help instaladorinfo Criar banco de dados.
19 20 pt_BR kciq_msg backup geral info Cópia de segurança
20 21 pt_BR kciq_msg admin mgm local instaladorinfo Dados de localização
... ... @@ -32,6 +33,7 @@ pt_BR kciq_msg finish
32 33 pt_BR language_fr Geral info fr Francè
33 34 pt_BR geral Geral TagHeader Geral
34 35 pt_BR kciq_msg savecfgfile instaladorinfo Gravar <i>config.php</i>
  36 +pt_BR kciq_msg inst config file saved instalador Gravação do arquivo de configurações não realizada adequadamente!
35 37 pt_BR kciq_msg inst end hist title instaladorinfo Histórico de alterações no CACIC
36 38 pt_BR kciq_msg ideal instaladorinfo Ideal
37 39 pt_BR language Geral info Idioma
... ... @@ -65,6 +67,7 @@ pt_BR kciq_msg database host help
65 67 pt_BR kciq_msg dbuser help instaladorinfo Nome do usuário para ser usado pelo CACIC para conectar ao banco de dados.
66 68 pt_BR kciq_msg new Geral info Nova
67 69 pt_BR kciq_msg no geral info Não
  70 +pt_BR kciq_msg inst config file read instaladorinfo Não foi possível ler o arquivo de configurações
68 71 pt_BR kciq_msg access level Geral info Nível de acesso
69 72 pt_BR kciq_msg admin mgm phone help instaladorinfo Número do telefone do Administrador do CACIC para contato.
70 73 pt_BR kciq_msg obs geral info Observação
... ... @@ -122,8 +125,9 @@ pt_BR kciq_msg version header
122 125 pt_BR kciq_msg phpversion instaladorinfo Versão do PHP
123 126 pt_BR kciq_msg phpcfgfile_help instaladorinfo Você poderá continuar a instalação e o arquivo poderá (opcionalmente) ser mostrado na tela. Assim, você poderá copiá-lo e colá-lo no devido diretório.
124 127 pt_BR kciq_msg inst end advise file instaladorarquivo inst_end_advise_file.html
  128 +pt_BR kciq_msg features file instaladorarquivo inst_end_features_file.html
125 129 pt_BR kciq_msg inst end hist file instaladorarquivo inst_end_hist_file.html
126 130 pt_BR kciq_installer_introdution instaladorarquivo introducao.html
127 131 pt_BR kciq_msg license en_read instaladorinfo leia em inglês
128 132 pt_BR kciq_msg license pt_read instaladorinfo leia em português
129   -pt_BR kciq_msg features file instaladorarquivo inst_end_features_file.html
  133 +pt_BR kciq_msg inst database connect fail instaladorinfo Não é possível conectar ao banco de dados com os dados do arquivo de configurações!
... ...