Can't change locale 2.1.0-rc4 Standard Edition

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
gml
Posts: 9
Joined: Mon Oct 15, 2007 3:39 am

Can't change locale 2.1.0-rc4 Standard Edition

Post by gml »

Hello!

I'm evaluating Timetrex for our small office and put it on a Gnu/Linux machine (Ubuntu 7.10 RC).

1. I can't set any locale. The only items that get changed are the language and Date format dropdown lists. German changes to Deutsch and the date format list is adjusted. All other text is still in English.
Same if I choose Spanish, French, Portuguese.

Code: Select all

Debug Buffer
 ============================================================================
 Memory Usage: 3214524
 ----------------------------------------------------------------------------
 DEBUG [243]: [Function](): URI: /timetrexx/interface/Login.php
 DEBUG [245]: [Function](): Production: 0
 DEBUG [100]: TTDate::setTimeZone(): Setting TimeZone: GMT
 DEBUG [53]: [Function](): Bypassing Authentication
 DEBUG [353]: TTi18n::chooseBestLocale(): Choosing Best Locale...
 DEBUG [323]: TTi18n::getBrowserLanguage(): HTTP_ACCEPT_LANGUAGE: de, en
 DEBUG [406]: TTi18n::chooseBestLocale(): cSetting Locale: de
 DEBUG [270]: TTi18n::setLocale(): Attempting to set Locale to: de Category: 6 Current Locale: 
 DEBUG [273]: TTi18n::setLocale(): Attempting to set Locale to: de
 DEBUG [275]: TTi18n::setLocale(): Failed setting i18n locale: de
 DEBUG [279]: TTi18n::setLocale(): Failed setting normalized i18n locale: de
 DEBUG [291]: TTi18n::setLocale(): Setting translator normalized locale to: de_DE
 DEBUG [309]: TTi18n::setLocale(): Set Locale To: de
 DEBUG [415]: TTi18n::chooseBestLocale(): Using Locale: de
 DEBUG [235]: TTi18n::getLanguageFromLocale(): Locale: de
 ============================================================================
 
============================================================================
                              PROFILER OUTPUT
============================================================================
Calls                    Time  Routine
-----------------------------------------------------------------------------
  1    0.0000 ms (0.00 %)  unprofiled

       163.8880 ms (100.00 %)  Missed
============================================================================
       163.8880 ms (100.00 %)  OVERALL TIME
============================================================================
2. I tried the basic steps from the other "can't set locale" thread, except the changes in the php code. I've given apache 2 all read/write rights on all subdirectories and files in the /timetrexx directory.
Deleted and reinstalled Timetrex too.

3. Running Timetrex 2.1.0-rc4

4. PHP 5.2.3-1ubuntu6

5. Ubuntu 7.10 RC

6. Apache 2.2.4 (Ubuntu)

Thanks in advance!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

This is a known issue with Ubuntu, see this thread for more information:

http://forums.timetrex.com/viewtopic.php?t=524

We're still working on a complete fix.
gml
Posts: 9
Joined: Mon Oct 15, 2007 3:39 am

Post by gml »

Back again...

I tried the suggested temp fix by creating symlinks. That didn't work unfortunately.
The locale dir already had /de. So I created de_DE, de_DE.utf8 symlinks pointing to /de. Didn't work.

I then digged into the php source where I found a comment!
//setlocale fails on ubuntu if UTF-8 is not specified
YAY to whomever added it!

I uncommented the '.UTF-8' part and it....works!

Ubuntu seems to have some problems with Umlauts since all ÄÖÜß etc were showing as gibberish. So I corrected them throughout the German .mo file and set the encoding to UTF-8 in the header.
Then msgfmt the whole thing including fuzzy, deleted the cache dir, restarted apache2 and voilà, everything in German 8)

Well, it resembles German. The machine translation could use some human proofreading . :wink:
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Yes, all the beta languages are just initial machine translations at this point. We are always looking for people willing to help us out on the translation front.
gml
Posts: 9
Joined: Mon Oct 15, 2007 3:39 am

Post by gml »

I'll give it a shot over the next few days. Might as well try to translate as much as possible before showing it around in English.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

The easiest way to do translations is to download poEdit from here:

http://www.poedit.net/

Then load up the messages file into it, ie:

interface/locale/de_DE/LC_MESSAGES/messages.po
Locked