We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

[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 marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2016-11-04 20:20:34 +0300

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.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by nthn
close date 2018-04-01 11:57:50.789987

Comments

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 )edit

Yes 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 )edit
2

From 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 )edit

Format.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 )edit

Interesting, 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

1 Answer

Sort by » oldest newest most voted
1

answered 2016-10-15 18:51:08 +0300

@zerngjia could you please confirm/deny for me that with the Taiwanese localization the date order should be <month> <day>? Thanks in advance!</day></month>

edit flag offensive delete publish link more

Comments

2

Hi, It should be <month> <day>!Such as 10月16日 for Oct 16.</day></month>

zerngjia ( 2016-10-15 19:11:29 +0300 )edit
1

Oh, sorry. Forget about my previous comment.

I haven't checked the locale because I misunderstood what you say! I will check this in Chinese Hong Kong locale (because Chinese Taiwan locale is not loaded yet in Jolla) tomorrow (I am not home and not having Jolla Phone around). ;P

zerngjia ( 2016-10-15 19:22:40 +0300 )edit
1

We still have not found the root cause of this issue, so to be able to rule out if the issue with the packaging I want to build a Taiwanese RPM in the same manner as I build the Hungarian and check the lock screen date order. I have seen that in the official Chinese translation (second from the bottom in the list (zh_cn code)) the date order changes to <month> <day> and shows the localized month names. </day></month>

I do not know how different the Taiwanese language from the Simplified Chinese, so my question was related generally to the date format Taiwanese. So in Taiwan you use <month><day> or <day><month>?</month></day></day></month>

martonmiklos ( 2016-10-15 20:55:52 +0300 )edit
1

I have built the Taiwanese RPM (you can find it here if you want to test drive it: https://dl.dropboxusercontent.com/u/4295670/unofficial-jolla-language-pack-zh_tw-2.0.5-0.0.1.noarch.rpm) but it shows me 15 10月, so it seems to be still an issue with the community language packs.

martonmiklos ( 2016-10-15 21:51:50 +0300 )edit
1

The date format of Taiwan is much the same as Simplified Chinese or Chinese (Hong Hong). We use <month> <day> sequence to describe the date. </day></month>

zerngjia ( 2016-10-15 21:54:31 +0300 )edit

Question tools

Follow
3 followers

Stats

Asked: 2016-09-28 00:58:58 +0300

Seen: 335 times

Last updated: Nov 04 '16