Commit 42a2c9a2 authored by Dimitris Kardarakos's avatar Dimitris Kardarakos

First release preparation: enable localization, code cleaning and README update

parent 2a9c5a6b
Pipeline #3871 passed with stage
in 7 minutes and 17 seconds
...@@ -34,6 +34,7 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Gui ...@@ -34,6 +34,7 @@ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Gui
find_package(KF5Config) find_package(KF5Config)
find_package(KF5Kirigami2) find_package(KF5Kirigami2)
find_package(KF5Plasma) find_package(KF5Plasma)
find_package(KF5I18n)
find_package(KF5CalendarCore REQUIRED) find_package(KF5CalendarCore REQUIRED)
################# Enable C++11 features for clang and gcc ################# ################# Enable C++11 features for clang and gcc #################
......
# Calindori # Calindori
Calendar for Plasma Mobile Calendar application for Plasma Mobile
# Installation Calindori is a touch friendly calendar application. It has been designed for mobile devices but it can also run on desktop environments. Users of Calindori are able to check previous and future dates and manage tasks and events.
When executing the application for the first time, a new calendar file is created that follows the ical standard. Alternatively, users may create additional calendars or import existing ones.
## Build
mkdir build mkdir build
cd build cd build
......
# Changelog
## Version 0.1
Initial release
...@@ -6,13 +6,18 @@ ...@@ -6,13 +6,18 @@
<name>Calindori</name> <name>Calindori</name>
<summary>Calendar application</summary> <summary>Calendar application</summary>
<description> <description>
<p>Calindori supports:</p> <p>Calindori is a touch friendly calendar application. It has been designed for mobile devices but it can also run on desktop environments. Users of Calindori are able to check previous and future dates and manage tasks and events.</p>
<p>When executing the application for the first time, a new calendar file is created that follows the ical standard. Alternatively, users may create additional calendars or import existing ones.</p>
<p>Features:</p>
<ul> <ul>
<li>Agenda</li> <li>Agenda</li>
<li>Events</li> <li>Events</li>
<li>Todos</li>
<li>Multiple calendars</li>
<li>Import calendar</li>
</ul> </ul>
</description> </description>
<url type="bugtracker">https://phabricator.kde.org/T6942</url> <url type="bugtracker">https://invent.kde.org/dkardarakos/calindori/issues</url>
<project_group>KDE</project_group> <project_group>KDE</project_group>
<provides> <provides>
<binary>calindori</binary> <binary>calindori</binary>
......
[Desktop Entry] [Desktop Entry]
Name=Calindori Name=Calindori
Comment=Calindori Comment=Calindori
Version=0.1
Exec=calindori Exec=calindori
MimeType=application/x-calindori; MimeType=application/x-calindori;
Icon=calindori Icon=calindori
......
...@@ -13,7 +13,7 @@ qt5_add_resources(RESOURCES resources.qrc) ...@@ -13,7 +13,7 @@ qt5_add_resources(RESOURCES resources.qrc)
add_subdirectory(plugins) add_subdirectory(plugins)
add_executable(calindori ${calindori_SRCS} ${RESOURCES}) add_executable(calindori ${calindori_SRCS} ${RESOURCES})
target_link_libraries(calindori Qt5::Core Qt5::Qml Qt5::Quick Qt5::Test Qt5::Svg KF5::ConfigCore KF5::Plasma) target_link_libraries(calindori Qt5::Core Qt5::Qml Qt5::Quick Qt5::Test Qt5::Svg KF5::ConfigCore KF5::Plasma KF5::I18n)
install(TARGETS calindori ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS calindori ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
......
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
*/ */
/** /**
* Creates the list of actions of 'Calendars' action container * Creates the list of actions of 'Calendars' action container
*/ */
function loadGlobalActions(calendars, calendarActions, calendarActionComp) { function loadGlobalActions(calendars, calendarActions, calendarActionComp)
{
var cfgCalendars = calendars.split(calendars.includes(";") ? ";" : null); var cfgCalendars = calendars.split(calendars.includes(";") ? ";" : null);
var currentChildren = calendarActions.children; var currentChildren = calendarActions.children;
var newChildren = []; var newChildren = [];
......
...@@ -44,6 +44,6 @@ Kirigami.Action { ...@@ -44,6 +44,6 @@ Kirigami.Action {
text: "Delete" text: "Delete"
iconName: "delete" iconName: "delete"
onTriggered: (configuration.activeCalendar == parent.text) ? showPassiveNotification("Active calendar cannot be deleted") : deleteCalendar() onTriggered: (configuration.activeCalendar == parent.text) ? showPassiveNotification(i18n("The active calendar cannot be deleted")) : deleteCalendar()
} }
} }
...@@ -40,7 +40,7 @@ Kirigami.Page { ...@@ -40,7 +40,7 @@ Kirigami.Page {
function importCalendar() { function importCalendar() {
if(root.fileToImport.text == "") { if(root.fileToImport.text == "") {
showPassiveNotification("Please import a calendar file"); showPassiveNotification(i18n("Please import a calendar file"));
return; return;
} }
...@@ -54,7 +54,7 @@ Kirigami.Page { ...@@ -54,7 +54,7 @@ Kirigami.Page {
var importResult = calendarController.importCalendar(root.calendarName, root.fileToImport); var importResult = calendarController.importCalendar(root.calendarName, root.fileToImport);
if(!(importResult.success)) { if(!(importResult.success)) {
showPassiveNotification("Calendar not imported. " + importResult.reason); showPassiveNotification(i18n("Calendar not imported. %1",importResult.reason));
return; return;
} }
......
/* /*
* Copyright 2018 Dimitris Kardarakos <dimkard@gmail.com> * Copyright 2019 Dimitris Kardarakos <dimkard@posteo.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
......
...@@ -31,7 +31,7 @@ Kirigami.OverlaySheet { ...@@ -31,7 +31,7 @@ Kirigami.OverlaySheet {
contentItem: Controls2.Label { contentItem: Controls2.Label {
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "All data included in this calendar will be deleted. Proceed with deletion?" text: i18n("All data included in this calendar will be deleted. Proceed with deletion?")
} }
parent: applicationWindow().overlay parent: applicationWindow().overlay
...@@ -42,13 +42,13 @@ Kirigami.OverlaySheet { ...@@ -42,13 +42,13 @@ Kirigami.OverlaySheet {
} }
Controls2.ToolButton { Controls2.ToolButton {
text: qsTr("Delete") text: i18n("Delete")
onClicked: { onClicked: {
var toRemoveCalendarComponent = Qt.createQmlObject("import org.kde.phone.calindori 0.1 as Calindori; Calindori.LocalCalendar { name: \"" + deleteSheet.calendar + "\"}",root); var toRemoveCalendarComponent = Qt.createQmlObject("import org.kde.phone.calindori 0.1 as Calindori; Calindori.LocalCalendar { name: \"" + deleteSheet.calendar + "\"}",root);
toRemoveCalendarComponent.deleteCalendar(); toRemoveCalendarComponent.deleteCalendar();
configuration.removeCalendar(deleteSheet.calendar); configuration.removeCalendar(deleteSheet.calendar);
showPassiveNotification("Calendar " + deleteSheet.calendar + " has been deleted"); showPassiveNotification(i18n("Calendar %1 has been deleted",deleteSheet.calendar));
deleteSheet.close(); deleteSheet.close();
} }
} }
......
/* /*
* Copyright 2019 Dimitris Kardarakos * Copyright 2019 Dimitris Kardarakos <dimkard@posteo.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
......
/* /*
* Copyright 2019 Dimitris Kardarakos <dimkard@gmail.com> * Copyright 2019 Dimitris Kardarakos <dimkard@posteo.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
...@@ -72,7 +72,7 @@ Kirigami.Page { ...@@ -72,7 +72,7 @@ Kirigami.Page {
return result; return result;
} }
title: qsTr("Event") title: i18n("Event")
ColumnLayout { ColumnLayout {
...@@ -86,7 +86,7 @@ Kirigami.Page { ...@@ -86,7 +86,7 @@ Kirigami.Page {
Controls2.Label { Controls2.Label {
id: calendarName id: calendarName
Kirigami.FormData.label: qsTr("Calendar:") Kirigami.FormData.label: i18n("Calendar:")
Layout.fillWidth: true Layout.fillWidth: true
text: root.calendar.name text: root.calendar.name
} }
...@@ -99,20 +99,20 @@ Kirigami.Page { ...@@ -99,20 +99,20 @@ Kirigami.Page {
id: summary id: summary
Layout.fillWidth: true Layout.fillWidth: true
Kirigami.FormData.label: qsTr("Summary:") Kirigami.FormData.label: i18n("Summary:")
text: eventData ? eventData.summary : "" text: eventData ? eventData.summary : ""
} }
RowLayout { RowLayout {
Kirigami.FormData.label: qsTr("Start:") Kirigami.FormData.label: i18n("Start:")
spacing: 0 spacing: 0
Controls2.ToolButton { Controls2.ToolButton {
Layout.fillWidth: true Layout.fillWidth: true
text: root.startdt.toLocaleDateString(Qt.locale(),Locale.NarrowFormat) text: root.startdt.toLocaleDateString(Qt.locale(),Locale.NarrowFormat)
onClicked: showPassiveNotification("Start date cannot be changed") onClicked: showPassiveNotification(i18n("Start date cannot be changed"))
} }
Controls2.ToolButton { Controls2.ToolButton {
...@@ -126,26 +126,26 @@ Kirigami.Page { ...@@ -126,26 +126,26 @@ Kirigami.Page {
enabled: !allDaySelector.checked enabled: !allDaySelector.checked
onClicked: { onClicked: {
startTimePickerSheet.hours = startTimeSelector.startHour startTimePickerSheet.hours = startTimeSelector.startHour;
startTimePickerSheet.minutes = startTimeSelector.startMinutes startTimePickerSheet.minutes = startTimeSelector.startMinutes;
startTimePickerSheet.pm = startTimeSelector.startPm startTimePickerSheet.pm = startTimeSelector.startPm;
startTimePickerSheet.open() startTimePickerSheet.open();
} }
Connections { Connections {
target: startTimePickerSheet target: startTimePickerSheet
onDatePicked: { onDatePicked: {
startTimeSelector.startHour = startTimePickerSheet.hours startTimeSelector.startHour = startTimePickerSheet.hours;
startTimeSelector.startMinutes = startTimePickerSheet.minutes startTimeSelector.startMinutes = startTimePickerSheet.minutes;
startTimeSelector.startPm = startTimePickerSheet.pm startTimeSelector.startPm = startTimePickerSheet.pm;
} }
} }
} }
} }
RowLayout { RowLayout {
Kirigami.FormData.label: "End:" Kirigami.FormData.label: i18n("End:")
spacing: 0 spacing: 0
Controls2.ToolButton { Controls2.ToolButton {
...@@ -157,15 +157,15 @@ Kirigami.Page { ...@@ -157,15 +157,15 @@ Kirigami.Page {
enabled: !allDaySelector.checked enabled: !allDaySelector.checked
onClicked: { onClicked: {
endDatePickerSheet.selectedDate = endDateSelector.endDate endDatePickerSheet.selectedDate = endDateSelector.endDate;
endDatePickerSheet.open() endDatePickerSheet.open();
} }
Connections { Connections {
target: endDatePickerSheet target: endDatePickerSheet
onDatePicked: { onDatePicked: {
endDateSelector.endDate = endDatePickerSheet.selectedDate endDateSelector.endDate = endDatePickerSheet.selectedDate;
} }
} }
} }
...@@ -181,19 +181,19 @@ Kirigami.Page { ...@@ -181,19 +181,19 @@ Kirigami.Page {
enabled: !allDaySelector.checked && (root.enddt != undefined && !isNaN(root.enddt)) enabled: !allDaySelector.checked && (root.enddt != undefined && !isNaN(root.enddt))
onClicked: { onClicked: {
endTimePickerSheet.hours = endTimeSelector.endHour endTimePickerSheet.hours = endTimeSelector.endHour;
endTimePickerSheet.minutes = endTimeSelector.endMinutes endTimePickerSheet.minutes = endTimeSelector.endMinutes;
endTimePickerSheet.pm = endTimeSelector.endPm endTimePickerSheet.pm = endTimeSelector.endPm;
endTimePickerSheet.open() endTimePickerSheet.open();
} }
Connections { Connections {
target: endTimePickerSheet target: endTimePickerSheet
onDatePicked: { onDatePicked: {
endTimeSelector.endHour = endTimePickerSheet.hours endTimeSelector.endHour = endTimePickerSheet.hours;
endTimeSelector.endMinutes = endTimePickerSheet.minutes endTimeSelector.endMinutes = endTimePickerSheet.minutes;
endTimeSelector.endPm = endTimePickerSheet.pm endTimeSelector.endPm = endTimePickerSheet.pm;
} }
} }
} }
...@@ -204,7 +204,7 @@ Kirigami.Page { ...@@ -204,7 +204,7 @@ Kirigami.Page {
enabled: !isNaN(root.startdt) enabled: !isNaN(root.startdt)
checked: eventData ? eventData.allday: false checked: eventData ? eventData.allday: false
text: qsTr("All day") text: i18n("All day")
} }
Kirigami.Separator { Kirigami.Separator {
...@@ -215,7 +215,7 @@ Kirigami.Page { ...@@ -215,7 +215,7 @@ Kirigami.Page {
id: location id: location
Layout.fillWidth: true Layout.fillWidth: true
Kirigami.FormData.label: qsTr("Location:") Kirigami.FormData.label: i18n("Location:")
text: eventData ? eventData.location : "" text: eventData ? eventData.location : ""
} }
} }
...@@ -233,7 +233,7 @@ Kirigami.Page { ...@@ -233,7 +233,7 @@ Kirigami.Page {
Layout.maximumWidth: eventCard.width Layout.maximumWidth: eventCard.width
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
text: eventData ? eventData.description : "" text: eventData ? eventData.description : ""
placeholderText: qsTr("Description") placeholderText: i18n("Description")
} }
} }
...@@ -242,7 +242,7 @@ Kirigami.Page { ...@@ -242,7 +242,7 @@ Kirigami.Page {
left: Kirigami.Action { left: Kirigami.Action {
id: cancelAction id: cancelAction
text: qsTr("Cancel") text: i18n("Cancel")
icon.name : "dialog-cancel" icon.name : "dialog-cancel"
onTriggered: editcompleted() onTriggered: editcompleted()
...@@ -251,7 +251,7 @@ Kirigami.Page { ...@@ -251,7 +251,7 @@ Kirigami.Page {
main: Kirigami.Action { main: Kirigami.Action {
id: info id: info
text: qsTr("Info") text: i18n("Info")
icon.name : "documentinfo" icon.name : "documentinfo"
onTriggered: showPassiveNotification("Please save or cancel this event") onTriggered: showPassiveNotification("Please save or cancel this event")
...@@ -260,8 +260,8 @@ Kirigami.Page { ...@@ -260,8 +260,8 @@ Kirigami.Page {
right: Kirigami.Action { right: Kirigami.Action {
id: saveAction id: saveAction
text: qsTr("Save") text: i18n("Save")
icon.name : "dialog-ok" icon.name: "dialog-ok"
onTriggered: { onTriggered: {
var validation = validate(); var validation = validate();
......
/* /*
* Copyright 2018 Dimitris Kardarakos <dimkard@gmail.com> * Copyright 2019 Dimitris Kardarakos <dimkard@posteo.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
...@@ -36,11 +36,11 @@ Kirigami.Page { ...@@ -36,11 +36,11 @@ Kirigami.Page {
cardsListview.model.loadEvents(); cardsListview.model.loadEvents();
} }
title: qsTr("Events") title: i18n("Events")
actions.main: Kirigami.Action { actions.main: Kirigami.Action {
icon.name: "resource-calendar-insert" icon.name: "resource-calendar-insert"
text: qsTr("Add event") text: i18n("Add event")
onTriggered: pageStack.push(eventEditor, {startdt: eventStartDt}) onTriggered: pageStack.push(eventEditor, {startdt: eventStartDt})
} }
...@@ -76,7 +76,7 @@ Kirigami.Page { ...@@ -76,7 +76,7 @@ Kirigami.Page {
actions: [ actions: [
Kirigami.Action { Kirigami.Action {
text: qsTr("Delete") text: i18n("Delete")
icon.name: "delete" icon.name: "delete"
onTriggered: { onTriggered: {
...@@ -88,7 +88,7 @@ Kirigami.Page { ...@@ -88,7 +88,7 @@ Kirigami.Page {
}, },
Kirigami.Action { Kirigami.Action {
text: qsTr("Edit") text: i18n("Edit")
icon.name: "editor" icon.name: "editor"
onTriggered: pageStack.push(eventEditor, { startdt: model.dtstart, uid: model.uid, eventData: model }) onTriggered: pageStack.push(eventEditor, { startdt: model.dtstart, uid: model.uid, eventData: model })
...@@ -99,7 +99,6 @@ Kirigami.Page { ...@@ -99,7 +99,6 @@ Kirigami.Page {
Controls2.Label { Controls2.Label {
property bool sameEndStart : model.dtstart && !isNaN(model.dtstart) && model.dtend && !isNaN(model.dtend) && model.dtstart.toLocaleString(Qt.locale(), "dd.MM.yyyy") == model.dtend.toLocaleString(Qt.locale(), "dd.MM.yyyy") property bool sameEndStart : model.dtstart && !isNaN(model.dtstart) && model.dtend && !isNaN(model.dtend) && model.dtstart.toLocaleString(Qt.locale(), "dd.MM.yyyy") == model.dtend.toLocaleString(Qt.locale(), "dd.MM.yyyy")
property string timeFormat: model.allday ? "" : "hh:mm" property string timeFormat: model.allday ? "" : "hh:mm"
property string dateFormat: model.allday ? "ddd d MMM yyyy" : "ddd d MMM yyyy hh:mm" property string dateFormat: model.allday ? "ddd d MMM yyyy" : "ddd d MMM yyyy hh:mm"
property string separator: model.allday ? "" : " - " property string separator: model.allday ? "" : " - "
...@@ -131,8 +130,7 @@ Kirigami.Page { ...@@ -131,8 +130,7 @@ Kirigami.Page {
Component { Component {
id: eventController id: eventController
Calindori.EventController { Calindori.EventController {}
}
} }
} }
...@@ -38,7 +38,7 @@ Item { ...@@ -38,7 +38,7 @@ Item {
property string filterName: "All files" property string filterName: "All files"
property string fileUrl property string fileUrl
property bool selectFolder: false property bool selectFolder: false
property string title: qsTr("Select a file") property string title: i18n("Select a file")
signal accepted signal accepted
Loader { Loader {
......
/* /*
* Copyright 2018 Dimitris Kardarakos <dimkard@gmail.com> * Copyright 2019 Dimitris Kardarakos <dimkard@posteo.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as * it under the terms of the GNU Library General Public License as
...@@ -40,20 +40,20 @@ Kirigami.ApplicationWindow { ...@@ -40,20 +40,20 @@ Kirigami.ApplicationWindow {
Kirigami.Action { Kirigami.Action {
id: calendarActions id: calendarActions
text: "Calendars" text: i18n("Calendars")
iconName: "view-calendar" iconName: "view-calendar"
Kirigami.Action { Kirigami.Action {
text: "Create" text: i18n("Create")
iconName: "list-add" iconName: "list-add"
onTriggered: root.pageStack.push(calendarEditor, {mode: "add"}); onTriggered: root.pageStack.push(calendarEditor, {mode: "add"})
} }
Kirigami.Action { Kirigami.Action {
text: "Import" text: i18n("Import")
iconName: "document-import" iconName: "document-import"
onTriggered: root.pageStack.push(calendarEditor, {mode: "import"}); onTriggered: root.pageStack.push(calendarEditor, {mode: "import"})
} }
Kirigami.Action { Kirigami.Action {
...@@ -64,7 +64,7 @@ Kirigami.ApplicationWindow { ...@@ -64,7 +64,7 @@ Kirigami.ApplicationWindow {
Kirigami.Action { Kirigami.Action {
id: show id: show
text: "Show" text: i18n("Show")
iconName: "view-choose" iconName: "view-choose"
Kirigami.Action { Kirigami.Action {
...@@ -72,12 +72,12 @@ Kirigami.ApplicationWindow { ...@@ -72,12 +72,12 @@ Kirigami.ApplicationWindow {
iconName: "view-calendar-day" iconName: "view-calendar-day"
onTriggered: { onTriggered: {
pageStack.clear(); pageStack.clear();
pageStack.push(calendarDashboardComponent) pageStack.push(calendarDashboardComponent);
} }
} }
Kirigami.Action { Kirigami.Action {
text: "Tasks" + " (" + localCalendar.name + ")" text: i18n("Tasks (%1)", localCalendar.name)
iconName: "view-calendar-tasks" iconName: "view-calendar-tasks"
onTriggered: { onTriggered: {
pageStack.clear(); pageStack.clear();
...@@ -164,14 +164,14 @@ Kirigami.ApplicationWindow { ...@@ -164,14 +164,14 @@ Kirigami.ApplicationWindow {
contextualActions: [ contextualActions: [
Kirigami.Action { Kirigami.Action {
iconName: "view-calendar-tasks" iconName: "view-calendar-tasks"
text: "Tasks" text: i18n("Tasks")
onTriggered: root.pageStack.push(todosView, { todoDt: calendarMonthView.selectedDate }) onTriggered: root.pageStack.push(todosView, { todoDt: calendarMonthView.selectedDate })
}, },
Kirigami.Action { Kirigami.Action {