Commit 0bf79352c18174dd0d64157f23e18038bfc2b616
1 parent
3dce5c15
Exists in
master
and in
1 other branch
Atualização do "trunk"
- adicionado arquivo de introduçao do instalador para o idioma inglês - correção de erro ao obter idiomas disponíveis - melhorias no código git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@255 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
6 changed files
with
47 additions
and
82 deletions
Show diff stats
admin/tradutor.php
| @@ -12,87 +12,8 @@ else { // Inserir regras para outras verificações (ex: permissões do usuário)! | @@ -12,87 +12,8 @@ else { // Inserir regras para outras verificações (ex: permissões do usuário)! | ||
| 12 | require_once('../include/library.php'); | 12 | require_once('../include/library.php'); |
| 13 | ?> | 13 | ?> |
| 14 | <html> | 14 | <html> |
| 15 | - <head> | ||
| 16 | - <link type="text/css" rel="stylesheet" | ||
| 17 | - href="../bibliotecas/phpTranslator/templates/css/template_css.css" /> | ||
| 18 | - <link type="text/css" rel="stylesheet" | ||
| 19 | - href="../bibliotecas/phpTranslator/templates/js/tabs/tabpane.css" /> | ||
| 20 | - <script type="text/javascript" | ||
| 21 | - src="../bibliotecas/phpTranslator/templates/js/tabs/tabpane_mini.js"> | ||
| 22 | - </script> | ||
| 23 | - </head> | ||
| 24 | <body> | 15 | <body> |
| 25 | <h2><?php echo $oTranslator->_('kciq_mnt_tradutor');?><h2> | 16 | <h2><?php echo $oTranslator->_('kciq_mnt_tradutor');?><h2> |
| 26 | -<!-- | ||
| 27 | - <table class="adminlist" width="100%"> | ||
| 28 | - <tr> | ||
| 29 | - <td>Idioma a traduzir</td> | ||
| 30 | - <td> | ||
| 31 | - <select name="translate_lang"> | ||
| 32 | - <option value="en-us">Inglês (US)</option> | ||
| 33 | - <option value="pt-br">Português brasileiro</option> | ||
| 34 | - <option value="add_lang">Adicionar tradução</option> | ||
| 35 | - </select> | ||
| 36 | - </td> | ||
| 37 | - </tr> | ||
| 38 | - <tr> | ||
| 39 | - <td>Descrição do idioma</td> | ||
| 40 | - <td> | ||
| 41 | - <input class="inputbox" type="text" name="mnt_language[lang]" size="50" maxlength="50" /> | ||
| 42 | - </td> | ||
| 43 | - </tr> | ||
| 44 | - <tr> | ||
| 45 | - <td>Sigla</td> | ||
| 46 | - <td> | ||
| 47 | - <input class="inputbox" type="text" name="mnt_language[lang]" value="pt_BR" size="10" maxlength="10" /> | ||
| 48 | - </td> | ||
| 49 | - </tr> | ||
| 50 | - <tr> | ||
| 51 | - <td valign="top">Conjunto de caracteres</td> | ||
| 52 | - <td valign="top"> | ||
| 53 | - <input class="inputbox" type="text" name="mnt_language[lang]" size="10" maxlength="10" /> | ||
| 54 | - </td> | ||
| 55 | - </tr> | ||
| 56 | - <tr> | ||
| 57 | - <td>Direção da escrita</td> | ||
| 58 | - <td> | ||
| 59 | - <select name="lang_direction"> | ||
| 60 | - <option value="lang_right">Direita para a esquerda</option> | ||
| 61 | - <option value="lang_left">Esquerda para a direita</option> | ||
| 62 | - </select> | ||
| 63 | - </td> | ||
| 64 | - </tr> | ||
| 65 | - <tr> | ||
| 66 | - <td>Versão do CACIC</td> | ||
| 67 | - <td> | ||
| 68 | - <input class="inputbox" type="text" name="mnt_language[type]" value="" size="10" maxlength="10" /> | ||
| 69 | - </td> | ||
| 70 | - </tr> | ||
| 71 | - <tr> | ||
| 72 | - <td>Versão do idioma</td> | ||
| 73 | - <td> | ||
| 74 | - <input class="inputbox" type="text" name="mnt_language[abbr]" value="" size="10" maxlength="10" /> | ||
| 75 | - </td> | ||
| 76 | - </tr> | ||
| 77 | - <tr align="right"> | ||
| 78 | - <td colspan="2"> | ||
| 79 | - <input class="button" type="submit" name="mnt_lang_action[salvar]" value="Save" /> | ||
| 80 | - <input class="button" type="reset" name="reset" value="Reset" /> | ||
| 81 | - </td> | ||
| 82 | - </tr> | ||
| 83 | - <tfoot> | ||
| 84 | - <tr> | ||
| 85 | - | ||
| 86 | - <td colspan="2"> | ||
| 87 | - </td> | ||
| 88 | - </tr> | ||
| 89 | - </tfoot> | ||
| 90 | - </table> | ||
| 91 | - | ||
| 92 | ---> | ||
| 93 | - | ||
| 94 | <?php | 17 | <?php |
| 95 | - | ||
| 96 | $oTranslator->translatorGUI(); | 18 | $oTranslator->translatorGUI(); |
| 97 | - | ||
| 98 | ?> | 19 | ?> |
| 99 | \ No newline at end of file | 20 | \ No newline at end of file |
include/library.php
| @@ -64,7 +64,7 @@ function getLanguages() { | @@ -64,7 +64,7 @@ function getLanguages() { | ||
| 64 | if(is_file($_dir->path.$_valor)) | 64 | if(is_file($_dir->path.$_valor)) |
| 65 | if(findexts($_valor) === 'php' ) { | 65 | if(findexts($_valor) === 'php' ) { |
| 66 | $_file_name = $_valor; | 66 | $_file_name = $_valor; |
| 67 | - @require_once($_dir->path.$_file_name); | 67 | + @require($_dir->path.$_file_name); |
| 68 | $_lang = array_merge($_lang, array($language_abbr => array('abbr' => $language_abbr, | 68 | $_lang = array_merge($_lang, array($language_abbr => array('abbr' => $language_abbr, |
| 69 | 'descr' => $language_def, | 69 | 'descr' => $language_def, |
| 70 | 'charset' => $language_charset, | 70 | 'charset' => $language_charset, |
instalador/ajax.php
| @@ -26,12 +26,25 @@ define('CACIC_PATH', $cacic_path); | @@ -26,12 +26,25 @@ define('CACIC_PATH', $cacic_path); | ||
| 26 | /* | 26 | /* |
| 27 | * atribuições para o ambiente | 27 | * atribuições para o ambiente |
| 28 | */ | 28 | */ |
| 29 | -if( ! @include("../include/define.php") ) | 29 | +if( ! @include("../include/library.php") ) |
| 30 | { | 30 | { |
| 31 | die("Install mal definido (Install miss-defined)!"); | 31 | die("Install mal definido (Install miss-defined)!"); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /* | 34 | /* |
| 35 | + * Idioma selecionado para o CACIC | ||
| 36 | + */ | ||
| 37 | +if(!empty($_POST['translate_lang'])) | ||
| 38 | + $_SESSION['cacic_language'] = $_POST['translate_lang']; | ||
| 39 | +elseif(!isset($_SESSION['cacic_language'])) | ||
| 40 | + $_SESSION['cacic_language'] = CACIC_LANGUAGE; | ||
| 41 | + | ||
| 42 | +/* | ||
| 43 | + * Idioma para os quais o CACIC está traduzido | ||
| 44 | + */ | ||
| 45 | +$_SESSION['cacic_language_available'] = getLanguages(); | ||
| 46 | + | ||
| 47 | +/* | ||
| 35 | * classe para instanciar a instalação | 48 | * classe para instanciar a instalação |
| 36 | */ | 49 | */ |
| 37 | if( ! @include_once("classes/install.ajax.php") ) | 50 | if( ! @include_once("classes/install.ajax.php") ) |
instalador/index.php
| @@ -45,11 +45,19 @@ | @@ -45,11 +45,19 @@ | ||
| 45 | // Conjunto de idiomas para os quais o CACIC está traduzido | 45 | // Conjunto de idiomas para os quais o CACIC está traduzido |
| 46 | $_SESSION['language_set'] = getLanguages(); | 46 | $_SESSION['language_set'] = getLanguages(); |
| 47 | 47 | ||
| 48 | - | 48 | + /* |
| 49 | + * Idioma selecionado para o CACIC | ||
| 50 | + */ | ||
| 49 | if(!empty($_POST['translate_lang'])) | 51 | if(!empty($_POST['translate_lang'])) |
| 50 | $_SESSION['cacic_language'] = $_POST['translate_lang']; | 52 | $_SESSION['cacic_language'] = $_POST['translate_lang']; |
| 51 | elseif(!isset($_SESSION['cacic_language'])) | 53 | elseif(!isset($_SESSION['cacic_language'])) |
| 52 | $_SESSION['cacic_language'] = CACIC_LANGUAGE; | 54 | $_SESSION['cacic_language'] = CACIC_LANGUAGE; |
| 55 | + | ||
| 56 | + /* | ||
| 57 | + * Idioma para os quais o CACIC está traduzido | ||
| 58 | + */ | ||
| 59 | + $_SESSION['cacic_language_available'] = getLanguages(); | ||
| 60 | + | ||
| 53 | /* | 61 | /* |
| 54 | * Inicia tradução para o idioma selecionado | 62 | * Inicia tradução para o idioma selecionado |
| 55 | */ | 63 | */ |
| @@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
| 1 | + <p>CACIC is a computer inventory system. It is a group of software able to allow hardware and software inventory. Initialy developed by Dataprev-ES, but nowdays it has lot of community contributions. | ||
| 2 | + </p><p>The web installer main goal is provide you an easy way for both install and setup CACIC base. See details bellow. | ||
| 3 | + </p><h3><span class="OkImg">Installation steps:</span></h3> | ||
| 4 | + <ol> | ||
| 5 | + <li>Introduction - This page!</li> | ||
| 6 | + <li>License - CACIC License, read and accept is needed.</li> | ||
| 7 | + | ||
| 8 | + <li>Prerequisite - Verify some CACIC-Manager (server) requisites.</li> | ||
| 9 | + <li>Setup - Database sever and basic data configuration.</li> | ||
| 10 | + <li>CACIC-Manager administrator - Add both administrator user and main office (headquarter).</li> | ||
| 11 | + <li>Finish installation - Check the installation process.</li> | ||
| 12 | + </ol> | ||
| 13 | + <h3><span class="OkImg">Installer features:</span></h3> | ||
| 14 | + | ||
| 15 | + <ul> | ||
| 16 | + <li>Verify minimal both softwares and libraries to use CACIC-Manager.</li> | ||
| 17 | + <li>Buil CACIC-Manager database.</li> | ||
| 18 | + <li>Build database tables.</li> | ||
| 19 | + <li>Setup check and build base data for CACIC.</li> | ||
| 20 | + <li>Add database data for CACIC demo (optional).</li> | ||
| 21 | + </ul> | ||
| 22 | + |
language/en_US/language.en_US.inc.php
| @@ -21,6 +21,7 @@ en_US kciq_installerintrotitle | @@ -21,6 +21,7 @@ en_US kciq_installerintrotitle | ||
| 21 | en_US kciq_msg js_enable instaladorinfo <b>JavaScript</b> is needed for web installer process. | 21 | en_US kciq_msg js_enable instaladorinfo <b>JavaScript</b> is needed for web installer process. |
| 22 | en_US kciq_installerresources instaladorinfo Installer features: | 22 | en_US kciq_installerresources instaladorinfo Installer features: |
| 23 | en_US kciq_msg def_version instaladorinfo Version | 23 | en_US kciq_msg def_version instaladorinfo Version |
| 24 | +en_US kciq_installer_introdution instaladorarquivo introduction.html | ||
| 24 | en_US kciq_mnt_lang traducao Manutençãoinfo Language | 25 | en_US kciq_mnt_lang traducao Manutençãoinfo Language |
| 25 | en_US manutenção ManutençãoTagHeader Maintenance | 26 | en_US manutenção ManutençãoTagHeader Maintenance |
| 26 | en_US kciq_mnt_tradutor Manutençãoinfo CACIC Language translate | 27 | en_US kciq_mnt_tradutor Manutençãoinfo CACIC Language translate |