When adding a new event, I noticed that the 'Start' and 'End' dates were using the wrong date format for my system locale - ie showing 'mm/dd/yyyy' instead of 'dd/mm/yyyy' My system is set up with LANG=en_AU.UTF-8 in /etc/environment and /etc/default/locale Orage clock (on the panel) shows the date in the correct format. Orage version is 4.3.99.1 shipped with xubuntu
I think the issue is how your system is setup. Orage uses language files to define how the dates look like in those buttons. This means that LANG is not enough, but you need LANGUAGE also. command locale shows this setting also. It works for me when I set LANGUAGE=en_AU:en:en_GB:en
Created attachment 1089 Screenshot - initial setup Shows locale environment variables and different date formats for different Orage components, as system was set up
Created attachment 1090 Screenshot - with LANGUAGE set Shows locale variables with LANGUAGE set, and no change to Orage button format
You could be right, it could be the way my system is set up. However, setting 'LANGUAGE' didn't work for me (at least I can't make it work). I did not have LANGUAGE set before at all. I've tried a few different LANGUAGE settings, including: LANGUAGE=en_AU:en:en_GB:en (the one you used) LANGUAGE=en_AU.UTF-8:en_GB.UTF-8:en (one that corresponds to the UTF_8 encodings on my system - do the encodings matter in this case?) LANGUAGE=en_AU:en_GB LANGUAGE=en_AU:en_AU.UTF-8:en_AU.utf8:en_GB:en_GB.UTF-8:en_GB.utf8 (in case I need to write utf8 rather than UTF-8) I've attached before-and-after screenshots. The clock in the bottom right corner is Orage Clock, with the second line set to %x. When you say Orage uses language files for those buttons, does that mean that for today's date it would use something like gettext("04/11/2007") rather than strftime(%x) ? Does mean you have to write a gettext translation file for each supported locale with translations for the days of the year? Do you do it this way because of some quirk of the xfce programming library that only allows you to use gettext on button text, and not strftime? I think this is odd behaviour - from the google-searching and reading I've just done, LANG is supposed to set the default for all LC_ variables, with LC_TIME specifically supposed to define the time/date format. LANGUAGE is an extension to allow specification of a list of fall-back locales for getttext translation, and overides LC_MESSAGES (not LC_TIME). The following page was the most complete explanation I could find; everything else seems to be consistent with this: http://www.suse.de/~mfabian/suse-cjk/locales-env-var.html If you still think it's a system setup issue, happy to work with ubuntu / xubuntu packagers to work out what the right setup should be. I just don't think getting the date format right should be this hard for the end user.
"When you say Orage uses language files for those buttons, does that mean that for today's date it would use something like gettext("04/11/2007") rather than strftime(%x) ?" >> Yes, Orage uses date_format = _("%m/%d/%Y"); >> which is exactly what you say... Does mean you have to write a gettext translation file for each supported locale with translations for the days of the year? >> Yes, that is how it is implemented Do you do it this way because of some quirk of the xfce programming library that only allows you to use gettext on button text, and not strftime? >> No. strftime should work equally. The question mainly is which one is >> more reliable and flexible: Operating system or Xfce translators. .................. I tried %x as you suggested and it works and I like it, so I probably will change Orage to use it, but it does not help you now with your current problem. ....................... Back to the issue: Yes, I still think it is something in your system. For some reason Orage is not using the proper gettext translation file. Could you try: strings /usr/local/xfce/share/locale/en_AU/LC_MESSAGES/orage.mo (the location of this file may be different in your system) For me it shows: $ strings /usr/local/xfce/share/locale/en_AU/LC_MESSAGES/orage.mo %m/%d/%Y Contributor Manage your time with Xfce4 Select _Today _Help Project-Id-Version: orage 4.3.90.2 Report-Msgid-Bugs-To: POT-Creation-Date: 2007-02-01 21:40+0200 PO-Revision-Date: 2006-10-08 17:20+0900 Last-Translator: Juha Kautto <juha@xfce.org> Language-Team: Austrilian English <en_gb@li.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); %d/%m/%y Contributor Manage your time with Xfce4 Select _Today _Help And the "%d/%m/%y" is the translation which may not exist in your system?
Problem solved by upgrading my language pack. Ubuntu splits the language files into a separate package, and the English language pack on my system was out of date. There was no orage.mo translation file for en_AU at all. After upgrading the package with command "sudo aptitude install language-pack-en", I have an en_AU translation file at /usr/share/locale-langpack/en_AU/LC_MESSAGES/orage.mo The LANGUAGE variable does not need to be set for this to work - with LANG=en_AU.UTF-8 the en_AU translation file is used. I have changed status to Resolved / INVALID as this was a system setup issue - feel free to change back if you're planning on changing date_format to %x and want to use bugzilla as a reminder Thanks for your help :-)
Thanks a lot for this great idea. I have now canged orage 4.5 to use operating system's %x setting. This is now better in sync with the orage-clock panel plugin and is much simpler to code. I will not do this change in Orage 4.4 since it may change settings to some countries and I do not want that to happen in the stable release. This is not yet in svn since I do several similar changes in other parts of Orage. This now gives me the possibility to use the same date format in every place. I will keep this bug open until I can commit these changes into 4.5 trunc svn.
This is now coded in 4.5.9.3 svn revision 25575. Thanks once agin for this great idea.