Calendar: Use correct language for month and day names
Apply fix for bug 353715 also on QML side. Differential Revision: https://phabricator.kde.org/D5345
This commit is contained in:
parent
328cd681a7
commit
a01e4fb69e
@ -312,7 +312,7 @@ Item {
|
||||
Components.Label {
|
||||
width: daysCalendar.cellWidth
|
||||
height: daysCalendar.cellHeight
|
||||
text: Qt.locale().dayName(calendarBackend.firstDayOfWeek + index, Locale.ShortFormat)
|
||||
text: Qt.locale(Qt.locale().uiLanguages[0]).dayName(calendarBackend.firstDayOfWeek + index, Locale.ShortFormat)
|
||||
font.pixelSize: Math.max(theme.smallestFont.pixelSize, daysCalendar.cellHeight / 3)
|
||||
opacity: 0.4
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
@ -28,7 +28,7 @@ PlasmaComponents.Menu {
|
||||
property Instantiator items: Instantiator {
|
||||
model: 12
|
||||
PlasmaComponents.MenuItem {
|
||||
text: capitalizeFirstLetter(Qt.locale().standaloneMonthName(index))
|
||||
text: capitalizeFirstLetter(Qt.locale(Qt.locale().uiLanguages[0]).standaloneMonthName(index))
|
||||
onClicked: calendarBackend.displayedDate = new Date(year, index, 1)
|
||||
}
|
||||
onObjectAdded: testMenu.addMenuItem(object)
|
||||
|
@ -143,7 +143,7 @@ PinchArea {
|
||||
Component.onCompleted: {
|
||||
for (var i = 0; i < 12; ++i) {
|
||||
append({
|
||||
label: Qt.locale().standaloneMonthName(i, Locale.LongFormat),
|
||||
label: Qt.locale(Qt.locale().uiLanguages[0]).standaloneMonthName(i, Locale.LongFormat),
|
||||
monthNumber: i + 1,
|
||||
isCurrent: true
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user