Login or Register

RSS IconRecent posts in this topic

avatar Pro
davidm on Nov 16. 2007. 1:11 pm
I know the localization system is not there yet, but it seems to me the only thing needed to translate the interface is editing the /views/ folders in /activecollab/application/modules/ for each modules.

I tried translating a few strings and it seems to work.
Any other item I need to edit to complete translation ?

Thanks !
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Staff
Ilija Studen on Nov 16. 2007. 3:14 pm
Hacked views are not upgradeable. Before we provide official localization support I would try hacking lang() function to match stuff against array containing translations. This is how final localization will actually work. Something like:

function lang($content) {
  static $translations = array(
    'key_in_english' => 'value in other language'
  );

  return isset($translations[$content]) ? $translations[$content] : $content;
}


lang() function is a bit more complex than that, I've just wrote this to illustrate the concept.
activeCollab Team Member
avatar Pro
davidm on Nov 16. 2007. 3:35 pm
Are views undergoing much changes between upgrades ?

If not, I could keep the translated views handy and check diffs on files to see what changed...
I am not PHP savvy, but thanks for the update :)
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Staff
Ilija Studen on Nov 16. 2007. 4:05 pm
davidm:
Are views undergoing much changes between upgrades ?


Most of the files don't get changed, but some go through major changes between versions. Next version will have a lot of changes all over the system. That is why I suggested overriding lang() function.
activeCollab Team Member
avatar Pro
davidm on Nov 16. 2007. 4:22 pm
If it's not too tricky, I might be able to pull it off - I have just basic knowledge of PHP...

Thanks for the feedback :)
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Pro
davidm on Nov 21. 2007. 10:16 am
Back on translating, I find myself wondering where is the lang() function ?
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Staff
Ilija Studen on Nov 21. 2007. 10:29 am
lang() function is located in /activecollab/angie/functions/environment.php somewhere around line 318
activeCollab Team Member
avatar Pro
davidm on Nov 21. 2007. 10:38 am
Thank you !
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Pro
davidm on Nov 22. 2007. 12:28 pm
Well, I am short on php skills to do what you suggested, thus I spent the afternoon altering the views for every modules and got down to having a french 1.0.4 version, except for a few strings which I have been trying to locate.

Here is what I am looking for :

* the "Welcome back xxxxxxxxx | Admin | Profile | Logout" on top

* the "People | Projetcs | Calendar | Search | Assignmt. Starred Trash Quick Add" main menu

* the "Discussions, Milestones, Files, Checklists, Calendar, Pages, Tickets, Time, People" project menu bar

I have looked for tpl files since ActiveCollab uses smarty but I failed to find the proper location for those strings... where are they ? ? ?
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)
avatar Pro
davidm on Nov 22. 2007. 2:24 pm
OK got the second one, it's in activecollab/application/modules/system/handlers/on_build_menu.php
The best way to predict the future is to invent it
------------------------------------------
Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

RSS IconRecent posts in this topic