You are not logged in.
- Topics: Active | Unanswered
#1 2010-01-12 20:00:33
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
FluxBB 1.4-RC1 administration localisation
Hello,
Based on Paul's great work, the following package localize the administration files and give the opportunity to translate the Managing side of this application. Now that this modification has been tested on my local board, it's time to let other users test it. I give you below the link to download the package. Please read the readme.txt file to learn how to install this mod and what will be modified on a standard 1.4-RC1 installation.
Download the Administration localization
[Date: 2010-01-22 |Translations: French and German]
Since the administration has been now localised, there'sno need to maintain this mod. You can now find some language packages on the following svn checkout or download page : http://code.google.com/p/jojaba-code/ [Edited: 2010/03/05]
A few words about what I did to build this package :
Based on Paul's package (published for 1.4Beta2)
Updated the administration files to version 1.4-RC1
Fixed some typos, missing string localization
Making work the Main menu (left) localization (it didn't work on Paul's Package)
Localized the Plugin example
Provided the French translation
German translation provided by cyberman
Code located and available here
Feedback and comments welcome ;)
Thanks
Last edited by jojaba (2010-03-05 22:07:44)
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#2 2010-01-13 07:22:36
- Mpok
- Member

- From: France
- Registered: 2008-05-12
- Posts: 302
Re: FluxBB 1.4-RC1 administration localisation
Nice. Thx Jojoba.
Will test it next week..
Offline
#3 2010-01-13 13:33:41
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 184
- Website
Re: FluxBB 1.4-RC1 administration localisation
I'm currently translating it to german ...
Offline
#4 2010-01-13 13:41:03
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
I'm currently translating it to german ...
Great ! Don't hesitate to give us feedback as soon as you tested it ![]()
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#5 2010-01-13 17:02:01
- adaur
- Member

- From: France
- Registered: 2010-01-07
- Posts: 445
Re: FluxBB 1.4-RC1 administration localisation
I've tested those files, everything work perfectly !
Good job jojaba ![]()
Please excuse my bad english, I'm french
.
Online
#6 2010-01-14 12:23:25
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
Just something I wanted to ask to the devs. I saw that the admin menu on the left is included in the several administration pages by using a function. That's why the localisation didn't work, I had to add the following line into the generate_admin_menu() function located in /include/common_admin.php file :
// Load the admin_common.php language file
require dirname(__FILE__).'/../lang/'.$pun_user['language'].'/admin_common.php';This wouldn't be required if the menu would be direktly included into the page (without using a function, like an HTML code), I'm sure (almost) the ability to recognize the page loaded can also be done without a function. I didn't looked to it very far, but I wanted to expose this, to have a developper opinion ![]()
Last edited by jojaba (2010-01-14 12:24:24)
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#7 2010-01-14 12:31:16
- Franz
- Lead developer

- From: Germany
- Registered: 2008-05-13
- Posts: 3,755
- Website
Re: FluxBB 1.4-RC1 administration localisation
It's done this way because otherwise the menu HTML (and PHP code) would have to be in every single admin file, which is bad practice, (not only) because refactoring (changing the code somehow) would be a real pain to do.
Also: the code you posted is unnecessary, it's easier to just add
global $lang_admin_common;Offline
#8 2010-01-14 14:48:17
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
Also: the code you posted is unnecessary, it's easier to just add
global $lang_admin_common;
Sorry but this doesn't work !
I did this (beginning of the common_admin.php file) :
<?php
/*---
Copyright (C) 2008-2009 FluxBB.org
based on code copyright (C) 2002-2005 Rickard Andersson
License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
---*/
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
exit;
//
// Display the admin navigation menu
//
function generate_admin_menu($page = '')
{
global $pun_config, $pun_user, $lang_admin_common;
$is_admin = $pun_user['g_id'] == PUN_ADMIN ? true : false;
?>Inserted the $lang_admin_common variable in the global variables list ![]()
Last edited by jojaba (2010-01-14 14:48:44)
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#9 2010-01-14 15:18:11
- Paul
- Developer
- From: Wales, UK
- Registered: 2008-04-27
- Posts: 1,623
Re: FluxBB 1.4-RC1 administration localisation
<?php
/*---
Copyright (C) 2008-2009 FluxBB.org
based on code copyright (C) 2002-2005 Rickard Andersson
License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
---*/
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
exit;
// Load the admin_common.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/admin_common.php';
//
// Display the admin navigation menu
//
function generate_admin_menu($page = '')
{
global $pun_config, $pun_user, $lang_admin_common;
$is_admin = $pun_user['g_id'] == PUN_ADMIN ? true : false;
?>Now remove the include $lang_admin_common from the other files. It should automatically be included in all of them via the include of common_admin.php.
Or is there a problem with the defining of PUN_ROOT ?
The only thing worse than finding a bug is knowing I created it in the first place.
Offline
#10 2010-01-14 15:30:44
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
<?php /*--- Copyright (C) 2008-2009 FluxBB.org based on code copyright (C) 2002-2005 Rickard Andersson License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher ---*/ // Make sure no one attempts to run this script "directly" if (!defined('PUN')) exit; // Load the admin_common.php language file require PUN_ROOT.'lang/'.$pun_user['language'].'/admin_common.php'; // // Display the admin navigation menu // function generate_admin_menu($page = '') { global $pun_config, $pun_user, $lang_admin_common; $is_admin = $pun_user['g_id'] == PUN_ADMIN ? true : false; ?>Now remove the include $lang_admin_common from the other files. It should automatically be included in all of them via the include of common_admin.php.
Or is there a problem with the defining of PUN_ROOT ?
I tried several solutions. Also this one. The problem is that this isn't take in account in the function generate_admin_menu() function. About the path, on my local installation PUN_ROOT = ./ so as we are in include folder, the PUN_ROOT constant is not good (but maybe I must set it to an absolute path (http://localhost/fluxbb. ?)
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#11 2010-01-14 16:23:43
- Paul
- Developer
- From: Wales, UK
- Registered: 2008-04-27
- Posts: 1,623
Re: FluxBB 1.4-RC1 administration localisation
Have you tried including the admin langauge files before including common_admin.php in the admin files. That should make it available to the function if declared to be global. Since common_admin.php is just functions and does nothing else by way of setting up admin or error checking it shouldn't be a problem. E.g.
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
// Load the admin language files
require PUN_ROOT.'lang/'.$pun_user['language'].'/admin_common.php';
require PUN_ROOT.'lang/'.$pun_user['language'].'/admin_censoring.php';
// Load Common Admin Functions
require PUN_ROOT.'include/common_admin.php';
if (!$pun_user['is_admmod'])
message($lang_common['No permission']);The only thing worse than finding a bug is knowing I created it in the first place.
Offline
#12 2010-01-14 16:53:26
- Franz
- Lead developer

- From: Germany
- Registered: 2008-05-13
- Posts: 3,755
- Website
Re: FluxBB 1.4-RC1 administration localisation
I tried several solutions. Also this one. The problem is that this isn't take in account in the function generate_admin_menu() function. About the path, on my local installation PUN_ROOT = ./ so as we are in include folder, the PUN_ROOT constant is not good (but maybe I must set it to an absolute path (http://localhost/fluxbb. ?)
Yes, it should work. PUN_ROOT must be the path to root from the file that is called, not the file where it is used to include something. The problem probably was that you hadn't used global in the function in that case (I'm guessing here...)!?
Last edited by Franz (2010-01-14 16:53:58)
Offline
#13 2010-01-14 21:22:15
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
I don't know what I've done, but now the solution to set the $lang_admin_common variable to global in the function works !
I apologize for all troubles I made, sorry for wasting your time (you must be very patient with me, php coding is only my hobby !
).
Could the users testing the admin pack also test this in /include/common_admin.php file ?
Delete the lines :
// Load the admin_common.php language file
require dirname(__FILE__).'/../lang/'.$pun_user['language'].'/admin_common.php';And add the $lang_admin_common variable to the glaobal variables :
function generate_admin_menu($page = '')
{
global $pun_config, $pun_user, $lang_admin_common;
$is_admin = $pun_user['g_id'] == PUN_ADMIN ? true : false;
...Thanks
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#14 2010-01-15 12:00:43
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
I don't know what I've done, but now the solution to set the $lang_admin_common variable to global in the function works !
I apologize for all troubles I made, sorry for wasting your time (you must be very patient with me, php coding is only my hobby !).
Could the users testing the admin pack also test this in /include/common_admin.php file ?
Delete the lines :// Load the admin_common.php language file require dirname(__FILE__).'/../lang/'.$pun_user['language'].'/admin_common.php';And add the $lang_admin_common variable to the glaobal variables :
function generate_admin_menu($page = '') { global $pun_config, $pun_user, $lang_admin_common; $is_admin = $pun_user['g_id'] == PUN_ADMIN ? true : false; ...Thanks
Is that the best solution ? It was the easiest and quieckiest for me but that won't mean that it is the best one ! Is one of the solutions (here or here) provided by Paul better ? Using one of these propositions will avoid to modify the /include/common_admin.php file that's a good point I think. What do you think ?
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#15 2010-01-15 13:07:16
- Paul
- Developer
- From: Wales, UK
- Registered: 2008-04-27
- Posts: 1,623
Re: FluxBB 1.4-RC1 administration localisation
Whatever you do you will have to modify common_admin.php because the function must have $lang_admin_common in its list of globals.
The only thing worse than finding a bug is knowing I created it in the first place.
Offline
#16 2010-01-15 15:13:34
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
Whatever you do you will have to modify common_admin.php because the function must have $lang_admin_common in its list of globals.
OK, thanks for that reply Paul, so this point is resolved ![]()
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#17 2010-01-19 09:47:58
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 184
- Website
Re: FluxBB 1.4-RC1 administration localisation
Great ! Don't hesitate to give us feedback as soon as you tested it
Uff, german translation was a big job - but it's ready now.
But on my testing I've trouble with special chars - it seems there's something not utf-8
head entry says utf-8
Source code looks like utf-8
But the browsers does not show special chars :-/ ...
Any ideas?
Last edited by cyberman (2010-01-19 09:48:29)
Offline
#18 2010-01-19 09:49:36
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,117
- Website
Re: FluxBB 1.4-RC1 administration localisation
Make sure the file is being saved as UTF-8.
Offline
#19 2010-01-20 11:28:12
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 184
- Website
Re: FluxBB 1.4-RC1 administration localisation
Thanx Smartys - this points me to the right direction!
Never had trouble with file encoding - only some files were encodet with ANSI (windows). After saving with utf-8 it works ... but on my tests I've find some untranslated strings too in admin_prune.php, admin_groups.php and admin_forums.php.
Maybe someone can check it
Last edited by cyberman (2010-01-20 11:29:38)
Offline
#20 2010-01-21 11:22:10
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 184
- Website
Re: FluxBB 1.4-RC1 administration localisation
@Developer
Is there a chance to add this work into version 1.4 (or later)?
I ask me why this feature was not requested earlier
...
Offline
#21 2010-01-21 11:34:07
- Franz
- Lead developer

- From: Germany
- Registered: 2008-05-13
- Posts: 3,755
- Website
Re: FluxBB 1.4-RC1 administration localisation
Not going to happen. There is a (slight) chance of this happening later, but the main problem is backwards compatibility, so that we might (probably not, except if the community can help us a lot) offer another version for those that don't care about backwards compatibility. But that's another version and thus, more work again.
Offline
#22 2010-01-21 11:56:33
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 184
- Website
Re: FluxBB 1.4-RC1 administration localisation
Hmm, that's too bad ... hard working/translating some days with not a real result
.
OK, so I have a fully localized admin panel only for "my" forum users
.
Offline
#23 2010-01-21 12:17:27
- jojaba
- Member

- From: Obersoultzbach, Elsaß, France
- Registered: 2009-12-04
- Posts: 350
- Website
Re: FluxBB 1.4-RC1 administration localisation
Hmm, that's too bad ... hard working/translating some days with not a real result
.
+1 ![]()
OK, so I have a fully localized admin panel only for "my" forum users
.
We can continue with the Mod release, it shouldn't be, know that we have made the hardest work, to difficult to maintain this package...
I opened (for the first time in my life) a Google code project regarding this localisation (and other stuff)... If somebody wants to join us (cyberman did it already
) just let me know and give me a Gmail address so that I can add you to the contributors. Working using svn will improve the modification process.
The Google code project : http://code.google.com/p/jojaba-code/
Source : http://code.google.com/p/jojaba-code/source/checkout
For the moment the text on the home page sounds very personal, but I will change this as soon as possible. I don't want to earn money on this, I just want to let other people benefit of my work (and of you work, if you are interested
).
PluXml 5.* - the light-weight but powerfull Content Managing System based on xml files storage!
Localize Mozilla extensions on BabelZilla
Offline
#24 2010-01-21 12:25:15
- cyberman
- Member
- From: Germany
- Registered: 2010-01-11
- Posts: 184
- Website
Re: FluxBB 1.4-RC1 administration localisation
We can continue with the Mod release,
Of course we'll do
...
Offline
#25 2010-01-21 13:46:06
- Mpok
- Member

- From: France
- Registered: 2008-05-12
- Posts: 302
Re: FluxBB 1.4-RC1 administration localisation
Not going to happen. There is a (slight) chance of this happening later, but the main problem is backwards compatibility, so that we might (probably not, except if the community can help us a lot) offer another version for those that don't care about backwards compatibility. But that's another version and thus, more work again.
Nice answer.. ![]()
And i agree with u (as i was in the original topic, on similar argues).
Still..
U can measure now how this "feature" is important for us ("foreign" communities).
As we all will propose a "admin translation mod", maybe can u (fluxbb.org) centralize ALL our contributions in an uniq mod "admin translation" (in ur future mod repository) with different entries organized by language...
Offline
