[SOLVED]Format.formatDate displays wrong date format with Format.DateMediumWithoutYear format using Hungarian locale [answered]
asked 2016-09-28 00:58:58 +0300
This post is a wiki. Anyone with karma >75 is welcome to improve it.
The lock screen's date display displays the date in [day number][month name] format rather then [month name][day number] when the device uses Hungarian locale.
It is drawn by the 63th line in the /usr/share/lipstick-jolla-home-qt5/lockscreen/Clock.qml:
text: Format.formatDate(time, Format.DateMediumWithoutYear)
If my understanding is correct the Format plugin is coming from DeclarativeFormatter from the Sailfish.Silica/Format 1.0.
I have not been able to find anything more about this object other than the informations available in the plugins.qmltypes, so if I bet well it is a closed source component.
I have no idea what is the proper way to report these kind of issues, so help would be appreciated!
Update:@sledges checked the silica codes and he revealed that there is a translation string in here which was mistranslated. https://translate.sailfishos.org/hu/sailfishsilica-qt5/translate/#unit=160277
I have corrected it in the Taiwanese translation too.
I have a feeling this is not a bug.
Are you suggesting that changing the locale to Hungarian should make the date swap around, to read Sep 28 instead of 28 Sep..?
Spam Hunter ( 2016-09-28 02:26:26 +0300 )editYes I would like to the date written in Sep 28 format.
The Format.formatDate outputs the month name in localized format (szept. in my case), so I think that it should follow the localized date formatting too.
In another places in the OS the displayed dates are outputted through the qsTr mactro giving the translators ability to create the proper localized the date format.
martonmiklos ( 2016-09-28 09:49:55 +0300 )editFrom what I can gather, ALL locale settings will format and display the date as we currently see it on the lock screen - numbers ~ month.
I think this is a design decision/choice and not a bug. I know I could patch the lockscreen file to make the date read how you'd like it, in the same breath, I don't think Jolla will be doing much about it, as it's not a bug, rather it is perhaps, a national preference.. I haven't found any similar posts.
I also recall, that a few mobile OS's support date format, so one can choose the desired layout/look of the date format, so ideally, this is what is missing - a plugin for date preference display.
Spam Hunter ( 2016-09-28 13:19:34 +0300 )editFormat.formatDate(time, Format.DateLong) outputs 2016 szeptember 28 with Hungarian locale, which is consistent to the locale settings both in order and month name.
If I set the locale to English it will output 28 September 2016 which also aligns with the locale settings.
I see no reason why the Format.DateMediumWithoutYear should not respect the locale settings.
martonmiklos ( 2016-09-28 18:21:39 +0300 )editInteresting, thanks for the info. I was unable to reproduce the output with Hungarian locale and the change to Format.formatDate, the date layout remains the same. Which language are you using on the device?, I ask, as I looked at languages on mine, Hungarian is not in the list. EDIT - I've just found your language pack on openrepos, language applied, but still no change in format of date.
Are you making changes on the device or are you doing it with the SFOS SDK?
Spam Hunter ( 2016-09-28 22:31:50 +0300 )edit