Skip to content

Commit

Permalink
Merge pull request #29 from valmorflores/internationalization-for-new…
Browse files Browse the repository at this point in the history
…-features

Internationalization for the new features and bugfix about languages
  • Loading branch information
mariuz authored Dec 9, 2020
2 parents c4d7cd4 + cf95a2f commit 4092829
Show file tree
Hide file tree
Showing 20 changed files with 210 additions and 40 deletions.
15 changes: 15 additions & 0 deletions inc/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,21 @@ function get_customize_languages()
'Russian', 'Spanish');
}

// to prevent file not found or case sensitive SO errors
function get_language_file($path = '.' . DIRECTORY_SEPARATOR . 'lang')
{
$fileLang = $path. DIRECTORY_SEPARATOR . (isset($_SESSION['s_cust']['language']) && !empty($_SESSION['s_cust']['language']) && ($_SESSION['s_cust']['language'] != 1) ? $_SESSION['s_cust']['language'] : LANGUAGE).'.inc.php';
if (file_exists($fileLang)){
return $fileLang;
} else {
if (file_exists(strtolower($fileLang))) {
return strtolower($fileLang);
} else {
return $path . DIRECTORY_SEPARATOR . LANGUAGE.'.inc.php';
}
}
}


// this replacement for php's escapeshellarg() is also working on windows
function ibwa_escapeshellarg($str)
Expand Down
2 changes: 1 addition & 1 deletion inc/panel_elements.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ function get_opened_table($name, $title, $url, $curl = '', $cdiv = '')
}

$html .= '<tr><td></td><td><row>
<input type="submit" class="btn btn-danger" name="tb_dropfields" value="Drop selected fields"></row>
<input type="submit" class="btn btn-danger" name="tb_dropfields" value="'.$GLOBALS['button_strings']['DropSelectedFields'].'"></row>
<td></tr>';

$html .= " </table>\n"
Expand Down
2 changes: 1 addition & 1 deletion inc/script_start.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
session_start();
set_error_handler('error_handler');

require './lang/'.(isset($_SESSION['s_cust']['language']) && !empty($_SESSION['s_cust']['language']) && ($_SESSION['s_cust']['language'] != 1) ? $_SESSION['s_cust']['language'] : LANGUAGE).'.inc.php';
require get_language_file('./lang/');
require './inc/session.inc.php';
require './inc/firebird.inc.php';
require './inc/panel_elements.inc.php';
Expand Down
2 changes: 1 addition & 1 deletion inc/xml_http_request_server.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
session_start();
localize_session_vars();

require '../lang/'.(isset($s_cust['language']) && !empty($s_cust['language']) && ($s_cust['language'] != 1) ? $s_cust['language'] : LANGUAGE).'.inc.php';
require get_language_file('../lang');

$dbhandle = db_connect();

Expand Down
13 changes: 13 additions & 0 deletions lang/Czech.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'nahoru',
'Bottom' => 'konec',
'Down' => 'dolů',
'tb_selector' => 'Tables selector',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Nastavit výchozí hodnoty',
'Load' => 'Nahrát',
'Unmark' => 'Zrušit označení',
'DropSelectedFields' => 'Drop selected fields',
'OpenSelectableMode' => 'Open selectable mode',
'DropSelectedTables' => 'Drop selected tables',
);

// strings on the database page
Expand Down Expand Up @@ -174,6 +178,13 @@
'OnDelete' => 'Při odstranění',
'Table1' => 'Tabulka',
'Column1' => 'Sloupec',
'DropManyColTitle' => 'Drop columns from table',
'TablesActionsTitle' => 'Actions',
'WarningManyTables' => 'The actions selected here affects many tables. Make a backup before running this feature.',
'Records' => 'Records',
'FormTableSelector' => 'Table Selector',
'DropManyTables' => 'Drop tables from database',
'SQLCommand' => 'SQL Command:',
);

// strings on the accessories page
Expand Down Expand Up @@ -472,6 +483,8 @@
'CREATE_DB_SUCCESS' => "Úspěšně vytvořena databáze %s. \n",
'HAVE_DEPENDENCIES' => 'Budete muset odstranit následující objekty, chcete-li odstranit %1$s %2$s: %3$s',
'COOKIES_NEEDED' => 'Musíte povolit soubory cookies v nastavení vašeho prohlížeče, pokud chcete používat uživatelská nastavení!',
'CONFIRM_MANY_TABLES_DELETE' => 'Do you want to permanently remove these tables?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Do you want to permanently remove these columns from the table?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "Pole typu blob jsou v tabulce, kterou jste vybrali, vynechána. <br>\n"
Expand Down
17 changes: 15 additions & 2 deletions lang/Portuguese, Brazilian.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'topo',
'Bottom' => 'rodapé',
'Down' => 'para baixo',
'tb_selector' => 'Seletor de tabelas',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Definir padrões',
'Load' => 'Carregar',
'Unmark' => 'Desmarcar',
'DropSelectedFields' => 'Apagar campos selecionados',
'OpenSelectableMode' => 'Abrir modo de seleção de tabelas',
'DropSelectedTables' => 'Apagar tabelas selecionadas',
);

// strings on the database page
Expand Down Expand Up @@ -174,6 +178,13 @@
'OnDelete' => 'On Delete',
'Table1' => 'Table',
'Column1' => 'Column',
'DropManyColTitle' => 'Remover colunas da tabela',
'TablesActionsTitle' => 'Ações',
'WarningManyTables' => 'As ações disponíveis aqui afetam várias tabelas. Faça um backup antes de realizar alguma ação.',
'Records' => 'Registros',
'FormTableSelector' => 'Tabelas selecionáveis',
'DropManyTables' => 'Remover as tabelas do banco de dados',
'SQLCommand' => 'Comando SQL:',
);

// strings on the accessories page
Expand Down Expand Up @@ -467,18 +478,20 @@
'CONFIRM_SP_DELETE' => 'Você realmente deseja apagar a stored procedure %s?',
'CONFIRM_VIEW_DELETE' => 'Do you really want to delete the view %s?',
'CONFIRM_UDF_DELETE' => 'Do you really want to delete the function %s?',
'CONFIRM_EXC_DELETE' => 'Do you really want to delete the exception %s?',
'CONFIRM_EXC_DELETE' => 'Do you really want to delete the exception %s?',
'NO_VIEW_SUPPORT' => "Editar ou apagar a partir de Views não é atualmente possível.<br>\n",
'CREATE_DB_SUCCESS' => "Banco de Dados %s criado com sucesso.\n",
'HAVE_DEPENDENCIES' => 'Você precisa apagar os seguintes objetos antes de apagar %1$s %2$s: %3$s',
'COOKIES_NEEDED' => 'You have to enable cookies in your browser settings if you want to use the customizing feature!',
'CONFIRM_MANY_TABLES_DELETE' => 'Você deseja remover permanentemente estas tabelas do banco de dados?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Você deseja remover permanentemente estas colunas da tabela?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "Os campos Blob na tabela que você selecionou estão omitidos.<br>\n"
."Somente exportação de Blobs do tipo texto são suportados na exportação csv.<br>\n",
'CAN_NOT_IMPORT_BLOBS' => "The blob fields in the table you have selected are omitted.<br>\n"
."Somente a importação de Blobs texto é possível no csv.<br>\n",
'SELECT_TABLE_FIRST' => "Por favor selecione uma tablea primeiro<br>\n",
'SELECT_TABLE_FIRST' => "Por favor selecione uma tabela primeiro<br>\n",
'SELECT_FILE_FIRST' => "Por favor selecione um arquivo de importação primeiro<br>\n",
'CAN_NOT_ALTER_DOMAINS' => "Alteração de colunas baseadas em domínios não é possível com o Firebird.<br>\n"
."Ao invés disto mude a definição do domínio na página Acessórios.<br>\n",
Expand Down
15 changes: 14 additions & 1 deletion lang/Romanian.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'top',
'Bottom' => 'bottom',
'Down' => 'down',
'tb_selector' => 'Tables selector',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Setări implicite',
'Load' => 'Load',
'Unmark' => 'Unmark',
'DropSelectedFields' => 'Drop selected fields',
'OpenSelectableMode' => 'Open selectable mode',
'DropSelectedTables' => 'Drop selected tables',
);

// strings on the database page
Expand Down Expand Up @@ -174,7 +178,14 @@
'OnDelete' => 'On Delete',
'Table1' => 'Table',
'Column1' => 'Column',
);
'DropManyColTitle' => 'Drop columns from table',
'TablesActionsTitle' => 'Actions',
'WarningManyTables' => 'The actions selected here affects many tables. Make a backup before running this feature.',
'Records' => 'Records',
'FormTableSelector' => 'Table Selector',
'DropManyTables' => 'Drop tables from database',
'SQLCommand' => 'SQL Command:',
);

// strings on the accessories page
$acc_strings = array('CreateIdx' => 'Create New Index',
Expand Down Expand Up @@ -472,6 +483,8 @@
'CREATE_DB_SUCCESS' => "Database %s is successfully created.\n",
'HAVE_DEPENDENCIES' => 'You have to delete the following objects before you can delete the %1$s %2$s: %3$s',
'COOKIES_NEEDED' => 'You have to enable cookies in your browser settings if you want to use the customizing feature!',
'CONFIRM_MANY_TABLES_DELETE' => 'Do you want to permanently remove these tables?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Do you want to permanently remove these columns from the table?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "The blob fields in the table you have selected are omitted.<br>\n"
Expand Down
13 changes: 13 additions & 0 deletions lang/Russian.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'верх',
'Bottom' => 'низ',
'Down' => 'ниже',
'tb_selector' => 'Tables selector',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Восстановить значения по умолчанию',
'Load' => 'Загрузить',
'Unmark' => 'Снять отметку',
'DropSelectedFields' => 'Drop selected fields',
'OpenSelectableMode' => 'Open selectable mode',
'DropSelectedTables' => 'Drop selected tables',
);

// strings on the database page
Expand Down Expand Up @@ -174,6 +178,13 @@
'OnDelete' => 'При удалении',
'Table1' => 'Таблица',
'Column1' => 'Столбец',
'DropManyColTitle' => 'Drop columns from table',
'TablesActionsTitle' => 'Actions',
'WarningManyTables' => 'The actions selected here affects many tables. Make a backup before running this feature.',
'Records' => 'Records',
'FormTableSelector' => 'Table Selector',
'DropManyTables' => 'Drop tables from database',
'SQLCommand' => 'SQL Command:',
);

// strings on the accessories page
Expand Down Expand Up @@ -472,6 +483,8 @@
'CREATE_DB_SUCCESS' => "База Данных %s была успешно создана.\n",
'HAVE_DEPENDENCIES' => 'Вы должны удалить следующие объекты прежде чем вы сможете удалить %1$s %2$s: %3$s',
'COOKIES_NEEDED' => 'Если вы хотите использовать возможности личной настройки нужно разрешить использование cookies в настройках вашего браузера.',
'CONFIRM_MANY_TABLES_DELETE' => 'Do you want to permanently remove these tables?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Do you want to permanently remove these columns from the table?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "В выбранной вами таблице опущены blob-поля.<br>\n"
Expand Down
13 changes: 13 additions & 0 deletions lang/dutch.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'Top',
'Bottom' => 'Bodem',
'Down' => 'Neer',
'tb_selector' => 'Tables selector',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Als standaard zetten',
'Load' => 'Laden',
'Unmark' => 'Markering verwijderen',
'DropSelectedFields' => 'Drop selected fields',
'OpenSelectableMode' => 'Open selectable mode',
'DropSelectedTables' => 'Drop selected tables',
);

// strings on the database page
Expand Down Expand Up @@ -174,6 +178,13 @@
'OnDelete' => 'On Delete',
'Table1' => 'Table',
'Column1' => 'Column',
'DropManyColTitle' => 'Drop columns from table',
'TablesActionsTitle' => 'Actions',
'WarningManyTables' => 'The actions selected here affects many tables. Make a backup before running this feature.',
'Records' => 'Records',
'FormTableSelector' => 'Table Selector',
'DropManyTables' => 'Drop tables from database',
'SQLCommand' => 'SQL Command:',
);

// strings on the accessories page
Expand Down Expand Up @@ -472,6 +483,8 @@
'CREATE_DB_SUCCESS' => "Databank %s met succes aangemaakt.\n",
'HAVE_DEPENDENCIES' => 'U moet de volgende objecten verwijdern alvorens u %1$s %2$s: %3$s',
'COOKIES_NEEDED' => 'You have to enable cookies in your browser settings if you want to use the customizing feature!',
'CONFIRM_MANY_TABLES_DELETE' => 'Do you want to permanently remove these tables?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Do you want to permanently remove these columns from the table?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "De blob velden die u geselecteerd hebt werden genegeerd.<br>\n"
Expand Down
15 changes: 14 additions & 1 deletion lang/english.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'top',
'Bottom' => 'bottom',
'Down' => 'down',
'tb_selector' => 'Tables selector',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Set Defaults',
'Load' => 'Load',
'Unmark' => 'Unmark',
'DropSelectedFields' => 'Drop selected fields',
'OpenSelectableMode' => 'Open selectable mode',
'DropSelectedTables' => 'Drop selected tables',
);

// strings on the database page
Expand Down Expand Up @@ -174,6 +178,13 @@
'OnDelete' => 'On Delete',
'Table1' => 'Table',
'Column1' => 'Column',
'DropManyColTitle' => 'Drop columns from table',
'TablesActionsTitle' => 'Actions',
'WarningManyTables' => 'The actions selected here affects many tables. Make a backup before running this feature.',
'Records' => 'Records',
'FormTableSelector' => 'Table Selector',
'DropManyTables' => 'Drop tables from database',
'SQLCommand' => 'SQL Command:',
);

// strings on the accessories page
Expand Down Expand Up @@ -471,7 +482,9 @@
'NO_VIEW_SUPPORT' => "Editing and deleting from views is not supported up to now.<br>\n",
'CREATE_DB_SUCCESS' => "Database %s is successfully created.\n",
'HAVE_DEPENDENCIES' => 'You have to delete the following objects before you can delete the %1$s %2$s: %3$s',
'COOKIES_NEEDED' => 'You have to enable cookies in your browser settings if you want to use the customizing feature!',
'COOKIES_NEEDED' => 'You have to enable cooies in your browser settings if you want to use the customizing feature!',
'CONFIRM_MANY_TABLES_DELETE' => 'Do you want to permanently remove these tables?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Do you want to permanently remove these columns from the table?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "The blob fields in the table you have selected are omitted.<br>\n"
Expand Down
13 changes: 13 additions & 0 deletions lang/german.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'Top' => 'nach oben',
'Bottom' => 'nach unten',
'Down' => 'runter',
'tb_selector' => 'Tables selector',
);

// strings to inscribe buttons
Expand Down Expand Up @@ -101,6 +102,9 @@
'Defaults' => 'Voreinstellungen setzen',
'Load' => 'Laden',
'Unmark' => 'Demarkieren',
'DropSelectedFields' => 'Drop selected fields',
'OpenSelectableMode' => 'Open selectable mode',
'DropSelectedTables' => 'Drop selected tables',
);

// strings on the database page
Expand Down Expand Up @@ -174,6 +178,13 @@
'OnDelete' => 'On Delete',
'Table1' => 'Tabelle',
'Column1' => 'Feld',
'DropManyColTitle' => 'Drop columns from table',
'TablesActionsTitle' => 'Actions',
'WarningManyTables' => 'The actions selected here affects many tables. Make a backup before running this feature.',
'Records' => 'Records',
'FormTableSelector' => 'Table Selector',
'DropManyTables' => 'Drop tables from database',
'SQLCommand' => 'SQL Command:',
);

// strings on the accessories page
Expand Down Expand Up @@ -472,6 +483,8 @@
'CREATE_DB_SUCCESS' => "Die Datenbank %s wurde erfolgreich erstellt.\n",
'HAVE_DEPENDENCIES' => 'Die folgenden Datenbankobjekte müssen gelöscht werden, bevor %1$s %2$s gelöscht werden kann: %3$s',
'COOKIES_NEEDED' => 'Die Benutzereinstellungen können nur verwendet werden, wenn in den Browser-Einstellungen die Annahme von Cookies erlaubt ist!',
'CONFIRM_MANY_TABLES_DELETE' => 'Do you want to permanently remove these tables?',
'CONFIRM_MANY_COLUMNS_DELETE' => 'Do you want to permanently remove these columns from the table?',
);

$WARNINGS = array('CAN_NOT_EXPORT_BLOBS' => "Ein oder mehrere Blob-Felder in der ausgewählten Tabelle werden übergangen.<br>\n"
Expand Down
Loading

0 comments on commit 4092829

Please sign in to comment.