Locale DE showing Month Number not Name

0 votes
asked Jul 8, 2021 in Question / help by Philipo98 (120 points)

Hello Community,

i got the following Problem, when i set the language to DE, it shows the day names in german, but the months are now only the number of the month not the name of the month itself.
1 2021   |    2 2021    |   3 2021 and so on


 

But wanted is this (PlantUML Webserver):


Where does the Localization comes from? Or how do PlantUML get it.
I'm running PlantUML in a Docker Container, and haven't installed german yet.
But on my local Windows Machine with locale DE, running PlantUML.jar generates the same calender output.


Thanks
Greetings Philip

1 Answer

0 votes
answered Jul 9, 2021 by plantuml (295,000 points)
Sorry about that... this is very strange.

Localization come from standard Java library (see https://github.com/plantuml/plantuml/blob/master/src/net/sourceforge/plantuml/project/time/Month.java#L68 )

We simply call the method from here: https://www.tutorialspoint.com/javatime/javatime_month_getdisplayname.htm

Could you check your Java version:

@startuml
version
@enduml

And tell us the result ?

Thanks !
commented Jul 12, 2021 by anonymous

Hey, 
thanks for the fast reply.
I checked the installed locale for the Java Runtime and it's set correctly to de_DE.
PlantUML showing thats everything right, but when i generate GANTT Diagramms in German they only get rendered as number.

My PlantUML Version

But i found out, that when i change the printscale to weekly, it renders the month names as expected.


Very suspicios laugh

Thanks
Greetings Philip

commented Jul 12, 2021 by plantuml (295,000 points)

Thanks for the information. Very odd indeed.

Note that you don't have to change locale for the JRE, we are doing this in the code. Anyway, it does not explain the result.

Let's do another try. Could you download last beta http://beta.plantuml.net/plantuml.jar

and launch:

java -jar plantuml.jar --de

This prints how your JRE/JDK is showing German months.

Here is what we have on our configs:

Testing locale de JANUARY
FULL --> 'Januar'
FULL_STANDALONE --> 'Januar'
SHORT --> 'Jan.'
SHORT_STANDALONE --> 'Jan'
NARROW --> 'J'
NARROW_STANDALONE --> 'J'
Testing locale de FEBRUARY
FULL --> 'Februar'
FULL_STANDALONE --> 'Februar'
SHORT --> 'Feb.'
SHORT_STANDALONE --> 'Feb'
NARROW --> 'F'
NARROW_STANDALONE --> 'F'
Testing locale de MARCH
FULL --> 'März'
FULL_STANDALONE --> 'März'
SHORT --> 'März'
SHORT_STANDALONE --> 'Mär'
NARROW --> 'M'
NARROW_STANDALONE --> 'M'
Testing locale de APRIL
FULL --> 'April'
FULL_STANDALONE --> 'April'
SHORT --> 'Apr.'
SHORT_STANDALONE --> 'Apr'
NARROW --> 'A'
NARROW_STANDALONE --> 'A'
Testing locale de MAY
FULL --> 'Mai'
FULL_STANDALONE --> 'Mai'
SHORT --> 'Mai'
SHORT_STANDALONE --> 'Mai'
NARROW --> 'M'
NARROW_STANDALONE --> 'M'
Testing locale de JUNE
FULL --> 'Juni'
FULL_STANDALONE --> 'Juni'
SHORT --> 'Juni'
SHORT_STANDALONE --> 'Jun'
NARROW --> 'J'
NARROW_STANDALONE --> 'J'
Testing locale de JULY
FULL --> 'Juli'
FULL_STANDALONE --> 'Juli'
SHORT --> 'Juli'
SHORT_STANDALONE --> 'Jul'
NARROW --> 'J'
NARROW_STANDALONE --> 'J'
Testing locale de AUGUST
FULL --> 'August'
FULL_STANDALONE --> 'August'
SHORT --> 'Aug.'
SHORT_STANDALONE --> 'Aug'
NARROW --> 'A'
NARROW_STANDALONE --> 'A'
Testing locale de SEPTEMBER
FULL --> 'September'
FULL_STANDALONE --> 'September'
SHORT --> 'Sept.'
SHORT_STANDALONE --> 'Sep'
NARROW --> 'S'
NARROW_STANDALONE --> 'S'
Testing locale de OCTOBER
FULL --> 'Oktober'
FULL_STANDALONE --> 'Oktober'
SHORT --> 'Okt.'
SHORT_STANDALONE --> 'Okt'
NARROW --> 'O'
NARROW_STANDALONE --> 'O'
Testing locale de NOVEMBER
FULL --> 'November'
FULL_STANDALONE --> 'November'
SHORT --> 'Nov.'
SHORT_STANDALONE --> 'Nov'
NARROW --> 'N'
NARROW_STANDALONE --> 'N'
Testing locale de DECEMBER
FULL --> 'Dezember'
FULL_STANDALONE --> 'Dezember'
SHORT --> 'Dez.'
SHORT_STANDALONE --> 'Dez'
NARROW --> 'D'
NARROW_STANDALONE --> 'D'

We are curious to see the result :-)

commented Jul 12, 2021 by Philipo98 (120 points)

Downloaded latest beta plantuml.jar v1.2021.9beta3
And launched as above, generating following output:

Testing locale de JANUARY
FULL --> 'Januar'
FULL_STANDALONE --> '1'
SHORT --> 'Jan'
SHORT_STANDALONE --> 'Jan'
NARROW --> 'J'
NARROW_STANDALONE --> '1'
Testing locale de FEBRUARY
FULL --> 'Februar'
FULL_STANDALONE --> '2'
SHORT --> 'Feb'
SHORT_STANDALONE --> 'Feb'
NARROW --> 'F'
NARROW_STANDALONE --> '2'
Testing locale de MARCH
FULL --> 'März'
FULL_STANDALONE --> '3'
SHORT --> 'Mär'
SHORT_STANDALONE --> 'Mär'
NARROW --> 'M'
NARROW_STANDALONE --> '3'
Testing locale de APRIL
FULL --> 'April'
FULL_STANDALONE --> '4'
SHORT --> 'Apr'
SHORT_STANDALONE --> 'Apr'
NARROW --> 'A'
NARROW_STANDALONE --> '4'
Testing locale de MAY
FULL --> 'Mai'
FULL_STANDALONE --> '5'
SHORT --> 'Mai'
SHORT_STANDALONE --> 'Mai'
NARROW --> 'M'
NARROW_STANDALONE --> '5'
Testing locale de JUNE
FULL --> 'Juni'
FULL_STANDALONE --> '6'
SHORT --> 'Jun'
SHORT_STANDALONE --> 'Jun'
NARROW --> 'J'
NARROW_STANDALONE --> '6'
Testing locale de JULY
FULL --> 'Juli'
FULL_STANDALONE --> '7'
SHORT --> 'Jul'
SHORT_STANDALONE --> 'Jul'
NARROW --> 'J'
NARROW_STANDALONE --> '7'
Testing locale de AUGUST
FULL --> 'August'
FULL_STANDALONE --> '8'
SHORT --> 'Aug'
SHORT_STANDALONE --> 'Aug'
NARROW --> 'A'
Testing locale de SEPTEMBER
FULL --> 'September'
FULL_STANDALONE --> '9'
SHORT --> 'Sep'
SHORT_STANDALONE --> 'Sep'
NARROW --> 'S'
NARROW_STANDALONE --> '9'
Testing locale de OCTOBER
FULL --> 'Oktober'
FULL_STANDALONE --> '10'
SHORT --> 'Okt'
SHORT_STANDALONE --> 'Okt'
NARROW --> 'O'
NARROW_STANDALONE --> '10'
Testing locale de NOVEMBER
FULL --> 'November'
FULL_STANDALONE --> '11'
SHORT --> 'Nov'
SHORT_STANDALONE --> 'Nov'
NARROW --> 'N'
NARROW_STANDALONE --> '11'
Testing locale de DECEMBER
FULL --> 'Dezember'
FULL_STANDALONE --> '12'
SHORT --> 'Dez'
SHORT_STANDALONE --> 'Dez'
NARROW --> 'D'
NARROW_STANDALONE --> '12'

Tested on my Windows 10 machine and my Debian PlantUML Server.
Both got same output.

Thanks
Greetings
Philip 

commented Jul 27, 2021 by plantuml (295,000 points)
Thanks for your test, it definitively help. It seems that there is a lot of issues with FULL_STANDALONE.

Anyway, this should be fixed in last beta http://beta.plantuml.net/plantuml.jar

Could you tell us if it's working for you now ?

Thanks!
commented Nov 29, 2021 by Capitán Primate (140 points)
I have the same problem in Windows, with the "es" locale.

Months appear as number when using the weekly printscale. When I use the monthly printscale, some months appear as month number and others appear as month name.

This doesn't happen in macOS
...