Skip to content

Commit

Permalink
Miscellaneous : Add spanish (ESP) translation (#353) (Thanks @gvasquezj
Browse files Browse the repository at this point in the history
… !)
  • Loading branch information
MacWarrior committed Apr 7, 2024
1 parent fc9ccd6 commit 0292063
Show file tree
Hide file tree
Showing 10 changed files with 4,485 additions and 15 deletions.
2 changes: 0 additions & 2 deletions upload/admin_area/language_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
}

$restorable_langs = get_restorable_languages($ll);

assign('restore_lang_options', $restorable_langs);
//Get List Of Languages
assign('language_list', $ll);
Assign('msg', $msg);

if (!empty($_GET['edit_language']) && Language::getInstance()->getLangById($_GET['edit_language'])) {

assign('edit_lang', 'yes');
$detail = Language::getInstance()->getLangById($_GET['edit_language']);
assign('lang_details', $detail);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{if count($restore_lang_options) > 0 }
<legend>{lang code='restore_language'}</legend>
<!-- language select option for translation -->
<div class="form-group" >
<form id="formRestore" name="formRestore" method="post">
<div class="row">
Expand Down
1 change: 1 addition & 0 deletions upload/cb_install/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
'language_FRA' => 'language_FRA.sql',
'language_DEU' => 'language_DEU.sql',
'language_POR' => 'language_POR.sql',
'language_ESP' => 'language_ESP.sql',
'ads_placements' => 'ads_placements.sql',
'countries' => 'countries.sql',
'email_templates' => 'email_templates.sql',
Expand Down
2,235 changes: 2,235 additions & 0 deletions upload/cb_install/sql/5.5.1/00013.sql

Large diffs are not rendered by default.

2,235 changes: 2,235 additions & 0 deletions upload/cb_install/sql/language_ESP.sql

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions upload/cb_install/sql/languages.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,6 @@ VALUES ('admin_setting'),
('option_tmdb_get_description'),
('tmdb_search'),
('movie_infos'),
('option_enable_video_actor'),
('option_enable_video_producer'),
('option_enable_video_executive_producer'),
('option_enable_video_director'),
('option_enable_video_crew'),
('option_enable_video_poster'),
('option_enable_video_backdrop'),
('option_tmdb_get_age_restriction'),
Expand Down
3 changes: 2 additions & 1 deletion upload/changelog/551.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version":"5.5.1",
"revision":"12",
"revision":"13",
"status":"dev",
"detail":[
{
Expand All @@ -26,6 +26,7 @@
,"Cleanup code"
,"Fix MySQL8 compatibility"
,"Fix old videos without quality specified"
,"Add spanish (ESP) translation <i>#353</i> (Thanks @gvasquezj !)"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion upload/includes/classes/lang.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ public static function restore_lang($code)
'en' => 'ENG',
'fr' => 'FRA',
'pt-BR' => 'POR',
'de' => 'DEU'
'de' => 'DEU',
'esp' => 'ESP'
];

$path = DirPath::get('sql') . 'language_' . $restorable_langs[$code] . '.sql';
Expand Down
8 changes: 3 additions & 5 deletions upload/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4816,7 +4816,8 @@ function get_restorable_languages(array $list_language = []): array
'en' => 'English',
'fr' => 'Français',
'pt-BR' => 'Portuguesa',
'de' => 'Deutsche'
'de' => 'Deutsche',
'esp' => 'Español'
];

return array_filter($restorable_langs, function ($lang) use ($list_language) {
Expand All @@ -4825,9 +4826,8 @@ function get_restorable_languages(array $list_language = []): array
});
}

function parseAllPHPModules()
function parseAllPHPModules(): array
{

ob_start();
phpinfo(INFO_MODULES);
$s = ob_get_contents();
Expand Down Expand Up @@ -4870,8 +4870,6 @@ function ageRestriction($var) {
return $var;
}



include('functions_db.php');
include('functions_filter.php');
include('functions_player.php');
Expand Down
7 changes: 7 additions & 0 deletions upload/plugins/editors_pick/sql/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SET @language_id_en = (SELECT `language_id` FROM `{tbl_prefix}languages` WHERE l
SET @language_id_fr = (SELECT `language_id` FROM `{tbl_prefix}languages` WHERE language_code = 'fr');
SET @language_id_de = (SELECT `language_id` FROM `{tbl_prefix}languages` WHERE language_code = 'de');
SET @language_id_ptbr = (SELECT `language_id` FROM `{tbl_prefix}languages` WHERE language_code = 'pt-BR');
SET @language_id_esp = (SELECT `language_id` FROM `{tbl_prefix}languages` WHERE language_code = 'esp');

SET @id_language_key = (SELECT id_language_key FROM `{tbl_prefix}languages_keys` WHERE `language_key` = 'plugin_editors_picks');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
Expand Down Expand Up @@ -83,6 +84,8 @@ INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_lang
VALUES (@language_id_de, @id_language_key, 'Zur redaktionellen Auswahl hinzufügen');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
VALUES (@language_id_ptbr, @id_language_key, 'Adicionar à Escolha do Editor');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
VALUES (@language_id_esp, @id_language_key, 'Añadir a la selección del editor');

SET @id_language_key = (SELECT id_language_key FROM `{tbl_prefix}languages_keys` WHERE `language_key` = 'plugin_editors_picks_remove_from');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
Expand All @@ -93,6 +96,8 @@ INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_lang
VALUES (@language_id_de, @id_language_key, 'Von der redaktionellen Auswahl entfernen');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
VALUES (@language_id_ptbr, @id_language_key, 'Remover da Escolha do Editor');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
VALUES (@language_id_esp, @id_language_key, 'Eliminar de la selección del editor');

SET @id_language_key = (SELECT id_language_key FROM `{tbl_prefix}languages_keys` WHERE `language_key` = 'plugin_editors_picks_remove_confirm');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
Expand All @@ -103,3 +108,5 @@ INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_lang
VALUES (@language_id_de, @id_language_key, 'Wollen Sie das ausgewählte Videos wirklich aus der redaktionellen Auswahl entfernen?');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
VALUES (@language_id_ptbr, @id_language_key, 'Tem certeza de que deseja remover os vídeos selecionados da Escolha do Editor?');
INSERT IGNORE INTO `{tbl_prefix}languages_translations` (`language_id`, `id_language_key`, `translation`)
VALUES (@language_id_esp, @id_language_key, '¿Estás seguro de que deseas eliminar los videos seleccionados de la Selección del editor?');

0 comments on commit 0292063

Please sign in to comment.