Recent Topics

Solution to 10 buggy files (not critical) in 1.10.2 Florida

Started by on Jul 24, 2007 – Contents updated: Jul 24, 2007

Jul 24, 2007 13:52    

[u]Related to: b2evolution 1.10.2 "Florida"[/u]

[u]Introduction[/u]

Due I need the Spanish [es_ES] language pack for this version of b2evo and I can't find them, I thought that to correct a previous version he would be simpler and thus I have done it. But, during the tests, I saw that several messages continue appearing in English, which is enough annoying for me. After verify source files, I saw that some messages (those that they appeared in English), did not have the declaration of habitual 'T_ ()' function in front of the message.

In addition, when using the “Editor” in “Expert” mode, I could observe that some buttons had incorrect aid text (tooltip), and some the 'AccelKey' duplicate in another button. You can test this beaviour in the current b2evolution demo site.
[list]The tooltip of 'b' button (Bold), was declared as 'STRong [Alt-B]', the same as tooltip of 'str' button, and the same 'AccelKey'.[/list:u][list]The tooltip of 'i' button (Italic), was declared as 'EMphasis [ALT-I], the same as tooltip of 'em' button, but different 'AccelKey'.[/list:u][list]The tooltip of 'block' button (Blockquote), was declared with the same 'AccelKey' that the button 'b' (Alt-B).[/list:u]After patching the 'Editor' buttons, work/look as:
[list]The 'b' button tooltip says: 'Bold [Alt-B]' and his 'AccelKey' work fine.[/list:u][list]The 'i' button tooltip says: 'Italic [Alt-I]' and his 'AccelKey' work fine.[/list:u][list]The 'block' button tooltip says: 'BLOCKQUOTE [Alt-Q]' and his CHANGED 'AccelKey' work fine.[/list:u][list]The '!NP' button tooltip says: 'next page [Alt-N]'' and his CHANGED 'AccelKey' work fine.[/list:u]This patch solves the problems, allowing an almost (see note bellow) complete translation to any language due to I have corrected the original 'messages.pot' template file in addition to the php source files to add the lacked functions and correct the mistake with the buttons of the 'Editor'.

I have test all the changes in local and remote server and all run fine, but these are minimal changes and I did not wait for any problem.

NOTE: Due to I don't use the 'MT Migration Tool' and of which this one don't have the pertinent messages in the 'messages.pot' template file, it is not possible to translate it at the moment.

[u]Modified files and where, related to 'Editor' in 'Expert' mode because there are some mistakes with the buttons and buttons tooltips.[/u]

File ./plugins\_quicktags.plugin.php on line 98, changed to:

Code

,'<?php echo T_('Bold [Alt-B]') ?>'

File ./plugins/_quicktags.plugin.php on line 106, changed to:

Code

,'<?php echo T_('Italic [Alt-I]') ?>'

File ./plugins/_quicktags.plugin.php on line 145, changed to:

Code

,'q'

File ./plugins/_quicktags.plugin.php on line 146, changed to:

Code

,'<?php echo T_('BLOCKQUOTE [Alt-Q]') ?>'

File ./plugins/_quicktags.plugin.php on line 220, changed to:

Code

,'n'

File ./plugins/_quicktags.plugin.php on line 221, changed to:

Code

,'<?php echo T_('next page [Alt-N]') ?>'

[u]Modified files and where, because it is impossible to translate them by lack of the T_() functions.[/u]

File ./inc/VIEW/files/_files_browse.inc.php on line 940, changed to:

Code

...ceFM'), T_('Always show the Filemanager'), T_('Display the Filemanager also in modes like upload.') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 104, changed to:

Code

...'chart_data' ][ 1 ], T_('Refering searches') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 105, changed to:

Code

...'chart_data' ][ 2 ], T_('Referers') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 106, changed to:

Code

...'chart_data' ][ 3 ], T_('Direct accesses') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 107, changed to:

Code

...'chart_data' ][ 4 ], T_('Self referred') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 108, changed to:

Code

...'chart_data' ][ 5 ], T_('Special referrers') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 109, changed to:

Code

...'chart_data' ][ 6 ], T_('Referer spam') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 110, changed to:

Code

...'chart_data' ][ 7 ], T_('Admin') );

File ./inc/VIEW/sessions/_stats_browserhits.view.php on line 145, changed to:

Code

'text'     => T_('Browser hits'), // Needs UTF-8

File ./inc/VIEW/sessions/_stats_referers.view.php on line 135, changed to:

Code

..._data' ][ 1 ][ 0 ] = T_('Top referers'); // Needs UTF-8

File ./inc/VIEW/sessions/_stats_referers.view.php on line 147, changed to:

Code

..._data' ][ 0 ][ $count ] = T_('Others'); // Needs UTF-8

File ./inc/VIEW/sessions/_stats_referers.view.php on line 185, changed to:

Code

'text'     => T_('Top referers'),

File ./inc/VIEW/sessions/_stats_robots.view.php on line 73, changed to:

Code

array_unshift( $chart[ 'chart_data' ][ 1 ], T_('Robot hits' );  // Translations need to be UTF-8

File ./inc/VIEW/sessions/_stats_robots.view.php on line 108, changed to:

Code

'text'     => T_('Robot hits'), // Needs UTF-8

File ./inc/VIEW/sessions/_stats_summary.view.php on line 93, changed to:

Code

array_unshift( $chart[ 'chart_data' ][ 1 ], T_('XML (RSS/Atom)') );

File ./inc/VIEW/sessions/_stats_summary.view.php on line 94, changed to:

Code

array_unshift( $chart[ 'chart_data' ][ 2 ], T_('Robots') );

File ./inc/VIEW/sessions/_stats_summary.view.php on line 95, changed to:

Code

array_unshift( $chart[ 'chart_data' ][ 3 ], T_('Browsers') );  // Translations need to be UTF-8

File ./inc/VIEW/sessions/_stats_summary.view.php on line 96, changed to:

Code

array_unshift( $chart[ 'chart_data' ][ 4 ], 'Unknown' );

File ./inc/VIEW/sessions/_stats_summary.view.php on line 131, changed to:

Code

'text'     => T_('Global hits'), // Needs UTF-8

File ./inc/VIEW/sessions/_stats_syndication.view.php on line 72, changed to:

Code

array_unshift( $chart[ 'chart_data' ][ 1 ], T_('XML (RSS/Atom) hits') );  // Translations need to be UTF-8

File ./inc/VIEW/sessions/_stats_syndication.view.php on line 107, changed to:

Code

'text'     => T_('XML hits'), // Needs UTF-8

File ./inc/CONTROL/settings/locales.php on line 202, changed to:

Code

$AdminUI->append_to_titlearea( T_('Extracting language file for ').$edit_locale.'...' );

File ./inc/CONTROL/settings/locales.php on line 214, changed to:

Code

$Messages->add( sprintf( T_('The file &laquo;%s&raquo; is not writable.'), $outfile ) );

[u]Changes in the .POT file[/u]

Aside from the changes in the previous files, also I have modified the 'messages.pot' template file to reflect the conducted changes and thus have the new messages in any future translation.

[u]BONUS[/u]

I am including the complete directory corresponding to my Spanish translation with the 'messages.po' file and the '_global.php' file generated by b2evolution. The 'messages.po' generated in formal mode as recommended by the dev Team with charset in 'ISO-8859-1, due 'UTF-8' fail to render OK some entitys and all the special characters escaped with '&wathever;' notation.

[u]INSTALL[/u]

The compressed file, contains the modified files located in its corresponding directories, simply copy the archives to he himself directory of your installation overwriting the previous ones, although I RECOMMEND TO MAKE FIRST BACKUP COPY or at least save the original affected files to a safe location before install.

[u]FINAL NOTE[/u]

Due the forum don't permit to upload more than 256Kb files I need to split the original file, to 'Florida_pacth.tar.gz' and the one with the Spanish translation 'directory_es_ES.tar.gz.

Hope this help
Ramon


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.