This question is answered.


Permlink Replies: 23 - Pages: 2 [ 1 2 | Next ] - Last Post: 13-Jan-2020 15:16 Last Post By: jGromit
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Date formats are ignoring the language setting
Posted: 31-Jul-2019 16:14
 
  Click to reply to this thread Reply
Not sure when this started happening, but jAlbum appears to be ignoring the language setting when formatting dates like currentDate, fileDate, and originalDate. A date format string like dd-MMM-yyyy is producing 31-May-2019, regardless of language setting (in French or German, it would be Mai, not May).
mwl1943

Posts: 5
Registered: 1-Dec-2008
Re: Date formats are ignoring the language setting
Posted: 01-Aug-2019 03:51   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
For example with Date format set at
EEEE dd MMMM yyyy', 'HH'h'mm
in English I get
Thursday 20 June 2019, 12h15
in French I get
Thu 20 Jun 2019, 12h15
The name of the day is also a bug.
Marcel
mwl1943

Posts: 5
Registered: 1-Dec-2008
Re: Date formats are ignoring the language setting
Posted: 02-Aug-2019 01:07   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
In jAlbum version 14.1 it was working properly. In version 15,4 the problem started.
Marcel
davidekholm

Posts: 3,472
Registered: 18-Oct-2002
Re: Date formats are ignoring the language setting
Posted: 10-Aug-2019 14:04   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Odd. Can't reproduce this, and I've been testing with Swedish vs English preference and the pattern dd-MMM-yyyy and the Minimal and Tiger skins. I get the month formatted correctly in Swedish if I set jAlbum's language preference to Swedish. I tested using the ${originalDate} and did the tests on Mac (not that that should matter)
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: Date formats are ignoring the language setting
Posted: 10-Aug-2019 14:55   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I get very consistent results, Win10 and macOS.

Date format: EEEE MMM d, yyyy

English result (correct): Saturday Aug 10, 2019

Any other language choice (wrong): Sat Aug 10, 2019

Notice that it even screws up the day of the week.

A couple of hunches, unrelated to each other:

Maybe try a language that matches neither the jAlbum default of English, nor the default language on your Mac, which I'm guessing is Swedish.

Or maybe it's a Java version thing?
davidekholm

Posts: 3,472
Registered: 18-Oct-2002
Re: Date formats are ignoring the language setting
Posted: 14-Aug-2019 17:20   in response to: jGromit in response to: jGromit
Correct
  Click to reply to this thread Reply
Now I can reproduce it. It worked in my development environment but fails with the Mac DMG package. It turned out that I had "optimized" away a module responsible for country specific date formatting (jdk.localedata). Now fixed. Get the fix for Mac here: http://jalbum.net/download/jAlbum.dmg
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: Date formats are ignoring the language setting
Posted: 14-Aug-2019 17:28   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That's better. Now I'm seeing the expected Mittwoch auf Deutsch.
mwl1943

Posts: 5
Registered: 1-Dec-2008
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 03:47   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
When will the bug be fix in jAlbum 18.
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 03:56   in response to: mwl1943 in response to: mwl1943
 
  Click to reply to this thread Reply
Attachment ss005825.png (34.6 KB)
It's working in jAlbum 18.4. If I choose Deutsch, today shows up as Montag.

ETA: Attached, a display of a camera date.
davidekholm

Posts: 3,472
Registered: 18-Oct-2002
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 05:04   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
The Mac version was missing some locale specific Java files which are now included in jAlbum 18.4.
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 05:14   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
The Windows version showed the same problem, but it's fine in 18.4.
davidekholm

Posts: 3,472
Registered: 18-Oct-2002
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 05:21   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
True, I've updated the release notes. I believe the Linux version will still need to be fixed
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 05:30   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I believe the Linux version will still need to be fixed.

Oh, you wouldn't want to do that. People use Linux because they don't want any hand-holding. They want to do things for themselves. I'm sure a page or two of obscure command line stuff will take care of it.
karlmistelberger

Posts: 462
Registered: 5-Dec-2013
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 13:30   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
True, I've updated the release notes. I believe the Linux version will still need to be fixed

Linux defines date format through environment variables. I suggest jAlbum does what everybody else does: use the system date format

Examples:

Di 27. Aug 13:25:22 CEST 2019

Tue 27 Aug 13:26:10 CEST 2019

Tue 27 Aug 2019 01:27:30 PM CEST

Вт авг 27 13:27:55 CEST 2019

2019年 8月 27日 火曜日 13:29:12 CEST
davidekholm

Posts: 3,472
Registered: 18-Oct-2002
Re: Date formats are ignoring the language setting
Posted: 27-Aug-2019 13:58   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
davidekholm wrote:
True, I've updated the release notes. I believe the Linux version will still need to be fixed

Linux defines date format through environment variables. I suggest jAlbum does what everybody else does: use the system date format


Sure, but to generate the names of days and months correctly, jAlbum needs to pick words from a multilingual dictionary. That's what needs to be included again.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums