forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Makc666 on December 15, 2005, 10:51:14 pm

Title: No logs created - view_log.php - missing translation
Post by: Makc666 on December 15, 2005, 10:51:14 pm
There is some strange translation error in view_log.php
When you go to viewlog.php file from Config panel, from Logging and statistics section:
1. if you use English language you get message like on screenshot 1. The title of the box is "Information"
http://coppermine-gallery.net/demo/cpg14x/viewlog.php?lang=english
2. if you use Russian language or any other you get message with the title of the box "Error". Screenshot 2.
http://coppermine-gallery.net/demo/cpg14x/viewlog.php?lang=german

When you select:
http://coppermine-gallery.net/demo/cpg14x/viewlog.php?lang=english
Coppermine works with this string from english.php
Code: [Select]
// Some common strings
...
$lang_info = 'Information';

Why it doesn't select proper language string for other languages this is the question.
I couldn't find in the code the proper string.

Code from: english.php

Code: [Select]
// Some common strings
$lang_yes = 'Yes';
$lang_no  = 'No';
$lang_back = 'BACK';
$lang_continue = 'CONTINUE';
$lang_info = 'Information';
$lang_error = 'Error';
$lang_check_uncheck_all = 'check/uncheck all'; //cpg1.4

Code: [Select]
// ------------------------------------------------------------------------- //
// File view_log.php  //cpg1.4
// ------------------------------------------------------------------------- //

if (defined('VIEWLOG_PHP')) $lang_viewlog_php = array(
  'delete_all' => 'Delete All Logs', //cpg1.4
  'delete_this' => 'Delete This Log', //cpg1.4
  'view_logs' => 'View Logs', //cpg1.4
  'no_logs' => 'No logs created.', //cpg1.4
);
Title: Re: No logs created - view_log.php - missing trasnlation
Post by: Nibbler on December 15, 2005, 10:59:51 pm
include/langfallback.inc.php

find

Code: [Select]
$lang_cpg_die_en = cpg_get_default_lang_var('lang_cpg_die','english');
$lang_cpg_die = array_merge($lang_cpg_die_en, $lang_cpg_die);

change to

Code: [Select]
$lang_cpg_die_en = cpg_get_default_lang_var('lang_cpg_die','english');
$lang_cpg_die = isset($lang_cpg_die) ? $lang_cpg_die : $lang_cpg_die_en;
Title: Re: No logs created - view_log.php - missing trasnlation
Post by: Makc666 on December 15, 2005, 11:09:32 pm
include/langfallback.inc.php

find

Code: [Select]
$lang_cpg_die_en = cpg_get_default_lang_var('lang_cpg_die','english');
$lang_cpg_die = array_merge($lang_cpg_die_en, $lang_cpg_die);

change to

Code: [Select]
$lang_cpg_die_en = cpg_get_default_lang_var('lang_cpg_die','english');
$lang_cpg_die = isset($lang_cpg_die) ? $lang_cpg_die : $lang_cpg_die_en;

Thanks. It helped.

Will it be fixed in CVS? ???
Title: Re: No logs created - view_log.php - missing translation
Post by: Nibbler on December 15, 2005, 11:20:35 pm
Already is, that's why it's marked as 'Fixed'.