<div dir="ltr">Here is a more decent patch (in the unified format) I redid the code after update10 instead of trying to apply the patches, though I expect it all came out more or less the same...<br><div class="gmail_extra"><br></div><div class="gmail_extra">The patch can now also be found here:<br><a href="https://github.com/Keeper-of-the-Keys/jolla-utils/tree/master/jolla-calendar">https://github.com/Keeper-of-the-Keys/jolla-utils/tree/master/jolla-calendar</a><br><br></div><div class="gmail_extra">Just one thing, I'm not the biggest expert on patch, should I remove the .orig/.update10 in the patch so that both pathes are the original file?<br><br></div><div class="gmail_extra">Thanks,<br></div><div class="gmail_extra">Eli<br><br></div><div class="gmail_extra"><div class="gmail_quote">2014-11-16 15:45 GMT+02:00 E.S. Rosenberg <span dir="ltr"><<a href="mailto:es.rosenberg+sailfishos.org@gmail.com" target="_blank">es.rosenberg+sailfishos.org@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">2014-11-14 13:51 GMT+02:00 Pekka Vuorela <span dir="ltr"><<a href="mailto:pekka.vuorela@jolla.com" target="_blank">pekka.vuorela@jolla.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">to, 2014-11-13 kello 23:43 +0200, E.S. Rosenberg kirjoitti:<br>
<span>> Well I solved it and now it's dependent on the locale (which by<br>
> default is not set on Jolla) so:<br>
<br>
> 1. I am more then happy to submit my patches to Jolla, though you guys<br>
> claim 'closed source' every file I edited had a BSD license at the<br>
> top.<br>
<br>
</span>I expect you have been checking Silica files. There the QML file side<br>
does have BSD licenses on files. Rationale being to allow application<br>
developers taking snippets of code when using provided elements directly<br>
is not enough for some reason.<br>
<br>
I don't think we have a precedent of merging contributions there,<br>
though. So while it's great you got it working how you like, it could be<br>
easier for us (or me) right now to implement this separately.<br>
<span><br>
> 2. To actually make this work properly jolla one or all of the<br>
> following environment variables need to be present LC_TIME, LC_ALL,<br>
> LANG, by default LANG is present but for people like me who want<br>
> language A but locale B for dates etc. so some way to set LC_* or at<br>
> least LC_ALL would be cool.<br>
> I tried adding to my .bashrc but that had no effect for launching from<br>
> the launcher, from CLI it helpend of course.<br>
><br>
> I assume I need to add it somewhere in dconf but I'm not knowledgeable<br>
> enough about dconf for the moment...<br>
<br>
</span>User session picks up the locale values (that is, LANG at the moment<br>
set) from /var/lib/environment/nemo/locale.conf<br>
<br>
But having different locale categories working properly is not that<br>
simple. String translations are also used for date/time patterns, Qt<br>
knows only one system locale, etc.<br></blockquote></div></div><div>Are you sure about this, as far as I can tell it's working fine, Qt is one of those frameworks that handles locales really well.... <br></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Acknowledged that some people want this, though.<br>
<span><br>
> Should I publish the patches here or is that considered unacceptable<br>
> behavior on this list?<br>
<br>
</span>I see no reason not to.<br></blockquote></span><div>So here are the patches, they will help you implement it.<br></div><div><br>/usr/lib/qt5/qml/Sailfish/Silica/DatePickerDialog.qml -- haven't gone over the whole file.<br>I am not 100% sure the DatePickerDialog.qml patch is needed for the calendar fix, but I guess for other uses....<br>Modified start date of labels and added Qt.locale().firstDayOfWeek into the calculation.<br><br></div><div>/usr/lib/qt5/qml/Sailfish/Silica/private/DatePicker.js -- this file does all the work<br></div><div>removed variable _weekStartsOnMonday<br></div><div>added variable _firstDayOfWeek<br></div><div>added function _setFirstDayOfWeek(dayNo)<br></div><div>modified function _getStartDateForMonthView(year, month) -- modified the math of the function so that it now always gives the right date (no matter what the firstDayOfWeeks' value is) and therefor the exception set for Monday was commented out.<br><br></div><div>/usr/share/jolla-calendar/pages/MonthPage.qml -- the QML file that describes the jolla-calendar page that matters<br></div><div>Modified start date of labels and added Qt.locale().firstDayOfWeek into the calculation.<br><br></div><div>/usr/lib/qt5/qml/Sailfish/Silica/DatePicker.qml<br></div><div>added property firstDayOfWeek which calls DatePicker.js._setFirstDayOfWeek() -- this was the only way I know at the moment to pass the information known to Qt.locale to the javascript, there may be better ways.<br><br></div><div>As said everything was checked in locales with the 3 different week starts that exist according to wikipedia (sat, sun, mon), but it should work for any day so unless someone decides that s/he observes the calendar of Discworld (8 days/week) it should be fine.<br></div><div><br>The order of the files in diff was "diff new orig".<br><br></div><div>A mention of me in the source would be nice, but not mandatory.<br></div><div>Hope this helps you implement it...<br></div><div>Eli<br></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div><br>
<br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>