diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..3af334450 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "mesonbuild.configureOnOpen": false +} \ No newline at end of file diff --git a/config.vala.in b/config.vala.in index 8f9bebabf..656cf0a05 100644 --- a/config.vala.in +++ b/config.vala.in @@ -5,4 +5,5 @@ namespace Build { public const string INSTALL_PREFIX = @PREFIX@; public const string DATADIR = @DATADIR@; public const string PROFILE = @PROFILE@; + public const string LOCALEDIR = @LOCALEDIR@; } \ No newline at end of file diff --git a/core/Constants.vala b/core/Constants.vala index 5aa8b17a6..a95ec7fb7 100644 --- a/core/Constants.vala +++ b/core/Constants.vala @@ -2,6 +2,7 @@ namespace Constants { public const string TODOIST_CLIENT_ID = "b0dd7d3714314b1dbbdab9ee03b6b432"; public const string TODOIST_CLIENT_SECRET = "a86dfeb12139459da3e5e2a8c197c678"; public const string TODOIST_SCOPE = "data:read_write,data:delete,project:delete"; + public const string BACKUP_VERSION = "1.0"; public const int UPDATE_TIMEOUT = 1500; public const int DESTROY_TIMEOUT = 750; public const int DRAG_TIMEOUT = 225; diff --git a/core/Enum.vala b/core/Enum.vala index 3397dfe7c..765dfe963 100644 --- a/core/Enum.vala +++ b/core/Enum.vala @@ -72,7 +72,7 @@ public enum FilterType { SCHEDULED = 2, PINBOARD = 3, LABEL = 4, - FILTER = 5; + LABELS = 5; public string to_string () { switch (this) { @@ -91,8 +91,8 @@ public enum FilterType { case LABEL: return "label"; - case FILTER: - return "filter"; + case LABELS: + return "labels"; default: assert_not_reached (); diff --git a/src/Layouts/HeaderItem.vala b/core/Layouts/HeaderItem.vala similarity index 88% rename from src/Layouts/HeaderItem.vala rename to core/Layouts/HeaderItem.vala index 4d654ff28..bbfea428f 100644 --- a/src/Layouts/HeaderItem.vala +++ b/core/Layouts/HeaderItem.vala @@ -31,6 +31,7 @@ public class Layouts.HeaderItem : Adw.Bin { set { _header_title = value; name_label.label = _header_title; + name_label.visible = value != null; } } @@ -116,6 +117,33 @@ public class Layouts.HeaderItem : Adw.Bin { } } } + + public bool separator_lines { + set { + if (value) { + listbox.add_css_class ("separator-lines"); + } + } + } + + public bool box_shadow { + set { + if (value) { + content_grid.remove_css_class ("sidebar-card"); + } + } + } + + public bool listbox_no_margin { + set { + if (value) { + listbox.margin_top = 0; + listbox.margin_bottom = 0; + listbox.margin_start = 0; + listbox.margin_end = 0; + } + } + } public HeaderItem (string? header_title = null) { Object ( @@ -132,19 +160,22 @@ public class Layouts.HeaderItem : Adw.Bin { name_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); listbox = new Gtk.ListBox () { - hexpand = true + hexpand = true, + margin_top = 3, + margin_bottom = 3, + margin_start = 3, + margin_end = 3 }; listbox.set_placeholder (get_placeholder ()); listbox.add_css_class ("bg-transparent"); content_grid = new Gtk.Grid () { - margin_end = 1 + margin_end = 3 }; content_grid.add_css_class ("card"); content_grid.add_css_class ("sidebar-card"); - content_grid.add_css_class ("padding-3"); content_grid.attach (listbox, 0, 0, 1, 1); action_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { @@ -241,6 +272,10 @@ public class Layouts.HeaderItem : Adw.Bin { listbox.append (widget); } + public void insert_child (Gtk.Widget widget, int position) { + listbox.insert (widget, position); + } + public void add_widget_end (Gtk.Widget widget) { action_box.append (widget); } diff --git a/src/Objects/BaseObject.vala b/core/Objects/BaseObject.vala similarity index 100% rename from src/Objects/BaseObject.vala rename to core/Objects/BaseObject.vala diff --git a/src/Objects/Color.vala b/core/Objects/Color.vala similarity index 100% rename from src/Objects/Color.vala rename to core/Objects/Color.vala diff --git a/src/Objects/DueDate.vala b/core/Objects/DueDate.vala similarity index 100% rename from src/Objects/DueDate.vala rename to core/Objects/DueDate.vala diff --git a/src/Objects/Filters/Completed.vala b/core/Objects/Filters/Completed.vala similarity index 100% rename from src/Objects/Filters/Completed.vala rename to core/Objects/Filters/Completed.vala diff --git a/src/Objects/Filters/Labels.vala b/core/Objects/Filters/Labels.vala similarity index 100% rename from src/Objects/Filters/Labels.vala rename to core/Objects/Filters/Labels.vala diff --git a/src/Objects/Filters/Pinboard.vala b/core/Objects/Filters/Pinboard.vala similarity index 100% rename from src/Objects/Filters/Pinboard.vala rename to core/Objects/Filters/Pinboard.vala diff --git a/src/Objects/Filters/Priority.vala b/core/Objects/Filters/Priority.vala similarity index 96% rename from src/Objects/Filters/Priority.vala rename to core/Objects/Filters/Priority.vala index 2dbcf933b..e04f67c7d 100644 --- a/src/Objects/Filters/Priority.vala +++ b/core/Objects/Filters/Priority.vala @@ -64,7 +64,7 @@ public class Objects.Priority : Objects.BaseObject { construct { name = Util.get_default ().get_priority_title (priority); - keywords = "%s;%s".printf (_("priority"), "p" + priority.to_string ()); + keywords = Util.get_default ().get_priority_keywords (priority); Services.Database.get_default ().item_added.connect (() => { _count = Services.Database.get_default ().get_items_by_priority (priority, false).size; diff --git a/src/Objects/Filters/Scheduled.vala b/core/Objects/Filters/Scheduled.vala similarity index 100% rename from src/Objects/Filters/Scheduled.vala rename to core/Objects/Filters/Scheduled.vala diff --git a/src/Objects/Filters/Today.vala b/core/Objects/Filters/Today.vala similarity index 100% rename from src/Objects/Filters/Today.vala rename to core/Objects/Filters/Today.vala diff --git a/src/Objects/Item.vala b/core/Objects/Item.vala similarity index 92% rename from src/Objects/Item.vala rename to core/Objects/Item.vala index f3b87f228..f3e56a842 100644 --- a/src/Objects/Item.vala +++ b/core/Objects/Item.vala @@ -30,7 +30,7 @@ public class Objects.Item : Objects.BaseObject { public string project_id { get; set; default = ""; } public string parent_id { get; set; default = ""; } - public int priority { get; set; default = 0; } + public int priority { get; set; default = Constants.PRIORITY_4; } public bool activate_name_editable { get; set; default = false; } @@ -85,7 +85,7 @@ public class Objects.Item : Objects.BaseObject { public bool pinned { get; set; default = false; } public string pinned_icon { get { - return pinned ? "planner-pinned-activated" : "planner-pinned"; + return pinned ? "planner-pin-tack" : "planner-pinned"; } } @@ -205,6 +205,7 @@ public class Objects.Item : Objects.BaseObject { public signal void reminder_added (Objects.Reminder reminder); public signal void reminder_deleted (Objects.Reminder reminder); public signal void loading_changed (bool value); + construct { deleted.connect (() => { Idle.add (() => { @@ -220,6 +221,27 @@ public class Objects.Item : Objects.BaseObject { update_local_labels (get_labels_from_json (node)); } + public Item.from_import_json (Json.Node node) { + id = node.get_object ().get_string_member ("id"); + content = node.get_object ().get_string_member ("content"); + description = node.get_object ().get_string_member ("description"); + added_at = node.get_object ().get_string_member ("added_at"); + completed_at = node.get_object ().get_string_member ("completed_at"); + updated_at = node.get_object ().get_string_member ("updated_at"); + section_id = node.get_object ().get_string_member ("section_id"); + project_id = node.get_object ().get_string_member ("project_id"); + parent_id = node.get_object ().get_string_member ("parent_id"); + priority = (int32) node.get_object ().get_int_member ("priority"); + child_order = (int32) node.get_object ().get_int_member ("child_order"); + checked = node.get_object ().get_boolean_member ("checked"); + is_deleted = node.get_object ().get_boolean_member ("is_deleted"); + day_order = (int32) node.get_object ().get_int_member ("day_order"); + due.update_from_json (Services.Database.get_default ().get_due_parameter (node.get_object ().get_string_member ("due"))); + collapsed = node.get_object ().get_boolean_member ("collapsed"); + pinned = node.get_object ().get_boolean_member ("pinned"); + update_local_labels (get_labels_from_json (node)); + } + public void update_labels_from_json (Json.Node node) { update_labels_async (get_labels_from_json (node)); } @@ -641,8 +663,6 @@ public class Objects.Item : Objects.BaseObject { Json.Generator generator = new Json.Generator (); Json.Node root = builder.get_root (); generator.set_root (root); - - print ("%s\n".printf (generator.to_data (null))); return generator.to_data (null); } @@ -670,7 +690,7 @@ public class Objects.Item : Objects.BaseObject { } } - if (section_id != "") { + if (parent_id != "") { builder.set_member_name ("parent_id"); if (Services.Database.get_default ().curTempIds_exists (parent_id)) { builder.add_string_value (Services.Database.get_default ().get_temp_id (parent_id)); @@ -705,12 +725,14 @@ public class Objects.Item : Objects.BaseObject { builder.add_null_value (); } - // builder.set_member_name ("labels"); - // builder.begin_array (); - // foreach (Objects.ItemLabel item_label in labels.values) { - // builder.add_string_value (item_label.label.name); - // } - // builder.end_array (); + builder.set_member_name ("labels"); + builder.begin_array (); + foreach (Objects.ItemLabel item_label in labels.values) { + if (item_label.label.backend_type == BackendType.TODOIST) { + builder.add_string_value (item_label.label.name); + } + } + builder.end_array (); builder.end_object (); Json.Generator generator = new Json.Generator (); @@ -777,9 +799,9 @@ public class Objects.Item : Objects.BaseObject { if (project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().add.begin (new_item, (obj, res) => { - string? id = Services.Todoist.get_default ().add.end (res); - if (id != null) { - new_item.id = id; + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + if (response.status) { + new_item.id = response.data; insert_duplicate (new_item); } }); @@ -810,7 +832,7 @@ public class Objects.Item : Objects.BaseObject { public void delete_item () { if (project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().delete.begin (this, (obj, res) => { - if (Services.Todoist.get_default ().delete.end (res)) { + if (Services.Todoist.get_default ().delete.end (res).status) { Services.Database.get_default ().delete_item (this); } }); diff --git a/src/Objects/ItemLabel.vala b/core/Objects/ItemLabel.vala similarity index 100% rename from src/Objects/ItemLabel.vala rename to core/Objects/ItemLabel.vala diff --git a/src/Objects/Label.vala b/core/Objects/Label.vala similarity index 72% rename from src/Objects/Label.vala rename to core/Objects/Label.vala index c00c8930d..b01c22b0f 100644 --- a/src/Objects/Label.vala +++ b/core/Objects/Label.vala @@ -105,6 +105,15 @@ public class Objects.Label : Objects.BaseObject { backend_type = BackendType.TODOIST; } + public Label.from_import_json (Json.Node node) { + id = node.get_object ().get_string_member ("id"); + name = node.get_object ().get_string_member ("name"); + color = node.get_object ().get_string_member ("color"); + backend_type = Util.get_default ().get_backend_type_by_text (node.get_object ().get_string_member ("backend_type")); + is_deleted = node.get_object ().get_boolean_member ("is_deleted"); + is_favorite = node.get_object ().get_boolean_member ("is_favorite"); + } + public void update_from_json (Json.Node node) { name = node.get_object ().get_string_member ("name"); @@ -175,54 +184,4 @@ public class Objects.Label : Objects.BaseObject { return generator.to_data (null); } - - public void delete (bool confirm = true) { - // if (!confirm) { - // if (todoist) { - // Planify.todoist.delete.begin (this, (obj, res) => { - // Planify.todoist.delete.end (res); - // Services.Database.get_default ().delete_label (this); - // }); - // } else { - // Services.Database.get_default ().delete_label (this); - // } - - // return; - // } - - // var message_dialog = new Dialogs.MessageDialog ( - // _("Delete label"), - // _("Are you sure you want to delete %s?".printf (Util.get_default ().get_dialog_text (short_name))), - // "dialog-warning" - // ); - // message_dialog.add_default_action (_("Cancel"), Gtk.ResponseType.CANCEL); - // message_dialog.show_all (); - - // var remove_button = new Widgets.LoadingButton ( - // LoadingButtonType.LABEL, _("Delete")) { - // hexpand = true - // }; - // remove_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); - // remove_button.get_style_context ().add_class ("border-radius-6"); - // message_dialog.add_action_widget (remove_button, Gtk.ResponseType.ACCEPT); - - // message_dialog.default_action.connect ((response) => { - // if (response == Gtk.ResponseType.ACCEPT) { - // if (todoist) { - // remove_button.is_loading = true; - // Planify.todoist.delete.begin (this, (obj, res) => { - // Planify.todoist.delete.end (res); - // Services.Database.get_default ().delete_label (this); - // remove_button.is_loading = false; - // message_dialog.hide_destroy (); - // }); - // } else { - // Services.Database.get_default ().delete_label (this); - // message_dialog.hide_destroy (); - // } - // } else { - // message_dialog.hide_destroy (); - // } - // }); - } } \ No newline at end of file diff --git a/src/Objects/Project.vala b/core/Objects/Project.vala similarity index 90% rename from src/Objects/Project.vala rename to core/Objects/Project.vala index 2bf0b6752..fe9a728e5 100644 --- a/src/Objects/Project.vala +++ b/core/Objects/Project.vala @@ -132,8 +132,8 @@ public class Objects.Project : Objects.BaseObject { Gee.ArrayList _items_checked; public Gee.ArrayList items_checked { get { - _items = Services.Database.get_default ().get_items_checked_by_project (this); - return _items; + _items_checked = Services.Database.get_default ().get_items_checked_by_project (this); + return _items_checked; } } @@ -186,7 +186,20 @@ public class Objects.Project : Objects.BaseObject { return _percentage; } } + + bool _loading = false; + public bool loading { + set { + _loading = value; + loading_changed (_loading); + } + + get { + return _loading; + } + } + public signal void loading_changed (bool value); public signal void project_count_updated (); Gee.HashMap _label_filter = new Gee.HashMap (); @@ -264,6 +277,29 @@ public class Objects.Project : Objects.BaseObject { backend_type = BackendType.GOOGLE_TASKS; } + public Project.from_import_json (Json.Node node) { + id = node.get_object ().get_string_member ("id"); + name = node.get_object ().get_string_member ("name"); + color = node.get_object ().get_string_member ("color"); + backend_type = Util.get_default ().get_backend_type_by_text (node.get_object ().get_string_member ("backend_type")); + inbox_project = node.get_object ().get_boolean_member ("inbox_project"); + team_inbox = node.get_object ().get_boolean_member ("team_inbox"); + child_order = (int32) node.get_object ().get_int_member ("child_order"); + is_deleted = node.get_object ().get_boolean_member ("is_deleted"); + is_archived = node.get_object ().get_boolean_member ("is_archived"); + is_favorite = node.get_object ().get_boolean_member ("is_favorite"); + shared = node.get_object ().get_boolean_member ("shared"); + view_style = node.get_object ().get_string_member ("view_style") == "board" ? ProjectViewStyle.BOARD : ProjectViewStyle.LIST; + sort_order = (int32) node.get_object ().get_int_member ("sort_order"); + parent_id = node.get_object ().get_string_member ("parent_id"); + collapsed = node.get_object ().get_boolean_member ("collapsed"); + icon_style = node.get_object ().get_string_member ("icon_style") == "progress" ? ProjectIconStyle.PROGRESS : ProjectIconStyle.EMOJI; + emoji = node.get_object ().get_string_member ("emoji"); + show_completed = node.get_object ().get_boolean_member ("show_completed"); + description = node.get_object ().get_string_member ("description"); + due_date = node.get_object ().get_string_member ("due_date"); + } + public void update_from_json (Json.Node node) { name = node.get_object ().get_string_member ("name"); @@ -343,22 +379,18 @@ public class Objects.Project : Objects.BaseObject { }); } - public void update_async (Widgets.LoadingButton? loading_button = null) { - if (loading_button != null) { - loading_button.is_loading = true; - } + public void update_async () { + loading = true; if (backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().update.begin (this, (obj, res) => { Services.Todoist.get_default ().update.end (res); Services.Database.get_default ().update_project (this); - - if (loading_button != null) { - loading_button.is_loading = false; - } + loading = false; }); - } else { + } else if (backend_type == BackendType.LOCAL) { Services.Database.get_default ().update_project (this); + loading = false; } } @@ -513,8 +545,6 @@ public class Objects.Project : Objects.BaseObject { Json.Generator generator = new Json.Generator (); Json.Node root = builder.get_root (); generator.set_root (root); - - print ("%s\n".printf (generator.to_data (null))); return generator.to_data (null); } diff --git a/src/Objects/Queue.vala b/core/Objects/Queue.vala similarity index 100% rename from src/Objects/Queue.vala rename to core/Objects/Queue.vala diff --git a/src/Objects/Reminder.vala b/core/Objects/Reminder.vala similarity index 89% rename from src/Objects/Reminder.vala rename to core/Objects/Reminder.vala index 7ad0ae98a..2c3c6878a 100644 --- a/src/Objects/Reminder.vala +++ b/core/Objects/Reminder.vala @@ -39,6 +39,20 @@ public class Objects.Reminder : Objects.BaseObject { } } + bool _loading = false; + public bool loading { + set { + _loading = value; + loading_changed (_loading); + } + + get { + return _loading; + } + } + + public signal void loading_changed (bool value); + construct { deleted.connect (() => { Services.Database.get_default ().reminder_deleted (this); @@ -96,23 +110,19 @@ public class Objects.Reminder : Objects.BaseObject { return generator.to_data (null); } - public void delete (Widgets.LoadingButton? loading_button = null) { - if (item.project.backend_type == BackendType.TODOIST) { - if (loading_button != null) { - loading_button.is_loading = true; - } + public void delete () { + loading = true; + if (item.project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().delete.begin (this, (obj, res) => { - if (Services.Todoist.get_default ().delete.end (res)) { + if (Services.Todoist.get_default ().delete.end (res).status) { Services.Database.get_default ().delete_reminder (this); - } else { - if (loading_button != null) { - loading_button.is_loading = false; - } + loading = false; } }); } else { Services.Database.get_default ().delete_reminder (this); + loading = false; } } } \ No newline at end of file diff --git a/src/Objects/Section.vala b/core/Objects/Section.vala similarity index 75% rename from src/Objects/Section.vala rename to core/Objects/Section.vala index 9cb2057ac..90cd2d23f 100644 --- a/src/Objects/Section.vala +++ b/core/Objects/Section.vala @@ -112,22 +112,6 @@ public class Objects.Section : Objects.BaseObject { section_count_updated (); } }); - - // Services.EventBus.get_default ().item_moved.connect ((item, old_project_id, section_id, insert) => { - // if (item.project_id == id || old_project_id == id) { - // _project_count = update_project_count (); - // _percentage = update_percentage (); - // project_count_updated (); - // } - // }); - - // Services.Database.get_default ().section_moved.connect ((section, old_project_id) => { - // if (section.project_id == id || old_project_id == id) { - // _project_count = update_project_count (); - // _percentage = update_percentage (); - // project_count_updated (); - // } - // }); } public Section.from_json (Json.Node node) { @@ -135,6 +119,18 @@ public class Objects.Section : Objects.BaseObject { update_from_json (node); } + public Section.from_import_json (Json.Node node) { + id = node.get_object ().get_string_member ("id"); + name = node.get_object ().get_string_member ("name"); + archived_at = node.get_object ().get_string_member ("archived_at"); + added_at = node.get_object ().get_string_member ("added_at"); + project_id = node.get_object ().get_string_member ("project_id"); + section_order = (int32) node.get_object ().get_int_member ("section_order"); + collapsed = node.get_object ().get_boolean_member ("collapsed"); + is_deleted = node.get_object ().get_boolean_member ("is_deleted"); + is_archived = node.get_object ().get_boolean_member ("is_archived"); + } + public void update_from_json (Json.Node node) { project_id = node.get_object ().get_string_member ("project_id"); name = node.get_object ().get_string_member ("name"); @@ -278,62 +274,6 @@ public class Objects.Section : Objects.BaseObject { return generator.to_data (null); } - public void delete (bool confirm = true) { - // if (!confirm) { - // if (project.todoist) { - // Planify.todoist.delete.begin (this, (obj, res) => { - // Planify.todoist.delete.end (res); - // Services.Database.get_default ().delete_section (this); - // }); - // } else { - // Services.Database.get_default ().delete_section (this); - // } - - // return; - // } - - // int tasks = items.size; - // string message = _("Are you sure you want to delete %s?".printf (Util.get_default ().get_dialog_text (name))); - // if (tasks > 0) { - // message = _("Delete %s with its %d tasks?".printf (Util.get_default ().get_dialog_text (name), tasks)); - // } - - // var message_dialog = new Dialogs.MessageDialog ( - // _("Delete section"), - // message, - // "dialog-warning" - // ); - // message_dialog.add_default_action (_("Cancel"), Gtk.ResponseType.CANCEL); - // message_dialog.show_all (); - - // var remove_button = new Widgets.LoadingButton ( - // LoadingButtonType.LABEL, _("Delete")) { - // hexpand = true - // }; - // remove_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); - // remove_button.get_style_context ().add_class ("border-radius-6"); - // message_dialog.add_action_widget (remove_button, Gtk.ResponseType.ACCEPT); - - // message_dialog.default_action.connect ((response) => { - // if (response == Gtk.ResponseType.ACCEPT) { - // if (project.todoist) { - // remove_button.is_loading = true; - // Planify.todoist.delete.begin (this, (obj, res) => { - // Planify.todoist.delete.end (res); - // Services.Database.get_default ().delete_section (this); - // remove_button.is_loading = false; - // message_dialog.hide_destroy (); - // }); - // } else { - // Services.Database.get_default ().delete_section (this); - // message_dialog.hide_destroy (); - // } - // } else { - // message_dialog.hide_destroy (); - // } - // }); - } - public override string get_move_json (string uuid, string new_project_id) { var builder = new Json.Builder (); builder.begin_array (); diff --git a/core/QuickAdd.vala b/core/QuickAdd.vala new file mode 100644 index 000000000..9c2ad17fa --- /dev/null +++ b/core/QuickAdd.vala @@ -0,0 +1,340 @@ +public class Layouts.QuickAdd : Adw.Bin { + public bool is_window_quick_add { get; construct; } + public Objects.Item item { get; set; } + + private Gtk.Entry content_entry; + private Widgets.LoadingButton submit_button; + private Widgets.HyperTextView description_textview; + private Widgets.ItemLabels item_labels; + private Widgets.ProjectPicker.ProjectPickerButton project_picker_button; + private Widgets.ScheduleButton schedule_button; + private Widgets.PinButton pin_button; + private Widgets.PriorityButton priority_button; + private Widgets.LabelPicker.LabelButton label_button; + private Gtk.Label name_label; + private Gtk.Image added_image; + private Gtk.Stack main_stack; + + public signal void hide_destroy (); + public signal void send_interface_id (string id); + + public QuickAdd (bool is_window_quick_add = false) { + Object ( + is_window_quick_add: is_window_quick_add + ); + } + + construct { + item = new Objects.Item (); + item.project_id = Services.Settings.get_default ().settings.get_string ("inbox-project-id"); + + + if (is_window_quick_add && + Services.Settings.get_default ().settings.get_boolean ("quick-add-save-last-project")) { + var project = Services.Database.get_default ().get_project (Services.Settings.get_default ().settings.get_string ("quick-add-project-selected")); + + if (project != null) { + item.project_id = project.id; + } + } + + content_entry = new Widgets.Entry () { + hexpand = true, + placeholder_text = _("To-do name") + }; + + content_entry.add_css_class (Granite.STYLE_CLASS_FLAT); + + var content_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + valign = Gtk.Align.CENTER, + hexpand = true, + margin_top = 12, + margin_start = 12, + margin_end = 12 + }; + + content_box.append (content_entry); + + description_textview = new Widgets.HyperTextView (_("Add a description…")) { + height_request = 64, + left_margin = 14, + right_margin = 6, + top_margin = 6, + wrap_mode = Gtk.WrapMode.WORD_CHAR, + hexpand = true + }; + + description_textview.remove_css_class ("view"); + + item_labels = new Widgets.ItemLabels (item) { + margin_start = 12 + }; + + schedule_button = new Widgets.ScheduleButton (); + pin_button = new Widgets.PinButton (item); + priority_button = new Widgets.PriorityButton (); + priority_button.update_from_item (item); + label_button = new Widgets.LabelPicker.LabelButton (item); + + var action_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) { + margin_start = 3, + margin_top = 6, + margin_bottom = 3 + }; + + var action_box_right = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { + hexpand = true, + halign = Gtk.Align.END, + margin_end = 3 + }; + + action_box_right.append (label_button); + action_box_right.append (priority_button); + action_box_right.append (pin_button); + + action_box.append (schedule_button); + action_box.append (action_box_right); + + var quick_add_content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + margin_top = 12, + margin_bottom = 12, + margin_start = 12, + margin_end = 12, + vexpand = true + }; + quick_add_content.add_css_class (Granite.STYLE_CLASS_CARD); + quick_add_content.add_css_class ("sidebar-card"); + quick_add_content.append (content_box); + quick_add_content.append (description_textview); + quick_add_content.append (item_labels); + quick_add_content.append (action_box); + + // Alert Box + var error_icon = new Widgets.DynamicIcon.from_icon_name ("dialog-warning-symbolic"); + var error_label = new Gtk.Label ("Error de casa"); + + var error_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + vexpand = true + }; + + error_box.append (error_icon); + error_box.append (error_label); + + submit_button = new Widgets.LoadingButton (LoadingButtonType.LABEL, _("Add To-Do")) { + valign = CENTER, + css_classes = { Granite.STYLE_CLASS_SUGGESTED_ACTION, "border-radius-6" } + }; + + var cancel_button = new Gtk.Button.with_label (_("Cancel")) { + valign = CENTER, + css_classes = { "border-radius-6" } + }; + + name_label = new Gtk.Label (null); + name_label.valign = Gtk.Align.CENTER; + name_label.ellipsize = Pango.EllipsizeMode.END; + + var submit_cancel_grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + homogeneous = true, + hexpand = true, + halign = END + }; + submit_cancel_grid.append (cancel_button); + submit_cancel_grid.append (submit_button); + + project_picker_button = new Widgets.ProjectPicker.ProjectPickerButton (); + project_picker_button.project = item.project; + + var footer_content = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + hexpand = true, + margin_bottom = 12, + margin_start = 14, + margin_end = 12 + }; + + footer_content.append (project_picker_button); + footer_content.append (submit_cancel_grid); + + var main_content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + valign = Gtk.Align.START + }; + main_content.append (quick_add_content); + // main_content.append (error_box); + main_content.append (footer_content); + + var warning_image = new Gtk.Image (); + warning_image.gicon = new ThemedIcon ("dialog-warning"); + warning_image.pixel_size = 32; + + var warning_label = new Gtk.Label (_("I'm sorry, Quick Add can't find any project available, try creating a project from Planify.")); + warning_label.wrap = true; + warning_label.max_width_chars = 42; + warning_label.xalign = 0; + + var warning_box = new Gtk.Box (HORIZONTAL, 12) { + margin_start = 12 + }; + warning_box.halign = Gtk.Align.CENTER; + warning_box.valign = Gtk.Align.CENTER; + warning_box.append (warning_image); + warning_box.append (warning_label); + + main_stack = new Gtk.Stack () { + hexpand = true, + vexpand = true, + transition_type = Gtk.StackTransitionType.CROSSFADE + }; + + added_image = new Gtk.Image (); + added_image.gicon = new ThemedIcon ("planner-completed"); + added_image.pixel_size = 64; + + var added_label = new Gtk.Label (_("To-do added")); + + var added_box = new Gtk.Box (VERTICAL, 0); + added_box.halign = Gtk.Align.CENTER; + added_box.valign = Gtk.Align.CENTER; + added_box.append (added_image); + added_box.append (added_label); + + main_stack.add_named (main_content, "main"); + main_stack.add_named (warning_box, "warning"); + main_stack.add_named (added_box, "added"); + + var window = new Gtk.WindowHandle (); + window.set_child (main_stack); + + child = window; + + Timeout.add (225, () => { + if (Services.Database.get_default ().is_database_empty ()) { + main_stack.visible_child_name = "warning"; + } else { + main_stack.visible_child_name = "main"; + content_entry.grab_focus (); + } + + return GLib.Source.REMOVE; + }); + + content_entry.activate.connect (add_item); + submit_button.clicked.connect (add_item); + cancel_button.clicked.connect (() => { + hide_destroy (); + }); + + project_picker_button.selected.connect ((project) => { + item.project_id = project.id; + + if (Services.Settings.get_default ().settings.get_boolean ("quick-add-save-last-project")) { + Services.Settings.get_default ().settings.set_string ("quick-add-project-selected", project.id); + } + }); + + schedule_button.date_changed.connect ((datetime) => { + set_due (datetime); + }); + + pin_button.changed.connect (() => { + set_pinned (!item.pinned); + }); + + priority_button.changed.connect ((priority) => { + set_priority (priority); + }); + + item_labels.labels_changed.connect (set_labels); + label_button.labels_changed.connect (set_labels); + + var destroy_controller = new Gtk.EventControllerKey (); + add_controller (destroy_controller); + + destroy_controller.key_pressed.connect ((keyval, keycode, state) => { + if (keyval == 65307) { + hide_destroy (); + } + + return false; + }); + } + + private void add_item () { + if (content_entry.buffer.text.length <= 0) { + hide_destroy (); + return; + } + + item.content = content_entry.get_text (); + item.description = description_textview.get_text (); + + if (item.project.backend_type == BackendType.TODOIST) { + submit_button.is_loading = true; + Services.Todoist.get_default ().add.begin (item, (obj, res) => { + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + submit_button.is_loading = false; + + if (response.status) { + item.id = response.data; + add_item_db (item); + } else { + debug ("%s", response.error); + } + }); + } else if (item.project.backend_type == BackendType.LOCAL) { + item.id = Util.get_default ().generate_id (); + add_item_db (item); + } + } + + private void add_item_db (Objects.Item item) { + if (Services.Database.get_default ().insert_item (item)) { + send_interface_id (item.id); + + main_stack.visible_child_name = "added"; + added_image.add_css_class ("fancy-turn-animation"); + + Timeout.add (750, () => { + hide_destroy (); + return GLib.Source.REMOVE; + }); + } + } + + public void update_content (string content = "") { + content_entry.set_text (content); + } + + public void set_project (Objects.Project project) { + project_picker_button.project = project; + item.project_id = project.id; + } + + public void set_due (GLib.DateTime? datetime) { + item.due.date = datetime == null ? "" : Util.get_default ().get_todoist_datetime_format (datetime); + + if (item.due.date == "") { + item.due.reset (); + } + + schedule_button.update_from_item (item); + } + + public void set_pinned (bool pinned) { + item.pinned = pinned; + pin_button.update_request (); + } + + public void set_priority (int priority) { + if (item.priority == priority) { + return; + } + + item.priority = priority; + priority_button.update_from_item (item); + } + + public void set_labels (Gee.HashMap labels) { + item.update_local_labels (labels); + item_labels.update_labels (); + } +} \ No newline at end of file diff --git a/src/Services/Database.vala b/core/Services/Database.vala similarity index 98% rename from src/Services/Database.vala rename to core/Services/Database.vala index a7d3c8ca7..5d968fdba 100644 --- a/src/Services/Database.vala +++ b/core/Services/Database.vala @@ -335,6 +335,19 @@ public class Services.Database : GLib.Object { } } + public void clear_database () { + string db_path = Environment.get_user_data_dir () + "/io.github.alainm23.planify/database.db"; + File db_file = File.new_for_path (db_path); + + if (db_file.query_exists ()) { + try { + db_file.delete (); + } catch (Error err) { + warning (err.message); + } + } + } + public bool is_database_empty () { return projects.size <= 0; } @@ -1237,7 +1250,7 @@ public class Services.Database : GLib.Object { return_value.id = stmt.column_text (0); return_value.content = stmt.column_text (1); return_value.description = stmt.column_text (2); - return_value.due.update_from_json (get_due_parameter (stmt, 3)); + return_value.due.update_from_json (get_due_parameter (stmt.column_text (3))); return_value.added_at = stmt.column_text (4); return_value.completed_at = stmt.column_text (5); return_value.updated_at = stmt.column_text (6); @@ -1645,7 +1658,7 @@ public class Services.Database : GLib.Object { Objects.Reminder return_value = new Objects.Reminder (); return_value.id = stmt.column_text (0); return_value.item_id = stmt.column_text (1); - return_value.due.update_from_json (get_due_parameter (stmt, 2)); + return_value.due.update_from_json (get_due_parameter (stmt.column_text (2))); return return_value; } @@ -1946,7 +1959,7 @@ public class Services.Database : GLib.Object { stmt.reset (); } - public void remove_CurTempIds (int64 id) { // vala-lint=naming-convention + public void remove_CurTempIds (string id) { // vala-lint=naming-convention Sqlite.Statement stmt; sql = """ @@ -1954,7 +1967,7 @@ public class Services.Database : GLib.Object { """; db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_int64 (stmt, "$id", id); + set_parameter_str (stmt, "$id", id); if (stmt.step () != Sqlite.DONE) { warning ("Error: %d: %s", db.errcode (), db.errmsg ()); @@ -2024,10 +2037,11 @@ public class Services.Database : GLib.Object { stmt.bind_int (par_position, val); } - private void set_parameter_int64 (Sqlite.Statement? stmt, string par, int64 val) { - int par_position = stmt.bind_parameter_index (par); - stmt.bind_int64 (par_position, val); - } + // private void set_parameter_int64 (Sqlite.Statement? stmt, string par, int64 val) { + // int par_position = stmt.bind_parameter_index (par); + // stmt.bind_int64 (par_position, val); + // } + private void set_parameter_str (Sqlite.Statement? stmt, string par, string val) { int par_position = stmt.bind_parameter_index (par); stmt.bind_text (par_position, val); @@ -2043,13 +2057,13 @@ public class Services.Database : GLib.Object { } Json.Parser parser; - private Json.Object? get_due_parameter (Sqlite.Statement stmt, int col) { + public Json.Object? get_due_parameter (string data) { if (parser == null) { parser = new Json.Parser (); } try { - parser.load_from_data (stmt.column_text (col), -1); + parser.load_from_data (data, -1); } catch (Error e) { debug (e.message); } diff --git a/src/Services/EventBus.vala b/core/Services/EventBus.vala similarity index 91% rename from src/Services/EventBus.vala rename to core/Services/EventBus.vala index 2af3b6307..eb528eec4 100644 --- a/src/Services/EventBus.vala +++ b/core/Services/EventBus.vala @@ -48,9 +48,8 @@ public class Services.EventBus : Object { public signal void checked_toggled (Objects.Item item, bool old_checked); public signal void favorite_toggled (Objects.Project project); public signal void item_moved (Objects.Item item, string old_project_id, string old_section_id, string old_parent_id = "", bool insert = true); - public signal void item_section_moved (Layouts.ItemRow itemrow, string old_section_id); public signal void update_items_position (string project_id, string section_id); - public signal void update_inserted_item_map (Layouts.ItemRow row, string old_section_id); + public signal void update_inserted_item_map (Gtk.Widget row, string old_section_id); public signal void update_section_sort_func (string project_id, string section_id, bool active); public signal void day_changed (); public signal void open_labels (); @@ -68,8 +67,8 @@ public class Services.EventBus : Object { public bool multi_select_enabled = false; public signal void show_multi_select (bool enabled); public signal void unselect_all (); - public signal void select_item (Layouts.ItemRow itemrow); - public signal void unselect_item (Layouts.ItemRow itemrow); + public signal void select_item (Gtk.Widget itemrow); + public signal void unselect_item (Gtk.Widget itemrow); public signal void magic_button_visible (bool active); public signal void item_drag_begin (Objects.Item item); diff --git a/core/Services/Settings.vala b/core/Services/Settings.vala index 16bb0989a..b5390d77e 100644 --- a/core/Services/Settings.vala +++ b/core/Services/Settings.vala @@ -34,4 +34,13 @@ public class Services.Settings : GLib.Object { public Settings () { settings = new GLib.Settings ("io.github.alainm23.planify"); } + + public void reset_settings () { + var schema_source = GLib.SettingsSchemaSource.get_default (); + SettingsSchema schema = schema_source.lookup ("io.github.alainm23.planify", true); + + foreach (string key in schema.list_keys ()) { + Services.Settings.get_default ().settings.reset (key); + } + } } diff --git a/src/Services/Todoist.vala b/core/Services/Todoist.vala similarity index 69% rename from src/Services/Todoist.vala rename to core/Services/Todoist.vala index 3dc63e0cf..791f25e24 100644 --- a/src/Services/Todoist.vala +++ b/core/Services/Todoist.vala @@ -52,7 +52,6 @@ public class Services.Todoist : GLib.Object { public Todoist () { session = new Soup.Session (); - parser = new Json.Parser (); var network_monitor = GLib.NetworkMonitor.get_default (); @@ -116,13 +115,6 @@ public class Services.Todoist : GLib.Object { log_out (); } - public void init () { - if (invalid_token ()) { - var todoist_oauth = new Dialogs.TodoistOAuth (); - todoist_oauth.show (); - } - } - public bool invalid_token () { return Services.Settings.get_default ().settings.get_string ("todoist-access-token").strip () == ""; } @@ -131,17 +123,14 @@ public class Services.Todoist : GLib.Object { return !invalid_token (); } - public async void get_todoist_token (string url) { - string CODE = url.split ("=") [1]; - CODE = CODE.split ("&") [0]; + public async void get_todoist_token (string _url) { + string code = _url.split ("=") [1]; + code = code.split ("&") [0]; - string URL = "https://todoist.com/oauth/access_token?client_id=%s&client_secret=%s&code=%s".printf ( - Constants.TODOIST_CLIENT_ID, - Constants.TODOIST_CLIENT_SECRET, - CODE - ); + string url = "https://todoist.com/oauth/access_token?client_id=%s&client_secret=%s&code=%s".printf ( + Constants.TODOIST_CLIENT_ID, Constants.TODOIST_CLIENT_SECRET, code); - var message = new Soup.Message ("POST", URL); + var message = new Soup.Message ("POST", url); try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); @@ -185,6 +174,7 @@ public class Services.Todoist : GLib.Object { var user_object = parser.get_root ().get_object ().get_object_member ("user"); if (user_object.get_null_member ("image_id") == false) { Services.Settings.get_default ().settings.set_string ("todoist-user-image-id", user_object.get_string_member ("image_id")); + Services.Settings.get_default ().settings.set_string ("todoist-user-avatar", user_object.get_string_member ("avatar_s640")); } // Set Inbox @@ -400,58 +390,58 @@ public class Services.Todoist : GLib.Object { } public async void queue () { - // Gee.ArrayList queue = Services.Database.get_default ().get_all_queue (); - - // string url = "%s?commands=%s".printf ( - // TODOIST_SYNC_URL, - // get_queue_json (queue) - // ); - - // var message = new Soup.Message ("POST", url); - // message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); - - // try { - // GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.LOW, null); - // parser.load_from_data ((string) stream.get_data ()); - - // // Debug - // print_root (parser.get_root ()); - - // var node = parser.get_root ().get_object (); - // string sync_token = node.get_string_member ("sync_token"); - // Services.Settings.get_default ().settings.set_string ("todoist-sync-token", sync_token); - - // foreach (var q in queue) { - // var uuid_member = node.get_object_member ("sync_status").get_member (q.uuid); - // if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - // if (q.query == "project_add") { - // var id = node.get_object_member ("temp_id_mapping").get_string_member (q.temp_id); - // Services.Database.get_default ().update_project_id (q.object_id, id); - // Services.Database.get_default ().remove_CurTempIds (q.object_id); - // } - - // if (q.query == "section_add") { - // var id = node.get_object_member ("temp_id_mapping").get_string_member (q.temp_id); - // Services.Database.get_default ().update_section_id (q.object_id, id); - // Services.Database.get_default ().remove_CurTempIds (q.object_id); - // } - - // if (q.query == "item_add") { - // var id = int64.parse (node.get_object_member ("temp_id_mapping").get_string_member (q.temp_id)); - // Services.Database.get_default ().update_item_id (q.object_id, id); - // Services.Database.get_default ().remove_CurTempIds (q.object_id); - // } - - // Services.Database.get_default ().remove_queue (q.uuid); - // } else { - // //var http_code = (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"); - // //var error_message = sync_status.get_object_member (uuid).get_string_member ("error"); - // //project_added_error (http_code, error_message); - // } - // } - // } catch (Error e) { - - // } + Gee.ArrayList queue = Services.Database.get_default ().get_all_queue (); + + string url = "%s?commands=%s".printf ( + TODOIST_SYNC_URL, + get_queue_json (queue) + ); + + var message = new Soup.Message ("POST", url); + message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + + try { + GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.LOW, null); + parser.load_from_data ((string) stream.get_data ()); + + // Debug + print_root (parser.get_root ()); + + var node = parser.get_root ().get_object (); + string sync_token = node.get_string_member ("sync_token"); + Services.Settings.get_default ().settings.set_string ("todoist-sync-token", sync_token); + + foreach (var q in queue) { + var uuid_member = node.get_object_member ("sync_status").get_member (q.uuid); + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + if (q.query == "project_add") { + var id = node.get_object_member ("temp_id_mapping").get_string_member (q.temp_id); + Services.Database.get_default ().update_project_id (q.object_id, id); + Services.Database.get_default ().remove_CurTempIds (q.object_id); + } + + if (q.query == "section_add") { + var id = node.get_object_member ("temp_id_mapping").get_string_member (q.temp_id); + Services.Database.get_default ().update_section_id (q.object_id, id); + Services.Database.get_default ().remove_CurTempIds (q.object_id); + } + + if (q.query == "item_add") { + var id = node.get_object_member ("temp_id_mapping").get_string_member (q.temp_id); + Services.Database.get_default ().update_item_id (q.object_id, id); + Services.Database.get_default ().remove_CurTempIds (q.object_id); + } + + Services.Database.get_default ().remove_queue (q.uuid); + } else { + //var http_code = (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"); + //var error_message = sync_status.get_object_member (uuid).get_string_member ("error"); + //project_added_error (http_code, error_message); + } + } + } catch (Error e) { + + } } public string get_queue_json (Gee.ArrayList queue) { @@ -492,7 +482,7 @@ public class Services.Todoist : GLib.Object { builder.set_member_name ("args"); builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.set_member_name ("name"); builder.add_string_value (get_string_member_by_object (q.args, "name")); @@ -513,7 +503,7 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.end_object (); builder.end_object (); @@ -537,7 +527,7 @@ public class Services.Todoist : GLib.Object { if (get_type_by_member (q.args, "project_id") == GLib.Type.STRING) { builder.add_string_value (get_string_member_by_object (q.args, "project_id")); } else { - builder.add_int_value (get_int_member_by_object (q.args, "project_id")); + builder.add_string_value (get_string_member_by_object (q.args, "project_id")); } builder.end_object (); @@ -552,7 +542,7 @@ public class Services.Todoist : GLib.Object { builder.set_member_name ("args"); builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.set_member_name ("name"); builder.add_string_value (get_string_member_by_object (q.args, "name")); @@ -570,7 +560,7 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.end_object (); builder.end_object (); @@ -585,14 +575,10 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.set_member_name ("project_id"); - if (get_type_by_member (q.args, "project_id") == GLib.Type.STRING) { - builder.add_string_value (get_string_member_by_object (q.args, "project_id")); - } else { - builder.add_int_value (get_int_member_by_object (q.args, "project_id")); - } + builder.add_string_value (get_string_member_by_object (q.args, "project_id")); builder.end_object (); builder.end_object (); @@ -619,31 +605,13 @@ public class Services.Todoist : GLib.Object { builder.add_int_value (get_int_member_by_object (q.args, "priority")); builder.set_member_name ("project_id"); - if (get_type_by_member (q.args, "project_id") == GLib.Type.STRING) { - builder.add_string_value (get_string_member_by_object (q.args, "project_id")); - } else { - builder.add_int_value (get_int_member_by_object (q.args, "project_id")); - } + builder.add_string_value (get_string_member_by_object (q.args, "project_id")); - if (get_type_by_member (q.args, "section_id") == GLib.Type.STRING) { - builder.set_member_name ("section_id"); - builder.add_string_value (get_string_member_by_object (q.args, "section_id")); - } else { - if (get_int_member_by_object (q.args, "section_id") != 0) { - builder.set_member_name ("section_id"); - builder.add_int_value (get_int_member_by_object (q.args, "section_id")); - } - } + builder.set_member_name ("section_id"); + builder.add_string_value (get_string_member_by_object (q.args, "section_id")); - if (get_type_by_member (q.args, "parent_id") == GLib.Type.STRING) { - builder.set_member_name ("parent_id"); - builder.add_string_value (get_string_member_by_object (q.args, "parent_id")); - } else { - if (get_int_member_by_object (q.args, "parent_id") != 0) { - builder.set_member_name ("parent_id"); - builder.add_int_value (get_int_member_by_object (q.args, "parent_id")); - } - } + builder.set_member_name ("parent_id"); + builder.add_string_value (get_string_member_by_object (q.args, "parent_id")); builder.end_object (); builder.end_object (); @@ -658,7 +626,7 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.set_member_name ("content"); builder.add_string_value (get_string_member_by_object (q.args, "content")); @@ -698,7 +666,7 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.end_object (); builder.end_object (); @@ -713,16 +681,12 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); string type = get_string_member_by_object (q.args, "type"); builder.set_member_name (type); - if (get_type_by_member (q.args, type) == GLib.Type.STRING) { - builder.add_string_value (get_string_member_by_object (q.args, type)); - } else { - builder.add_int_value (get_int_member_by_object (q.args, type)); - } + builder.add_string_value (get_string_member_by_object (q.args, type)); builder.end_object (); builder.end_object (); @@ -737,7 +701,7 @@ public class Services.Todoist : GLib.Object { builder.begin_object (); builder.set_member_name ("id"); - builder.add_int_value (get_int_member_by_object (q.args, "id")); + builder.add_string_value (get_string_member_by_object (q.args, "id")); builder.end_object (); builder.end_object (); @@ -810,19 +774,24 @@ public class Services.Todoist : GLib.Object { } } - public async string? add (Objects.BaseObject object) { + public async TodoistResponse add (Objects.BaseObject object) { string temp_id = Util.get_default ().generate_string (); string uuid = Util.get_default ().generate_string (); - string? id = null; + string id; string url = "%s?commands=%s".printf ( TODOIST_SYNC_URL, object.get_add_json (temp_id, uuid) - ); + ); var message = new Soup.Message ("POST", url); - message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + message.request_headers.append ( + "Authorization", + "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token")) + ); + TodoistResponse response = new TodoistResponse (); + try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); parser.load_from_data ((string) stream.get_data ()); @@ -830,64 +799,80 @@ public class Services.Todoist : GLib.Object { // Debug print_root (parser.get_root ()); - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); + if (is_todoist_error (message.status_code)) { + response.from_error_json (parser.get_root ()); - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); - id = parser.get_root ().get_object ().get_object_member ("temp_id_mapping").get_string_member (temp_id); - } else { debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") + message.status_code, + get_todoist_error (message.status_code) + ); + } else { + var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); + var uuid_member = sync_status.get_member (uuid); + + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); + id = parser.get_root ().get_object ().get_object_member ("temp_id_mapping").get_string_member (temp_id); + + response.status = true; + response.data = id; + } else { + response.error = sync_status.get_object_member (uuid).get_string_member ("error"); + + debug_error ( + (uint) sync_status.get_object_member (uuid).get_int_member ("http_code"), + sync_status.get_object_member (uuid).get_string_member ("error") ); + } } } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { + if (is_todoist_error (message.status_code)) { + response.error = e.message; + debug_error ( - (int32) message.status_code, + message.status_code, e.message - ); + ); } else { id = Util.get_default ().generate_id (object); - object.id = id; - var queue = new Objects.Queue (); queue.uuid = uuid; queue.object_id = id; queue.temp_id = temp_id; queue.query = object.type_add; queue.args = object.to_json (); - + Services.Database.get_default ().insert_queue (queue); Services.Database.get_default ().insert_CurTempIds (object.id, temp_id, object.object_type_string); + + response.status = true; + response.data = queue.object_id; } } - return id; + return response; } - private void debug_error (int status_code, string message) { - print ("Code: %d - %s".printf (status_code, message)); + private void debug_error (uint status_code, string message) { + debug ("Code: %s - %s".printf (status_code.to_string (), message)); } - public async bool update (Objects.BaseObject object) { + public async TodoistResponse update (Objects.BaseObject object) { string uuid = Util.get_default ().generate_string (); - bool success = false; string url = "%s?commands=%s".printf ( TODOIST_SYNC_URL, object.get_update_json (uuid) - ); + ); var message = new Soup.Message ("POST", url); - message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + message.request_headers.append ( + "Authorization", + "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token")) + ); + + TodoistResponse response = new TodoistResponse (); try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); @@ -896,29 +881,37 @@ public class Services.Todoist : GLib.Object { // Debug print_root (parser.get_root ()); - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); + if (is_todoist_error (message.status_code)) { + response.from_error_json (parser.get_root ()); - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); - success = true; - } else { debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") + message.status_code, + get_todoist_error (message.status_code) + ); + } else { + var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); + var uuid_member = sync_status.get_member (uuid); + + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); + response.status = true; + } else { + response.error = sync_status.get_object_member (uuid).get_string_member ("error"); + + debug_error ( + (uint) sync_status.get_object_member (uuid).get_int_member ("http_code"), + sync_status.get_object_member (uuid).get_string_member ("error") ); + } } } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { + if (is_todoist_error (message.status_code)) { + response.error = e.message; + debug_error ( - (int32) message.status_code, + message.status_code, e.message - ); + ); } else { var queue = new Objects.Queue (); queue.uuid = uuid; @@ -927,15 +920,15 @@ public class Services.Todoist : GLib.Object { queue.args = object.to_json (); Services.Database.get_default ().insert_queue (queue); + response.status = true; } } - return success; + return response; } - public async bool delete (Objects.BaseObject object) { + public async TodoistResponse delete (Objects.BaseObject object) { string uuid = Util.get_default ().generate_string (); - bool success = false; string url = "%s?commands=%s".printf ( TODOIST_SYNC_URL, @@ -945,6 +938,8 @@ public class Services.Todoist : GLib.Object { var message = new Soup.Message ("POST", url); message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + TodoistResponse response = new TodoistResponse (); + try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); parser.load_from_data ((string) stream.get_data ()); @@ -952,29 +947,37 @@ public class Services.Todoist : GLib.Object { // Debug print_root (parser.get_root ()); - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); + if (is_todoist_error (message.status_code)) { + response.from_error_json (parser.get_root ()); - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); - success = true; - } else { debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") + message.status_code, + get_todoist_error (message.status_code) + ); + } else { + var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); + var uuid_member = sync_status.get_member (uuid); + + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); + response.status = true; + } else { + response.error = sync_status.get_object_member (uuid).get_string_member ("error"); + + debug_error ( + (uint) sync_status.get_object_member (uuid).get_int_member ("http_code"), + sync_status.get_object_member (uuid).get_string_member ("error") ); + } } } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { + if (is_todoist_error (message.status_code)) { + response.error = e.message; + debug_error ( - (int32) message.status_code, + message.status_code, e.message - ); + ); } else { var queue = new Objects.Queue (); queue.uuid = uuid; @@ -983,10 +986,11 @@ public class Services.Todoist : GLib.Object { queue.args = object.to_json (); Services.Database.get_default ().insert_queue (queue); + response.status = true; } } - return success; + return response; } /* Sections @@ -1004,17 +1008,21 @@ public class Services.Todoist : GLib.Object { Items */ - public async bool complete_item (Objects.Item item) { + public async TodoistResponse complete_item (Objects.Item item) { string uuid = Util.get_default ().generate_string (); - bool success = false; string url = "%s?commands=%s".printf ( TODOIST_SYNC_URL, item.get_check_json (uuid, item.checked ? "item_complete" : "item_uncomplete") - ); + ); var message = new Soup.Message ("POST", url); - message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + message.request_headers.append ( + "Authorization", + "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token")) + ); + + TodoistResponse response = new TodoistResponse (); try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); @@ -1022,43 +1030,51 @@ public class Services.Todoist : GLib.Object { // Debug print_root (parser.get_root ()); + + if (is_todoist_error (message.status_code)) { + response.from_error_json (parser.get_root ()); - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); - - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); - success = true; - } else { debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") + message.status_code, + get_todoist_error (message.status_code) + ); + } else { + var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); + var uuid_member = sync_status.get_member (uuid); + + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); + response.status = true; + } else { + response.error = sync_status.get_object_member (uuid).get_string_member ("error"); + + debug_error ( + (uint) sync_status.get_object_member (uuid).get_int_member ("http_code"), + sync_status.get_object_member (uuid).get_string_member ("error") ); + } } } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { + if (is_todoist_error (message.status_code)) { + response.error = e.message; + debug_error ( - (int32) message.status_code, + message.status_code, e.message - ); + ); } else { var queue = new Objects.Queue (); queue.uuid = uuid; queue.object_id = item.id; queue.query = item.checked ? "item_complete" : "item_uncomplete"; queue.args = item.to_json (); - success = true; Services.Database.get_default ().insert_queue (queue); + response.status = true; } } - return success; + return response; } private void print_root (Json.Node root) { @@ -1097,9 +1113,8 @@ public class Services.Todoist : GLib.Object { return generator.to_data (null); } - public async bool move_item (Objects.Item item, string type, string id) { + public async TodoistResponse move_item (Objects.Item item, string type, string id) { string uuid = Util.get_default ().generate_string (); - bool success = false; string url = "%s?commands=%s".printf ( TODOIST_SYNC_URL, @@ -1107,7 +1122,12 @@ public class Services.Todoist : GLib.Object { ); var message = new Soup.Message ("POST", url); - message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + message.request_headers.append ( + "Authorization", + "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token")) + ); + + TodoistResponse response = new TodoistResponse (); try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); @@ -1115,50 +1135,57 @@ public class Services.Todoist : GLib.Object { print_root (parser.get_root ()); - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); + if (is_todoist_error (message.status_code)) { + response.from_error_json (parser.get_root ()); - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ( - "todoist-sync-token", - parser.get_root ().get_object ().get_string_member ("sync_token") - ); - success = true; - } else { debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") + message.status_code, + get_todoist_error (message.status_code) + ); + } else { + var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); + var uuid_member = sync_status.get_member (uuid); + + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + Services.Settings.get_default ().settings.set_string ( + "todoist-sync-token", + parser.get_root ().get_object ().get_string_member ("sync_token") + ); + response.status = true; + } else { + response.error = sync_status.get_object_member (uuid).get_string_member ("error"); + + debug_error ( + (uint) sync_status.get_object_member (uuid).get_int_member ("http_code"), + sync_status.get_object_member (uuid).get_string_member ("error") ); + } } } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { + if (is_todoist_error (message.status_code)) { + response.error = e.message; + debug_error ( - (int32) message.status_code, + message.status_code, e.message - ); + ); } else { var queue = new Objects.Queue (); queue.uuid = uuid; queue.object_id = item.id; queue.query = "item_move"; queue.args = item.to_move_json (type, id); - success = true; Services.Database.get_default ().insert_queue (queue); + response.status = true; } } - return success; + return response; } - public async bool move_project_section (Objects.BaseObject base_object, string project_id) { + public async TodoistResponse move_project_section (Objects.BaseObject base_object, string project_id) { string uuid = Util.get_default ().generate_string (); - bool success = false; string url = "%s?commands=%s".printf ( TODOIST_SYNC_URL, @@ -1166,7 +1193,12 @@ public class Services.Todoist : GLib.Object { ); var message = new Soup.Message ("POST", url); - message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); + message.request_headers.append ( + "Authorization", + "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token")) + ); + + TodoistResponse response = new TodoistResponse (); try { GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); @@ -1174,32 +1206,40 @@ public class Services.Todoist : GLib.Object { print_root (parser.get_root ()); - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); + if (is_todoist_error (message.status_code)) { + response.from_error_json (parser.get_root ()); - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ( - "todoist-sync-token", - parser.get_root ().get_object ().get_string_member ("sync_token") - ); - success = true; - } else { debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") + message.status_code, + get_todoist_error (message.status_code) + ); + } else { + var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); + var uuid_member = sync_status.get_member (uuid); + + if (uuid_member.get_node_type () == Json.NodeType.VALUE) { + Services.Settings.get_default ().settings.set_string ( + "todoist-sync-token", + parser.get_root ().get_object ().get_string_member ("sync_token") + ); + response.status = true; + } else { + response.error = sync_status.get_object_member (uuid).get_string_member ("error"); + + debug_error ( + (uint) sync_status.get_object_member (uuid).get_int_member ("http_code"), + sync_status.get_object_member (uuid).get_string_member ("error") ); + } } } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { + if (is_todoist_error (message.status_code)) { + response.error = e.message; + debug_error ( - (int32) message.status_code, + message.status_code, e.message - ); + ); } else { var queue = new Objects.Queue (); queue.uuid = uuid; @@ -1211,12 +1251,49 @@ public class Services.Todoist : GLib.Object { } queue.args = base_object.to_json (); - success = true; + response.status = true; Services.Database.get_default ().insert_queue (queue); } } - return success; + return response; + } + + public bool is_todoist_error (uint status_code) { + return (status_code == 400 || status_code == 401 || + status_code == 403 || status_code == 404 || + status_code == 429 || status_code == 500 || + status_code == 503); + } + + public string get_todoist_error (uint code) { + var messages = new Gee.HashMap (); + + messages.set (400, _("The request was incorrect.")); + messages.set (401, _("Authentication is required, and has failed, or has not yet been provided.")); + messages.set (403, _("The request was valid, but for something that is forbidden.")); + messages.set (404, _("The requested resource could not be found.")); + messages.set (429, _("The user has sent too many requests in a given amount of time.")); + messages.set (500, _("The request failed due to a server error.")); + messages.set (503, _("The server is currently unable to handle the request.")); + + return messages.has_key (code) ? messages.get (code) : _("Unknown error"); + } +} + +public class TodoistResponse { + public bool status { get; set; } + public string error { get; set; default = ""; } + public int error_code { get; set; default = 0; } + public int http_code { get; set; default = 0; } + + public string data { get; set; } + + public void from_error_json (Json.Node node) { + status = false; + error_code = (int) node.get_object ().get_int_member ("error_code"); + error = node.get_object ().get_string_member ("error"); + http_code = (int) node.get_object ().get_int_member ("http_code"); } } diff --git a/src/Util.vala b/core/Util.vala similarity index 85% rename from src/Util.vala rename to core/Util.vala index ac7277e88..2b8969055 100644 --- a/src/Util.vala +++ b/core/Util.vala @@ -170,11 +170,11 @@ public class Util : GLib.Object { var file_path = File.new_for_path (get_avatar_path (id)); var file_from_uri = File.new_for_uri (avatar_url); + if (!file_path.query_exists ()) { MainLoop loop = new MainLoop (); - file_from_uri.copy_async.begin (file_path, 0, Priority.DEFAULT, null, (current_num_bytes, total_num_bytes) => { // vala-lint=line-length - }, (obj, res) => { + file_from_uri.copy_async.begin (file_path, 0, Priority.DEFAULT, null, (current_num_bytes, total_num_bytes) => {}, (obj, res) => { try { if (file_from_uri.copy_async.end (res)) { // Services.EventBus.get_default ().avatar_downloaded (); @@ -228,7 +228,7 @@ public class Util : GLib.Object { } public string get_encode_text (string text) { - return text.replace ("&", "%26").replace ("#", "%23"); + return Uri.escape_string (text, null, false); } public string get_theme_name () { @@ -602,29 +602,6 @@ public class Util : GLib.Object { return returned; } - public void item_added (Layouts.ItemRow row) { - bool insert = row.project_id != row.item.project.id || row.section_id != row.item.section_id; - - if (row.item.section_id != "") { - Services.Database.get_default ().get_section (row.item.section_id) - .add_item_if_not_exists (row.item, insert); - } else { - Services.Database.get_default ().get_project (row.item.project_id) - .add_item_if_not_exists (row.item, insert); - } - - if (!insert) { - Services.EventBus.get_default ().update_inserted_item_map (row, ""); - row.update_inserted_item (); - } else { - row.hide_destroy (); - } - - Services.EventBus.get_default ().send_notification (create_toast (_("Task added to %s".printf (row.item.project.short_name)))); - Services.EventBus.get_default ().update_section_sort_func (row.item.project_id, row.item.section_id, false); - } - - public GLib.DateTime get_today_format_date () { return get_format_date (new DateTime.now_local ()); } @@ -667,9 +644,11 @@ public class Util : GLib.Object { } bool returned = true; + if (datetime.get_hour () == 0 && datetime.get_minute () == 0 && datetime.get_second () == 0) { returned = false; } + return returned; } @@ -769,6 +748,10 @@ public class Util : GLib.Object { _dynamic_icons.set ("information", true); _dynamic_icons.set ("dots-vertical", true); _dynamic_icons.set ("plus", true); + _dynamic_icons.set ("file-download", true); + _dynamic_icons.set ("download", true); + _dynamic_icons.set ("file", true); + _dynamic_icons.set ("gift", true); } return _dynamic_icons; @@ -783,8 +766,8 @@ public class Util : GLib.Object { return entry.get_text_length () > 0; } - public bool is_text_valid (Widgets.SourceView entry) { - return entry.buffer.text.length > 0; + public bool is_text_valid (string text) { + return text.length > 0; } public string get_short_name (string name, int size = Constants.SHORT_NAME_SIZE) { @@ -800,38 +783,9 @@ public class Util : GLib.Object { public bool is_clock_format_12h () { return Services.Settings.get_default ().settings.get_string ("clock-format").contains ("12h"); } - - public void open_quick_find () { - // var dialog = new Dialogs.QuickFind.QuickFind (); - - // int window_x, window_y; - // int window_width, width_height; - - // Services.Settings.get_default ().settings.get ("window-position", "(ii)", out window_x, out window_y); - // Services.Settings.get_default ().settings.get ("window-size", "(ii)", out window_width, out width_height); - - // dialog.move (window_x + ((window_width - dialog.width_request) / 2), window_y + 48); - // dialog.show_all (); - } - - public void open_item_dialog (Objects.Item item) { - // Services.EventBus.get_default ().alt_pressed = false; - - // var dialog = new Dialogs.Item (item); - - // int window_x, window_y; - // int window_width, width_height; - - // Services.Settings.get_default ().settings.get ("window-position", "(ii)", out window_x, out window_y); - // Services.Settings.get_default ().settings.get ("window-size", "(ii)", out window_width, out width_height); - - // dialog.move (window_x + ((window_width - dialog.width_request) / 2), window_y + 48); - // dialog.show_all (); - } - public void clear_database (string title, string message) { - var dialog = new Adw.MessageDialog ((Gtk.Window) Planify.instance.main_window, - title, message); + public void clear_database (string title, string message, Gtk.Window window) { + var dialog = new Adw.MessageDialog (window, title, message); dialog.body_use_markup = true; dialog.add_response ("cancel", _("Cancel")); @@ -841,101 +795,25 @@ public class Util : GLib.Object { dialog.response.connect ((response) => { if (response == "delete") { - clear_database_query (); - reset_settings (); - show_alert_destroy (); + Services.Database.get_default ().clear_database (); + Services.Settings.get_default ().reset_settings (); + show_alert_destroy (window); } }); } - public void show_alert_destroy () { - var dialog = new Adw.MessageDialog ((Gtk.Window) Planify.instance.main_window, - null, _("Process completed, you need to start Planify again.")); + public void show_alert_destroy (Gtk.Window window) { + var dialog = new Adw.MessageDialog (window, null, _("Process completed, you need to start Planify again.")); dialog.modal = true; dialog.add_response ("ok", _("Ok")); dialog.show (); dialog.response.connect ((response) => { - Planify.instance.main_window.destroy (); + window.destroy (); }); } - public void clear_database_query () { - string db_path = Environment.get_user_data_dir () + "/io.github.alainm23.planify/database.db"; - File db_file = File.new_for_path (db_path); - - if (db_file.query_exists ()) { - try { - db_file.delete (); - } catch (Error err) { - warning (err.message); - } - } - } - - public void reset_settings () { - var schema_source = GLib.SettingsSchemaSource.get_default (); - SettingsSchema schema = schema_source.lookup ("com.github.alainm23.planit", true); - - foreach (string key in schema.list_keys ()) { - Services.Settings.get_default ().settings.reset (key); - } - } - - // public void open_migrate_message () { - // var message_dialog = new Dialogs.MessageDialog ( - // _("Welcome to Planner 3"), - // _("We have detected that you have a Planner 2 configuration started, currently the v3 database is not compatible with v2, if you wish you can download a backup in JSON format and migrate your data manually, or you can start with v3 with a new configuration."), - // "dialog-warning" - // ) { - // modal = true - // }; - - // message_dialog.add_default_action (_("Create backup"), Gtk.ResponseType.ACCEPT, Gtk.STYLE_CLASS_SUGGESTED_ACTION); - // message_dialog.add_default_action (_("Starting over"), Gtk.ResponseType.CANCEL); - - // message_dialog.show_all (); - - // message_dialog.default_action.connect ((response) => { - // if (response == Gtk.ResponseType.CANCEL) { - // clear_database_query (); - // Services.Settings.get_default ().settings.set_string ("version", Build.VERSION); - // message_dialog.destroy (); - // } else { - // Services.MigrateV2.get_default ().export_v2_database (); - // } - // }); - // } - - // public void delete_app_data () { - // var message_dialog = new Dialogs.MessageDialog ( - // _("Delete all data app"), - // _("Are you sure that you would like to delete all of your data app? Once deleted, it cannot be restored. You will need to restart the app for the change to take place."), - // "dialog-warning" - // ); - // message_dialog.add_default_action (_("Cancel"), Gtk.ResponseType.CANCEL); - // message_dialog.show_all (); - - // var remove_button = new Widgets.LoadingButton ( - // LoadingButtonType.LABEL, _("Delete")) { - // hexpand = true - // }; - // remove_button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION); - // remove_button.get_style_context ().add_class ("border-radius-6"); - // message_dialog.add_action_widget (remove_button, Gtk.ResponseType.ACCEPT); - - // message_dialog.default_action.connect ((response) => { - // if (response == Gtk.ResponseType.ACCEPT) { - // clear_database_query (); - // reset_settings (); - // Planify.instance.main_window.destroy (); - // } else { - // message_dialog.hide_destroy (); - // } - // }); - // } - public FilterType get_filter () { switch (Services.Settings.get_default ().settings.get_enum ("homepage-item")) { case 0: @@ -945,33 +823,12 @@ public class Util : GLib.Object { case 2: return FilterType.SCHEDULED; case 3: - return FilterType.FILTER; + return FilterType.LABELS; default: assert_not_reached (); } } - public bool is_todoist_error (int status_code) { - return (status_code == 400 || status_code == 401 || - status_code == 403 || status_code == 404 || - status_code == 429 || status_code == 500 || - status_code == 503); - } - - public string get_todoist_error (int code) { - var messages = new Gee.HashMap (); - - messages.set (400, _("The request was incorrect.")); - messages.set (401, _("Authentication is required, and has failed, or has not yet been provided.")); - messages.set (403, _("The request was valid, but for something that is forbidden.")); - messages.set (404, _("The requested resource could not be found.")); - messages.set (429, _("The user has sent too many requests in a given amount of time.")); - messages.set (500, _("The request failed due to a server error.")); - messages.set (503, _("The server is currently unable to handle the request.")); - - return messages.get (code); - } - public int get_default_priority () { int default_priority = Services.Settings.get_default ().settings.get_enum ("default-priority"); int returned = 1; @@ -1063,6 +920,20 @@ public class Util : GLib.Object { } } + public string get_priority_keywords (int priority) { + if (priority == Constants.PRIORITY_1) { + return "%s;%s".printf ("p1", _("high")); + } else if (priority == Constants.PRIORITY_2) { + return "%s;%s".printf ("p2", _("medium")); + } else if (priority == Constants.PRIORITY_3) { + return "%s;%s".printf ("p3", _("low")); + } else if (priority == Constants.PRIORITY_4) { + return "%s;%s".printf ("p4", _("none")); + } else { + return ""; + } + } + public string get_priority_icon (int priority) { if (priority == Constants.PRIORITY_1) { return "planner-priority-1"; @@ -1326,6 +1197,20 @@ We hope you’ll enjoy using Planify!"""); return text; } } + + public BackendType get_backend_type_by_text (string backend_type) { + if (backend_type == "local") { + return BackendType.LOCAL; + } else if (backend_type == "todoist") { + return BackendType.TODOIST; + } else if (backend_type == "google-tasks") { + return BackendType.GOOGLE_TASKS; + } else if (backend_type == "caldav") { + return BackendType.CALDAV; + } else { + return BackendType.NONE; + } + } } public class RegexMarkdown { diff --git a/core/Utils.vala b/core/Utils.vala deleted file mode 100644 index c0d3f0edd..000000000 --- a/core/Utils.vala +++ /dev/null @@ -1,93 +0,0 @@ -/* -* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Utils : GLib.Object { - private static Utils? _instance; - public static Utils get_default () { - if (_instance == null) { - _instance = new Utils (); - } - - return _instance; - } - - public string get_encode_text (string text) { - return GLib.Uri.escape_string (text, null, false); - } - - /* - Icons - */ - - private Gee.HashMap? _dynamic_icons; - public Gee.HashMap dynamic_icons { - get { - if (_dynamic_icons != null) { - return _dynamic_icons; - } - - _dynamic_icons = new Gee.HashMap (); - _dynamic_icons.set ("planner-calendar", true); - _dynamic_icons.set ("planner-search", true); - _dynamic_icons.set ("chevron-right", true); - _dynamic_icons.set ("chevron-down", true); - _dynamic_icons.set ("planner-refresh", true); - _dynamic_icons.set ("planner-edit", true); - _dynamic_icons.set ("planner-trash", true); - _dynamic_icons.set ("planner-star", true); - _dynamic_icons.set ("planner-note", true); - _dynamic_icons.set ("planner-close-circle", true); - _dynamic_icons.set ("planner-check-circle", true); - _dynamic_icons.set ("planner-flag", true); - _dynamic_icons.set ("planner-tag", true); - _dynamic_icons.set ("planner-pinned", true); - _dynamic_icons.set ("planner-settings", true); - _dynamic_icons.set ("planner-bell", true); - _dynamic_icons.set ("sidebar-left", true); - _dynamic_icons.set ("sidebar-right", true); - _dynamic_icons.set ("planner-mail", true); - _dynamic_icons.set ("planner-note", true); - _dynamic_icons.set ("planner-settings-sliders", true); - _dynamic_icons.set ("planner-list", true); - _dynamic_icons.set ("planner-board", true); - _dynamic_icons.set ("color-swatch", true); - _dynamic_icons.set ("emoji-happy", true); - _dynamic_icons.set ("planner-clipboard", true); - _dynamic_icons.set ("planner-copy", true); - _dynamic_icons.set ("planner-rotate", true); - _dynamic_icons.set ("planner-section", true); - _dynamic_icons.set ("unordered-list", true); - _dynamic_icons.set ("ordered-list", true); - _dynamic_icons.set ("menu", true); - _dynamic_icons.set ("share", true); - _dynamic_icons.set ("dropdown", true); - _dynamic_icons.set ("information", true); - _dynamic_icons.set ("dots-vertical", true); - _dynamic_icons.set ("plus", true); - - return _dynamic_icons; - } - } - - public bool is_dynamic_icon (string icon_name) { - return dynamic_icons.has_key (icon_name); - } -} \ No newline at end of file diff --git a/src/Widgets/Calendar/Calendar.vala b/core/Widgets/Calendar/Calendar.vala similarity index 100% rename from src/Widgets/Calendar/Calendar.vala rename to core/Widgets/Calendar/Calendar.vala diff --git a/src/Widgets/Calendar/CalendarDay.vala b/core/Widgets/Calendar/CalendarDay.vala similarity index 89% rename from src/Widgets/Calendar/CalendarDay.vala rename to core/Widgets/Calendar/CalendarDay.vala index 32d787e00..62958c7c3 100644 --- a/src/Widgets/Calendar/CalendarDay.vala +++ b/core/Widgets/Calendar/CalendarDay.vala @@ -19,7 +19,7 @@ * Authored by: Alain M. */ -public class Widgets.Calendar.CalendarDay : Gtk.Grid { +public class Widgets.Calendar.CalendarDay : Adw.Bin { public int day { set { label.label = value.to_string (); @@ -32,10 +32,14 @@ public class Widgets.Calendar.CalendarDay : Gtk.Grid { private Gtk.Label label; public signal void day_selected (int day); - construct { - halign = Gtk.Align.CENTER; - valign = Gtk.Align.CENTER; + public CalendarDay () { + Object ( + halign: Gtk.Align.CENTER, + valign: Gtk.Align.CENTER + ); + } + construct { label = new Gtk.Label (null) { height_request = 16, width_request = 16, @@ -56,7 +60,7 @@ public class Widgets.Calendar.CalendarDay : Gtk.Grid { main_grid.append (label); - attach (main_grid, 0, 0); + child = main_grid; var gesture = new Gtk.GestureClick (); gesture.set_button (1); diff --git a/src/Widgets/Calendar/CalendarHeader.vala b/core/Widgets/Calendar/CalendarHeader.vala similarity index 94% rename from src/Widgets/Calendar/CalendarHeader.vala rename to core/Widgets/Calendar/CalendarHeader.vala index a9b24f166..fa3713187 100644 --- a/src/Widgets/Calendar/CalendarHeader.vala +++ b/core/Widgets/Calendar/CalendarHeader.vala @@ -37,11 +37,15 @@ public class Widgets.Calendar.CalendarHeader : Gtk.Box { } } - construct { - hexpand = true; - orientation = Gtk.Orientation.HORIZONTAL; - valign = Gtk.Align.CENTER; - + public CalendarHeader () { + Object ( + hexpand: true, + orientation: Gtk.Orientation.HORIZONTAL, + valign: Gtk.Align.CENTER + ); + } + + construct { month_label = new Gtk.Label (new GLib.DateTime.now_local ().format (_("%OB"))); month_label.add_css_class ("font-bold"); diff --git a/src/Widgets/Calendar/CalendarView.vala b/core/Widgets/Calendar/CalendarView.vala similarity index 96% rename from src/Widgets/Calendar/CalendarView.vala rename to core/Widgets/Calendar/CalendarView.vala index b0ba8bdfb..7f048853d 100644 --- a/src/Widgets/Calendar/CalendarView.vala +++ b/core/Widgets/Calendar/CalendarView.vala @@ -19,7 +19,7 @@ * Authored by: Alain M. */ -public class Widgets.Calendar.CalendarView : Gtk.Box { +public class Widgets.Calendar.CalendarView : Adw.Bin { private Gee.ArrayList days_arraylist; private Gtk.Grid days_grid; @@ -27,7 +27,6 @@ public class Widgets.Calendar.CalendarView : Gtk.Box { public CalendarView () { Object ( - orientation: Gtk.Orientation.VERTICAL, margin_start: 6, margin_end: 6 ); @@ -59,7 +58,7 @@ public class Widgets.Calendar.CalendarView : Gtk.Box { days_arraylist.add (day); } - append (days_grid); + child = days_grid; } public void fill_grid_days (int start_day, diff --git a/src/Widgets/Calendar/CalendarWeek.vala b/core/Widgets/Calendar/CalendarWeek.vala similarity index 100% rename from src/Widgets/Calendar/CalendarWeek.vala rename to core/Widgets/Calendar/CalendarWeek.vala diff --git a/src/Widgets/CircularProgressBar.vala b/core/Widgets/CircularProgressBar.vala similarity index 77% rename from src/Widgets/CircularProgressBar.vala rename to core/Widgets/CircularProgressBar.vala index fb6428a7f..ec5390754 100644 --- a/src/Widgets/CircularProgressBar.vala +++ b/core/Widgets/CircularProgressBar.vala @@ -11,7 +11,7 @@ using Gtk; using Cairo; -public class Widgets.CircularProgressBar : Gtk.Grid { +public class Widgets.CircularProgressBar : Adw.Bin { public int size { get; construct; } public double percentage { @@ -48,13 +48,14 @@ public class Widgets.CircularProgressBar : Gtk.Grid { add_css_class ("circular-progress-bar"); } - circularProgressBar = new _CircularProgressBar(size); - circularProgressBar.margin_start = 2; - circularProgressBar.margin_top = 2; - circularProgressBar.margin_end = 2; - circularProgressBar.margin_bottom = 2; + circularProgressBar = new _CircularProgressBar(size) { + margin_start = 2, + margin_top = 2, + margin_end = 2, + margin_bottom = 2 + }; - attach(circularProgressBar, 0, 0); + child = circularProgressBar; } } @@ -173,7 +174,7 @@ public class _CircularProgressBar : Gtk.DrawingArea { } private int calculate_radius () { - return int.min (get_allocated_width () / 2, get_allocated_height () / 2) - 1; + return int.min (get_width () / 2, get_height () / 2) - 1; } public override Gtk.SizeRequestMode get_request_mode () { @@ -188,8 +189,8 @@ public class _CircularProgressBar : Gtk.DrawingArea { color = Gdk.RGBA (); - var center_x = get_allocated_width () / 2; - var center_y = get_allocated_height () / 2; + var center_x = get_width () / 2; + var center_y = get_height () / 2; var radius = calculate_radius (); if (radius - line_width < 0) { @@ -241,34 +242,5 @@ public class _CircularProgressBar : Gtk.DrawingArea { cr.stroke (); } } - - // Textual information - // var context = get_style_context (); - // context.save (); - // // FIXME: Gtk4 has changes in the styles that need to be reviewed - // // For now we get the text color from the default context. - // color = context.get_color (); - // Gdk.cairo_set_source_rgba (cr, color); - - // // Percentage - // layout = Pango.cairo_create_layout (cr); - // layout.set_text ("%d".printf ((int) (percentage * 100.0)), -1); - // desc = Pango.FontDescription.from_string (font + " 24"); - // layout.set_font_description (desc); - // Pango.cairo_update_layout (cr, layout); - // layout.get_size (out w, out h); - // cr.move_to (center_x - ((w / Pango.SCALE) / 2), center_y - 27 ); - // Pango.cairo_show_layout (cr, layout); - - // // Units indicator (percentage) - // layout.set_text ("PERCENT", -1); - // desc = Pango.FontDescription.from_string (font + " 8"); - // layout.set_font_description (desc); - // Pango.cairo_update_layout (cr, layout); - // layout.get_size (out w, out h); - // cr.move_to (center_x - ((w / Pango.SCALE) / 2), center_y + 13); - // Pango.cairo_show_layout (cr, layout); - // context.restore (); - // cr.restore (); } } \ No newline at end of file diff --git a/src/Widgets/ContextMenu/MenuItem.vala b/core/Widgets/ContextMenu/MenuItem.vala similarity index 100% rename from src/Widgets/ContextMenu/MenuItem.vala rename to core/Widgets/ContextMenu/MenuItem.vala diff --git a/src/Widgets/ContextMenu/MenuPicker.vala b/core/Widgets/ContextMenu/MenuPicker.vala similarity index 100% rename from src/Widgets/ContextMenu/MenuPicker.vala rename to core/Widgets/ContextMenu/MenuPicker.vala diff --git a/src/Widgets/ContextMenu/MenuSeparator.vala b/core/Widgets/ContextMenu/MenuSeparator.vala similarity index 100% rename from src/Widgets/ContextMenu/MenuSeparator.vala rename to core/Widgets/ContextMenu/MenuSeparator.vala diff --git a/src/Widgets/DateTimePicker/DateTimePicker.vala b/core/Widgets/DateTimePicker/DateTimePicker.vala similarity index 93% rename from src/Widgets/DateTimePicker/DateTimePicker.vala rename to core/Widgets/DateTimePicker/DateTimePicker.vala index 34d0d7410..1eed1441f 100644 --- a/src/Widgets/DateTimePicker/DateTimePicker.vala +++ b/core/Widgets/DateTimePicker/DateTimePicker.vala @@ -112,17 +112,14 @@ public class Widgets.DateTimePicker.DateTimePicker : Gtk.Popover { calendar_grid.attach (calendar_view, 0, 0); calendar_grid.add_css_class (Granite.STYLE_CLASS_CARD); - var time_icon = new Widgets.DynamicIcon () { - margin_start = 3 + var time_icon = new Widgets.DynamicIcon.from_icon_name ("planner-clock") { + margin_start = 9 }; - time_icon.size = 21; - time_icon.update_icon_name ("planner-clock"); - var time_label = new Gtk.Label (_("Time")) { - margin_start = 6 + margin_start = 6, + css_classes = { "font-weight-500" } }; - time_label.add_css_class ("font-weight-500"); time_picker = new Widgets.DateTimePicker.TimePicker () { hexpand = true, @@ -131,19 +128,19 @@ public class Widgets.DateTimePicker.DateTimePicker : Gtk.Popover { var time_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { hexpand = true, - margin_top = 6 + margin_top = 6, + css_classes = { "card" } }; time_box.append (time_icon); time_box.append (time_label); time_box.append (time_picker); - time_box.add_css_class (Granite.STYLE_CLASS_CARD); var submit_button = new Widgets.LoadingButton.with_label (_("Done")) { margin_top = 12, - margin_bottom = 3 + margin_bottom = 3, + css_classes = { Granite.STYLE_CLASS_SUGGESTED_ACTION } }; - submit_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); var calendar_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { hexpand = true @@ -156,7 +153,7 @@ public class Widgets.DateTimePicker.DateTimePicker : Gtk.Popover { var content_stack = new Gtk.Stack () { hexpand = true, vexpand = true, - transition_type = Gtk.StackTransitionType.SLIDE_RIGHT, + transition_type = Gtk.StackTransitionType.SLIDE_LEFT_RIGHT, vhomogeneous = false, hhomogeneous = true }; diff --git a/src/Widgets/ScheduleButton.vala b/core/Widgets/DateTimePicker/ScheduleButton.vala similarity index 99% rename from src/Widgets/ScheduleButton.vala rename to core/Widgets/DateTimePicker/ScheduleButton.vala index 6d6cbd567..8ca804976 100644 --- a/src/Widgets/ScheduleButton.vala +++ b/core/Widgets/DateTimePicker/ScheduleButton.vala @@ -43,7 +43,6 @@ public class Widgets.ScheduleButton : Gtk.Grid { due_image = new Widgets.DynamicIcon (); due_image.update_icon_name ("planner-calendar"); - due_image.size = 16; due_label = new Gtk.Label (_("Schedule")) { xalign = 0, diff --git a/core/Widgets/DateTimePicker/TimePicker.vala b/core/Widgets/DateTimePicker/TimePicker.vala new file mode 100644 index 000000000..c025518c0 --- /dev/null +++ b/core/Widgets/DateTimePicker/TimePicker.vala @@ -0,0 +1,280 @@ +/* +* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 3 of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +* Boston, MA 02110-1301 USA +* +* Authored by: Alain M. +*/ + +public class Widgets.DateTimePicker.TimePicker : Adw.Bin { + private Gtk.Text time_entry; + private Gtk.Stack time_stack; + private Gtk.Revealer no_time_revealer; + + public string format_12 { get; construct; } + public string format_24 { get; construct; } + + private GLib.DateTime _time = null; + public GLib.DateTime time { + get { + if (_time == null) { + time = new GLib.DateTime.now_local (); + } + + return _time; + } + + set { + _time = value; + changing_time = true; + + update_text (true); + changing_time = false; + } + } + + public bool has_time { + get { + return time_stack.visible_child_name == "time-box"; + } + + set { + time_stack.visible_child_name = value ? "time-box" : "add-time"; + } + } + + public bool no_time_visible { + set { + no_time_revealer.reveal_child = value; + } + } + + private string old_string = ""; + private bool changing_time = false; + + public signal void time_changed (); + + construct { + if (format_12 == null) { + format_12 = Granite.DateTime.get_default_time_format (true); + } + + if (format_24 == null) { + format_24 = Granite.DateTime.get_default_time_format (false); + } + + time_entry = new Gtk.Text () { + max_width_chars = 9, + margin_start = 12 + }; + + var no_time_button = new Gtk.Button () { + valign = Gtk.Align.CENTER, + halign = Gtk.Align.CENTER, + child = new Widgets.DynamicIcon.from_icon_name ("planner-close-circle"), + css_classes = { "flat" } + }; + + no_time_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT, + reveal_child = true, + child = no_time_button + }; + + var time_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { + css_classes = { "card" }, + margin_top = 3, + margin_bottom = 3, + margin_end = 3 + }; + time_box.append (time_entry); + time_box.append (no_time_revealer); + + var add_time_button = new Gtk.Button () { + valign = Gtk.Align.CENTER, + halign = Gtk.Align.END, + child = new Widgets.DynamicIcon.from_icon_name ("plus"), + css_classes = { "flat" } + }; + + time_stack = new Gtk.Stack () { + transition_type = Gtk.StackTransitionType.CROSSFADE + }; + time_stack.add_named (add_time_button, "add-time"); + time_stack.add_named (time_box, "time-box"); + + + var timepicker_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { + margin_start = 3, + hexpand = true + }; + + timepicker_box.append (time_stack); + + var main_grid = new Gtk.Grid () { + hexpand = true + }; + + main_grid.attach (timepicker_box, 0, 0); + + child = main_grid; + + add_time_button.clicked.connect (() => { + time_stack.visible_child_name = "time-box"; + update_text (); + }); + + // Connecting to events allowing manual changes + var focus_controller = new Gtk.EventControllerFocus (); + var scroll_controller = new Gtk.EventControllerScroll ( + Gtk.EventControllerScrollFlags.BOTH_AXES | + Gtk.EventControllerScrollFlags.DISCRETE + ); + + time_entry.add_controller (focus_controller); + time_entry.add_controller (scroll_controller); + + focus_controller.leave.connect (() => { + is_unfocused (); + }); + + scroll_controller.scroll.connect ((dx, dy) => { + double largest = dx.abs () > dy.abs () ? dx : dy; + if (largest < 0) { + _time = _time.add_minutes (1); + } else { + _time = _time.add_minutes (-1); + } + + update_text (); + return false; + }); + + time_entry.activate.connect (is_unfocused); + + no_time_button.clicked.connect (() => { + time_stack.visible_child_name = "add-time"; + _time = null; + update_text (); + }); + } + + private void is_unfocused () { + if (old_string.collate (time_entry.text) != 0) { + old_string = time_entry.text; + parse_time (time_entry.text.dup ()); + } + } + + private void parse_time (string timestr) { + string current = ""; + bool is_hours = true; + bool is_suffix = false; + bool has_suffix = false; + + int? hour = null; + int? minute = null; + foreach (var c in timestr.down ().to_utf8 ()) { + if (c.isdigit ()) { + current = "%s%c".printf (current, c); + } else { + if (!is_suffix) { + if (current != "") { + if (is_hours) { + is_hours = false; + hour = int.parse (current); + current = ""; + } else { + minute = int.parse (current); + current = ""; + } + } + + if (c.to_string ().contains ("a") || c.to_string ().contains ("p")) { + is_suffix = true; + current = "%s%c".printf (current, c); + } + } + + if (c.to_string ().contains ("m") && is_suffix) { + if (hour == null) { + return; + } else if (minute == null) { + minute = 0; + } + + // We can imagine that some will try to set it to "19:00 am" + if (current.contains ("a") || hour >= 12) { + time = time.add_hours (hour - time.get_hour ()); + } else { + time = time.add_hours (hour + 12 - time.get_hour ()); + } + + if (current.contains ("a") && hour == 12) { + time = time.add_hours (-12); + } + + time = time.add_minutes (minute - time.get_minute ()); + has_suffix = true; + } + } + } + + if (is_hours == false && is_suffix == false && current != "") { + minute = int.parse (current); + } + + if (hour == null) { + if (current.length < 3) { + hour = int.parse (current); + minute = 0; + } else if (current.length == 4) { + hour = int.parse (current.slice (0, 2)); + minute = int.parse (current.slice (2, 4)); + if (hour > 23 || minute > 59) { + hour = null; + minute = null; + } + } + } + + if (hour == null || minute == null) { + update_text (); + return; + } + + if (has_suffix == false) { + time = time.add_hours (hour - time.get_hour ()); + time = time.add_minutes (minute - time.get_minute ()); + } + + update_text (); + } + + private void update_text (bool no_signal = false) { + if (Util.get_default ().is_clock_format_12h ()) { + time_entry.set_text (time.format (format_12)); + } else { + time_entry.set_text (time.format (format_24)); + } + + old_string = time_entry.text; + + if (no_signal == false) { + time_changed (); + } + } +} \ No newline at end of file diff --git a/core/Widgets/DynamicIcon.vala b/core/Widgets/DynamicIcon.vala index 0025c72f9..c514d4c52 100644 --- a/core/Widgets/DynamicIcon.vala +++ b/core/Widgets/DynamicIcon.vala @@ -78,7 +78,7 @@ public class Widgets.DynamicIcon : Adw.Bin { dark_mode = Granite.Settings.get_default ().prefers_color_scheme == Granite.Settings.ColorScheme.DARK; } - if (Utils.get_default ().is_dynamic_icon (icon_name)) { + if (Util.get_default ().is_dynamic_icon (icon_name)) { icon.gicon = new ThemedIcon ("%s-%s".printf ( icon_name, dark_mode ? "dark" : "light" )); diff --git a/src/Widgets/Entries.vala b/core/Widgets/Entries.vala similarity index 100% rename from src/Widgets/Entries.vala rename to core/Widgets/Entries.vala diff --git a/core/Widgets/IconColorProject.vala b/core/Widgets/IconColorProject.vala new file mode 100644 index 000000000..ee917f748 --- /dev/null +++ b/core/Widgets/IconColorProject.vala @@ -0,0 +1,56 @@ +public class Widgets.IconColorProject : Adw.Bin { + public Objects.Project project { get; set; } + public int pixel_size { get; construct; } + + private Widgets.CircularProgressBar circular_progress_bar; + private Gtk.Label emoji_label; + private Gtk.Stack color_emoji_stack; + private Gtk.Stack stack; + + public IconColorProject (int pixel_size) { + Object ( + pixel_size: pixel_size + ); + } + + construct { + circular_progress_bar = new Widgets.CircularProgressBar (pixel_size); + circular_progress_bar.percentage = 100; + + emoji_label = new Gtk.Label (null) { + halign = Gtk.Align.CENTER + }; + + color_emoji_stack = new Gtk.Stack () { + transition_type = Gtk.StackTransitionType.CROSSFADE + }; + + color_emoji_stack.add_named (circular_progress_bar, "color"); + color_emoji_stack.add_named (emoji_label, "emoji"); + + var inbox_icon = new Widgets.DynamicIcon.from_icon_name ("planner-inbox") { + size = 19 + }; + + stack = new Gtk.Stack () { + transition_type = Gtk.StackTransitionType.CROSSFADE + }; + + stack.add_named (color_emoji_stack, "color-emoji"); + stack.add_named (inbox_icon, "inbox"); + + child = stack; + + notify["project"].connect (() => { + update_request (); + }); + } + + public void update_request () { + stack.visible_child_name = project.is_inbox_project ? "inbox" : "color-emoji"; + color_emoji_stack.visible_child_name = project.icon_style == ProjectIconStyle.PROGRESS ? "color" : "emoji"; + circular_progress_bar.color = project.color; + circular_progress_bar.percentage = project.percentage; + emoji_label.label = project.emoji; + } +} \ No newline at end of file diff --git a/src/Widgets/ItemLabelChild.vala b/core/Widgets/ItemLabelChild.vala similarity index 100% rename from src/Widgets/ItemLabelChild.vala rename to core/Widgets/ItemLabelChild.vala diff --git a/src/Widgets/ItemLabels.vala b/core/Widgets/ItemLabels.vala similarity index 96% rename from src/Widgets/ItemLabels.vala rename to core/Widgets/ItemLabels.vala index 66c543e4f..86382d682 100644 --- a/src/Widgets/ItemLabels.vala +++ b/core/Widgets/ItemLabels.vala @@ -19,21 +19,21 @@ * Authored by: Alain M. */ -public class Widgets.ItemLabels : Gtk.Grid { +public class Widgets.ItemLabels : Adw.Bin { public Objects.Item item { get; construct; } - private Gtk.FlowBox flowbox; - private Gtk.Revealer main_revealer; - - public signal void labels_changed (Gee.HashMap labels); - public signal void dialog_open (bool value); - private bool has_items { get { return item_labels_map.size > 0; } } + private Gtk.FlowBox flowbox; + private Gtk.Revealer main_revealer; + + public signal void labels_changed (Gee.HashMap labels); + public signal void dialog_open (bool value); + private Gee.HashMap item_labels_map; public ItemLabels (Objects.Item item) { @@ -56,12 +56,11 @@ public class Widgets.ItemLabels : Gtk.Grid { }; main_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN + transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN, + child = flowbox }; - - main_revealer.child = flowbox; - attach (main_revealer, 0, 0); + child = main_revealer; add_labels (); // button_press_event.connect ((sender, evt) => { diff --git a/src/Widgets/LabelButton.vala b/core/Widgets/LabelPicker/LabelButton.vala similarity index 79% rename from src/Widgets/LabelButton.vala rename to core/Widgets/LabelPicker/LabelButton.vala index 8a54f1911..f06b2e7e9 100644 --- a/src/Widgets/LabelButton.vala +++ b/core/Widgets/LabelPicker/LabelButton.vala @@ -19,12 +19,12 @@ * Authored by: Alain M. */ -public class Widgets.LabelButton : Gtk.Grid { +public class Widgets.LabelPicker.LabelButton : Adw.Bin { public Objects.Item item { get; construct; } private Gtk.MenuButton button; - - private Widgets.LabelPicker.LabelPicker labels_picker = null; + private Widgets.LabelPicker.LabelPicker labels_picker; + public signal void labels_changed (Gee.HashMap labels); public LabelButton (Objects.Item item) { @@ -39,18 +39,13 @@ public class Widgets.LabelButton : Gtk.Grid { construct { labels_picker = new Widgets.LabelPicker.LabelPicker (); - var tag_image = new Widgets.DynamicIcon (); - tag_image.size = 16; - tag_image.update_icon_name ("planner-tag"); - button = new Gtk.MenuButton () { - child = tag_image, - popover = labels_picker + child = new Widgets.DynamicIcon.from_icon_name ("planner-tag"), + popover = labels_picker, + css_classes = { Granite.STYLE_CLASS_FLAT } }; - - button.add_css_class (Granite.STYLE_CLASS_FLAT); - - attach (button, 0, 0); + + child = button; labels_picker.show.connect (() => { labels_picker.item = item; diff --git a/src/Widgets/LabelPicker/LabelPicker.vala b/core/Widgets/LabelPicker/LabelPicker.vala similarity index 91% rename from src/Widgets/LabelPicker/LabelPicker.vala rename to core/Widgets/LabelPicker/LabelPicker.vala index d836cff1f..2cfe08bda 100644 --- a/src/Widgets/LabelPicker/LabelPicker.vala +++ b/core/Widgets/LabelPicker/LabelPicker.vala @@ -110,15 +110,15 @@ public class Widgets.LabelPicker.LabelPicker : Gtk.Popover { content_grid.attach (listbox_scrolled, 0, 0); - var main_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); - main_grid.append (search_entry); - main_grid.append (content_grid); + var toolbar_view = new Adw.ToolbarView (); + toolbar_view.add_top_bar (search_entry); + toolbar_view.content = content_grid; - child = main_grid; + child = toolbar_view; add_all_labels (); var controller_key = new Gtk.EventControllerKey (); - main_grid.add_controller (controller_key); + toolbar_view.add_controller (controller_key); controller_key.key_pressed.connect ((keyval, keycode, state) => { var key = Gdk.keyval_name (keyval).replace ("KP_", ""); @@ -172,13 +172,19 @@ public class Widgets.LabelPicker.LabelPicker : Gtk.Popover { is_loading = true; label.backend_type = BackendType.TODOIST; Services.Todoist.get_default ().add.begin (label, (obj, res) => { - label.id = Services.Todoist.get_default ().add.end (res); - Services.Database.get_default ().insert_label (label); - checked_toggled (label, true); - - popdown (); - is_loading = false; - search_entry.text = ""; + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + + if (response.status) { + label.id = response.data; + Services.Database.get_default ().insert_label (label); + checked_toggled (label, true); + + popdown (); + is_loading = false; + search_entry.text = ""; + } else { + + } }); } else { label.id = Util.get_default ().generate_id (label); diff --git a/src/Widgets/LabelPicker/LabelRow.vala b/core/Widgets/LabelPicker/LabelRow.vala similarity index 100% rename from src/Widgets/LabelPicker/LabelRow.vala rename to core/Widgets/LabelPicker/LabelRow.vala diff --git a/src/Widgets/PinButton.vala b/core/Widgets/PinButton.vala similarity index 95% rename from src/Widgets/PinButton.vala rename to core/Widgets/PinButton.vala index cf35ea278..67363ddde 100644 --- a/src/Widgets/PinButton.vala +++ b/core/Widgets/PinButton.vala @@ -35,9 +35,9 @@ public class Widgets.PinButton : Gtk.Button { ); } - construct { - add_css_class (Granite.STYLE_CLASS_FLAT); - + construct { + add_css_class ("flat"); + pinned_image = new Widgets.DynamicIcon (); pinned_image.size = 16; diff --git a/src/Widgets/PriorityButton.vala b/core/Widgets/PriorityButton.vala similarity index 75% rename from src/Widgets/PriorityButton.vala rename to core/Widgets/PriorityButton.vala index 18ae59354..723955b44 100644 --- a/src/Widgets/PriorityButton.vala +++ b/core/Widgets/PriorityButton.vala @@ -1,7 +1,4 @@ -public class Widgets.PriorityButton : Gtk.Grid { - // public Objects.Item item { get; construct set; } - // public ECal.Component task { get; construct set; } - +public class Widgets.PriorityButton : Adw.Bin { private Widgets.DynamicIcon priority_image; private Gtk.MenuButton button; private Gtk.Popover priority_picker = null; @@ -17,26 +14,21 @@ public class Widgets.PriorityButton : Gtk.Grid { } construct { - button = new Gtk.MenuButton (); - button.add_css_class (Granite.STYLE_CLASS_FLAT); - - open_picker (); - priority_image = new Widgets.DynamicIcon (); priority_image.size = 16; - var projectbutton_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) { - valign = Gtk.Align.CENTER + button = new Gtk.MenuButton () { + css_classes = { Granite.STYLE_CLASS_FLAT }, + valign = Gtk.Align.CENTER, + halign = Gtk.Align.CENTER, + child = priority_image, + popover = build_popover (), }; - projectbutton_box.append (priority_image); - button.child = projectbutton_box; - attach (button, 0, 0); - - open_picker (); + child = button; } - public void open_picker () { + public Gtk.Popover build_popover () { var priority_1_item = new Widgets.ContextMenu.MenuItem (_("Priority 1: high"), "planner-priority-1"); var priority_2_item = new Widgets.ContextMenu.MenuItem (_("Priority 2: medium"), "planner-priority-2"); var priority_3_item = new Widgets.ContextMenu.MenuItem (_("Priority 3: low"), "planner-priority-3"); @@ -52,11 +44,9 @@ public class Widgets.PriorityButton : Gtk.Grid { priority_picker = new Gtk.Popover () { has_arrow = false, child = menu_box, - position = Gtk.PositionType.TOP + position = Gtk.PositionType.BOTTOM }; - button.popover = priority_picker; - priority_1_item.clicked.connect (() => { priority_picker.popdown (); changed (Constants.PRIORITY_1); @@ -76,6 +66,8 @@ public class Widgets.PriorityButton : Gtk.Grid { priority_picker.popdown (); changed (Constants.PRIORITY_4); }); + + return priority_picker; } public void update_from_item (Objects.Item item) { diff --git a/core/Widgets/ProjectPicker/ProjectPickerButton.vala b/core/Widgets/ProjectPicker/ProjectPickerButton.vala new file mode 100644 index 000000000..a090f2176 --- /dev/null +++ b/core/Widgets/ProjectPicker/ProjectPickerButton.vala @@ -0,0 +1,50 @@ +public class Widgets.ProjectPicker.ProjectPickerButton : Adw.Bin { + public Objects.Project project { get; set; } + + private Widgets.IconColorProject icon_project; + private Gtk.Label name_label; + + public signal void selected (Objects.Project project); + + construct { + icon_project = new Widgets.IconColorProject (10); + + name_label = new Gtk.Label (null); + name_label.valign = Gtk.Align.CENTER; + name_label.ellipsize = Pango.EllipsizeMode.END; + + var project_box = new Gtk.Box (HORIZONTAL, 6) { + valign = CENTER + }; + project_box.append (icon_project); + project_box.append (name_label); + + var project_picker_popover = new Widgets.ProjectPicker.ProjectPickerPopover (); + + var project_button = new Gtk.MenuButton () { + popover = project_picker_popover, + child = project_box, + css_classes = { Granite.STYLE_CLASS_FLAT } + }; + + child = project_button; + + notify["project"].connect (() => { + if (project != null) { + update_project_request (); + } + }); + + project_picker_popover.selected.connect ((_project) => { + project = _project; + update_project_request (); + selected (_project); + }); + } + + public void update_project_request () { + name_label.label = project.is_inbox_project ? _("Inbox") : project.name; + icon_project.project = project; + icon_project.update_request (); + } +} \ No newline at end of file diff --git a/core/Widgets/ProjectPicker/ProjectPickerPopover.vala b/core/Widgets/ProjectPicker/ProjectPickerPopover.vala new file mode 100644 index 000000000..af544f031 --- /dev/null +++ b/core/Widgets/ProjectPicker/ProjectPickerPopover.vala @@ -0,0 +1,114 @@ +public class Widgets.ProjectPicker.ProjectPickerPopover : Gtk.Popover { + public signal void selected (Objects.Project project); + + public ProjectPickerPopover () { + Object ( + height_request: 300, + width_request: 275, + has_arrow: false, + position: Gtk.PositionType.BOTTOM + ); + } + + construct { + var search_entry = new Gtk.SearchEntry () { + margin_top = 9, + margin_start = 9, + margin_end = 9, + margin_bottom = 9 + }; + + var inbox_group = new Layouts.HeaderItem (null) { + reveal_child = true + }; + + var local_group = new Layouts.HeaderItem (_("On this Computer")) { + reveal_child = Services.Database.get_default ().get_projects_by_backend_type (BackendType.LOCAL).size > 0 + }; + local_group.show_action = false; + + var todoist_group = new Layouts.HeaderItem (_("Todoist")) { + reveal_child = Services.Database.get_default ().get_projects_by_backend_type (BackendType.TODOIST).size > 0 + }; + todoist_group.show_action = false; + + var scrolled_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); + scrolled_box.append (inbox_group); + scrolled_box.append (local_group); + scrolled_box.append (todoist_group); + + var listbox = new Gtk.ListBox () { + hexpand = true, + vexpand = true + }; + + var stack = new Gtk.Stack () { + hexpand = true, + vexpand = true, + transition_type = Gtk.StackTransitionType.CROSSFADE, + margin_start = 6, + margin_end = 6, + margin_bottom = 6 + }; + + stack.add_named (scrolled_box, "projects"); + stack.add_named (listbox, "search"); + + var scrolled_window = new Gtk.ScrolledWindow () { + hscrollbar_policy = Gtk.PolicyType.NEVER, + hexpand = true, + vexpand = true, + child = stack + }; + + var toolbar_view = new Adw.ToolbarView (); + toolbar_view.add_top_bar (search_entry); + toolbar_view.content = scrolled_window; + + child = toolbar_view; + add_css_class ("popover-no-content"); + search_entry.grab_focus (); + + foreach (Objects.Project project in Services.Database.get_default ().projects) { + var row = new Widgets.ProjectPicker.ProjectPickerRow (project); + var row_2 = new Widgets.ProjectPicker.ProjectPickerRow (project); + + row.selected.connect (() => { + selected (row.project); + popdown (); + }); + + row_2.selected.connect (() => { + selected (row.project); + popdown (); + }); + + listbox.append (row_2); + + if (project.is_inbox_project) { + inbox_group.add_child (row); + } else { + if (project.backend_type == BackendType.LOCAL) { + local_group.add_child (row); + } else if (project.backend_type == BackendType.TODOIST) { + todoist_group.add_child (row); + } + } + } + + search_entry.search_changed.connect (() => { + scrolled_window.vadjustment.value = 0; + listbox.invalidate_filter (); + stack.visible_child_name = search_entry.text.length > 0 ? "search" : "projects"; + }); + + listbox.set_filter_func ((row) => { + var project = ((Widgets.ProjectPicker.ProjectPickerRow) row).project; + return search_entry.text.down () in project.name.down (); + }); + + closed.connect (() => { + stack.visible_child_name = "projects"; + }); + } +} \ No newline at end of file diff --git a/core/Widgets/ProjectPicker/ProjectPickerRow.vala b/core/Widgets/ProjectPicker/ProjectPickerRow.vala new file mode 100644 index 000000000..363eeb352 --- /dev/null +++ b/core/Widgets/ProjectPicker/ProjectPickerRow.vala @@ -0,0 +1,81 @@ +public class Widgets.ProjectPicker.ProjectPickerRow : Gtk.ListBoxRow { + public Objects.Project project { get; construct; } + + private Gtk.Label name_label; + private Gtk.Revealer main_revealer; + private Widgets.IconColorProject icon_project; + + public signal void selected (); + + public ProjectPickerRow (Objects.Project project) { + Object ( + project: project + ); + } + + construct { + add_css_class ("selectable-item"); + add_css_class ("transition"); + + icon_project = new Widgets.IconColorProject (10); + icon_project.project = project; + + name_label = new Gtk.Label (null); + name_label.valign = Gtk.Align.CENTER; + name_label.ellipsize = Pango.EllipsizeMode.END; + + var selected_icon = new Gtk.Image () { + gicon = new ThemedIcon ("emblem-ok-symbolic"), + pixel_size = 16, + hexpand = true, + valign = Gtk.Align.CENTER, + halign = Gtk.Align.END, + margin_end = 3 + }; + + selected_icon.add_css_class ("color-primary"); + + var selected_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.CROSSFADE + }; + + selected_revealer.child = selected_icon; + + var content_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + margin_top = 6, + margin_start = 6, + margin_end = 6, + margin_bottom = 6 + }; + content_box.append (icon_project); + content_box.append (name_label); + content_box.append (selected_revealer); + + main_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN + }; + + main_revealer.child = content_box; + + child = main_revealer; + + update_request (); + + Timeout.add (main_revealer.transition_duration, () => { + main_revealer.reveal_child = true; + return GLib.Source.REMOVE; + }); + + var select_gesture = new Gtk.GestureClick (); + add_controller (select_gesture); + + select_gesture.pressed.connect (() => { + selected (); + }); + } + + public void update_request () { + name_label.label = project.inbox_project ? _("Inbox") : project.name; + icon_project.update_request (); + } +} \ No newline at end of file diff --git a/core/meson.build b/core/meson.build index a79059828..210f1196b 100644 --- a/core/meson.build +++ b/core/meson.build @@ -1,10 +1,65 @@ core_files = files( - 'Utils.vala', + 'Util.vala', 'Enum.vala', 'Constants.vala', + 'QuickAdd.vala', + 'Services/Settings.vala', + 'Services/EventBus.vala', + 'Services/Database.vala', + 'Services/Todoist.vala', + + 'Layouts/HeaderItem.vala', + 'Widgets/DynamicIcon.vala', - 'Widgets/LoadingButton.vala' + 'Widgets/LoadingButton.vala', + 'Widgets/Entries.vala', + 'Widgets/IconColorProject.vala', + 'Widgets/PinButton.vala', + 'Widgets/PriorityButton.vala', + 'Widgets/ItemLabels.vala', + 'Widgets/ItemLabelChild.vala', + 'Widgets/CircularProgressBar.vala', + + 'Widgets/Calendar/Calendar.vala', + 'Widgets/Calendar/CalendarDay.vala', + 'Widgets/Calendar/CalendarHeader.vala', + 'Widgets/Calendar/CalendarView.vala', + 'Widgets/Calendar/CalendarWeek.vala', + + 'Widgets/ContextMenu/MenuItem.vala', + 'Widgets/ContextMenu/MenuSeparator.vala', + 'Widgets/ContextMenu/MenuPicker.vala', + + 'Widgets/DateTimePicker/ScheduleButton.vala', + 'Widgets/DateTimePicker/DateTimePicker.vala', + 'Widgets/DateTimePicker/TimePicker.vala', + + 'Widgets/LabelPicker/LabelPicker.vala', + 'Widgets/LabelPicker/LabelRow.vala', + 'Widgets/LabelPicker/LabelButton.vala', + + 'Widgets/ProjectPicker/ProjectPickerPopover.vala', + 'Widgets/ProjectPicker/ProjectPickerRow.vala', + 'Widgets/ProjectPicker/ProjectPickerButton.vala', + + 'Objects/BaseObject.vala', + 'Objects/Color.vala', + 'Objects/DueDate.vala', + 'Objects/Item.vala', + 'Objects/ItemLabel.vala', + 'Objects/Label.vala', + 'Objects/Project.vala', + 'Objects/Queue.vala', + 'Objects/Reminder.vala', + 'Objects/Section.vala', + + 'Objects/Filters/Pinboard.vala', + 'Objects/Filters/Scheduled.vala', + 'Objects/Filters/Today.vala', + 'Objects/Filters/Priority.vala', + 'Objects/Filters/Completed.vala', + 'Objects/Filters/Labels.vala', ) core_deps = [ @@ -15,6 +70,7 @@ core_deps = [ libadwaita_dep, granite_dep, json_dep, + libsoup_dep ] core_lib = shared_library( diff --git a/data/io.github.alainm23.planify.appdata.xml.in.in b/data/io.github.alainm23.planify.appdata.xml.in.in index 8d876925c..f52965b3f 100644 --- a/data/io.github.alainm23.planify.appdata.xml.in.in +++ b/data/io.github.alainm23.planify.appdata.xml.in.in @@ -4,7 +4,7 @@ CC0 GPL-3.0+ Planify - Never worry about forgetting things again + Forget about forgetting things

🚀️ Planify is here...

    @@ -53,7 +53,27 @@ https://www.patreon.com/alainm23 https://useplanner.com/support/ @appid@.desktop - ​ + + + +

    Planify 4.3 is here, design improvements and new features available.

    +

    What’s New

    +
      +
    • Quick Add Improvements: Now supports project selection, due date, priority, labels and pinned.
    • +
    • Sidebar filter settings: It is now possible to re-order, hide filters and the task cutter.
    • +
    • Backup support: It is now possible to create a backup copy and import it from somewhere else. Planify will import all your tasks and settings.
    • +
    • Offline support for Todoist: You were without internet, keep using Planify with Todoist, the tasks will be saved locally and synchronized when the connection returns.
    • +
    +

    Bug Fixed and Translations

    +
      +
    • Russian translations thanks to @hachikoharuno.
    • +
    • Fix typos in welcome project #1079 thanks to @Jaques22.
    • +
    • Fixed error when displaying color in calendar events.
    • +
    • Bugs fixed #1076, #1073.
    • +
    +
    +
    +
      diff --git a/data/resources/io.github.alainm23.planify.gresource.xml b/data/io.github.alainm23.planify.gresource.xml similarity index 92% rename from data/resources/io.github.alainm23.planify.gresource.xml rename to data/io.github.alainm23.planify.gresource.xml index 4006fc658..9acffbf9e 100644 --- a/data/resources/io.github.alainm23.planify.gresource.xml +++ b/data/io.github.alainm23.planify.gresource.xml @@ -12,6 +12,7 @@ resources/stylesheet/index.css resources/ui/shortcuts.ui + io.github.alainm23.planify.appdata.xml.in.in resources/icons/planner-inbox.svg resources/icons/planner-today.svg @@ -45,6 +46,7 @@ resources/icons/settings/planner-upload.svg resources/icons/settings/light-bulb.svg resources/icons/settings/archive-plus.svg + resources/icons/settings/sidebar.svg resources/icons/planner-calendar-light.svg resources/icons/planner-calendar-dark.svg @@ -70,7 +72,6 @@ resources/icons/planner-tag-light.svg resources/icons/planner-pinned-dark.svg resources/icons/planner-pinned-light.svg - resources/icons/planner-pinned-activated.svg resources/icons/planner-settings-dark.svg resources/icons/planner-settings-light.svg resources/icons/planner-bell-light.svg @@ -119,5 +120,13 @@ resources/icons/dots-vertical-dark.svg resources/icons/plus-light.svg resources/icons/plus-dark.svg + resources/icons/file-download-light.svg + resources/icons/file-download-dark.svg + resources/icons/download-light.svg + resources/icons/download-dark.svg + resources/icons/file-light.svg + resources/icons/file-dark.svg + resources/icons/gift-light.svg + resources/icons/gift-dark.svg diff --git a/data/io.github.alainm23.planify.gschema.xml b/data/io.github.alainm23.planify.gschema.xml index d242b362e..45c352ea9 100644 --- a/data/io.github.alainm23.planify.gschema.xml +++ b/data/io.github.alainm23.planify.gschema.xml @@ -145,8 +145,8 @@ Whether the window was maximized on last run - - 0 + + "" @@ -304,7 +304,7 @@ '3.0' The currently installed version. - The currently installed version of planit, updated only after the user launched the app. This is used to know when to trigger the Release Dialog. + The currently installed version of Planify, updated only after the user launched the app. This is used to know when to trigger the Release Dialog. @@ -336,5 +336,17 @@ Google User Email Google User Email + + + ['inbox', 'today', 'scheduled', 'labels'] + + + + + + true + Show Taks Count + Show Taks Count + diff --git a/data/resources/icons/download-dark.svg b/data/resources/icons/download-dark.svg new file mode 100644 index 000000000..07f907ef5 --- /dev/null +++ b/data/resources/icons/download-dark.svg @@ -0,0 +1,59 @@ + + + + + + + + diff --git a/data/resources/icons/download-light.svg b/data/resources/icons/download-light.svg new file mode 100644 index 000000000..8c2447be4 --- /dev/null +++ b/data/resources/icons/download-light.svg @@ -0,0 +1,59 @@ + + + + + + + + diff --git a/data/resources/icons/planner-pinned-activated.svg b/data/resources/icons/file-dark.svg similarity index 56% rename from data/resources/icons/planner-pinned-activated.svg rename to data/resources/icons/file-dark.svg index df3f6e258..8bda34d75 100644 --- a/data/resources/icons/planner-pinned-activated.svg +++ b/data/resources/icons/file-dark.svg @@ -5,49 +5,47 @@ fill="none" viewBox="0 0 16 16" version="1.1" - id="svg6" - sodipodi:docname="planner-pinned-activated.svg" + id="svg2" + sodipodi:docname="file-dark.svg" inkscape:version="1.3 (0e150ed6c4, 2023-07-21)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> + id="defs2" /> + inkscape:current-layer="svg2" /> + d="m 4.28125,14.34375 h 7.4375 c 0.966525,0 1.75,-0.783475 1.75,-1.75 V 5.375 L 9.75,1.65625 H 4.28125 c -0.9664987,0 -1.75,0.7835013 -1.75,1.75 v 9.1875 c 0,0.966525 0.7835013,1.75 1.75,1.75 z" + id="path1" + style="stroke:#ffffff;stroke-opacity:1" /> + d="M 13.25,5.59375 H 9.53125 V 1.875" + id="path2" + style="stroke:#ffffff;stroke-opacity:1" /> diff --git a/data/resources/icons/file-download-dark.svg b/data/resources/icons/file-download-dark.svg new file mode 100644 index 000000000..509bb8382 --- /dev/null +++ b/data/resources/icons/file-download-dark.svg @@ -0,0 +1,59 @@ + + + + + + + + diff --git a/data/resources/icons/file-download-light.svg b/data/resources/icons/file-download-light.svg new file mode 100644 index 000000000..01ac8842b --- /dev/null +++ b/data/resources/icons/file-download-light.svg @@ -0,0 +1,59 @@ + + + + + + + + diff --git a/data/resources/icons/file-light.svg b/data/resources/icons/file-light.svg new file mode 100644 index 000000000..08557b66f --- /dev/null +++ b/data/resources/icons/file-light.svg @@ -0,0 +1,51 @@ + + + + + + + diff --git a/data/resources/icons/gift-dark.svg b/data/resources/icons/gift-dark.svg new file mode 100644 index 000000000..db3ec0517 --- /dev/null +++ b/data/resources/icons/gift-dark.svg @@ -0,0 +1,75 @@ + + + + + + + + + + diff --git a/data/resources/icons/gift-light.svg b/data/resources/icons/gift-light.svg new file mode 100644 index 000000000..943fb82cc --- /dev/null +++ b/data/resources/icons/gift-light.svg @@ -0,0 +1,75 @@ + + + + + + + + + + diff --git a/data/resources/icons/planner-pin-tack.svg b/data/resources/icons/planner-pin-tack.svg index e54b81b57..347eabdd1 100644 --- a/data/resources/icons/planner-pin-tack.svg +++ b/data/resources/icons/planner-pin-tack.svg @@ -24,10 +24,10 @@ inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="22.083334" - inkscape:cx="3.8943394" - inkscape:cy="6.2716978" - inkscape:window-width="1366" - inkscape:window-height="699" + inkscape:cx="3.871698" + inkscape:cy="6.2716979" + inkscape:window-width="1920" + inkscape:window-height="1011" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" @@ -36,7 +36,8 @@ inkscape:deskcolor="#d1d1d1" /> + transform="matrix(0.875,0,0,0.875,-2.9375,-2.5)" + style="stroke:#f66151;stroke-opacity:1;fill:#f66151;fill-opacity:0.1"> + style="fill:#f66151;fill-opacity:0.1;stroke:#f66151;stroke-opacity:1" /> + style="stroke:#f66151;stroke-opacity:1;fill:#f66151;fill-opacity:0.1" /> diff --git a/data/resources/icons/settings/sidebar.svg b/data/resources/icons/settings/sidebar.svg new file mode 100644 index 000000000..d63b0c0e8 --- /dev/null +++ b/data/resources/icons/settings/sidebar.svg @@ -0,0 +1,45 @@ + + + + + + diff --git a/data/resources/stylesheet/sidebar.css b/data/resources/stylesheet/sidebar.css index 7df24f3b7..3fef1a5d0 100644 --- a/data/resources/stylesheet/sidebar.css +++ b/data/resources/stylesheet/sidebar.css @@ -1,6 +1,6 @@ -.sidebar { - background: @sidebar_bg_color; -} +/* + * Inbox View + */ .filter-pane-row-inbox { box-shadow: none; @@ -19,6 +19,10 @@ box-shadow: 0px 0px 3px 1px #1e63ec; } +/* + * Today View + */ + .filter-pane-row-today { box-shadow: none; padding: 3px; @@ -36,6 +40,10 @@ box-shadow: 0px 0px 3px 1px #16af54; } +/* + * Scheduled View + */ + .filter-pane-row-scheduled { box-shadow: none; padding: 3px; @@ -53,7 +61,11 @@ box-shadow: 0px 0px 3px 1px #9d59e0; } -.filter-pane-row-filter { +/* + * Labels View + */ + +.filter-pane-row-labels { box-shadow: none; padding: 3px; border-radius: 6px; @@ -62,27 +74,62 @@ color: #7e8087; } -.filter-pane-row-filter.selected image { +.filter-pane-row-labels.selected image { animation: fancy-turn 0.7s ease-in-out; } -.filter-pane-row-filter-selected { +.filter-pane-row-labels-selected { box-shadow: 0px 0px 3px 1px #7e8087; } -.selectable-item { +/* + * Pinboard View + */ + + .filter-pane-row-pinboard { + box-shadow: none; + padding: 3px; + border-radius: 6px; + transition: all 220ms ease-in-out; + background-color: alpha(#f66151, 0.15); + color: #f66151; +} + +.filter-pane-row-pinboard.selected image { + animation: fancy-turn 0.7s ease-in-out; +} + +.filter-pane-row-pinboard-selected { + box-shadow: 0px 0px 3px 1px #f66151; +} + +.sidebar-row { padding: 0; - border-radius: 12px; transition: all 220ms ease-in-out; background-color: transparent; } -.selectable-item:hover { +.sidebar-row:selected, +.sidebar-row:hover { + outline: none; +} + +.separator-lines row:not(:first-child) { + border-top: 1px solid @item_border_color; +} + +.selectable-item { + padding: 0; + border-radius: 12px; + transition: all 220ms ease-in-out; background-color: transparent; + outline: none; } -.selectable-item:selected { +.selectable-item:selected, +.selectable-item:hover { background-color: transparent; + outline: none; } .selectable-item-selected { @@ -95,7 +142,23 @@ transition: all 220ms ease-in-out; } +.sidebar { + background: @sidebar_bg_color; +} + .sidebar-card { box-shadow: none; border: 1px solid @item_border_color; +} + +.gift-animation, +.gift-animation image { + animation-name: fancy-turn; + animation-duration: 1s; + animation-timing-function: ease-out; + animation-iteration-count: infinite; + animation-direction: normal; + animation-delay: 0s; + animation-fill-mode: none; + animation-play-state: running; } \ No newline at end of file diff --git a/data/resources/stylesheet/stylesheet.css b/data/resources/stylesheet/stylesheet.css index 203716c69..1b0f77bb2 100644 --- a/data/resources/stylesheet/stylesheet.css +++ b/data/resources/stylesheet/stylesheet.css @@ -21,6 +21,10 @@ check { padding: 3px; } +.padding-9 { + padding: 9px; +} + .border-radius-6 { border-radius: 6px; } @@ -204,12 +208,9 @@ entry.flat:focus-within { margin-top: 24px; } -.card { - box-shadow: none; -} - .card-selected { - padding: 9px; + margin-left: 3px; + padding-left: 9px; padding-top: 3px; padding-right: 3px; padding-bottom: 0px; @@ -229,6 +230,10 @@ entry.flat:focus-within { text-decoration: line-through; } +.underline { + text-decoration: underline; +} + .complete-animation { background-color: @selected_color; border-radius: 6px; @@ -506,4 +511,9 @@ checkbutton.theme-selector radio:checked { padding: 3px; min-height: 16px; min-width: 16px; +} + +.event-bar { + background-color: @colorAccent; + border-radius: 1px; } \ No newline at end of file diff --git a/meson.build b/meson.build index 9441d99eb..52a9088ea 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'io.github.alainm23.planify', 'vala', 'c', - version: '4.2.1' + version: '4.3' ) gnome = import('gnome') @@ -15,6 +15,7 @@ gio_dep = dependency('gio-2.0') glib_dep = dependency('glib-2.0') gee_dep = dependency('gee-0.8') gtk_dep = dependency('gtk4') +libsoup_dep = dependency('libsoup-3.0') sqlite3_dep = dependency('sqlite3') libadwaita_dep = dependency('libadwaita-1') webkitgtk_dep = dependency('webkitgtk-6.0') @@ -31,7 +32,7 @@ m_dep = meson.get_compiler('c').find_library('m', required : false) ############ asresources = gnome.compile_resources ( - 'as-resources', 'data/resources/io.github.alainm23.planify.gresource.xml', + 'as-resources', 'data/io.github.alainm23.planify.gresource.xml', source_dir: 'data', c_name: 'as' ) diff --git a/po/POTFILES b/po/POTFILES index 03e81e4ed..f47fc3c4f 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,20 +1,78 @@ # List of source files containing translatable strings. # Please keep this file sorted alphabetically. +core/Util.vala +core/Enum.vala +core/Constants.vala +core/QuickAdd.vala + +core/Services/Settings.vala +core/Services/EventBus.vala +core/Services/Database.vala +core/Services/Todoist.vala + +core/Layouts/HeaderItem.vala + +core/Widgets/DynamicIcon.vala +core/Widgets/LoadingButton.vala +core/Widgets/Entries.vala +core/Widgets/IconColorProject.vala +core/Widgets/PinButton.vala +core/Widgets/PriorityButton.vala +core/Widgets/ItemLabels.vala +core/Widgets/ItemLabelChild.vala +core/Widgets/CircularProgressBar.vala + +core/Widgets/Calendar/Calendar.vala +core/Widgets/Calendar/CalendarDay.vala +core/Widgets/Calendar/CalendarHeader.vala +core/Widgets/Calendar/CalendarView.vala +core/Widgets/Calendar/CalendarWeek.vala + +core/Widgets/ContextMenu/MenuItem.vala +core/Widgets/ContextMenu/MenuSeparator.vala +core/Widgets/ContextMenu/MenuPicker.vala + +core/Widgets/DateTimePicker/ScheduleButton.vala +core/Widgets/DateTimePicker/DateTimePicker.vala +core/Widgets/DateTimePicker/TimePicker.vala + +core/Widgets/LabelPicker/LabelPicker.vala +core/Widgets/LabelPicker/LabelRow.vala +core/Widgets/LabelPicker/LabelButton.vala + +core/Widgets/ProjectPicker/ProjectPickerPopover.vala +core/Widgets/ProjectPicker/ProjectPickerRow.vala +core/Widgets/ProjectPicker/ProjectPickerButton.vala + +core/Objects/BaseObject.vala +core/Objects/Color.vala +core/Objects/DueDate.vala +core/Objects/Item.vala +core/Objects/ItemLabel.vala +core/Objects/Label.vala +core/Objects/Project.vala +core/Objects/Queue.vala +core/Objects/Reminder.vala +core/Objects/Section.vala + +core/Objects/Filters/Pinboard.vala +core/Objects/Filters/Scheduled.vala +core/Objects/Filters/Today.vala +core/Objects/Filters/Priority.vala +core/Objects/Filters/Completed.vala +core/Objects/Filters/Labels.vala src/App.vala src/MainWindow.vala -src/Util.vala -src/Enum.vala -src/Services/Database.vala -src/Services/EventBus.vala -src/Services/Todoist.vala +src/Objects/Backup.vala + src/Services/GoogleTasks.vala src/Services/ActionManager.vala src/Services/Notification.vala src/Services/TimeMonitor.vala -src/Services/Settings.vala src/Services/DBusServer.vala +src/Services/Backups.vala src/Services/CalendarEvents/CalendarEvents.vala src/Services/CalendarEvents/DateIterator.vala @@ -23,7 +81,6 @@ src/Services/CalendarEvents/Util.vala src/Layouts/Sidebar.vala src/Layouts/FilterPaneRow.vala -src/Layouts/HeaderItem.vala src/Layouts/ProjectRow.vala src/Layouts/SectionRow.vala src/Layouts/ItemRow.vala @@ -32,56 +89,27 @@ src/Layouts/SectionBoard.vala src/Layouts/ItemBoard.vala src/Layouts/HeaderBar.vala -src/Widgets/DynamicIcon.vala src/Widgets/ColorPickerRow.vala -src/Widgets/LoadingButton.vala -src/Widgets/CircularProgressBar.vala src/Widgets/MagicButton.vala src/Widgets/EditableLabel.vala -src/Widgets/Entries.vala src/Widgets/Placeholder.vala src/Widgets/SyncButton.vala -src/Widgets/ScheduleButton.vala -src/Widgets/PriorityButton.vala src/Widgets/ItemSummary.vala -src/Widgets/PinButton.vala -src/Widgets/LabelButton.vala -src/Widgets/ItemLabels.vala -src/Widgets/ItemLabelChild.vala -src/Widgets/IconColorProject.vala src/Widgets/ReminderButton.vala src/Widgets/MultiSelectToolbar.vala src/Widgets/EventsList.vala src/Widgets/EventRow.vala -src/Widgets/CalendarSourceRow.vala src/Widgets/SubItems.vala src/Widgets/LabelChild.vala src/Widgets/LabelsSummary.vala src/Widgets/SectionsOrderPopover.vala -src/Widgets/Calendar/Calendar.vala -src/Widgets/Calendar/CalendarDay.vala -src/Widgets/Calendar/CalendarHeader.vala -src/Widgets/Calendar/CalendarView.vala -src/Widgets/Calendar/CalendarWeek.vala - -src/Widgets/DateTimePicker/DateTimePicker.vala -src/Widgets/DateTimePicker/TimePicker.vala - -src/Widgets/LabelPicker/LabelPicker.vala -src/Widgets/LabelPicker/LabelRow.vala - src/Widgets/ReminderPicker/ReminderPicker.vala src/Widgets/ReminderPicker/ReminderRow.vala -src/Widgets/ContextMenu/MenuItem.vala -src/Widgets/ContextMenu/MenuSeparator.vala -src/Widgets/ContextMenu/MenuPicker.vala - src/Views/Project/Project.vala src/Views/Project/List.vala src/Views/Project/Board.vala -src/Views/Date.vala src/Views/Today.vala src/Views/Pinboard.vala src/Views/Label/Label.vala @@ -93,32 +121,12 @@ src/Views/Scheduled/ScheduledDay.vala src/Views/Scheduled/ScheduledRange.vala src/Views/Scheduled/ScheduledMonth.vala -src/Objects/BaseObject.vala -src/Objects/Color.vala -src/Objects/DueDate.vala -src/Objects/Item.vala -src/Objects/ItemLabel.vala -src/Objects/Label.vala -src/Objects/Project.vala -src/Objects/Queue.vala -src/Objects/Reminder.vala -src/Objects/Section.vala - -src/Objects/Filters/Pinboard.vala -src/Objects/Filters/Scheduled.vala -src/Objects/Filters/Today.vala -src/Objects/Filters/Priority.vala -src/Objects/Filters/Completed.vala -src/Objects/Filters/Labels.vala - -src/Models/ItemList.vala - src/Dialogs/Project.vala src/Dialogs/Label.vala src/Dialogs/Item.vala -src/Dialogs/TodoistOAuth.vala src/Dialogs/GoogleOAuth.vala src/Dialogs/WhatsNew.vala +src/Dialogs/QuickAdd.vala src/Dialogs/ProjectDescription.vala src/Dialogs/ManageSectionOrder.vala src/Dialogs/ProjectPicker/ProjectPicker.vala @@ -135,3 +143,9 @@ src/Dialogs/QuickFind/Synapse.vala src/Dialogs/Preferences/PreferencesWindow.vala src/Dialogs/Preferences/SettingsHeader.vala +src/Dialogs/Preferences/Pages/Backup.vala +src/Dialogs/Preferences/Pages/Sidebar.vala + +quick-add/App.vala +quick-add/MainWindow.vala +quick-add/Services/DBusClient.vala \ No newline at end of file diff --git a/po/es.po b/po/es.po index 1693aabfd..83228f1bf 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: io.github.alainm23.planify\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,342 +17,288 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -msgid "" -"The process removes all stored information without the possibility of " -"undoing it." -msgstr "" - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -msgid "About Planify" -msgstr "" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "" -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "" -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "" -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "" -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "" -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "" -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "" -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" msgstr "" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "" -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "" - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "" - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" msgstr "" -#: src/Util.vala:965 -msgid "The requested resource could not be found." +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 +msgid "Priority 1: high" msgstr "" -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 +msgid "Priority 2: medium" msgstr "" -#: src/Util.vala:967 -msgid "The request failed due to a server error." +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 +msgid "Priority 3: low" msgstr "" -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 +msgid "Priority 4: none" msgstr "" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 -msgid "Priority 1: high" +#: core/Util.vala:925 +msgid "high" msgstr "" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 -msgid "Priority 2: medium" +#: core/Util.vala:927 +msgid "medium" msgstr "" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 -msgid "Priority 3: low" +#: core/Util.vala:929 +msgid "low" msgstr "" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 -msgid "Priority 4: none" +#: core/Util.vala:931 +msgid "none" msgstr "" -#: src/Util.vala:1137 +#: core/Util.vala:1010 msgid "Meet Planify" msgstr "" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" "This project shows you everything you need to know to hit the ground " "running. Don’t hesitate to play around in it – you can always create a new " "one from settings." msgstr "" -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." msgstr "" -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." msgstr "" -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "" -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." msgstr "" -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "" -#: src/Util.vala:1165 +#: core/Util.vala:1038 msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "" -#: src/Util.vala:1170 +#: core/Util.vala:1043 msgid "Create a project" msgstr "" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" "Organize your to-dos better! Go to the left panel and click the '+' button " "in the 'On This Computer' section and add a project of your own." msgstr "" -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -363,212 +309,475 @@ msgid "" "We hope you’ll enjoy using Planify!" msgstr "" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "" -#: src/Util.vala:1201 +#: core/Util.vala:1074 msgid "Show your calendar events" msgstr "" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" "You can display your system's calendar events in Planify. Go to " "'Preferences' 🡒 Calendar Events to turn ir on." msgstr "" -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "" -#: src/Util.vala:1209 +#: core/Util.vala:1082 msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " "account. Go to 'Preferences' 🡒 'Accounts'." msgstr "" -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "" + +#: core/QuickAdd.vala:58 +msgid "Add a description…" +msgstr "" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "" + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "" + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "" + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "" + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "" + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "" + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "" + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "" + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "" + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "" + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "" + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "" + +#: src/MainWindow.vala:455 +msgid "About Planify" +msgstr "" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "" -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "" -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +msgid "What’s new in Planify" msgstr "" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "" -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." msgstr "" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Add to favorites" msgstr "" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "" @@ -577,145 +786,140 @@ msgstr "" msgid "(No Section)" msgstr "" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "" -#: src/Layouts/ItemRow.vala:452 +#: src/Layouts/ItemRow.vala:482 msgid "Add subtask" msgstr "" -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "" - #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 msgid "Copy to clipboard" msgstr "" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 msgid "Duplicate" msgstr "" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 msgid "Weekly" msgstr "" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 msgid "Monthly" msgstr "" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 msgid "Yearly" msgstr "" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "" @@ -740,45 +944,20 @@ msgid "" "mode will be synced when you reconnect" msgstr "" -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "" @@ -787,104 +966,27 @@ msgstr "" msgid "All" msgstr "" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr "" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 -#: src/Dialogs/LabelPicker.vala:153 -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "" - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 msgid "" "Your list of reminders will show up here. Add one by clicking the button." msgstr "" -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "" @@ -892,80 +994,76 @@ msgstr "" msgid "Description" msgstr "" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "" -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "" @@ -981,59 +1079,6 @@ msgstr "" msgid "Labels: Todoist" msgstr "" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "" - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "" - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "" @@ -1058,7 +1103,7 @@ msgstr "" msgid "Update project" msgstr "" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "" @@ -1082,28 +1127,27 @@ msgstr "" msgid "Update label" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "" -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "" - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "" @@ -1111,17 +1155,40 @@ msgstr "" msgid "What's New" msgstr "" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" +#: src/Dialogs/WhatsNew.vala:108 +msgid "Sidebar filter settings" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." msgstr "" #: src/Dialogs/ProjectDescription.vala:34 @@ -1136,11 +1203,7 @@ msgstr "" msgid "Type a search" msgstr "" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "" @@ -1165,37 +1228,37 @@ msgid "Year(s)" msgstr "" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "" @@ -1207,268 +1270,363 @@ msgstr "" msgid "Quickly switch projects and views, find tasks, search by labels." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +msgid "Integrations" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +msgid "Sidebar" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 -msgid "Customize your homepage." +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 +msgid "Customize your sidebar." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 msgid "Quick Add" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "" #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +msgid "Backups" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 msgid "Delete Planify Data" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -msgid "Sort Settings" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +msgid "Home Page" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +msgid "Sort Settings" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can " -"change it to whatever you'd like." -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 msgid "Light Style" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 msgid "Dark Style" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 msgid "Dark Blue Style" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +msgid "Settings" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +msgid "Save Last Selected Project" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 msgid "The command was copied to the clipboard." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +msgid "Loading…" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" "Are you sure you want to remove the Todoist sync? This action will delete " "all your tasks and settings." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " "delete all your tasks and settings." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +msgid "Create backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +msgid "Show in sidebar" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +msgid "Planify - Quick Add" +msgstr "" diff --git a/po/fr.po b/po/fr.po index bd66420cd..711df7850 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.alainm23.planner\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: 2023-12-11 10:00+0100\n" "Last-Translator: Irénée Thirion \n" "Language-Team: French \n" @@ -19,290 +19,230 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.4.1\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "Êtes-vous sûr de vouloir tout réinitialiser ?" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -msgid "" -"The process removes all stored information without the possibility of " -"undoing it." -msgstr "" -"Ce processus supprime toutes les informations stockées sans possibilité de " -"l’annuler." - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" -"Planify démarrera automatiquement à l’allumage de cet appareil et continuera " -"à s’exécuter à la fermeture de sa fenêtre pour envoyer des notifications." - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "Planify" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "Tâches synchronisées avec succès" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "" -"Souhaitez-vous utiliser Todoist comme votre projet de boîte de réception par " -"défaut ?" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "Annuler" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "OK" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "Préférences" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "Raccourcis clavier" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -msgid "About Planify" -msgstr "À propos de Planify" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "Rouge baie" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "Rouge" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "Orange" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "Vert olive" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "Jaune" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "Vert citron" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "Vert" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "Vert menthe" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "Bleu sarcelle" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "Bleu ciel" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "Bleu clair" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "Bleu" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "Raisin" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "Violet" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "Lavande" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "Magenta" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "Saumon" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "Anthracite" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "Gris" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "Taupe" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "Clair" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "Sombre" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "Bleu sombre" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "Aucun" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "Boîte de réception" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "Aujourd’hui" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "Aujourd’hui + Boîte de réception" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "Demain" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "Hier" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "Lun," -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "Mar," -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "Mer," -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "Jeu," -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "Ven," -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "Sa," -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "Di," -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" -msgstr "Tâche ajoutée à %s" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" +msgstr "Annuler" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "Tout réinitialiser" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "Processus achevé, vous devez redémarrer Planify." -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "La requête était incorrecte." - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "" -"L’authentification est requise et a échoué ou n’a pas encore été effectuée." - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." -msgstr "La demande était valide, mais pour quelque chose qui est interdit." - -#: src/Util.vala:965 -msgid "The requested resource could not be found." -msgstr "La ressource demandée n’a pas pu être trouvée." - -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." -msgstr "L’utilisateur a envoyé trop de requêtes dans un certain délai." - -#: src/Util.vala:967 -msgid "The request failed due to a server error." -msgstr "La requête a échoué à cause d’un problème du serveur." - -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." -msgstr "Le serveur est actuellement incapable de gérer la requête." +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" +msgstr "OK" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 msgid "Priority 1: high" msgstr "Priorité 1 : Élevée" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 msgid "Priority 2: medium" msgstr "Priorité 2 : Moyenne" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 msgid "Priority 3: low" msgstr "Priorité 3 : Basse" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 msgid "Priority 4: none" msgstr "Priorité 4 : Aucune" -#: src/Util.vala:1137 +#: core/Util.vala:925 +msgid "high" +msgstr "" + +#: core/Util.vala:927 +msgid "medium" +msgstr "" + +#: core/Util.vala:929 +#, fuzzy +msgid "low" +msgstr "Jaune" + +#: core/Util.vala:931 +msgid "none" +msgstr "" + +#: core/Util.vala:1010 msgid "Meet Planify" msgstr "Découvrir Planify" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" "This project shows you everything you need to know to hit the ground " "running. Don’t hesitate to play around in it – you can always create a new " @@ -312,11 +252,11 @@ msgstr "" "bien commencer. N’hésitez pas à vous amuser avec – vous pouvez toujours en " "créer un nouveau depuis les paramètres." -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "Cliquez sur cette tâche" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." @@ -325,11 +265,11 @@ msgstr "" "cliquant sur la case à cocher sur la gauche. Les tâches accomplies " "apparaîtront en bas de votre projet." -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "Créer une nouvelle tâche" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." @@ -337,33 +277,34 @@ msgstr "" "Maintenant c’est à vous : cliquez sur le bouton '+' au-dessus de votre " "projet, saisissez un contenu et cliquez sur le bouton « Enregistrer »." -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "Planifier cette tâche pour aujourd’hui ou plus tard" -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." msgstr "" "Cliquez sur l’icône de calendrier en bas de votre tâche pour décider d’une " "date d’échéance." -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "Réorganiser vos tâches" -#: src/Util.vala:1165 +#: core/Util.vala:1038 +#, fuzzy msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "" "Pour réorganiser votre liste, cliquez sur une tâche et maintenez, puis " "faites la glisser où vous le souhaitez." -#: src/Util.vala:1170 +#: core/Util.vala:1043 msgid "Create a project" msgstr "Créer un projet" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" "Organize your to-dos better! Go to the left panel and click the '+' button " "in the 'On This Computer' section and add a project of your own." @@ -372,11 +313,11 @@ msgstr "" "sur le bouton '+' dans la section « Sur cet ordinateur » pour ajouter vos " "propres projets." -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "C’est terminé !" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -394,15 +335,15 @@ msgstr "" "\n" "Nous espérons que vous aurez plaisir à utiliser Planify !" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "Personnaliser votre installation" -#: src/Util.vala:1201 +#: core/Util.vala:1074 msgid "Show your calendar events" msgstr "Affichez vos événements de calendrier" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" "You can display your system's calendar events in Planify. Go to " "'Preferences' 🡒 Calendar Events to turn ir on." @@ -411,11 +352,11 @@ msgstr "" "Planify. Allez dans « Préférences » → « Événements du calendrier » pour " "activer cette option." -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "Activez la synchronisation avec des services tiers." -#: src/Util.vala:1209 +#: core/Util.vala:1082 msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " "account. Go to 'Preferences' 🡒 'Accounts'." @@ -423,192 +364,466 @@ msgstr "" "Planify ne crée pas seulement des tâches localement, il peut aussi " "synchroniser votre compte Todoist. Allez dans « Préférences » → « Comptes »." -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "💼️ Travail" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "🎒️ École" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "👉️ Délégué" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "🏡️ Maison" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "🏃‍♀️️ À suivre" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "Prévu" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "Épinglé" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "Projets" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "Sections" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "Tâches" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "Étiquettes" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "Filtres" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "Listes" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "Ne pas répéter" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "Chaque jour" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "Tous les %d jours" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "Chaque semaine" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "Toutes les %d semaines" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "Chaque mois" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "Tous les %d mois" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "Chaque année" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "Toutes les %d années" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "" + +#: core/QuickAdd.vala:58 +#, fuzzy +msgid "Add a description…" +msgstr "Ajouter une description" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "La requête était incorrecte." + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "" +"L’authentification est requise et a échoué ou n’a pas encore été effectuée." + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "La demande était valide, mais pour quelque chose qui est interdit." + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "La ressource demandée n’a pas pu être trouvée." + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "L’utilisateur a envoyé trop de requêtes dans un certain délai." + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "La requête a échoué à cause d’un problème du serveur." + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "Le serveur est actuellement incapable de gérer la requête." + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "Épingler" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "Définir la priorité" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "%OB" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "%Y" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "Di" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "Lun" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "Mar" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "Mer" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "Jeu" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "Ven" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "Sa" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "Programmer" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "Pas de date" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "Semaine suivante" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "Choisir une date" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "Heure" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "Fait" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "Chercher ou créer" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "" +"Votre liste de filtres apparaîtra ici. Créez-en une en saisissant le nom et " +"en pressant la touche Entrée." + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "Ajout d’étiquette(s)" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "Sur cet ordinateur" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "Todoist" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "Tâche copiée dans le presse-papiers" + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "Dupliquer" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "Nouvelle section" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "Projet copié vers le presse-papiers." + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "épinglé" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "prévu" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "à venir" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "aujourd’hui" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "Complétée" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "complété" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "journal de bord" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "Étiquettes" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "Êtes-vous sûr de vouloir tout réinitialiser ?" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "" +"Ce processus supprime toutes les informations stockées sans possibilité de " +"l’annuler." + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" +"Planify démarrera automatiquement à l’allumage de cet appareil et continuera " +"à s’exécuter à la fermeture de sa fenêtre pour envoyer des notifications." + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "Planify" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "Tâches synchronisées avec succès" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "" +"Souhaitez-vous utiliser Todoist comme votre projet de boîte de réception par " +"défaut ?" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "Préférences" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "Raccourcis clavier" + +#: src/MainWindow.vala:455 +msgid "About Planify" +msgstr "À propos de Planify" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "Sur cet ordinateur" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "Favoris" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "" "Aucune tâche favorite disponible. Créez-en une en cliquant sur le bouton " "« + »" -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "Sur cet ordinateur" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "Pas de projet disponible. Créez-en un en cliquant sur le bouton ’+’" -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" -msgstr "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +#, fuzzy +msgid "What’s new in Planify" +msgstr "Quoi de neuf dans Planify" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "" "Pas de compte disponible, synchronisez-en un en cliquant sur le bouton « + »" -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "Google Tasks" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." msgstr "" "L’ordre de la liste des projets a été modifié en ordre de tri personnalisé." -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "Supprimer des favoris" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Add to favorites" msgstr "Ajouter aux favoris" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "Modifier le projet" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "Supprimer le projet" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "Partager" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "Envoyer par courriel" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "Êtes-vous sûr de vouloir supprimer %s ?" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "Supprimer" @@ -617,145 +832,140 @@ msgstr "Supprimer" msgid "(No Section)" msgstr "(Pas de section)" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "Tâche ajoutée à %s" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "Ajouter la tâche" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "Modifier la section" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "Déplacer la section" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "Gérer l’ordre des sections" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "Supprimer la section" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "Supprimer la section" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "Ajouter une description" -#: src/Layouts/ItemRow.vala:452 +#: src/Layouts/ItemRow.vala:482 msgid "Add subtask" msgstr "Ajouter une sous-tâche" -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "Enregistrer" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "Pas de date" - #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "Déplacer" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "Déplacer vers la section" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "Compléter" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "Éditer" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "Supprimer la tâche" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "Ajoutée le" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "Mise à jour le" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "Indisponible" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 msgid "Copy to clipboard" msgstr "Copier vers le presse-papiers" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 msgid "Duplicate" msgstr "Dupliquer" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "Répéter" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "Quotidiennement" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 msgid "Weekly" msgstr "Hebdomadairement" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 msgid "Monthly" msgstr "Mensuellement" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 msgid "Yearly" msgstr "Annuellement" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "Personnalisé" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "Terminé. Prochaine occurrence : %s" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "Supprimer la tâche" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "Êtes-vous sûr de vouloir supprimer cette tâche ?" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "La tâche a été supprimée" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "Annuler" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "Déplacer les tâches" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "Êtes-vous sûr de vouloir déplacer vos tâches vers %s ?" @@ -783,45 +993,20 @@ msgstr "" "Internet. Les changements faits hors-ligne\n" "seront synchronisés lors de la reconnection" -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "Programmer" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "Définir la priorité" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "Épingler" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "Ajout d’étiquette(s)" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "Ajouter un / des rappel(s)" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "Fait" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "Marquer comme fait" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "Supprimer %d tâches" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "Êtes-vous sûr de vouloir supprimer ces %d tâches ?" @@ -830,108 +1015,29 @@ msgstr "Êtes-vous sûr de vouloir supprimer ces %d tâches ?" msgid "All" msgstr "Tout" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "Ajouter une section" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "%OB" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "%Y" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "Di" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "Lun" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "Mar" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "Mer" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "Jeu" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "Ven" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "Sa" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "Semaine suivante" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "Choisir une date" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "Heure" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "AM" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "PM" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr ":" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "Chercher ou créer" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 -#: src/Dialogs/LabelPicker.vala:153 -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "" -"Votre liste de filtres apparaîtra ici. Créez-en une en saisissant le nom et " -"en pressant la touche Entrée." - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "Rappels" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "Ajouter un rappel" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 msgid "" "Your list of reminders will show up here. Add one by clicking the button." msgstr "" "Votre liste de rappels apparaîtra ici. Ajoutez-en une en cliquant sur le " "bouton." -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "Échéance ?" @@ -939,80 +1045,76 @@ msgstr "Échéance ?" msgid "Description" msgstr "Description" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "Filtrer par étiquettes" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "Sélectionner" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "Coller" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "Supprimer le projet" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "Ordre de tri personnalisé" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "Alphabétiquement" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "Date d’échéance" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "Date ajoutée" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "Priorité" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "Trier par" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "Cacher les tâches accomplies" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "Afficher les tâches accomplies" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "Masquer les tâches accomplies" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "Montrer les tâches accomplies" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "Nouvelle section" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "Tapez 'a' ou cliquez sur le bouton + pour créer une nouvelle tâche" -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "En retard" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "Reprogrammer" @@ -1028,59 +1130,6 @@ msgstr "Étiquettes : sur cet ordinateur" msgid "Labels: Todoist" msgstr "Étiquettes : Todoist" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "Complétée" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "Tâche copiée dans le presse-papiers" - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "Dupliquer" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "Projet copié vers le presse-papiers." - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "épinglé" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "prévu" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "à venir" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "aujourd’hui" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "priorité" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "complété" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "journal de bord" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "Étiquettes" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "Nouveau projet" @@ -1105,7 +1154,7 @@ msgstr "Ajouter le projet" msgid "Update project" msgstr "Mettre le projet à jour" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "Projet ajouté avec succès !" @@ -1129,28 +1178,27 @@ msgstr "Ajouter une étiquette" msgid "Update label" msgstr "Mettre à jour l’étiquette" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "Synchronisation Todoist" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "Chargement" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "Planner synchronise vos tâches, cela peut prendre quelques minutes." -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "Synchronisation. Patientez un instant s’il vous plaît." - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "Veuillez entrer vos informations d’identification" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "Réseau Indisponible" @@ -1158,18 +1206,42 @@ msgstr "Réseau Indisponible" msgid "What's New" msgstr "Quoi de neuf" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" -msgstr "Quoi de neuf dans Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" +msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" -msgstr "Version 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." +msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" -msgstr "Synchroniser avec votre compte Todoist" +#: src/Dialogs/WhatsNew.vala:108 +#, fuzzy +msgid "Sidebar filter settings" +msgstr "Utiliser les paramètres système" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." +msgstr "" #: src/Dialogs/ProjectDescription.vala:34 msgid "Project Description" @@ -1183,11 +1255,7 @@ msgstr "Mettre à jour" msgid "Type a search" msgstr "Tapez une recherche" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "Sur cet ordinateur" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "Aucune section" @@ -1212,37 +1280,37 @@ msgid "Year(s)" msgstr "Année(s)" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "Lundi" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "Mardi" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "Mercredi" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "Jeudi" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "Vendredi" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "Samedi" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "Dimanche" @@ -1256,234 +1324,245 @@ msgstr "" "Passez rapidement d’un projet à l’autre et d’une vue à l’autre, trouvez des " "tâches, faites des recherches par étiquettes." -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" -msgstr "Comptes" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +#, fuzzy +msgid "Integrations" +msgstr "Intégration à l’environnement de bureau" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "Synchronisez vos fournisseurs de tâches favoris." -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "Général" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "Customisez selon vos envies." -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" -msgstr "Page d’accueil" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +#, fuzzy +msgid "Sidebar" +msgstr "Largeur du volet latéral" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 -msgid "Customize your homepage." +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 +#, fuzzy +msgid "Customize your sidebar." msgstr "Customisez votre page d’accueil." -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "Apparence" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 msgid "Quick Add" msgstr "Ajout rapide" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "Ajouter des tâches depuis n’importe quel endroit." #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "Aide" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "Créer un projet tutoriel" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." msgstr "" "Faites le tour pas à pas de l’application avec un court projet tutoriel." -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +msgid "Backups" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "Vie privée" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 msgid "Delete Planify Data" msgstr "Supprimer les données de Planify" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "Un projet tutoriel a été créé" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -msgid "Sort Settings" -msgstr "Paramètres de tri" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +#, fuzzy +msgid "Home Page" +msgstr "Page d’accueil" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "Trier les projets" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "Ascendant" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "Descendant" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "Trier par" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +msgid "Sort Settings" +msgstr "Paramètres de tri" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "Intégration à l’environnement de bureau" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "Exécuter en arrière-plan" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "" "Laisser Planify s’exécuter en arrière-plan et envoyer des notifications." -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "Lancer au démarrage" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "Indique si Planify devrait se lancer au démarrage." -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "Événements de calendrier" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "Date & heure" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "24 h" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "12 h" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "Format d’Horloge" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "Début de la semaine" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "Paramètres des tâches" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "Instantanément" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" msgstr "Attendre 2500 millisec." -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "Accomplissement des tâches" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "" "Marquer vos tâches comme accomplies instantanément ou attendre 2500 " "millisecondes avec l’option annuler." -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "Priorité 1" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "Priorité 2" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "Priorité 3" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "Priorité par défaut" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "Visualisation de la description" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "Souligner les tâches accomplies" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can " -"change it to whatever you'd like." -msgstr "" -"Assurez-vous de voir les tâches les plus importantes directement à " -"l’ouverture de Planify. La page d’accueil par défaut est la vue de votre " -"Boîte de réception, mais vous pouvez la modifier." - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "Thème de l’application" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "Utiliser les paramètres système" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 msgid "Light Style" msgstr "Style clair" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 msgid "Dark Style" msgstr "Style sombre" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 msgid "Dark Blue Style" msgstr "Style bleu sombre" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "Largeur du volet latéral" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "Comptes" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "Projet boîte de réception par défaut" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "Synchroniser avec votre compte Todoist" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "Synchroniser avec votre compte Google" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "Serveur de synchronisation" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." @@ -1491,11 +1570,11 @@ msgstr "" "Activez ce paramètre pour que Planner se synchronise automatiquement avec " "votre compte Todoist toutes les 15 minutes." -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "Dernière synchronisation" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." @@ -1504,11 +1583,7 @@ msgstr "" "sur votre bureau, avec une combinaison de touches. Vous n’aurez même pas à " "quitter l’application que vous étiez en train d’utiliser." -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "Définissez un raccourci personnalisé dans les paramètres Système" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" @@ -1516,11 +1591,35 @@ msgstr "" "Allez dans Paramètres système → Clavier → Raccourcis → Personnalisé, et " "ajoutez un nouveau raccourci avec la commande suivante :" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +#, fuzzy +msgid "Settings" +msgstr "Paramètres de tri" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +#, fuzzy +msgid "Save Last Selected Project" +msgstr "Supprimer le projet" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 msgid "The command was copied to the clipboard." msgstr "La commande a été copiée vers le presse-papiers." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +#, fuzzy +msgid "Loading…" +msgstr "Chargement" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "Synchronisation. Patientez un instant s’il vous plaît." + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" "Are you sure you want to remove the Todoist sync? This action will delete " "all your tasks and settings." @@ -1528,7 +1627,7 @@ msgstr "" "Êtes-vous sûr de vouloir supprimer la synchronisation Todoist ? Cette action " "supprimera toutes vos tâches et paramètres." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " "delete all your tasks and settings." @@ -1536,6 +1635,110 @@ msgstr "" "Êtes-vous sûr de vouloir supprimer la synchronisation Google Tasks ? Cette " "action supprimera toutes vos tâches et paramètres." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "Se déconnecter" + +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +#, fuzzy +msgid "Create backup" +msgstr "Créer un projet" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +#, fuzzy +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "" +"Êtes-vous sûr de vouloir supprimer la synchronisation Todoist ? Cette action " +"supprimera toutes vos tâches et paramètres." + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +msgid "Show in sidebar" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +#, fuzzy +msgid "Planify - Quick Add" +msgstr "Ajout rapide" + +#, c-format +#~ msgid "priority" +#~ msgstr "priorité" + +#~ msgid "Save" +#~ msgstr "Enregistrer" + +#~ msgid "AM" +#~ msgstr "AM" + +#~ msgid "PM" +#~ msgstr "PM" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "Version 4.1.1" +#~ msgstr "Version 4.1.1" + +#~ msgid "" +#~ "When you open up Planify, make sure you see the to-dos that are most " +#~ "important. The default homepage is your Inbox view, but you can " +#~ "change it to whatever you'd like." +#~ msgstr "" +#~ "Assurez-vous de voir les tâches les plus importantes directement à " +#~ "l’ouverture de Planify. La page d’accueil par défaut est la vue de votre " +#~ "Boîte de réception, mais vous pouvez la modifier." + +#~ msgid "Set a custom shortcut in System Settings" +#~ msgstr "Définissez un raccourci personnalisé dans les paramètres Système" diff --git a/po/io.github.alainm23.planify.pot b/po/io.github.alainm23.planify.pot index 1693aabfd..83228f1bf 100644 --- a/po/io.github.alainm23.planify.pot +++ b/po/io.github.alainm23.planify.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: io.github.alainm23.planify\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,342 +17,288 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -msgid "" -"The process removes all stored information without the possibility of " -"undoing it." -msgstr "" - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -msgid "About Planify" -msgstr "" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "" -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "" -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "" -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "" -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "" -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "" -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "" -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" msgstr "" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "" -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "" - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "" - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" msgstr "" -#: src/Util.vala:965 -msgid "The requested resource could not be found." +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 +msgid "Priority 1: high" msgstr "" -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 +msgid "Priority 2: medium" msgstr "" -#: src/Util.vala:967 -msgid "The request failed due to a server error." +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 +msgid "Priority 3: low" msgstr "" -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 +msgid "Priority 4: none" msgstr "" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 -msgid "Priority 1: high" +#: core/Util.vala:925 +msgid "high" msgstr "" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 -msgid "Priority 2: medium" +#: core/Util.vala:927 +msgid "medium" msgstr "" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 -msgid "Priority 3: low" +#: core/Util.vala:929 +msgid "low" msgstr "" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 -msgid "Priority 4: none" +#: core/Util.vala:931 +msgid "none" msgstr "" -#: src/Util.vala:1137 +#: core/Util.vala:1010 msgid "Meet Planify" msgstr "" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" "This project shows you everything you need to know to hit the ground " "running. Don’t hesitate to play around in it – you can always create a new " "one from settings." msgstr "" -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." msgstr "" -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." msgstr "" -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "" -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." msgstr "" -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "" -#: src/Util.vala:1165 +#: core/Util.vala:1038 msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "" -#: src/Util.vala:1170 +#: core/Util.vala:1043 msgid "Create a project" msgstr "" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" "Organize your to-dos better! Go to the left panel and click the '+' button " "in the 'On This Computer' section and add a project of your own." msgstr "" -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -363,212 +309,475 @@ msgid "" "We hope you’ll enjoy using Planify!" msgstr "" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "" -#: src/Util.vala:1201 +#: core/Util.vala:1074 msgid "Show your calendar events" msgstr "" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" "You can display your system's calendar events in Planify. Go to " "'Preferences' 🡒 Calendar Events to turn ir on." msgstr "" -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "" -#: src/Util.vala:1209 +#: core/Util.vala:1082 msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " "account. Go to 'Preferences' 🡒 'Accounts'." msgstr "" -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "" + +#: core/QuickAdd.vala:58 +msgid "Add a description…" +msgstr "" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "" + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "" + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "" + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "" + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "" + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "" + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "" + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "" + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "" + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "" + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "" + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "" + +#: src/MainWindow.vala:455 +msgid "About Planify" +msgstr "" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "" -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "" -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +msgid "What’s new in Planify" msgstr "" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "" -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." msgstr "" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Add to favorites" msgstr "" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "" @@ -577,145 +786,140 @@ msgstr "" msgid "(No Section)" msgstr "" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "" -#: src/Layouts/ItemRow.vala:452 +#: src/Layouts/ItemRow.vala:482 msgid "Add subtask" msgstr "" -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "" - #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 msgid "Copy to clipboard" msgstr "" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 msgid "Duplicate" msgstr "" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 msgid "Weekly" msgstr "" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 msgid "Monthly" msgstr "" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 msgid "Yearly" msgstr "" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "" @@ -740,45 +944,20 @@ msgid "" "mode will be synced when you reconnect" msgstr "" -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "" @@ -787,104 +966,27 @@ msgstr "" msgid "All" msgstr "" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr "" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 -#: src/Dialogs/LabelPicker.vala:153 -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "" - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 msgid "" "Your list of reminders will show up here. Add one by clicking the button." msgstr "" -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "" @@ -892,80 +994,76 @@ msgstr "" msgid "Description" msgstr "" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "" -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "" @@ -981,59 +1079,6 @@ msgstr "" msgid "Labels: Todoist" msgstr "" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "" - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "" - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "" @@ -1058,7 +1103,7 @@ msgstr "" msgid "Update project" msgstr "" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "" @@ -1082,28 +1127,27 @@ msgstr "" msgid "Update label" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "" -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "" - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "" @@ -1111,17 +1155,40 @@ msgstr "" msgid "What's New" msgstr "" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" +#: src/Dialogs/WhatsNew.vala:108 +msgid "Sidebar filter settings" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." msgstr "" #: src/Dialogs/ProjectDescription.vala:34 @@ -1136,11 +1203,7 @@ msgstr "" msgid "Type a search" msgstr "" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "" @@ -1165,37 +1228,37 @@ msgid "Year(s)" msgstr "" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "" @@ -1207,268 +1270,363 @@ msgstr "" msgid "Quickly switch projects and views, find tasks, search by labels." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +msgid "Integrations" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +msgid "Sidebar" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 -msgid "Customize your homepage." +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 +msgid "Customize your sidebar." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 msgid "Quick Add" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "" #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +msgid "Backups" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 msgid "Delete Planify Data" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -msgid "Sort Settings" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +msgid "Home Page" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +msgid "Sort Settings" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can " -"change it to whatever you'd like." -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 msgid "Light Style" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 msgid "Dark Style" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 msgid "Dark Blue Style" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +msgid "Settings" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +msgid "Save Last Selected Project" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 msgid "The command was copied to the clipboard." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +msgid "Loading…" +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" "Are you sure you want to remove the Todoist sync? This action will delete " "all your tasks and settings." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " "delete all your tasks and settings." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +msgid "Create backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +msgid "Show in sidebar" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +msgid "Planify - Quick Add" +msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index da005d131..2401e74ca 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: io.github.alainm23.planify\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: 2023-06-04 16:50-0300\n" "Last-Translator: Fúlvio Leo \n" "Language: pt_BR\n" @@ -17,347 +17,290 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1)\n" "X-Generator: Gtranslator 42.0\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "Você tem certeza que quer reiniciar tudo?" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -#, fuzzy -msgid "" -"The process removes all stored information without the possibility of " -"undoing it." -msgstr "" -"Este processo remove todas as informações armazenadas sem a possibilidade de " -"desfazer." - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "Tarefas sincronizadas com sucesso" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "Você quer usar o Todoist como sua Caixa de Entrada de Projetos padrão?" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "Cancelar" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "Ok" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "Preferências" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "Atalhos de teclado" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -#, fuzzy -msgid "About Planify" -msgstr "Sobre o Planner" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "Vermelho Baga" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "Vermelho" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "Laranja" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "Verde Oliva" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "Amarelo" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "Verde Limão" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "Verde" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "Verde Menta" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "Cerceta" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "Azul Céu" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "Azul claro" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "Azul" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "Verde Uva" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "Violeta" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "Lavanda" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "Magenta" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "Salmão" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "Carvão" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "Cinza" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "Taupe" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "Claro" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "Escuro" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "Azul Escuro" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "Nenhum" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "Caixa de Entrada" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "Hoje" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "Hoje + Caixa de Entrada" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "Amanhã" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "Ontem" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "Seg," -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "Ter," -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "Qua," -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "Qui" -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "Sex," -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "Sáb," -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "Dom," -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" -msgstr "Tarefas adicionadas a %s" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" +msgstr "Cancelar" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "Reiniciar tudo" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "" -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "A requisição foi incorreta." - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "Autenticação é requerida, mas falhou ou não foi provida ainda." - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." -msgstr "A requisição foi válida, mas por algum motivo é proibida." - -#: src/Util.vala:965 -msgid "The requested resource could not be found." -msgstr "O recurso requerido não pôde ser encontrado." - -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." -msgstr "O usuário mandou muitas requisições em um dado período de tempo." - -#: src/Util.vala:967 -msgid "The request failed due to a server error." -msgstr "A requisição falhou devido a um erro de servidor." - -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." -msgstr "O servidor não pode processar a requisição no momento." +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" +msgstr "Ok" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 msgid "Priority 1: high" msgstr "Prioridade 1: alta" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 msgid "Priority 2: medium" msgstr "Prioridade 2: média" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 msgid "Priority 3: low" msgstr "Prioridade 3: baixa" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 msgid "Priority 4: none" msgstr "Prioridade 4: nenhuma" -#: src/Util.vala:1137 +#: core/Util.vala:925 +msgid "high" +msgstr "" + +#: core/Util.vala:927 +msgid "medium" +msgstr "" + +#: core/Util.vala:929 +#, fuzzy +msgid "low" +msgstr "Amarelo" + +#: core/Util.vala:931 +msgid "none" +msgstr "" + +#: core/Util.vala:1010 msgid "Meet Planify" msgstr "" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" "This project shows you everything you need to know to hit the ground " "running. Don’t hesitate to play around in it – you can always create a new " "one from settings." msgstr "" -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." msgstr "" -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." msgstr "" -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "" -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." msgstr "" -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "" -#: src/Util.vala:1165 +#: core/Util.vala:1038 msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "" -#: src/Util.vala:1170 +#: core/Util.vala:1043 #, fuzzy msgid "Create a project" msgstr "Atualizar projeto" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" "Organize your to-dos better! Go to the left panel and click the '+' button " "in the 'On This Computer' section and add a project of your own." msgstr "" -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -368,215 +311,486 @@ msgid "" "We hope you’ll enjoy using Planify!" msgstr "" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "" -#: src/Util.vala:1201 +#: core/Util.vala:1074 #, fuzzy msgid "Show your calendar events" msgstr "Eventos de Calendário" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" "You can display your system's calendar events in Planify. Go to " "'Preferences' 🡒 Calendar Events to turn ir on." msgstr "" -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "" -#: src/Util.vala:1209 +#: core/Util.vala:1082 msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " "account. Go to 'Preferences' 🡒 'Accounts'." msgstr "" -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "Agendado" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "Quadro de anúncios" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "Projetos" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "Seções" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "Tarefas" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "Rótulos" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "Filtros" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "Listas" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "Não Repita" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "Todo dia" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "A cada %d dias" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "Toda semana" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "A cada %d semanas" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "Todo mês" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "A cada %d meses" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "Todo ano" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "A cada %d anos" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "" + +#: core/QuickAdd.vala:58 +#, fuzzy +msgid "Add a description…" +msgstr "Adicionar uma descrição" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "A requisição foi incorreta." + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "Autenticação é requerida, mas falhou ou não foi provida ainda." + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "A requisição foi válida, mas por algum motivo é proibida." + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "O recurso requerido não pôde ser encontrado." + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "O usuário mandou muitas requisições em um dado período de tempo." + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "A requisição falhou devido a um erro de servidor." + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "O servidor não pode processar a requisição no momento." + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "Fixado" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "Definir a prioridade" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "%OB" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "%Y" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "Dom" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "Seg" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "Ter" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "Qua" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "Qui" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "Sex" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "Sáb" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "Agendar" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "Sem Data" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "Próxima semana" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "Escolha uma data" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "Tempo" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "Feita" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "Procure ou Crie" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +#, fuzzy +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "" +"Sua lista de filtros irá aparecer aqui. Crie uma clicando clicando no botão " +"'+'" + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "Adicionar rótulo(s)" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "Neste computador" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "Todoist" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "Tarefa copiada para a área de transferência" + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "Duplicar" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "Nova seção" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "Este projeto foi copiado para a Área de Transferência." + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "Quadro de fixados" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "agendar" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "por vir" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "hoje" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "Concluído" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "concluído" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "Registro de eventos" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "rótulos" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "Você tem certeza que quer reiniciar tudo?" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +#, fuzzy +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "" +"Este processo remove todas as informações armazenadas sem a possibilidade de " +"desfazer." + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "Tarefas sincronizadas com sucesso" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "Você quer usar o Todoist como sua Caixa de Entrada de Projetos padrão?" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "Preferências" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "Atalhos de teclado" + +#: src/MainWindow.vala:455 +#, fuzzy +msgid "About Planify" +msgstr "Sobre o Planner" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "Neste computador" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "Favoritos" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "Nenhum favorito disponível. Crie um clicando no botão '+'" -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "Neste Computador" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "Nenhum projeto disponível. Crie um clicando no botão '+'" -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" -msgstr "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +msgid "What’s new in Planify" +msgstr "" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "Nenhuma conta disponível. Sincronize uma clicando no botão '+'" -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "Google Tasks" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." msgstr "" "Ordem da lista de projetos alterada para Ordem de Classificação Personalizada" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 #, fuzzy msgid "Add to favorites" msgstr "Favoritos" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "Editar Projeto" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "Deletar projeto" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "Compartilhar" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "Enviar por e-mail" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "Você tem certeza que quer deletar %s?" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "Deletar" @@ -585,150 +799,145 @@ msgstr "Deletar" msgid "(No Section)" msgstr "(Sem seção)" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "Tarefas adicionadas a %s" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "Adicionar Tarefa" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "Editar Seção" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "Mover Seção" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "Gerenciar Ordem de Seção" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "Deletar Seção" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "Deletar Seção" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "Adicionar uma descrição" -#: src/Layouts/ItemRow.vala:452 -msgid "Add subtask" -msgstr "Adicionar subtarefa" - -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "Sem Data" +#: src/Layouts/ItemRow.vala:482 +msgid "Add subtask" +msgstr "Adicionar subtarefa" #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "Mover" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "Mover para Seção" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "Completar" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "Editar" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "Deletar tarefa" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "Adicionado em" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "Atualizado em" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "Não disponível" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 #, fuzzy msgid "Copy to clipboard" msgstr "Tarefa copiada para a área de transferência" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 #, fuzzy msgid "Duplicate" msgstr "Duplicar" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "Repetir" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 #, fuzzy msgid "Weekly" msgstr "Semana(s)" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 #, fuzzy msgid "Monthly" msgstr "Mês(es)" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 #, fuzzy msgid "Yearly" msgstr "Ano(s)" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "Concluído. Próxima ocorrência: %s" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "Deletar To-Do" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "Você tem certeza que quer deletar este to-do?" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "A tarefa foi deletada" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "Desfazer" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "Mover tarefas" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "Você tem certeza que quer mover sua tarefa para %s?" @@ -756,45 +965,20 @@ msgstr "" "As mudanças que você fez no modo offline\n" "serão sincronizadas quando você reconectar" -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "Agendar" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "Definir a prioridade" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "Fixado" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "Adicionar rótulo(s)" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "Adicionar lembrete(s)" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "Feita" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "Marcar como concluída" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "Deletar %d To-Dos" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "Você tem certeza que quer deletar esses %d to-dos?" @@ -803,101 +987,21 @@ msgstr "Você tem certeza que quer deletar esses %d to-dos?" msgid "All" msgstr "Todos" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "Adicionar Seção" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "%OB" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "%Y" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "Dom" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "Seg" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "Ter" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "Qua" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "Qui" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "Sex" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "Sáb" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "Próxima semana" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "Escolha uma data" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "Tempo" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "AM" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "PM" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr ":" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "Procure ou Crie" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 -#: src/Dialogs/LabelPicker.vala:153 -#, fuzzy -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "" -"Sua lista de filtros irá aparecer aqui. Crie uma clicando clicando no botão " -"'+'" - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "Lembretes" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "Adicionar lembrete" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 #, fuzzy msgid "" "Your list of reminders will show up here. Add one by clicking the button." @@ -905,8 +1009,8 @@ msgstr "" "Sua lista de filtros irá aparecer aqui. Crie uma clicando clicando no botão " "'+'" -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "Quando?" @@ -914,80 +1018,76 @@ msgstr "Quando?" msgid "Description" msgstr "Descrição" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "Filtrar por Rótulos" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "Selecionar" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "Colar" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "Deletar Projeto" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "Ordem de classificação personalizada" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "Alfabeticamente" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "Data de vencimento" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "Dados adicionados" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "Prioridade" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "Esconder tarefas concluídas" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "Mostrar Tarefas Concluídas" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "Esconder Tarefas Concluídas" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "Mostrar tarefas concluídas" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "Nova seção" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "Pressione 'a'ou toque no botão mais para criar um novo to-do" -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "Atrasado" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "Reagendar" @@ -1003,59 +1103,6 @@ msgstr "Rótulos: Neste Computador" msgid "Labels: Todoist" msgstr "Rótulos: Todoist" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "Concluído" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "Tarefa copiada para a área de transferência" - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "Duplicar" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "Este projeto foi copiado para a Área de Transferência." - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "Quadro de fixados" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "agendar" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "por vir" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "hoje" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "prioridade" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "concluído" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "Registro de eventos" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "rótulos" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "Novo Projeto" @@ -1080,7 +1127,7 @@ msgstr "Adicionar projeto" msgid "Update project" msgstr "Atualizar projeto" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "Projeto adicionado com sucesso!" @@ -1104,29 +1151,28 @@ msgstr "Adicionar rótulo" msgid "Update label" msgstr "Atualizar rótulo" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "Sincronizar todoist" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "Carregando" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "" "Planner está sincronizando suas tarefas, isso pode levar alguns minutos." -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "Sincronizando. Aguarde um momento, por favor." - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "Insira suas credenciais" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "A Internet Não Está Disponível" @@ -1134,18 +1180,42 @@ msgstr "A Internet Não Está Disponível" msgid "What's New" msgstr "" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" -msgstr "Sincronize com sua Conta Todoist" +#: src/Dialogs/WhatsNew.vala:108 +#, fuzzy +msgid "Sidebar filter settings" +msgstr "Usar as configurações do sistema" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." +msgstr "" #: src/Dialogs/ProjectDescription.vala:34 msgid "Project Description" @@ -1159,11 +1229,7 @@ msgstr "Atualizar" msgid "Type a search" msgstr "Digite uma busca" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "Neste computador" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "Nenhuma Seção" @@ -1188,37 +1254,37 @@ msgid "Year(s)" msgstr "Ano(s)" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "Segunda-feira" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "Terça-feira" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "Quarta-feira" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "Quinta-feira" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "Sexta-feita" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "Sábado" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "Domingo" @@ -1232,233 +1298,246 @@ msgstr "" "Alterne rapidamente projetos e visualizações, encontre tarefas, busque por " "rótulos." -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" -msgstr "Contas" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +#, fuzzy +msgid "Integrations" +msgstr "Integração DE" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "Geral" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +msgid "Sidebar" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 -msgid "Customize your homepage." -msgstr "" +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 +#, fuzzy +msgid "Customize your sidebar." +msgstr "Ordem de classificação personalizada" -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "Aparência" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 #, fuzzy msgid "Quick Add" msgstr "Busca Rápida" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "" #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +#, fuzzy +msgid "Backups" +msgstr "Voltar" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 #, fuzzy msgid "Delete Planify Data" msgstr "Deletar tarefa" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -#, fuzzy -msgid "Sort Settings" -msgstr "Configurações da tarefa" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +msgid "Home Page" +msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "Classificar projetos" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "Ascendente" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "Descendente" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "Ordenar por" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +#, fuzzy +msgid "Sort Settings" +msgstr "Configurações da tarefa" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "Integração DE" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "Executar em segundo plano" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "Eventos de Calendário" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "Data e Tempo" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "24h" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "12h" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "Formato de Relógio" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "Começo da semana" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "Configurações da tarefa" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "Imediatamente" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" msgstr "Aguarde 2500 milisegundos" -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "Concluir tarefa" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "Prioridade 1" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "Prioridade 2" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "Prioridade 3" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "Prioridade padrão" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "Pré-visualização da descrição" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "Sublinhar tarefas concluídas" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can " -"change it to whatever you'd like." -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "Usar as configurações do sistema" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 #, fuzzy msgid "Light Style" msgstr "Azul claro" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 #, fuzzy msgid "Dark Style" msgstr "Azul Escuro" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 #, fuzzy msgid "Dark Blue Style" msgstr "Azul Escuro" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "Contas" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "Caixa de Entrada de Projetos padrão" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "Sincronize com sua Conta Todoist" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "Sincronize com sua Conta do Google" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "Sincronizar Servidor" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." @@ -1466,32 +1545,52 @@ msgstr "" "Ative esta configuração para que o Planner sincronize automaticamente com " "sua conta Todoist a cada 15 minutos." -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "Última Sincronização" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +#, fuzzy +msgid "Settings" +msgstr "Configurações da tarefa" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +#, fuzzy +msgid "Save Last Selected Project" +msgstr "Deletar Projeto" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 #, fuzzy msgid "The command was copied to the clipboard." msgstr "Este projeto foi copiado para a Área de Transferência." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +#, fuzzy +msgid "Loading…" +msgstr "Carregando" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "Sincronizando. Aguarde um momento, por favor." + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" "Are you sure you want to remove the Todoist sync? This action will delete " "all your tasks and settings." @@ -1499,7 +1598,7 @@ msgstr "" "Você tem certeza que deseja remover a sincronização do Todoist? Esta ação " "irá deletar todas as suas tarefas e configurações." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 #, fuzzy msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " @@ -1508,10 +1607,96 @@ msgstr "" "Você tem certeza que deseja remover a sincronização do Todoist? Esta ação " "irá deletar todas as suas tarefas e configurações." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "Sair" +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +#, fuzzy +msgid "Create backup" +msgstr "Atualizar projeto" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +#, fuzzy +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "" +"Você tem certeza que deseja remover a sincronização do Todoist? Esta ação " +"irá deletar todas as suas tarefas e configurações." + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +msgid "Show in sidebar" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +#, fuzzy +msgid "Planify - Quick Add" +msgstr "Busca Rápida" + +#, c-format +#~ msgid "priority" +#~ msgstr "prioridade" + +#~ msgid "AM" +#~ msgstr "AM" + +#~ msgid "PM" +#~ msgstr "PM" + +#~ msgid ":" +#~ msgstr ":" + #~ msgid "Move to project" #~ msgstr "Mover para projeto" @@ -1528,9 +1713,6 @@ msgstr "Sair" #~ "Sua lista de filtros irá aparecer aqui. Crie uma clicando clicando no " #~ "botão '+'" -#~ msgid "Back" -#~ msgstr "Voltar" - #~ msgid "Sync" #~ msgstr "Sincronizar" diff --git a/po/ru.po b/po/ru.po index 8254ae2a8..24d99ccc5 100644 --- a/po/ru.po +++ b/po/ru.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.alainm23.planner\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: 2023-12-12 05:43+0500\n" "Last-Translator: Hachikoha \n" "Language: ru\n" @@ -17,301 +17,244 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "Вы уверены, что хотите сбросить все?" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -msgid "" -"The process removes all stored information without the possibility of undoing " -"it." -msgstr "" -"Процесс удаляет всю сохраненную информацию без возможности восстановления." - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" -"Planify будет автоматически запускаться при включении этого устройства и " -"запускаться при закрытии его окна для отправки уведомлений о задачах." - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "Planify" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "Задачи синхронизированы успешно" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "Хотите использовать Todoist в качестве проекта «Входящие» по умолчанию?" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "Отмена" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "ОК" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "Настройки" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "Сочетания клавиш" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -msgid "About Planify" -msgstr "О Planify" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "Ягодно-красный" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "Красный" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "Оранжевый" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "Оливковый" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "Желтый" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "Лаймовый" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "Зеленый" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "Мятный" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "Бирюзовый" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "Небесно-голубой" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "Голубой" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "Синий" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "Виноград" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "Фиолетовый" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "Лаванда" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "Пурпурный" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "Лосось" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "Древесный уголь" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "Серый" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "Серо-коричневый" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "Светлый" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "Темный" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "Темно-синий" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "Нет" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "Входящие" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "Сегодня" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "Сегодня + Входящие" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "Завтра" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "Вчера" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "Пн," -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "Вт," -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "Ср," -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "Чт," -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "Пт," -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "Сб," -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "Вс," -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" -msgstr "Задача добавлена в %s" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" +msgstr "Отмена" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "Сбросить все" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "Процесс завершен, вам нужно снова перезапустить Planify." -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "Запрос был неправильным." - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "" -"Требуется аутентификация, но она завершилась неудачно или еще не была выполнена." - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." -msgstr "Запрос был действительным, но для чего-то запрещенного." - -#: src/Util.vala:965 -msgid "The requested resource could not be found." -msgstr "Запрошенный ресурс не найден." - -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." -msgstr "Пользователь отправил слишком много запросов за определенный промежуток времени." - -#: src/Util.vala:967 -msgid "The request failed due to a server error." -msgstr "Запрос не выполнен из-за ошибки сервера." - -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." -msgstr "Сервер в настоящее время не может обработать запрос." +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" +msgstr "ОК" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 msgid "Priority 1: high" msgstr "Приоритет 1: высокий" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 msgid "Priority 2: medium" msgstr "Приоритет 2: средний" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 msgid "Priority 3: low" msgstr "Приоритет 3: низкий" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 msgid "Priority 4: none" msgstr "Приоритет 4: нет" -#: src/Util.vala:1137 +#: core/Util.vala:925 +msgid "high" +msgstr "" + +#: core/Util.vala:927 +msgid "medium" +msgstr "" + +#: core/Util.vala:929 +#, fuzzy +msgid "low" +msgstr "Желтый" + +#: core/Util.vala:931 +msgid "none" +msgstr "" + +#: core/Util.vala:1010 msgid "Meet Planify" msgstr "Встречайте Planify" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" -"This project shows you everything you need to know to hit the ground running. " -"Don’t hesitate to play around in it – you can always create a new one from " -"settings." +"This project shows you everything you need to know to hit the ground " +"running. Don’t hesitate to play around in it – you can always create a new " +"one from settings." msgstr "" "Этот проект покажет вам все, что нужно знать, чтобы приступить к делу. Не " "стесняйтесь экспериментировать с ним – вы всегда можете создать новый в " "настройках." -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "Нажмите на эту задачу" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." @@ -319,11 +262,11 @@ msgstr "" "Перед вами задача! Завершите ее, нажав на флажок слева. Выполненные задачи " "собираются в нижней части вашего проекта." -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "Создать новую задачу" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." @@ -331,43 +274,45 @@ msgstr "" "Теперь ваша очередь, нажмите кнопку «+» в верхней части проекта, введите все " "оставшиеся данные и нажмите синюю кнопку «Сохранить»." -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "Запланируйте эту задачу на сегодня или позже." -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." -msgstr "Нажмите кнопку календаря внизу, чтобы решить, когда выполнить это задание." +msgstr "" +"Нажмите кнопку календаря внизу, чтобы решить, когда выполнить это задание." -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "Измените порядок задач" -#: src/Util.vala:1165 +#: core/Util.vala:1038 +#, fuzzy msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "" "Чтобы изменить порядок списка, нажмите и удерживайте задачу, а затем " "перетащите ее куда вам нужно." -#: src/Util.vala:1170 +#: core/Util.vala:1043 msgid "Create a project" msgstr "Создать проект" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" -"Organize your to-dos better! Go to the left panel and click the '+' button in " -"the 'On This Computer' section and add a project of your own." +"Organize your to-dos better! Go to the left panel and click the '+' button " +"in the 'On This Computer' section and add a project of your own." msgstr "" "Организуйте свои задачи лучше! Перейдите на левую панель, нажмите кнопку «+» " "в разделе «На этом компьютере» и добавьте собственный проект." -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "Вы готовы!" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -380,32 +325,32 @@ msgstr "" "Это все, что вам действительно нужно знать. Не стесняйтесь добавлять свои " "собственные проекты и задачи.\n" "\n" -"Вы можете вернуться к этому проекту позже, чтобы изучить расширенные функции, " -"указанные ниже..\n" +"Вы можете вернуться к этому проекту позже, чтобы изучить расширенные " +"функции, указанные ниже..\n" "\n" "Мы надеемся, что вам понравится использовать Planify!" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "Настройте параметры приложения" -#: src/Util.vala:1201 +#: core/Util.vala:1074 msgid "Show your calendar events" msgstr "Показать события календаря" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" -"You can display your system's calendar events in Planify. Go to 'Preferences' " -"🡒 Calendar Events to turn ir on." +"You can display your system's calendar events in Planify. Go to " +"'Preferences' 🡒 Calendar Events to turn ir on." msgstr "" "Вы можете отображать события календаря вашей системы в Planify. Перейдите в " "«Настройки» 🡒 «События календаря», чтобы включить их." -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "Включите синхронизацию со сторонним сервисом." -#: src/Util.vala:1209 +#: core/Util.vala:1082 msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " "account. Go to 'Preferences' 🡒 'Accounts'." @@ -413,187 +358,464 @@ msgstr "" "Planify не только создает задачи локально, но и может синхронизировать их с " "вашей учетной записью Todoist. Перейдите в «Настройки» 🡒 «Учетные записи»." -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "💼️ Работа" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "🎒️ Учеба" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "👉️ Делегирование" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "🏡️ Дом" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "🏃‍♀️️ Последующая работа" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "Предстоящее" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "Прикрепленные" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "Проекты" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "Разделы" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "Задачи" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "Метки" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "Фильтры" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "Списки" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "Не повторяйте" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "Каждый день" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "Каждые %d дня(ей)" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "Каждую неделю" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "Каждые %d недели(ель)" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "Каждый месяц" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "Каждые %d месяца(ев)" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "Каждый год" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "Каждые %d года(лет)" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "" + +#: core/QuickAdd.vala:58 +#, fuzzy +msgid "Add a description…" +msgstr "Добавить описание" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "Запрос был неправильным." + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "" +"Требуется аутентификация, но она завершилась неудачно или еще не была " +"выполнена." + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "Запрос был действительным, но для чего-то запрещенного." + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "Запрошенный ресурс не найден." + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "" +"Пользователь отправил слишком много запросов за определенный промежуток " +"времени." + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "Запрос не выполнен из-за ошибки сервера." + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "Сервер в настоящее время не может обработать запрос." + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "Закрепить" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "Установить приоритет" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "%OB" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "%Y" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "Вс" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "Пн" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "Вт" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "Ср" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "Чт" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "Пт" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "Сб" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "Запланировать" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "Нет данных" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "Через неделю" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "Выберите дату" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "Время" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "Готово" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "Найдите или создайте" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "" +"Здесь появится список ваших фильтров. Создайте его, введя имя и нажав " +"клавишу Enter." + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "Добавить метку(-ки)" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "На этом компьютере" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "Todoist" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "Задача скопирована в буфер обмена." + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "Дублировать" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "Новый раздел" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "Проект скопирован в буфер обмена." + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "Прикрепленные" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "Предстоящее" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "предстоящий" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "сегодня" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "Завершено" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "завершено" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "журнал событий" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "Метки" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "Вы уверены, что хотите сбросить все?" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "" +"Процесс удаляет всю сохраненную информацию без возможности восстановления." + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" +"Planify будет автоматически запускаться при включении этого устройства и " +"запускаться при закрытии его окна для отправки уведомлений о задачах." + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "Planify" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "Задачи синхронизированы успешно" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "" +"Хотите использовать Todoist в качестве проекта «Входящие» по умолчанию?" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "Настройки" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "Сочетания клавиш" + +#: src/MainWindow.vala:455 +msgid "About Planify" +msgstr "О Planify" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "На этом компьютере" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "Избранное" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "В избранном ничего нет. Создайте, нажав кнопку «+»." -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "На этом компьютере" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "Нет доступного проекта. Создайте его, нажав кнопку «+»." -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" -msgstr "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +#, fuzzy +msgid "What’s new in Planify" +msgstr "Что нового в Planify" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "Нет доступной учетной записи. Синхронизируйте ее, нажав кнопку «+»." -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "Google Tasks" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." -msgstr "Порядок списка проектов изменен на пользовательский порядок сортировки." +msgstr "" +"Порядок списка проектов изменен на пользовательский порядок сортировки." -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "Удалить из избранного" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Add to favorites" msgstr "Добавить в избранное" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "Изменить проект" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "Удалить проект" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "Поделиться" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "Отправить по e-mail" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "Вы уверены, что хотите удалить %s ?" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "Удалить" @@ -602,144 +824,140 @@ msgstr "Удалить" msgid "(No Section)" msgstr "(Нет разделов)" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "Задача добавлена в %s" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "Добавить задачу" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "Изменить раздел" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "Переместить раздел" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "Изменить порядок разделов" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "Удалить раздел" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "Удалить раздел" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "Добавить описание" -#: src/Layouts/ItemRow.vala:452 +#: src/Layouts/ItemRow.vala:482 msgid "Add subtask" msgstr "Добавить подзадачу" -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "Сохранить" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "Нет данных" - #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 src/Dialogs/ProjectPicker/ProjectPicker.vala:73 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "Переместить" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "Переместить в раздел" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "Завершить" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "Изменить" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "Удалить задачу" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "Добавлено" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "Обновлено" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "Не доступно" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 msgid "Copy to clipboard" msgstr "Скопировать в буфер обмена" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 msgid "Duplicate" msgstr "Дублировать" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "Повторять" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "Ежедневно" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 msgid "Weekly" msgstr "Еженедельно" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 msgid "Monthly" msgstr "Ежемесячно" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 msgid "Yearly" msgstr "Ежегодно" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "Пользовательская настройка" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "Завершено. Следующее появление: %s" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "Удалить задачу" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "Вы уверены, что хотите удалить эту задачу?" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "Задача была удалена" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "Отменить" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "Переместить задачи" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "Вы уверены, что хотите переместить задачу в %s ?" @@ -767,45 +985,20 @@ msgstr "" "Изменения, внесенные вами в автономном режиме,\n" "будут синхронизированы при повторном подключении." -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "Запланировать" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "Установить приоритет" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "Закрепить" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "Добавить метку(-ки)" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "Добавить напоминание" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "Готово" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "Пометить как завершенные" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "Удалить %d задач" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "Вы уверены, что хотите удалить эти %d задач?" @@ -814,105 +1007,27 @@ msgstr "Вы уверены, что хотите удалить эти %d зад msgid "All" msgstr "Все" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "Добавить раздел" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "%OB" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "%Y" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "Вс" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "Пн" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "Вт" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "Ср" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "Чт" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "Пт" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "Сб" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "Через неделю" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "Выберите дату" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "Время" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "AM" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "PM" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr ":" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "Найдите или создайте" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 src/Dialogs/LabelPicker.vala:153 -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "" -"Здесь появится список ваших фильтров. Создайте его, введя имя и нажав клавишу " -"Enter." - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "Напоминания" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "Добавить напоминание" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 msgid "" "Your list of reminders will show up here. Add one by clicking the button." msgstr "Здесь появится список напоминаний. Добавьте его, нажав кнопку." -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "Когда?" @@ -920,80 +1035,76 @@ msgstr "Когда?" msgid "Description" msgstr "Описание" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "Фильтровать по меткам" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "Выбрать" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "Вставить" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "Удалить проект" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "Порядок пользователя" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "По алфавиту" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "По сроку выполнения" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "По дате добавления" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "По приоритету" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "Сортировать" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "Скрыть выполненные задачи" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "Показать выполненные задачи" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "Скрыть выполненные задачи" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "Показать выполненные задачи" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "Новый раздел" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "Нажмите «a» или коснитесь кнопки плюс, чтобы создать новую задачу." -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "Просрочено" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "Перенести" @@ -1009,59 +1120,6 @@ msgstr "Метки : На этом компьютере" msgid "Labels: Todoist" msgstr "Метки : Todoist" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "Завершено" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "Задача скопирована в буфер обмена." - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "Дублировать" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "Проект скопирован в буфер обмена." - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "Прикрепленные" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "Предстоящее" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "предстоящий" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "сегодня" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "приоритет" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "завершено" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "журнал событий" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "Метки" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "Новый проект" @@ -1086,7 +1144,7 @@ msgstr "Добавить проект" msgid "Update project" msgstr "Обновить проект" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "Проект успешно добавлен!" @@ -1110,28 +1168,27 @@ msgstr "Добавить метку" msgid "Update label" msgstr "Обновить метку" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "Синхронизация с Todoist" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "Загрузка" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "Planify синхронизирует ваши задачи, это может занять несколько минут." -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "Синхронизация. Пожалуйста подождите." - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "Пожалуйста, введите свои учетные данные" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "Сеть недоступна" @@ -1139,18 +1196,42 @@ msgstr "Сеть недоступна" msgid "What's New" msgstr "Что нового" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" -msgstr "Что нового в Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" +msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" -msgstr "Версия 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." +msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" -msgstr "Синхронизируйте со своей учетной записью Todoist." +#: src/Dialogs/WhatsNew.vala:108 +#, fuzzy +msgid "Sidebar filter settings" +msgstr "Использовать системные настройки" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." +msgstr "" #: src/Dialogs/ProjectDescription.vala:34 msgid "Project Description" @@ -1164,11 +1245,7 @@ msgstr "Обновить" msgid "Type a search" msgstr "Введите запрос" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "На этом компьютере" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "Нет раздела" @@ -1193,37 +1270,37 @@ msgid "Year(s)" msgstr "Года(лет)" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "Понедельник" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "Вторник" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "Среда" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "Четверг" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "Пятница" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "Суббота" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "Воскресенье" @@ -1233,158 +1310,174 @@ msgstr "Быстрый поиск" #: src/Dialogs/QuickFind/QuickFind.vala:172 msgid "Quickly switch projects and views, find tasks, search by labels." -msgstr "Быстро переключайте проекты и списки, находите задачи, осуществляйте поиск по меткам." +msgstr "" +"Быстро переключайте проекты и списки, находите задачи, осуществляйте поиск " +"по меткам." -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" -msgstr "Учетные записи" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +#, fuzzy +msgid "Integrations" +msgstr "Интеграция с рабочим окружением" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "Синхронизируйте со своими любимыми планировщиками задач." -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "Общие" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "Настройте как вам нравится." -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" -msgstr "Домашняя страница" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +#, fuzzy +msgid "Sidebar" +msgstr "Ширина боковой панели" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 -msgid "Customize your homepage." +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 +#, fuzzy +msgid "Customize your sidebar." msgstr "Настройте свою домашнюю страницу." -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "Оформление" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 msgid "Quick Add" msgstr "Быстрое добавление" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "Добавляйте задачи из любого места." #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "Поддержка" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "Создайте обучающий проект" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." -msgstr "Изучите приложение шаг за шагом с помощью короткого руководства пользователя." +msgstr "" +"Изучите приложение шаг за шагом с помощью короткого руководства пользователя." + +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +msgid "Backups" +msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "Конфиденциальность" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 msgid "Delete Planify Data" msgstr "Удалить данные Planify" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "Обучающий проект был создан" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -msgid "Sort Settings" -msgstr "Настройки сортировки" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +#, fuzzy +msgid "Home Page" +msgstr "Домашняя страница" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "Сортировка проектов" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "По возрастанию" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "По убыванию" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "Сортировать по" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +msgid "Sort Settings" +msgstr "Настройки сортировки" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "Интеграция с рабочим окружением" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "Запустить в фоновом режиме" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "Позвольте Planify работать в фоновом режиме и отправлять уведомления." -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "Запускать при старте системы" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "Должен ли Planify запускаться при старте системы." -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "События календаря" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "Дата и время" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "24-часовой" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "12-часовой" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "Формат времени" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "Начало недели" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "Настройки задачи" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "Немедленно" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" -msgstr "Ожидать 2500\n" +msgstr "" +"Ожидать 2500\n" "миллисекунд" -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "Выполнить задачу" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "" @@ -1392,77 +1485,76 @@ msgstr "" "мгновенно или подождите 2500\n" "миллисекунд с опцией отмены." -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "Приоритет 1" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "Приоритет 2" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "Приоритет 3" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "Приоритет по умолчанию" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "Предварительный просмотр описания" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "Подчеркните выполненные задачи" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can change " -"it to whatever you'd like." -msgstr "" -"Открывая Planify, убедитесь, что вы видите наиболее важные задачи. Домашней " -"страницей по умолчанию является список «‎Входящие», но вы можете " -"изменить его на любой другой." - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "Тема приложения" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "Использовать системные настройки" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 msgid "Light Style" msgstr "Светлый стиль" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 msgid "Dark Style" msgstr "Темный стиль" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 msgid "Dark Blue Style" msgstr "Темно-синий стиль" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "Ширина боковой панели" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "Учетные записи" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "Проект «Входящие» по умолчанию" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "Синхронизируйте со своей учетной записью Todoist." + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "Синхронизировать с вашей учетной записью Google" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "Синхронизация с сервером" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." @@ -1470,11 +1562,11 @@ msgstr "" "Активируйте эту настройку, чтобы Planify автоматически синхронизировался с " "вашей учетной записью Todoist каждые 15 минут." -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "Последняя синхронизация" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." @@ -1483,11 +1575,7 @@ msgstr "" "места на рабочем столе с помощью всего лишь нескольких нажатий клавиш. Вам " "даже не придется выходить из приложения, в котором вы сейчас находитесь." -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "Установите свое сочетание клавиш в настройках системы." - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" @@ -1496,19 +1584,43 @@ msgstr "" "Пользовательские сочетания клавиш, затем добавьте новое сочетание клавиш со " "следующим текстом:" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +#, fuzzy +msgid "Settings" +msgstr "Настройки сортировки" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +#, fuzzy +msgid "Save Last Selected Project" +msgstr "Удалить проект" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 msgid "The command was copied to the clipboard." msgstr "Команда скопирована в буфер обмена." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +#, fuzzy +msgid "Loading…" +msgstr "Загрузка" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "Синхронизация. Пожалуйста подождите." + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" -"Are you sure you want to remove the Todoist sync? This action will delete all " -"your tasks and settings." +"Are you sure you want to remove the Todoist sync? This action will delete " +"all your tasks and settings." msgstr "" -"Вы уверены, что хотите удалить синхронизацию с Todoist? Это действие приведет " -"к удалению всех ваших задач и настроек." +"Вы уверены, что хотите удалить синхронизацию с Todoist? Это действие " +"приведет к удалению всех ваших задач и настроек." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " "delete all your tasks and settings." @@ -1516,6 +1628,110 @@ msgstr "" "Вы уверены, что хотите удалить синхронизацию с Google Tasks? Это действие " "приведет к удалению всех ваших задач и настроек." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "Выйти" + +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +#, fuzzy +msgid "Create backup" +msgstr "Создать проект" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +#, fuzzy +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "" +"Вы уверены, что хотите удалить синхронизацию с Todoist? Это действие " +"приведет к удалению всех ваших задач и настроек." + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +msgid "Show in sidebar" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +#, fuzzy +msgid "Planify - Quick Add" +msgstr "Быстрое добавление" + +#~ msgid "Save" +#~ msgstr "Сохранить" + +#~ msgid "AM" +#~ msgstr "AM" + +#~ msgid "PM" +#~ msgstr "PM" + +#~ msgid ":" +#~ msgstr ":" + +#, c-format +#~ msgid "priority" +#~ msgstr "приоритет" + +#~ msgid "Version 4.1.1" +#~ msgstr "Версия 4.1.1" + +#~ msgid "" +#~ "When you open up Planify, make sure you see the to-dos that are most " +#~ "important. The default homepage is your Inbox view, but you can " +#~ "change it to whatever you'd like." +#~ msgstr "" +#~ "Открывая Planify, убедитесь, что вы видите наиболее важные задачи. " +#~ "Домашней страницей по умолчанию является список «‎Входящие», но вы " +#~ "можете изменить его на любой другой." + +#~ msgid "Set a custom shortcut in System Settings" +#~ msgstr "Установите свое сочетание клавиш в настройках системы." diff --git a/po/tr.po b/po/tr.po index 94d6fab26..6b9fa7363 100644 --- a/po/tr.po +++ b/po/tr.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.alainm23.planner\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: 2023-06-02 22:02+0300\n" "Last-Translator: Sabri Ünal \n" "Language-Team: Türkçe \n" @@ -24,345 +24,291 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.2.2\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "Tümünü sıfırlamak istediğinize emin misiniz?" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -#, fuzzy -msgid "" -"The process removes all stored information without the possibility of " -"undoing it." -msgstr "Bu işlem, saklanan tüm bilgileri geri alma olanağı olmadan kaldırır." - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "Planify" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "Görevler başarıyla eşzamanlandı" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "Todoist öntanımlı Gelen Kutusu Projesi olarak kullanılsın mı?" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "İptal" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "Tamam" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "Tercihler" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "Klavye Kısayolları" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -msgid "About Planify" -msgstr "Planify Hakkında" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "Dut Kırmızısı" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "Kırmızı" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "Turuncu" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "Zeytin Yeşili" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "Sarı" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "Misket Limonu Yeşili" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "Yeşil" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "Nane Yeşili" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "Deniz Mavisi" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "Gök Mavisi" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "Açık Mavi" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "Mavi" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "Üzüm Moru" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "Menekşe" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "Lavanta" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "Macenta" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "Somon" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "Kömür Karası" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "Gri" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "Boz Kahverengi" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "Açık" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "Koyu" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "Koyu Mavi" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "Hiçbiri" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "Gelen Kutusu" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "Bugün" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "Bugün + Gelen Kutusu" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "Yarın" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "Dün" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "Paz," -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "Sal," -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "Çrş" -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "Per," -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "Cum," -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "Cts," -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "Paz," -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" -msgstr "Görev %s ögesine eklendi" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" +msgstr "İptal" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "Tümünü sıfırla" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "" -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "İstek yanlış." - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "Kimlik doğrulama gerekiyor ve başarısız oldu veya henüz sağlanmadı." - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." -msgstr "İstek geçerliydi, ancak yasak olan bir şey için." - -#: src/Util.vala:965 -msgid "The requested resource could not be found." -msgstr "İstenen kaynak bulunamadı." - -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." -msgstr "Kullanıcı belirli bir süre içinde çok fazla istek gönderdi." - -#: src/Util.vala:967 -msgid "The request failed due to a server error." -msgstr "Sunucu hatası nedeniyle istek başarısız oldu." - -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." -msgstr "Sunucu şu anda isteği işleyemiyor." +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" +msgstr "Tamam" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 msgid "Priority 1: high" msgstr "Öncelik 1: yüksek" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 msgid "Priority 2: medium" msgstr "Öncelik 2: orta" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 msgid "Priority 3: low" msgstr "Öncelik 3: düşük" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 msgid "Priority 4: none" msgstr "Öncelik 4: yok" -#: src/Util.vala:1137 +#: core/Util.vala:925 +msgid "high" +msgstr "" + +#: core/Util.vala:927 +msgid "medium" +msgstr "" + +#: core/Util.vala:929 +#, fuzzy +msgid "low" +msgstr "Sarı" + +#: core/Util.vala:931 +msgid "none" +msgstr "" + +#: core/Util.vala:1010 #, fuzzy msgid "Meet Planify" msgstr "Planify" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" "This project shows you everything you need to know to hit the ground " "running. Don’t hesitate to play around in it – you can always create a new " "one from settings." msgstr "" -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." msgstr "" -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." msgstr "" -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "" -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." msgstr "" -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "" -#: src/Util.vala:1165 +#: core/Util.vala:1038 msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "" -#: src/Util.vala:1170 +#: core/Util.vala:1043 #, fuzzy msgid "Create a project" msgstr "Projeyi güncelle" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" "Organize your to-dos better! Go to the left panel and click the '+' button " "in the 'On This Computer' section and add a project of your own." msgstr "" -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -373,217 +319,485 @@ msgid "" "We hope you’ll enjoy using Planify!" msgstr "" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "" -#: src/Util.vala:1201 +#: core/Util.vala:1074 #, fuzzy msgid "Show your calendar events" msgstr "Takvim Etkinlikleri" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" "You can display your system's calendar events in Planify. Go to " "'Preferences' 🡒 Calendar Events to turn ir on." msgstr "" -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "" -#: src/Util.vala:1209 +#: core/Util.vala:1082 msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " "account. Go to 'Preferences' 🡒 'Accounts'." msgstr "" -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "Zamanlanmış" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "Pano" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "Projeler" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "Bölümler" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "Görevler" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "Etiketler" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "Filtreler" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "Listeler" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "Tekrarlama" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "Her gün" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "%d günde bir" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "Her hafta" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "Her %d haftada bir" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "Her ay" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "Her %d ayda bir" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "Her yıl" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "Her %d yılda bir" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "" + +#: core/QuickAdd.vala:58 +#, fuzzy +msgid "Add a description…" +msgstr "Açıklama ekle" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "İstek yanlış." + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "Kimlik doğrulama gerekiyor ve başarısız oldu veya henüz sağlanmadı." + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "İstek geçerliydi, ancak yasak olan bir şey için." + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "İstenen kaynak bulunamadı." + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "Kullanıcı belirli bir süre içinde çok fazla istek gönderdi." + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "Sunucu hatası nedeniyle istek başarısız oldu." + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "Sunucu şu anda isteği işleyemiyor." + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "İğnelenmiş" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "Önceliğe göre sırala" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "%OB" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "%Y" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "Pzr" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "Pzt" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "Sal" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "CSB" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "Per" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "Cum" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "Cts" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "Zamanla" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "Tarih Yok" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "Sonraki hafta" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "Tarih seçiniz" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "Zaman" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "Tamamlandı" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "Ara veya Oluştur" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +#, fuzzy +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "" +"Filtrelerinizin listesi burada görünecek. '+' düğmesine tıklayarak bir tane " +"oluşturabilirsiniz" + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "Etiket(ler) ekle" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "Bu Bilgisayarda" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "Todoist" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "Görev panoya kopyalandı" + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "İkizle" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "Yeni bölüm" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "Proje Panoya kopyalandı." + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "pano" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "zamanlanmış" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "yaklaşan" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "bugün" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "Tamamlandı" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "tamamlandı" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "logbook" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "etiketler" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "Tümünü sıfırlamak istediğinize emin misiniz?" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +#, fuzzy +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "Bu işlem, saklanan tüm bilgileri geri alma olanağı olmadan kaldırır." + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "Planify" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "Görevler başarıyla eşzamanlandı" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "Todoist öntanımlı Gelen Kutusu Projesi olarak kullanılsın mı?" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "Tercihler" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "Klavye Kısayolları" + +#: src/MainWindow.vala:455 +msgid "About Planify" +msgstr "Planify Hakkında" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "Bu bilgisayarda" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "Gözdeler" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "" "Gözdeler bulunamadı. '+' düğmesine tıklayarak bir tane oluşturabilirsiniz" -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "Bu Bilgisayarda" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "Proje bulunamadı. '+' düğmesine tıklayarak bir tane oluşturabilirsiniz" -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" -msgstr "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +msgid "What’s new in Planify" +msgstr "" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "" "Hesap bulunamadı. '+' düğmesine tıklayarak bir tane eşzamanlama " "oluşturabilirsiniz" -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "Google Görevler" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." msgstr "Proje listesi sırası, Özel Sıralama Düzeni olarak değiştirildi." -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 #, fuzzy msgid "Add to favorites" msgstr "Gözdeler" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "Projeyi Düzenle" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "Projeyi sil" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "Paylaş" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "E-posta ile gönder" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "%s ögesini silmek istediğinizden emin misiniz?" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "Sil" @@ -592,150 +806,145 @@ msgstr "Sil" msgid "(No Section)" msgstr "(Bölüm Yok)" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "Görev %s ögesine eklendi" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "Görev Ekle" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "Bölümü Düzenle" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "Bölümü Taşı" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "Bölüm Sıralamasını Yönet" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "Bölümü Sil" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "Bölümü sil" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "Açıklama ekle" -#: src/Layouts/ItemRow.vala:452 -msgid "Add subtask" -msgstr "Alt görev ekle" - -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "Tarih Yok" +#: src/Layouts/ItemRow.vala:482 +msgid "Add subtask" +msgstr "Alt görev ekle" #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "Taşı" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "Bölüme Taşı" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "Tamamlandı" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "Düzenle" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "Görevi sil" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "Eklenme tarihi" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "Güncellenme tarihi" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "Kullanılamıyor" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 #, fuzzy msgid "Copy to clipboard" msgstr "Görev panoya kopyalandı" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 #, fuzzy msgid "Duplicate" msgstr "İkizle" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "Yinele" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 #, fuzzy msgid "Weekly" msgstr "Hafta" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 #, fuzzy msgid "Monthly" msgstr "Ay(lar)" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 #, fuzzy msgid "Yearly" msgstr "Yıl" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "Tamamlandı. Sonraki gerçekleşme: %s" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "Yapılacak'ı Sil" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "Bu yapılacakʼı silmek istediğinize emin misiniz?" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "Görev silindi" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "Geri Al" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "Görevleri taşı" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "Görevinizi %s ögesine taşımak istediğinizden emin misiniz?" @@ -763,45 +972,20 @@ msgstr "" "Çevrim dışı kipte yaptığınız değişiklikler,\n" "yeniden bağlandığınızda eşzamanlanacak" -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "Zamanla" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "Önceliğe göre sırala" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "İğnelenmiş" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "Etiket(ler) ekle" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "Hatırlatıcı(lar) ekle" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "Tamamlandı" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "Tamamlanmış Olarak Maskele" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "%d Yapılacakʼı Sil" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "%d yapılacakʼı silmek istediğinize emin misiniz?" @@ -810,101 +994,21 @@ msgstr "%d yapılacakʼı silmek istediğinize emin misiniz?" msgid "All" msgstr "Tüm" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "Bölüm Ekle" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "%OB" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "%Y" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "Pzr" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "Pzt" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "Sal" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "CSB" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "Per" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "Cum" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "Cts" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "Sonraki hafta" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "Tarih seçiniz" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "Zaman" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "ÖÖ" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "ÖS" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr ":" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "Ara veya Oluştur" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 -#: src/Dialogs/LabelPicker.vala:153 -#, fuzzy -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "" -"Filtrelerinizin listesi burada görünecek. '+' düğmesine tıklayarak bir tane " -"oluşturabilirsiniz" - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "Hatırlatıcılar" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "Hatırlatıcı ekle" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 #, fuzzy msgid "" "Your list of reminders will show up here. Add one by clicking the button." @@ -912,8 +1016,8 @@ msgstr "" "Filtrelerinizin listesi burada görünecek. '+' düğmesine tıklayarak bir tane " "oluşturabilirsiniz" -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "Ne zaman?" @@ -921,81 +1025,77 @@ msgstr "Ne zaman?" msgid "Description" msgstr "Açıklama" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "Etiketlere Göre Filtrele" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "Seç" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "Yapıştır" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "Projeyi Sil" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "Özel sıralama düzeni" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "Alfabetik" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "Bitiş tarihi" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "Eklenme tarihi" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "Öncelik" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "Tamamlanan görevleri gizle" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "Tamamlanan Görevleri Göster" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "Tamamlanan Görevleri Gizle" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "Tamamlanan görevleri göster" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "Yeni bölüm" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "" "Yeni yapılacak oluşturmak için 'a' tuşuna basın veya artı düğmesine tıklayın" -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "Süresi doldu" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "Yeniden zamanla" @@ -1011,59 +1111,6 @@ msgstr "Etiketler: Bu Bilgisayarda" msgid "Labels: Todoist" msgstr "Etiketler: Todoist" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "Tamamlandı" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "Görev panoya kopyalandı" - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "İkizle" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "Proje Panoya kopyalandı." - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "pano" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "zamanlanmış" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "yaklaşan" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "bugün" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "öncelik" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "tamamlandı" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "logbook" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "etiketler" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "Yeni Proje" @@ -1088,7 +1135,7 @@ msgstr "Proje Ekle" msgid "Update project" msgstr "Projeyi güncelle" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "Proje eklendi." @@ -1112,28 +1159,27 @@ msgstr "Etiket ekle" msgid "Update label" msgstr "Etiketi güncelle" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "Todoist Eşzamanlama" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "Yükleniyor" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "Planlayıcı görevlerinizi eşzamanlıyor, bu birkaç dakika sürebilir." -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "Eşzamanlanıyor. Lütfen biraz bekleyin." - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "Lütfen kimlik bilgilerinizi girin" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "Ağ Kullanılamıyor" @@ -1141,18 +1187,42 @@ msgstr "Ağ Kullanılamıyor" msgid "What's New" msgstr "" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" -msgstr "Todoist Hesabınızla Eşzamanlayın" +#: src/Dialogs/WhatsNew.vala:108 +#, fuzzy +msgid "Sidebar filter settings" +msgstr "Sistem Ayarlarını Kullan" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." +msgstr "" #: src/Dialogs/ProjectDescription.vala:34 msgid "Project Description" @@ -1166,11 +1236,7 @@ msgstr "Güncelle" msgid "Type a search" msgstr "Aramak için yazınız" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "Bu Bilgisayarda" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "Bölüm Yok" @@ -1195,37 +1261,37 @@ msgid "Year(s)" msgstr "Yıl" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "Pazartesi" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "Salı" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "Çarşamba" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "Perşembe" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "Cuma" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "Cumartesi" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "Pazar" @@ -1239,233 +1305,246 @@ msgstr "" "Hızlı bir şekilde projeleri ve görünümleri değiştirin, görevleri bulun, " "etiketlere göre arama yapın." -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" -msgstr "Hesaplar" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +#, fuzzy +msgid "Integrations" +msgstr "Masaüstü Ortamı Tümleşimi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "Genel" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +msgid "Sidebar" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 -msgid "Customize your homepage." -msgstr "" +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 +#, fuzzy +msgid "Customize your sidebar." +msgstr "Özel sıralama düzeni" -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "Görünüm" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 #, fuzzy msgid "Quick Add" msgstr "Hızlı Arama" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "" #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +#, fuzzy +msgid "Backups" +msgstr "Geri" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 #, fuzzy msgid "Delete Planify Data" msgstr "Görevi sil" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -#, fuzzy -msgid "Sort Settings" -msgstr "Görev ayarları" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +msgid "Home Page" +msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "Projeleri sırala" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "Artan" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "Azalan" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "Sırala" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +#, fuzzy +msgid "Sort Settings" +msgstr "Görev ayarları" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "Masaüstü Ortamı Tümleşimi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "Arka planda çalıştır" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "Takvim Etkinlikleri" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "Tarih ve Zaman" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "24 saat" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "12 saat" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "Saat Biçimi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "Hafta başlangıcı" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "Görev ayarları" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "Anında" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" msgstr "2500 milisaniye bekle" -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "Görevi tamamla" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "Öncelik 1" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "Öncelik 2" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "Öncelik 3" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "Öntanımlı öncelik" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "Açıklama ön izleme" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "Tamamlanan görevlerin altını çiz" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can " -"change it to whatever you'd like." -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "Sistem Ayarlarını Kullan" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 #, fuzzy msgid "Light Style" msgstr "Açık Mavi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 #, fuzzy msgid "Dark Style" msgstr "Koyu Mavi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 #, fuzzy msgid "Dark Blue Style" msgstr "Koyu Mavi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "Hesaplar" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "Öntanımlı Gelen Kutusu Projesi" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "Todoist Hesabınızla Eşzamanlayın" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "Google Hesabınızla Eşzamanlayın" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "Eşzamanlama Sunucusu" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." @@ -1473,32 +1552,52 @@ msgstr "" "Planner'ın 15 dakikada bir kendiliğinden Todoist hesabınızla eşzamanlanması " "için bu ayarı etkinleştirin." -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "Son Eşzamanlama" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +#, fuzzy +msgid "Settings" +msgstr "Görev ayarları" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +#, fuzzy +msgid "Save Last Selected Project" +msgstr "Projeyi Sil" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 #, fuzzy msgid "The command was copied to the clipboard." msgstr "Proje Panoya kopyalandı." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +#, fuzzy +msgid "Loading…" +msgstr "Yükleniyor" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "Eşzamanlanıyor. Lütfen biraz bekleyin." + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" "Are you sure you want to remove the Todoist sync? This action will delete " "all your tasks and settings." @@ -1506,7 +1605,7 @@ msgstr "" "Todoist eşzamanlamasını kaldırmak istediğinden emin misin? Bu eylem, tüm " "görevlerinizi ve ayarlarınızı silecek." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 #, fuzzy msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " @@ -1515,10 +1614,96 @@ msgstr "" "Todoist eşzamanlamasını kaldırmak istediğinden emin misin? Bu eylem, tüm " "görevlerinizi ve ayarlarınızı silecek." -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "Oturumu Kapat" +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +#, fuzzy +msgid "Create backup" +msgstr "Projeyi güncelle" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +#, fuzzy +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "" +"Todoist eşzamanlamasını kaldırmak istediğinden emin misin? Bu eylem, tüm " +"görevlerinizi ve ayarlarınızı silecek." + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +msgid "Show in sidebar" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +#, fuzzy +msgid "Planify - Quick Add" +msgstr "Hızlı Arama" + +#, c-format +#~ msgid "priority" +#~ msgstr "öncelik" + +#~ msgid "AM" +#~ msgstr "ÖÖ" + +#~ msgid "PM" +#~ msgstr "ÖS" + +#~ msgid ":" +#~ msgstr ":" + #~ msgid "Move to project" #~ msgstr "Projeye taşı" @@ -1535,9 +1720,6 @@ msgstr "Oturumu Kapat" #~ "Filtrelerinizin listesi burada görünecek. '+' düğmesine tıklayarak bir " #~ "tane oluşturabilirsiniz" -#~ msgid "Back" -#~ msgstr "Geri" - #~ msgid "Sync" #~ msgstr "Eşzamanla" diff --git a/po/zh_CN.po b/po/zh_CN.po index 97e82499a..86ea4b33e 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: io.github.alainm23.planify\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-09 06:09-0500\n" +"POT-Creation-Date: 2023-12-18 19:36-0500\n" "PO-Revision-Date: 2023-08-20 03:43+0800\n" "Last-Translator: YaoSheng \n" "Language-Team: \n" @@ -17,284 +17,230 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.3.2\n" -#: src/App.vala:110 src/Dialogs/Preferences/PreferencesWindow.vala:149 -msgid "Are you sure you want to reset all?" -msgstr "确定要重置所有设置吗?" - -#: src/App.vala:111 src/Dialogs/Preferences/PreferencesWindow.vala:150 -msgid "" -"The process removes all stored information without the possibility of " -"undoing it." -msgstr "此操作将移除所有已存储信息并不可撤销。" - -#: src/App.vala:122 -msgid "" -"Planify will automatically start when this device turns on and run when its " -"window is closed so that it can send to-do notifications." -msgstr "" -"Planify 将在设备开机时自动启动并在窗口关闭时保持运行,以便发送待办事项通知。" - -#: src/MainWindow.vala:37 -msgid "Planify" -msgstr "Planify" - -#: src/MainWindow.vala:236 -msgid "Tasks synced successfully" -msgstr "成功同步任务" - -#: src/MainWindow.vala:236 -msgid "Do you want to use Todoist as your default Inbox Project?" -msgstr "你想将 Todoist 作为默认待办收件箱项目吗?" - -#: src/MainWindow.vala:239 src/Util.vala:835 src/Layouts/ProjectRow.vala:478 -#: src/Layouts/SectionRow.vala:658 src/Layouts/ItemRow.vala:1536 -#: src/Layouts/ItemRow.vala:1643 src/Layouts/LabelRow.vala:145 -#: src/Layouts/SectionBoard.vala:497 src/Widgets/MultiSelectToolbar.vala:321 -#: src/Views/Project/Project.vala:281 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1043 -msgid "Cancel" -msgstr "取消" - -#: src/MainWindow.vala:240 src/Util.vala:854 -msgid "Ok" -msgstr "好" - -#: src/MainWindow.vala:443 src/Dialogs/Preferences/PreferencesWindow.vala:42 -msgid "Preferences" -msgstr "偏好设置" - -#. preferences_item.tooltip_markup = Granite.markup_accel_tooltip ({"comma"}, _("Preferences")); -#: src/MainWindow.vala:447 -msgid "Keyboard shortcuts" -msgstr "快捷键" - -#. keyboard_shortcuts_item.tooltip_markup = Granite.markup_accel_tooltip ({"F1"}, _("Keyboard shortcuts")); -#: src/MainWindow.vala:451 -msgid "About Planify" -msgstr "关于 Planify" - -#: src/Util.vala:41 src/Util.vala:42 +#: core/Util.vala:41 core/Util.vala:42 msgid "Berry Red" msgstr "浆果红" -#: src/Util.vala:44 src/Util.vala:45 +#: core/Util.vala:44 core/Util.vala:45 msgid "Red" msgstr "红色" -#: src/Util.vala:47 src/Util.vala:48 +#: core/Util.vala:47 core/Util.vala:48 msgid "Orange" msgstr "橙色" -#: src/Util.vala:50 src/Util.vala:51 +#: core/Util.vala:50 core/Util.vala:51 msgid "Olive Green" msgstr "橄榄绿" -#: src/Util.vala:53 src/Util.vala:54 +#: core/Util.vala:53 core/Util.vala:54 msgid "Yellow" msgstr "黄色" -#: src/Util.vala:56 src/Util.vala:57 +#: core/Util.vala:56 core/Util.vala:57 msgid "Lime Green" msgstr "柠檬绿" -#: src/Util.vala:59 src/Util.vala:60 +#: core/Util.vala:59 core/Util.vala:60 msgid "Green" msgstr "绿色" -#: src/Util.vala:62 src/Util.vala:63 +#: core/Util.vala:62 core/Util.vala:63 msgid "Mint Green" msgstr "薄荷绿" -#: src/Util.vala:65 src/Util.vala:66 +#: core/Util.vala:65 core/Util.vala:66 msgid "Teal" msgstr "凫绿" -#: src/Util.vala:68 src/Util.vala:69 +#: core/Util.vala:68 core/Util.vala:69 msgid "Sky Blue" msgstr "天蓝色" -#: src/Util.vala:71 src/Util.vala:72 +#: core/Util.vala:71 core/Util.vala:72 msgid "Light Blue" msgstr "浅蓝色" -#: src/Util.vala:74 src/Util.vala:75 +#: core/Util.vala:74 core/Util.vala:75 msgid "Blue" msgstr "蓝色" -#: src/Util.vala:77 src/Util.vala:78 +#: core/Util.vala:77 core/Util.vala:78 msgid "Grape" msgstr "葡萄紫" -#: src/Util.vala:80 src/Util.vala:81 +#: core/Util.vala:80 core/Util.vala:81 msgid "Violet" msgstr "紫色" -#: src/Util.vala:83 src/Util.vala:84 +#: core/Util.vala:83 core/Util.vala:84 msgid "Lavander" msgstr "淡紫色" -#: src/Util.vala:86 src/Util.vala:87 +#: core/Util.vala:86 core/Util.vala:87 msgid "Magenta" msgstr "洋红色" -#: src/Util.vala:89 src/Util.vala:90 +#: core/Util.vala:89 core/Util.vala:90 msgid "Salmon" msgstr "鲑红" -#: src/Util.vala:92 src/Util.vala:93 +#: core/Util.vala:92 core/Util.vala:93 msgid "Charcoal" msgstr "深灰色" -#: src/Util.vala:95 src/Util.vala:96 +#: core/Util.vala:95 core/Util.vala:96 msgid "Grey" msgstr "灰色" -#: src/Util.vala:98 src/Util.vala:99 +#: core/Util.vala:98 core/Util.vala:99 msgid "Taupe" msgstr "褐灰色" -#: src/Util.vala:238 +#: core/Util.vala:240 msgid "Light" msgstr "浅色" -#: src/Util.vala:241 +#: core/Util.vala:243 msgid "Dark" msgstr "深色" -#: src/Util.vala:244 +#: core/Util.vala:246 msgid "Dark Blue" msgstr "深蓝色" -#: src/Util.vala:257 src/Layouts/ItemRow.vala:1234 -#: src/Dialogs/Preferences/PreferencesWindow.vala:274 +#: core/Util.vala:259 src/Layouts/ItemRow.vala:1273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:297 msgid "None" msgstr "无" -#: src/Util.vala:260 src/Util.vala:1119 src/Enum.vala:108 -#: src/Layouts/FilterPaneRow.vala:122 +#: core/Util.vala:262 core/Util.vala:992 core/Enum.vala:108 +#: core/Widgets/ProjectPicker/ProjectPickerRow.vala:78 +#: core/Widgets/ProjectPicker/ProjectPickerButton.vala:46 +#: src/Layouts/FilterPaneRow.vala:128 #: src/Dialogs/ProjectPicker/ProjectPickerRow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:406 +#: src/Dialogs/Preferences/PreferencesWindow.vala:170 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:38 msgid "Inbox" msgstr "待办收件箱" -#: src/Util.vala:263 src/Util.vala:438 src/Enum.vala:105 -#: src/Layouts/FilterPaneRow.vala:119 src/Layouts/ItemRow.vala:997 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:70 src/Views/Date.vala:104 -#: src/Views/Today.vala:51 src/Views/Today.vala:135 -#: src/Objects/Filters/Today.vala:66 src/Dialogs/DatePicker.vala:64 -#: src/Dialogs/Preferences/PreferencesWindow.vala:417 +#: core/Util.vala:265 core/Util.vala:440 core/Enum.vala:105 +#: core/Widgets/DateTimePicker/DateTimePicker.vala:70 +#: core/Objects/Filters/Today.vala:66 src/Layouts/FilterPaneRow.vala:125 +#: src/Layouts/ItemRow.vala:1036 src/Views/Today.vala:51 +#: src/Views/Today.vala:135 src/Dialogs/DatePicker.vala:64 +#: src/Dialogs/Preferences/PreferencesWindow.vala:171 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:39 msgid "Today" msgstr "今日" -#: src/Util.vala:266 +#: core/Util.vala:268 msgid "Today + Inbox" msgstr "今日任务 + 待办收件夹" -#: src/Util.vala:440 src/Layouts/ItemRow.vala:1000 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:73 -#: src/Dialogs/DatePicker.vala:68 +#: core/Util.vala:442 core/Widgets/DateTimePicker/DateTimePicker.vala:73 +#: src/Layouts/ItemRow.vala:1039 src/Dialogs/DatePicker.vala:68 msgid "Tomorrow" msgstr "明天" -#: src/Util.vala:442 +#: core/Util.vala:444 msgid "Yesterday" msgstr "昨天" -#: src/Util.vala:569 +#: core/Util.vala:571 msgid "Mo," msgstr "周一," -#: src/Util.vala:573 +#: core/Util.vala:575 msgid "Tu," msgstr "周二," -#: src/Util.vala:577 +#: core/Util.vala:579 msgid "We," msgstr "周三," -#: src/Util.vala:581 +#: core/Util.vala:583 msgid "Th," msgstr "周四," -#: src/Util.vala:585 +#: core/Util.vala:587 msgid "Fr," msgstr "周五," -#: src/Util.vala:589 +#: core/Util.vala:591 msgid "Sa," msgstr "周六," -#: src/Util.vala:593 +#: core/Util.vala:595 msgid "Su," msgstr "周日," -#: src/Util.vala:621 -#, c-format -msgid "Task added to %s" -msgstr "任务添加至 %s" +#: core/Util.vala:791 core/QuickAdd.vala:128 src/MainWindow.vala:239 +#: src/Layouts/ProjectRow.vala:477 src/Layouts/SectionRow.vala:683 +#: src/Layouts/ItemRow.vala:1575 src/Layouts/ItemRow.vala:1682 +#: src/Layouts/LabelRow.vala:145 src/Layouts/SectionBoard.vala:497 +#: src/Widgets/MultiSelectToolbar.vala:325 src/Views/Project/Project.vala:280 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1159 +#: src/Dialogs/Preferences/Pages/Backup.vala:184 +#: src/Dialogs/Preferences/Pages/Backup.vala:241 +msgid "Cancel" +msgstr "取消" -#: src/Util.vala:836 +#: core/Util.vala:792 msgid "Reset all" msgstr "重置所有数据" -#: src/Util.vala:851 +#: core/Util.vala:806 src/Services/Backups.vala:511 msgid "Process completed, you need to start Planify again." msgstr "操作完成,你需要再次启动 Planify。" -#: src/Util.vala:962 -msgid "The request was incorrect." -msgstr "请求错误。" - -#: src/Util.vala:963 -msgid "" -"Authentication is required, and has failed, or has not yet been provided." -msgstr "须要身份验证,但已失败或尚未提供。" - -#: src/Util.vala:964 -msgid "The request was valid, but for something that is forbidden." -msgstr "请求有效,但无权限访问。" - -#: src/Util.vala:965 -msgid "The requested resource could not be found." -msgstr "找不到请求的资源。" - -#: src/Util.vala:966 -msgid "The user has sent too many requests in a given amount of time." -msgstr "用户在同一时间发送了太多请求。" - -#: src/Util.vala:967 -msgid "The request failed due to a server error." -msgstr "由于服务器错误,请求失败。" - -#: src/Util.vala:968 -msgid "The server is currently unable to handle the request." -msgstr "服务器当前无法处理请求。" +#: core/Util.vala:809 src/MainWindow.vala:240 src/Services/Backups.vala:515 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1066 +msgid "Ok" +msgstr "好" -#: src/Util.vala:1052 src/Widgets/PriorityButton.vala:40 -#: src/Widgets/MultiSelectToolbar.vala:199 src/Objects/Item.vala:69 +#: core/Util.vala:911 core/Widgets/PriorityButton.vala:32 +#: core/Objects/Item.vala:68 src/Widgets/MultiSelectToolbar.vala:203 msgid "Priority 1: high" msgstr "优先级 1:高" -#: src/Util.vala:1054 src/Widgets/PriorityButton.vala:41 -#: src/Widgets/MultiSelectToolbar.vala:200 src/Objects/Item.vala:71 +#: core/Util.vala:913 core/Widgets/PriorityButton.vala:33 +#: core/Objects/Item.vala:70 src/Widgets/MultiSelectToolbar.vala:204 msgid "Priority 2: medium" msgstr "优先级 2:中" -#: src/Util.vala:1056 src/Widgets/PriorityButton.vala:42 -#: src/Widgets/MultiSelectToolbar.vala:201 src/Objects/Item.vala:73 +#: core/Util.vala:915 core/Widgets/PriorityButton.vala:34 +#: core/Objects/Item.vala:72 src/Widgets/MultiSelectToolbar.vala:205 msgid "Priority 3: low" msgstr "优先级 3:低" -#: src/Util.vala:1058 src/Util.vala:1060 src/Widgets/PriorityButton.vala:43 -#: src/Widgets/MultiSelectToolbar.vala:202 src/Objects/Item.vala:75 +#: core/Util.vala:917 core/Util.vala:919 core/Widgets/PriorityButton.vala:35 +#: core/Objects/Item.vala:74 src/Widgets/MultiSelectToolbar.vala:206 msgid "Priority 4: none" msgstr "优先级 4:无" -#: src/Util.vala:1137 +#: core/Util.vala:925 +msgid "high" +msgstr "" + +#: core/Util.vala:927 +msgid "medium" +msgstr "" + +#: core/Util.vala:929 +#, fuzzy +msgid "low" +msgstr "黄色" + +#: core/Util.vala:931 +msgid "none" +msgstr "" + +#: core/Util.vala:1010 msgid "Meet Planify" msgstr "认识 Planify" -#: src/Util.vala:1140 +#: core/Util.vala:1013 msgid "" "This project shows you everything you need to know to hit the ground " "running. Don’t hesitate to play around in it – you can always create a new " @@ -303,11 +249,11 @@ msgstr "" "该项目将为您提供一切入门所需的信息。请随意在其中进行操作,如果需要,您随时可" "以从设置中创建一个新的项目。" -#: src/Util.vala:1146 +#: core/Util.vala:1019 msgid "Tap this to-do" msgstr "点击此待办事项" -#: src/Util.vala:1147 +#: core/Util.vala:1020 msgid "" "You're looking at a to-do! Complete it by tapping the checkbox on the left. " "Completed to-dos are collected al the bottom of your project." @@ -315,11 +261,11 @@ msgstr "" "你正在看一个待办事项!点击左边的复选框来完成它。完成的待办事项会被收集在你的" "项目底部。" -#: src/Util.vala:1152 +#: core/Util.vala:1025 msgid "Create a new to-do" msgstr "创建一个新的待办事项" -#: src/Util.vala:1153 +#: core/Util.vala:1026 msgid "" "Now it's your turn, tap the '+' button at the top of your project, enter any " "pending and tap the blue 'Save' button." @@ -327,29 +273,30 @@ msgstr "" "现在轮到你了,点击你的项目顶部的 ‘+’ 键,输入任何待定,然后点击蓝色的 ‘保存’ " "按钮。" -#: src/Util.vala:1158 +#: core/Util.vala:1031 msgid "Plan this to-do by today or later" msgstr "将待办事项计划到今天或之后" -#: src/Util.vala:1159 +#: core/Util.vala:1032 msgid "Tap the calendar button at the bottom to decide when to do this to-do." msgstr "点一下底部的日历按钮,决定何时完成这项待办事项。" -#: src/Util.vala:1164 +#: core/Util.vala:1037 msgid "Reorder yours to-dos" msgstr "重新排列你的待办事项" -#: src/Util.vala:1165 +#: core/Util.vala:1038 +#, fuzzy msgid "" -"To reorder your list, tap amd hold a to-do, then drag it to where it shpuld " +"To reorder your list, tap and hold a to-do, then drag it to where it should " "go." msgstr "要重新排列你的清单,点住一个待办事项,然后把它拖到它应该去的地方。" -#: src/Util.vala:1170 +#: core/Util.vala:1043 msgid "Create a project" msgstr "创建一个项目" -#: src/Util.vala:1171 +#: core/Util.vala:1044 msgid "" "Organize your to-dos better! Go to the left panel and click the '+' button " "in the 'On This Computer' section and add a project of your own." @@ -357,11 +304,11 @@ msgstr "" "更好地组织你的待办事项!进入左侧面板,点击 ‘此电脑上’ 部分的 ‘+’ 按钮,添加一" "个你自己的项目。" -#: src/Util.vala:1176 +#: core/Util.vala:1049 msgid "You’re done!" msgstr "你完成了!" -#: src/Util.vala:1177 +#: core/Util.vala:1050 msgid "" "That’s all you really need to know. Feel free to start adding your own " "projects and to-dos.\n" @@ -377,15 +324,15 @@ msgstr "" "\n" "我们希望您会喜欢使用 Planify!" -#: src/Util.vala:1193 +#: core/Util.vala:1066 msgid "Tune your setup" msgstr "调整你的设置" -#: src/Util.vala:1201 +#: core/Util.vala:1074 msgid "Show your calendar events" msgstr "显示你的日历事件" -#: src/Util.vala:1202 +#: core/Util.vala:1075 msgid "" "You can display your system's calendar events in Planify. Go to " "'Preferences' 🡒 Calendar Events to turn ir on." @@ -393,11 +340,11 @@ msgstr "" "您可以在 Planify 中显示您系统的日历事件。进入 ‘偏好设置’ 🡒 ‘日历事件’ 来打" "开。" -#: src/Util.vala:1208 +#: core/Util.vala:1081 msgid "Enable synchronization with third-party service." msgstr "启用与第三方服务的同步。" -#: src/Util.vala:1209 +#: core/Util.vala:1082 #, fuzzy msgid "" "Planify not only creates tasks locally, it can also synchronize your Todoist " @@ -406,188 +353,453 @@ msgstr "" "Planify不仅可以在本地创建任务,它还可以同步你的 Todoist、Google Tasks 和 " "CalDAV 账户。进入 ‘偏好设置’ 🡒 ‘账户’ 。" -#: src/Util.vala:1220 +#: core/Util.vala:1093 msgid "💼️Work" msgstr "💼️工作" -#: src/Util.vala:1226 +#: core/Util.vala:1099 msgid "🎒️School" msgstr "🎒️学校" -#: src/Util.vala:1232 +#: core/Util.vala:1105 msgid "👉️Delegated" msgstr "👉️委托" -#: src/Util.vala:1238 +#: core/Util.vala:1111 msgid "🏡️Home" msgstr "🏡️家" -#: src/Util.vala:1244 +#: core/Util.vala:1117 msgid "🏃‍♀️️Follow Up" msgstr "🏃‍♀️️跟进" -#: src/Enum.vala:111 src/Layouts/FilterPaneRow.vala:125 -#: src/Views/Scheduled/Scheduled.vala:32 src/Objects/Filters/Scheduled.vala:50 -#: src/Dialogs/Preferences/PreferencesWindow.vala:428 +#: core/Enum.vala:111 core/Objects/Filters/Scheduled.vala:50 +#: src/Layouts/FilterPaneRow.vala:131 src/Views/Scheduled/Scheduled.vala:32 +#: src/Dialogs/Preferences/PreferencesWindow.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:40 msgid "Scheduled" msgstr "已计划" -#: src/Enum.vala:114 src/Layouts/FilterPaneRow.vala:128 -#: src/Views/Pinboard.vala:38 +#: core/Enum.vala:114 src/Layouts/FilterPaneRow.vala:134 +#: src/Views/Pinboard.vala:38 src/Dialogs/Preferences/Pages/Sidebar.vala:41 msgid "Pinboard" msgstr "置顶" -#: src/Enum.vala:181 +#: core/Enum.vala:181 src/Dialogs/Preferences/Pages/Backup.vala:160 msgid "Projects" msgstr "项目" -#: src/Enum.vala:184 +#: core/Enum.vala:184 src/Dialogs/Preferences/Pages/Backup.vala:164 msgid "Sections" msgstr "分区" -#: src/Enum.vala:187 src/Enum.vala:196 +#: core/Enum.vala:187 core/Enum.vala:196 msgid "Tasks" msgstr "任务" -#: src/Enum.vala:190 src/Layouts/FilterPaneRow.vala:131 -#: src/Views/Label/Labels.vala:34 src/Objects/Filters/Labels.vala:58 +#: core/Enum.vala:190 core/Objects/Filters/Labels.vala:58 +#: src/Layouts/FilterPaneRow.vala:137 src/Views/Label/Labels.vala:34 #: src/Dialogs/LabelPicker.vala:57 -#: src/Dialogs/Preferences/PreferencesWindow.vala:439 +#: src/Dialogs/Preferences/PreferencesWindow.vala:173 +#: src/Dialogs/Preferences/Pages/Backup.vala:172 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:42 msgid "Labels" msgstr "标签" -#: src/Enum.vala:193 +#: core/Enum.vala:193 msgid "Filters" msgstr "过滤器" -#: src/Enum.vala:199 +#: core/Enum.vala:199 msgid "Lists" msgstr "列表" -#: src/Enum.vala:217 +#: core/Enum.vala:217 msgid "Don't Repeat" msgstr "不重复" -#: src/Enum.vala:220 src/Enum.vala:222 +#: core/Enum.vala:220 core/Enum.vala:222 msgid "Every day" msgstr "每天" -#: src/Enum.vala:222 +#: core/Enum.vala:222 #, c-format msgid "Every %d days" msgstr "每 %d 天" -#: src/Enum.vala:226 src/Enum.vala:228 +#: core/Enum.vala:226 core/Enum.vala:228 msgid "Every week" msgstr "每周" -#: src/Enum.vala:228 +#: core/Enum.vala:228 #, c-format msgid "Every %d weeks" msgstr "每 %d 周" -#: src/Enum.vala:233 src/Enum.vala:235 +#: core/Enum.vala:233 core/Enum.vala:235 msgid "Every month" msgstr "每月" -#: src/Enum.vala:235 +#: core/Enum.vala:235 #, c-format msgid "Every %d months" msgstr "每 %d 月" -#: src/Enum.vala:240 src/Enum.vala:242 +#: core/Enum.vala:240 core/Enum.vala:242 msgid "Every year" msgstr "每年" -#: src/Enum.vala:242 +#: core/Enum.vala:242 #, c-format msgid "Every %d years" msgstr "每 %d 年" -#: src/Services/CalendarEvents/Util.vala:269 +#: core/QuickAdd.vala:43 +msgid "To-do name" +msgstr "待办事项名称" + +#: core/QuickAdd.vala:58 +msgid "Add a description…" +msgstr "添加一个描述…" + +#: core/QuickAdd.vala:123 src/Layouts/ItemRow.vala:491 +msgid "Add To-Do" +msgstr "添加待办事项" + +#: core/QuickAdd.vala:169 +msgid "" +"I'm sorry, Quick Add can't find any project available, try creating a " +"project from Planify." +msgstr "" +"很抱歉,‘快速添加’ 无法找到任何可用的项目,请尝试从 Planify 创建一个项目。" + +#: core/QuickAdd.vala:192 +msgid "To-do added" +msgstr "待办事项已添加" + +#: core/Services/Todoist.vala:1273 +msgid "The request was incorrect." +msgstr "请求错误。" + +#: core/Services/Todoist.vala:1274 +msgid "" +"Authentication is required, and has failed, or has not yet been provided." +msgstr "须要身份验证,但已失败或尚未提供。" + +#: core/Services/Todoist.vala:1275 +msgid "The request was valid, but for something that is forbidden." +msgstr "请求有效,但无权限访问。" + +#: core/Services/Todoist.vala:1276 +msgid "The requested resource could not be found." +msgstr "找不到请求的资源。" + +#: core/Services/Todoist.vala:1277 +msgid "The user has sent too many requests in a given amount of time." +msgstr "用户在同一时间发送了太多请求。" + +#: core/Services/Todoist.vala:1278 +msgid "The request failed due to a server error." +msgstr "由于服务器错误,请求失败。" + +#: core/Services/Todoist.vala:1279 +msgid "The server is currently unable to handle the request." +msgstr "服务器当前无法处理请求。" + +#: core/Services/Todoist.vala:1281 +msgid "Unknown error" +msgstr "" + +#: core/Widgets/PinButton.vala:34 +msgid "Pinned" +msgstr "已置顶" + +#: core/Widgets/PriorityButton.vala:12 +msgid "Set the priority" +msgstr "设置优先级" + +#: core/Widgets/Calendar/CalendarHeader.vala:35 +#: core/Widgets/Calendar/CalendarHeader.vala:49 +msgid "%OB" +msgstr "%OB" + +#: core/Widgets/Calendar/CalendarHeader.vala:36 +#: core/Widgets/Calendar/CalendarHeader.vala:52 +msgid "%Y" +msgstr "%Y" + +#: core/Widgets/Calendar/CalendarWeek.vala:35 +msgid "Su" +msgstr "日" + +#: core/Widgets/Calendar/CalendarWeek.vala:36 +msgid "Mo" +msgstr "一" + +#: core/Widgets/Calendar/CalendarWeek.vala:37 +msgid "Tu" +msgstr "二" + +#: core/Widgets/Calendar/CalendarWeek.vala:38 +msgid "We" +msgstr "三" + +#: core/Widgets/Calendar/CalendarWeek.vala:39 +msgid "Th" +msgstr "四" + +#: core/Widgets/Calendar/CalendarWeek.vala:40 +msgid "Fr" +msgstr "五" + +#: core/Widgets/Calendar/CalendarWeek.vala:41 +msgid "Sa" +msgstr "六" + +#: core/Widgets/DateTimePicker/ScheduleButton.vala:37 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:47 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:80 +#: core/Widgets/DateTimePicker/ScheduleButton.vala:81 +#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:306 +msgid "Schedule" +msgstr "计划" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:76 +#: src/Layouts/ItemRow.vala:1042 src/Dialogs/DatePicker.vala:77 +msgid "No Date" +msgstr "无日期" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:78 +#: src/Dialogs/DatePicker.vala:71 +msgid "Next week" +msgstr "下周" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:83 +msgid "Choose a date" +msgstr "选择一个日期" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:119 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:208 +msgid "Time" +msgstr "事件" + +#: core/Widgets/DateTimePicker/DateTimePicker.vala:139 +#: src/Widgets/MultiSelectToolbar.vala:50 +#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:106 +#: src/Dialogs/RepeatConfig.vala:156 +msgid "Done" +msgstr "完成" + +#: core/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 +msgid "Search or Create" +msgstr "搜索或创建" + +#: core/Widgets/LabelPicker/LabelPicker.vala:215 +#: src/Dialogs/LabelPicker.vala:153 +msgid "" +"Your list of filters will show up here. Create one by entering the name and " +"pressing the Enter key." +msgstr "你的过滤器列表将显示在这里,输入名称并按下回车键创建。" + +#: core/Widgets/LabelPicker/LabelButton.vala:35 +msgid "Add label(s)" +msgstr "添加标签" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:25 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:162 +msgid "On this Computer" +msgstr "此电脑上" + +#: core/Widgets/ProjectPicker/ProjectPickerPopover.vala:30 +#: src/Layouts/Sidebar.vala:288 src/Layouts/Sidebar.vala:291 +#: src/Dialogs/Project.vala:140 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:165 +#: src/Dialogs/Preferences/PreferencesWindow.vala:586 +#: src/Dialogs/Preferences/PreferencesWindow.vala:620 +#: src/Dialogs/Preferences/PreferencesWindow.vala:769 +#: src/Dialogs/Preferences/Pages/Backup.vala:151 +msgid "Todoist" +msgstr "Todoist" + +#: core/Objects/Item.vala:780 +msgid "Task copied to clipboard" +msgstr "任务已复制到剪切板" + +#: core/Objects/Item.vala:798 +#, c-format +msgid "Diplicate" +msgstr "复制" + +#: core/Objects/Project.vala:684 src/Views/Project/Project.vala:351 +msgid "New section" +msgstr "新分区" + +#: core/Objects/Project.vala:694 +msgid "The project was copied to the Clipboard." +msgstr "此项目已复制到剪切板。" + +#: core/Objects/Filters/Pinboard.vala:51 +msgid "pinboard" +msgstr "置顶" + +#: core/Objects/Filters/Scheduled.vala:51 +#, c-format +msgid "scheduled" +msgstr "已计划" + +#: core/Objects/Filters/Scheduled.vala:51 +msgid "upcoming" +msgstr "未来事项" + +#: core/Objects/Filters/Today.vala:67 +msgid "today" +msgstr "今天" + +#: core/Objects/Filters/Completed.vala:58 src/Views/Filter.vala:165 +msgid "Completed" +msgstr "已完成" + +#: core/Objects/Filters/Completed.vala:59 +#, c-format +msgid "completed" +msgstr "已完成" + +#: core/Objects/Filters/Completed.vala:59 +msgid "logbook" +msgstr "日志" + +#: core/Objects/Filters/Labels.vala:59 +#, c-format +msgid "labels" +msgstr "标签" + +#: src/App.vala:105 src/Dialogs/Preferences/PreferencesWindow.vala:158 +msgid "Are you sure you want to reset all?" +msgstr "确定要重置所有设置吗?" + +#: src/App.vala:106 src/Dialogs/Preferences/PreferencesWindow.vala:159 +msgid "" +"The process removes all stored information without the possibility of " +"undoing it." +msgstr "此操作将移除所有已存储信息并不可撤销。" + +#: src/App.vala:118 +msgid "" +"Planify will automatically start when this device turns on and run when its " +"window is closed so that it can send to-do notifications." +msgstr "" +"Planify 将在设备开机时自动启动并在窗口关闭时保持运行,以便发送待办事项通知。" + +#: src/MainWindow.vala:37 +msgid "Planify" +msgstr "Planify" + +#: src/MainWindow.vala:236 +msgid "Tasks synced successfully" +msgstr "成功同步任务" + +#: src/MainWindow.vala:236 +msgid "Do you want to use Todoist as your default Inbox Project?" +msgstr "你想将 Todoist 作为默认待办收件箱项目吗?" + +#: src/MainWindow.vala:449 src/Dialogs/Preferences/PreferencesWindow.vala:40 +msgid "Preferences" +msgstr "偏好设置" + +#: src/MainWindow.vala:452 +msgid "Keyboard shortcuts" +msgstr "快捷键" + +#: src/MainWindow.vala:455 +msgid "About Planify" +msgstr "关于 Planify" + +#: src/Services/Backups.vala:510 +msgid "Backup successfully imported" +msgstr "" + +#: src/Services/Backups.vala:526 +msgid "Planify backup files" +msgstr "" + +#: src/Services/CalendarEvents/Util.vala:243 msgid "On this computer" msgstr "此电脑上" -#: src/Layouts/Sidebar.vala:69 +#: src/Layouts/Sidebar.vala:79 msgid "Favorites" msgstr "最爱" -#: src/Layouts/Sidebar.vala:70 +#: src/Layouts/Sidebar.vala:80 msgid "No favorites available. Create one by clicking on the '+' button" msgstr "尚无可用 ‘最爱’,点击 ‘+’ 按钮创建" -#: src/Layouts/Sidebar.vala:74 src/Dialogs/Project.vala:139 -#: src/Dialogs/Preferences/PreferencesWindow.vala:692 +#: src/Layouts/Sidebar.vala:84 src/Dialogs/Project.vala:139 +#: src/Dialogs/Preferences/PreferencesWindow.vala:585 msgid "On This Computer" msgstr "此电脑上" -#: src/Layouts/Sidebar.vala:75 src/Layouts/Sidebar.vala:210 -#: src/Layouts/Sidebar.vala:223 +#: src/Layouts/Sidebar.vala:85 src/Layouts/Sidebar.vala:289 +#: src/Layouts/Sidebar.vala:302 msgid "No project available. Create one by clicking on the '+' button" msgstr "尚无可用项目,点击 ‘+’ 按钮创建" -#: src/Layouts/Sidebar.vala:209 src/Layouts/Sidebar.vala:212 -#: src/Dialogs/Project.vala:140 src/Dialogs/WhatsNew.vala:98 -#: src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:693 -#: src/Dialogs/Preferences/PreferencesWindow.vala:728 -#: src/Dialogs/Preferences/PreferencesWindow.vala:876 -msgid "Todoist" -msgstr "Todoist" +#: src/Layouts/Sidebar.vala:98 src/Dialogs/WhatsNew.vala:46 +msgid "What’s new in Planify" +msgstr "" -#: src/Layouts/Sidebar.vala:213 src/Layouts/Sidebar.vala:226 +#: src/Layouts/Sidebar.vala:292 src/Layouts/Sidebar.vala:305 msgid "No account available, Sync one by clicking the '+' button" msgstr "尚无可用账户,点击 ‘+’ 按钮以同步" -#: src/Layouts/Sidebar.vala:222 src/Layouts/Sidebar.vala:225 -#: src/Dialogs/Preferences/PreferencesWindow.vala:762 +#: src/Layouts/Sidebar.vala:301 src/Layouts/Sidebar.vala:304 +#: src/Dialogs/Preferences/PreferencesWindow.vala:654 msgid "Google Tasks" msgstr "Google Tasks" -#: src/Layouts/ProjectRow.vala:338 +#: src/Layouts/ProjectRow.vala:340 msgid "Project list order changed to Custom Sort Order." msgstr "项目列表顺序改变至自定义顺序。" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Remove from favorites" msgstr "从 ‘最爱’ 移除" -#: src/Layouts/ProjectRow.vala:412 src/Layouts/ProjectRow.vala:419 +#: src/Layouts/ProjectRow.vala:411 src/Layouts/ProjectRow.vala:418 msgid "Add to favorites" msgstr "添加至 ‘最爱’" -#: src/Layouts/ProjectRow.vala:420 src/Views/Project/Project.vala:150 +#: src/Layouts/ProjectRow.vala:419 src/Views/Project/Project.vala:150 #: src/Dialogs/Project.vala:65 msgid "Edit Project" msgstr "编辑项目" #. var move_item = new Widgets.ContextMenu.MenuItem (_("Move to project"), "chevron-right"); -#: src/Layouts/ProjectRow.vala:422 src/Layouts/ProjectRow.vala:475 -#: src/Views/Project/Project.vala:278 +#: src/Layouts/ProjectRow.vala:421 src/Layouts/ProjectRow.vala:474 +#: src/Views/Project/Project.vala:277 msgid "Delete project" msgstr "删除项目" -#: src/Layouts/ProjectRow.vala:425 +#: src/Layouts/ProjectRow.vala:424 msgid "Share" msgstr "分享" -#: src/Layouts/ProjectRow.vala:426 +#: src/Layouts/ProjectRow.vala:425 msgid "Send by e-mail" msgstr "用 e-mail 发送" -#: src/Layouts/ProjectRow.vala:475 src/Layouts/SectionRow.vala:655 +#: src/Layouts/ProjectRow.vala:474 src/Layouts/SectionRow.vala:680 #: src/Layouts/LabelRow.vala:142 src/Layouts/SectionBoard.vala:494 -#: src/Views/Project/Project.vala:278 +#: src/Views/Project/Project.vala:277 #, c-format msgid "Are you sure you want to delete %s?" msgstr "你确定要删除 %s 吗?" -#: src/Layouts/ProjectRow.vala:479 src/Layouts/SectionRow.vala:659 -#: src/Layouts/ItemRow.vala:1537 src/Layouts/LabelRow.vala:146 -#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:278 -#: src/Widgets/MultiSelectToolbar.vala:322 src/Views/Project/Project.vala:282 -#: src/Dialogs/Preferences/PreferencesWindow.vala:1044 +#: src/Layouts/ProjectRow.vala:478 src/Layouts/SectionRow.vala:684 +#: src/Layouts/ItemRow.vala:1576 src/Layouts/LabelRow.vala:146 +#: src/Layouts/SectionBoard.vala:498 src/Widgets/MultiSelectToolbar.vala:282 +#: src/Widgets/MultiSelectToolbar.vala:326 src/Views/Project/Project.vala:281 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1160 msgid "Delete" msgstr "删除" @@ -596,145 +808,140 @@ msgstr "删除" msgid "(No Section)" msgstr "(无分区)" -#: src/Layouts/SectionRow.vala:597 src/Layouts/SectionBoard.vala:432 +#: src/Layouts/SectionRow.vala:567 +#, c-format +msgid "Task added to %s" +msgstr "任务添加至 %s" + +#: src/Layouts/SectionRow.vala:622 src/Layouts/SectionBoard.vala:432 msgid "Add Task" msgstr "添加任务" -#: src/Layouts/SectionRow.vala:598 src/Layouts/SectionBoard.vala:433 +#: src/Layouts/SectionRow.vala:623 src/Layouts/SectionBoard.vala:433 msgid "Edit Section" msgstr "编辑分区" -#: src/Layouts/SectionRow.vala:599 src/Layouts/SectionBoard.vala:434 +#: src/Layouts/SectionRow.vala:624 src/Layouts/SectionBoard.vala:434 msgid "Move Section" msgstr "移动分区" -#: src/Layouts/SectionRow.vala:600 src/Layouts/SectionBoard.vala:435 +#: src/Layouts/SectionRow.vala:625 src/Layouts/SectionBoard.vala:435 #: src/Dialogs/ManageSectionOrder.vala:32 msgid "Manage Section Order" msgstr "管理分区顺序" -#: src/Layouts/SectionRow.vala:601 src/Layouts/SectionBoard.vala:436 +#: src/Layouts/SectionRow.vala:626 src/Layouts/SectionBoard.vala:436 msgid "Delete Section" msgstr "删除分区" -#: src/Layouts/SectionRow.vala:655 src/Layouts/SectionBoard.vala:494 +#: src/Layouts/SectionRow.vala:680 src/Layouts/SectionBoard.vala:494 msgid "Delete section" msgstr "删除分区" -#: src/Layouts/ItemRow.vala:405 src/Views/Project/List.vala:52 -#: src/Views/Project/List.vala:277 src/Dialogs/ProjectDescription.vala:42 +#: src/Layouts/ItemRow.vala:438 src/Views/Project/List.vala:52 +#: src/Views/Project/List.vala:275 src/Dialogs/ProjectDescription.vala:42 msgid "Add a description" msgstr "添加描述" -#: src/Layouts/ItemRow.vala:452 +#: src/Layouts/ItemRow.vala:482 msgid "Add subtask" msgstr "添加子任务" -#: src/Layouts/ItemRow.vala:461 -msgid "Save" -msgstr "保存" - -#: src/Layouts/ItemRow.vala:1003 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:76 -#: src/Dialogs/DatePicker.vala:77 -msgid "No Date" -msgstr "无日期" - #. var labels_item = new Widgets.ContextMenu.MenuItem (_("Labels"), "planner-tag"); #. var reminders_item = new Widgets.ContextMenu.MenuItem (_("Reminders"), "planner-bell"); -#: src/Layouts/ItemRow.vala:1007 src/Layouts/ItemRow.vala:1133 -#: src/Layouts/ItemRow.vala:1644 +#: src/Layouts/ItemRow.vala:1046 src/Layouts/ItemRow.vala:1172 +#: src/Layouts/ItemRow.vala:1683 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:73 #: src/Dialogs/ProjectPicker/ProjectPicker.vala:105 msgid "Move" msgstr "移动" -#: src/Layouts/ItemRow.vala:1008 src/Layouts/ItemRow.vala:1134 +#: src/Layouts/ItemRow.vala:1047 src/Layouts/ItemRow.vala:1173 msgid "Move to Section" msgstr "移动到分区" -#: src/Layouts/ItemRow.vala:1010 +#: src/Layouts/ItemRow.vala:1049 msgid "Complete" msgstr "完成" -#: src/Layouts/ItemRow.vala:1011 +#: src/Layouts/ItemRow.vala:1050 msgid "Edit" msgstr "编辑" -#: src/Layouts/ItemRow.vala:1013 src/Layouts/ItemRow.vala:1140 +#: src/Layouts/ItemRow.vala:1052 src/Layouts/ItemRow.vala:1179 msgid "Delete task" msgstr "删除任务" -#: src/Layouts/ItemRow.vala:1115 +#: src/Layouts/ItemRow.vala:1154 msgid "Added at" msgstr "在…中添加" -#: src/Layouts/ItemRow.vala:1116 +#: src/Layouts/ItemRow.vala:1155 msgid "Updated at" msgstr "在…中更新" -#: src/Layouts/ItemRow.vala:1118 +#: src/Layouts/ItemRow.vala:1157 msgid "Not available" msgstr "不可用" -#: src/Layouts/ItemRow.vala:1131 +#: src/Layouts/ItemRow.vala:1170 msgid "Copy to clipboard" msgstr "复制到剪切板" -#: src/Layouts/ItemRow.vala:1132 +#: src/Layouts/ItemRow.vala:1171 msgid "Duplicate" msgstr "创建副本" -#: src/Layouts/ItemRow.vala:1135 src/Dialogs/RepeatConfig.vala:66 +#: src/Layouts/ItemRow.vala:1174 src/Dialogs/RepeatConfig.vala:66 msgid "Repeat" msgstr "重复" -#: src/Layouts/ItemRow.vala:1235 +#: src/Layouts/ItemRow.vala:1274 msgid "Daily" msgstr "每天" -#: src/Layouts/ItemRow.vala:1236 +#: src/Layouts/ItemRow.vala:1275 msgid "Weekly" msgstr "每周" -#: src/Layouts/ItemRow.vala:1237 +#: src/Layouts/ItemRow.vala:1276 msgid "Monthly" msgstr "每月" -#: src/Layouts/ItemRow.vala:1238 +#: src/Layouts/ItemRow.vala:1277 msgid "Yearly" msgstr "每年" -#: src/Layouts/ItemRow.vala:1239 +#: src/Layouts/ItemRow.vala:1278 msgid "Custom" msgstr "自定义" -#: src/Layouts/ItemRow.vala:1515 src/Layouts/ItemBoard.vala:424 +#: src/Layouts/ItemRow.vala:1554 src/Layouts/ItemBoard.vala:431 #, c-format msgid "Completed. Next occurrence: %s" msgstr "已完成,下一个事件:%s" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:309 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:313 msgid "Delete To-Do" msgstr "删除待办事项" -#: src/Layouts/ItemRow.vala:1533 src/Widgets/MultiSelectToolbar.vala:310 +#: src/Layouts/ItemRow.vala:1572 src/Widgets/MultiSelectToolbar.vala:314 msgid "Are you sure you want to delete this to-do?" msgstr "你确定要删除这个待办事项吗?" -#: src/Layouts/ItemRow.vala:1568 +#: src/Layouts/ItemRow.vala:1607 msgid "The task was deleted" msgstr "任务已删除" -#: src/Layouts/ItemRow.vala:1569 +#: src/Layouts/ItemRow.vala:1608 msgid "Undo" msgstr "撤销" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 msgid "Move tasks" msgstr "移动任务" -#: src/Layouts/ItemRow.vala:1640 +#: src/Layouts/ItemRow.vala:1679 #, c-format msgid "Are you sure you want to move your task to %s?" msgstr "你确定要将任务移动到 %s 吗?" @@ -763,45 +970,20 @@ msgstr "" "离线模式下所做的更改将在重新\n" "联网后进行同步" -#: src/Widgets/ScheduleButton.vala:37 src/Widgets/ScheduleButton.vala:48 -#: src/Widgets/ScheduleButton.vala:81 src/Widgets/ScheduleButton.vala:82 -#: src/Widgets/MultiSelectToolbar.vala:60 src/Views/Project/List.vala:308 -msgid "Schedule" -msgstr "计划" - -#: src/Widgets/PriorityButton.vala:15 -msgid "Set the priority" -msgstr "设置优先级" - -#: src/Widgets/PinButton.vala:34 -msgid "Pinned" -msgstr "已置顶" - -#: src/Widgets/LabelButton.vala:35 -msgid "Add label(s)" -msgstr "添加标签" - #: src/Widgets/ReminderButton.vala:33 msgid "Add reminder(s)" msgstr "添加备忘录" -#: src/Widgets/MultiSelectToolbar.vala:50 -#: src/Widgets/DateTimePicker/DateTimePicker.vala:145 -#: src/Dialogs/ProjectDescription.vala:62 src/Dialogs/DatePicker.vala:111 -#: src/Dialogs/RepeatConfig.vala:156 -msgid "Done" -msgstr "完成" - -#: src/Widgets/MultiSelectToolbar.vala:276 +#: src/Widgets/MultiSelectToolbar.vala:280 msgid "Mask as Completed" msgstr "标记为完成" -#: src/Widgets/MultiSelectToolbar.vala:312 +#: src/Widgets/MultiSelectToolbar.vala:316 #, c-format msgid "Delete %d To-Dos" msgstr "删除 %d 个待办事项" -#: src/Widgets/MultiSelectToolbar.vala:313 +#: src/Widgets/MultiSelectToolbar.vala:317 #, c-format msgid "Are you sure you want to delete these %d to-dos?" msgstr "你确定要删除这 %d 个待办事项吗?" @@ -810,104 +992,27 @@ msgstr "你确定要删除这 %d 个待办事项吗?" msgid "All" msgstr "所有" -#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:154 +#: src/Widgets/SectionsOrderPopover.vala:39 src/Views/Project/Project.vala:153 msgid "Add Section" msgstr "添加分区" -#: src/Widgets/Calendar/CalendarHeader.vala:35 -#: src/Widgets/Calendar/CalendarHeader.vala:45 -msgid "%OB" -msgstr "%OB" - -#: src/Widgets/Calendar/CalendarHeader.vala:36 -#: src/Widgets/Calendar/CalendarHeader.vala:48 -msgid "%Y" -msgstr "%Y" - -#: src/Widgets/Calendar/CalendarWeek.vala:35 -msgid "Su" -msgstr "日" - -#: src/Widgets/Calendar/CalendarWeek.vala:36 -msgid "Mo" -msgstr "一" - -#: src/Widgets/Calendar/CalendarWeek.vala:37 -msgid "Tu" -msgstr "二" - -#: src/Widgets/Calendar/CalendarWeek.vala:38 -msgid "We" -msgstr "三" - -#: src/Widgets/Calendar/CalendarWeek.vala:39 -msgid "Th" -msgstr "四" - -#: src/Widgets/Calendar/CalendarWeek.vala:40 -msgid "Fr" -msgstr "五" - -#: src/Widgets/Calendar/CalendarWeek.vala:41 -msgid "Sa" -msgstr "六" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:78 -#: src/Dialogs/DatePicker.vala:71 -msgid "Next week" -msgstr "下周" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:83 -msgid "Choose a date" -msgstr "选择一个日期" - -#: src/Widgets/DateTimePicker/DateTimePicker.vala:125 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:209 -msgid "Time" -msgstr "事件" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:151 -msgid "AM" -msgstr "上午" - -#. / TRANSLATORS: this will only show up when 12-hours clock is in use -#: src/Widgets/DateTimePicker/TimePicker.vala:156 -msgid "PM" -msgstr "下午" - -#: src/Widgets/DateTimePicker/TimePicker.vala:185 -msgid ":" -msgstr ":" - -#: src/Widgets/LabelPicker/LabelPicker.vala:71 src/Dialogs/LabelPicker.vala:71 -msgid "Search or Create" -msgstr "搜索或创建" - -#: src/Widgets/LabelPicker/LabelPicker.vala:209 -#: src/Dialogs/LabelPicker.vala:153 -msgid "" -"Your list of filters will show up here. Create one by entering the name and " -"pressing the Enter key." -msgstr "你的过滤器列表将显示在这里,输入名称并按下回车键创建。" - #: src/Widgets/ReminderPicker/ReminderPicker.vala:44 msgid "Reminders" msgstr "备忘录" #: src/Widgets/ReminderPicker/ReminderPicker.vala:94 -#: src/Widgets/ReminderPicker/ReminderPicker.vala:225 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:224 #: src/Widgets/ReminderPicker/ReminderRow.vala:56 msgid "Add reminder" msgstr "添加备忘录" -#: src/Widgets/ReminderPicker/ReminderPicker.vala:246 +#: src/Widgets/ReminderPicker/ReminderPicker.vala:245 msgid "" "Your list of reminders will show up here. Add one by clicking the button." msgstr "你的备忘录列表将显示在这里,点击按钮创建。" -#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:209 -#: src/Views/Project/List.vala:338 +#: src/Views/Project/Project.vala:151 src/Views/Project/Project.vala:204 +#: src/Views/Project/List.vala:336 msgid "When?" msgstr "何时?" @@ -915,80 +1020,76 @@ msgstr "何时?" msgid "Description" msgstr "描述" -#: src/Views/Project/Project.vala:156 +#: src/Views/Project/Project.vala:154 msgid "Filter by Labels" msgstr "以标签过滤" -#: src/Views/Project/Project.vala:158 +#: src/Views/Project/Project.vala:155 msgid "Select" msgstr "选择" -#: src/Views/Project/Project.vala:160 +#: src/Views/Project/Project.vala:156 msgid "Paste" msgstr "粘贴" -#: src/Views/Project/Project.vala:162 +#: src/Views/Project/Project.vala:157 msgid "Delete Project" msgstr "删除项目" -#: src/Views/Project/Project.vala:306 -#: src/Dialogs/Preferences/PreferencesWindow.vala:164 -#: src/Dialogs/Preferences/PreferencesWindow.vala:571 +#: src/Views/Project/Project.vala:305 +#: src/Dialogs/Preferences/PreferencesWindow.vala:186 +#: src/Dialogs/Preferences/PreferencesWindow.vala:494 msgid "Custom sort order" msgstr "自定义顺序" -#: src/Views/Project/Project.vala:307 -#: src/Dialogs/Preferences/PreferencesWindow.vala:163 -#: src/Dialogs/Preferences/PreferencesWindow.vala:570 +#: src/Views/Project/Project.vala:306 +#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:493 msgid "Alphabetically" msgstr "字母表顺序" -#: src/Views/Project/Project.vala:308 +#: src/Views/Project/Project.vala:307 msgid "Due date" msgstr "截止日期" -#: src/Views/Project/Project.vala:309 +#: src/Views/Project/Project.vala:308 msgid "Date added" msgstr "日期已添加" -#: src/Views/Project/Project.vala:310 +#: src/Views/Project/Project.vala:309 msgid "Priority" msgstr "优先级" -#: src/Views/Project/Project.vala:312 +#: src/Views/Project/Project.vala:311 msgid "Order by" msgstr "" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Hide completed tasks" msgstr "隐藏已完成的任务" -#: src/Views/Project/Project.vala:315 +#: src/Views/Project/Project.vala:314 msgid "Show Completed Tasks" msgstr "显示已完成的任务" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Hide Completed Tasks" msgstr "隐藏已完成的任务" -#: src/Views/Project/Project.vala:343 +#: src/Views/Project/Project.vala:342 msgid "Show completed tasks" msgstr "显示已完成的任务" -#: src/Views/Project/Project.vala:352 src/Objects/Project.vala:654 -msgid "New section" -msgstr "新分区" - -#: src/Views/Project/List.vala:100 src/Views/Date.vala:157 -#: src/Views/Today.vala:190 src/Views/Pinboard.vala:56 src/Views/Filter.vala:67 +#: src/Views/Project/List.vala:100 src/Views/Today.vala:190 +#: src/Views/Pinboard.vala:56 src/Views/Filter.vala:68 msgid "Press 'a' or tap the plus button to create a new to-do" msgstr "按 ‘a’ 或点击 ‘+’ 按钮创建新待办事项" -#: src/Views/Date.vala:62 src/Views/Today.vala:81 +#: src/Views/Today.vala:81 msgid "Overdue" msgstr "逾期" -#: src/Views/Date.vala:71 src/Views/Today.vala:89 +#: src/Views/Today.vala:89 msgid "Reschedule" msgstr "重新计划" @@ -1004,59 +1105,6 @@ msgstr "标签:此电脑上" msgid "Labels: Todoist" msgstr "标签:Todoist" -#: src/Views/Filter.vala:133 src/Objects/Filters/Completed.vala:58 -msgid "Completed" -msgstr "已完成" - -#: src/Objects/Item.vala:766 -msgid "Task copied to clipboard" -msgstr "任务已复制到剪切板" - -#: src/Objects/Item.vala:784 -#, c-format -msgid "Diplicate" -msgstr "复制" - -#: src/Objects/Project.vala:664 -msgid "The project was copied to the Clipboard." -msgstr "此项目已复制到剪切板。" - -#: src/Objects/Filters/Pinboard.vala:51 -msgid "pinboard" -msgstr "置顶" - -#: src/Objects/Filters/Scheduled.vala:51 -#, c-format -msgid "scheduled" -msgstr "已计划" - -#: src/Objects/Filters/Scheduled.vala:51 -msgid "upcoming" -msgstr "未来事项" - -#: src/Objects/Filters/Today.vala:67 -msgid "today" -msgstr "今天" - -#: src/Objects/Filters/Priority.vala:67 -#, c-format -msgid "priority" -msgstr "优先级" - -#: src/Objects/Filters/Completed.vala:59 -#, c-format -msgid "completed" -msgstr "已完成" - -#: src/Objects/Filters/Completed.vala:59 -msgid "logbook" -msgstr "日志" - -#: src/Objects/Filters/Labels.vala:59 -#, c-format -msgid "labels" -msgstr "标签" - #: src/Dialogs/Project.vala:51 msgid "New Project" msgstr "新项目" @@ -1081,7 +1129,7 @@ msgstr "添加项目" msgid "Update project" msgstr "更新项目" -#: src/Dialogs/Project.vala:325 +#: src/Dialogs/Project.vala:331 msgid "Project added successfully!" msgstr "成功添加项目!" @@ -1105,28 +1153,27 @@ msgstr "添加标签" msgid "Update label" msgstr "更新标签" -#: src/Dialogs/TodoistOAuth.vala:33 src/Dialogs/GoogleOAuth.vala:40 +#: src/Dialogs/GoogleOAuth.vala:40 msgid "Todoist Sync" msgstr "Todoist 同步" -#: src/Dialogs/TodoistOAuth.vala:42 src/Dialogs/TodoistOAuth.vala:140 #: src/Dialogs/GoogleOAuth.vala:54 src/Dialogs/GoogleOAuth.vala:145 msgid "Loading" msgstr "加载中" -#: src/Dialogs/TodoistOAuth.vala:76 src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/GoogleOAuth.vala:85 +#: src/Dialogs/Preferences/PreferencesWindow.vala:987 msgid "Planner is sync your tasks, this may take a few minutes." msgstr "Planner 正在同步你的任务,这可能会用上几分钟。" -#: src/Dialogs/TodoistOAuth.vala:123 -msgid "Synchronizing. Wait a moment please." -msgstr "同步中,请稍候。" - -#: src/Dialogs/TodoistOAuth.vala:133 src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/GoogleOAuth.vala:138 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1046 msgid "Please enter your credentials" msgstr "请输入你的凭证" -#: src/Dialogs/TodoistOAuth.vala:153 src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/GoogleOAuth.vala:158 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1063 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1065 msgid "Network Is Not Available" msgstr "网络不可用" @@ -1134,18 +1181,42 @@ msgstr "网络不可用" msgid "What's New" msgstr "" -#: src/Dialogs/WhatsNew.vala:47 -msgid "What's New in Planify" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Quick Add Improvements" msgstr "" -#: src/Dialogs/WhatsNew.vala:52 -msgid "Version 4.1.1" +#: src/Dialogs/WhatsNew.vala:107 +msgid "Now supports project selection, due date, priority, labels and pinned." msgstr "" -#: src/Dialogs/WhatsNew.vala:98 src/Dialogs/WhatsNew.vala:99 -#: src/Dialogs/Preferences/PreferencesWindow.vala:729 -msgid "Synchronize with your Todoist Account" -msgstr "与你的 Todoist 账户同步" +#: src/Dialogs/WhatsNew.vala:108 +#, fuzzy +msgid "Sidebar filter settings" +msgstr "使用系统设置" + +#: src/Dialogs/WhatsNew.vala:108 +msgid "It is now possible to re-order, hide filters and the task cutter." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "Backup support" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:109 +msgid "" +"It is now possible to create a backup copy and import it from somewhere " +"else. Planify will import all your tasks and settings." +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "Offline support for Todoist" +msgstr "" + +#: src/Dialogs/WhatsNew.vala:110 +msgid "" +"You were without internet, keep using Planify with Todoist, the tasks will " +"be saved locally and synchronized when the connection returns." +msgstr "" #: src/Dialogs/ProjectDescription.vala:34 msgid "Project Description" @@ -1159,11 +1230,7 @@ msgstr "更新" msgid "Type a search" msgstr "输入一个搜索" -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:160 -msgid "On this Computer" -msgstr "此电脑上" - -#: src/Dialogs/ProjectPicker/ProjectPicker.vala:248 +#: src/Dialogs/ProjectPicker/ProjectPicker.vala:250 msgid "No Section" msgstr "无分区" @@ -1188,37 +1255,37 @@ msgid "Year(s)" msgstr "年" #: src/Dialogs/RepeatConfig.vala:124 -#: src/Dialogs/Preferences/PreferencesWindow.vala:241 +#: src/Dialogs/Preferences/PreferencesWindow.vala:264 msgid "Monday" msgstr "周一" #: src/Dialogs/RepeatConfig.vala:125 -#: src/Dialogs/Preferences/PreferencesWindow.vala:242 +#: src/Dialogs/Preferences/PreferencesWindow.vala:265 msgid "Tuesday" msgstr "周二" #: src/Dialogs/RepeatConfig.vala:126 -#: src/Dialogs/Preferences/PreferencesWindow.vala:243 +#: src/Dialogs/Preferences/PreferencesWindow.vala:266 msgid "Wednesday" msgstr "周三" #: src/Dialogs/RepeatConfig.vala:127 -#: src/Dialogs/Preferences/PreferencesWindow.vala:244 +#: src/Dialogs/Preferences/PreferencesWindow.vala:267 msgid "Thursday" msgstr "周四" #: src/Dialogs/RepeatConfig.vala:128 -#: src/Dialogs/Preferences/PreferencesWindow.vala:245 +#: src/Dialogs/Preferences/PreferencesWindow.vala:268 msgid "Friday" msgstr "周五" #: src/Dialogs/RepeatConfig.vala:129 -#: src/Dialogs/Preferences/PreferencesWindow.vala:246 +#: src/Dialogs/Preferences/PreferencesWindow.vala:269 msgid "Saturday" msgstr "周六" #: src/Dialogs/RepeatConfig.vala:130 -#: src/Dialogs/Preferences/PreferencesWindow.vala:240 +#: src/Dialogs/Preferences/PreferencesWindow.vala:263 msgid "Sunday" msgstr "周日" @@ -1230,241 +1297,254 @@ msgstr "快速查找" msgid "Quickly switch projects and views, find tasks, search by labels." msgstr "快速选择项目和视图,查找任务,搜索标签。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:51 -#: src/Dialogs/Preferences/PreferencesWindow.vala:685 -#: src/Dialogs/Preferences/PreferencesWindow.vala:771 -msgid "Accounts" -msgstr "账户" +#: src/Dialogs/Preferences/PreferencesWindow.vala:49 +#, fuzzy +msgid "Integrations" +msgstr "桌面环境集成" -#: src/Dialogs/Preferences/PreferencesWindow.vala:52 +#: src/Dialogs/Preferences/PreferencesWindow.vala:50 msgid "Sync your favorite to-do providers." msgstr "与你最喜爱的待办事项提供商同步。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:68 -#: src/Dialogs/Preferences/PreferencesWindow.vala:157 +#: src/Dialogs/Preferences/PreferencesWindow.vala:66 +#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:181 msgid "General" msgstr "通用" -#: src/Dialogs/Preferences/PreferencesWindow.vala:69 +#: src/Dialogs/Preferences/PreferencesWindow.vala:67 msgid "Customize to your liking." msgstr "根据喜好进行定制。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:79 -#: src/Dialogs/Preferences/PreferencesWindow.vala:387 -msgid "Homepage" -msgstr "" +#: src/Dialogs/Preferences/PreferencesWindow.vala:77 +#: src/Dialogs/Preferences/Pages/Sidebar.vala:28 +#, fuzzy +msgid "Sidebar" +msgstr "打开或关闭侧边栏" -#: src/Dialogs/Preferences/PreferencesWindow.vala:80 +#: src/Dialogs/Preferences/PreferencesWindow.vala:78 #, fuzzy -msgid "Customize your homepage." +msgid "Customize your sidebar." msgstr "根据喜好进行定制。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:90 -#: src/Dialogs/Preferences/PreferencesWindow.vala:503 -#: src/Dialogs/Preferences/PreferencesWindow.vala:567 +#: src/Dialogs/Preferences/PreferencesWindow.vala:88 +#: src/Dialogs/Preferences/PreferencesWindow.vala:426 +#: src/Dialogs/Preferences/PreferencesWindow.vala:490 msgid "Appearance" msgstr "外观" -#: src/Dialogs/Preferences/PreferencesWindow.vala:101 -#: src/Dialogs/Preferences/PreferencesWindow.vala:964 +#: src/Dialogs/Preferences/PreferencesWindow.vala:99 +#: src/Dialogs/Preferences/PreferencesWindow.vala:858 msgid "Quick Add" msgstr "快速添加" -#: src/Dialogs/Preferences/PreferencesWindow.vala:102 +#: src/Dialogs/Preferences/PreferencesWindow.vala:100 msgid "Adding To-Dos From Anywhere." msgstr "随处添加待办事项。" #. Support Group -#: src/Dialogs/Preferences/PreferencesWindow.vala:118 +#: src/Dialogs/Preferences/PreferencesWindow.vala:116 msgid "Support" msgstr "支持" -#: src/Dialogs/Preferences/PreferencesWindow.vala:124 +#: src/Dialogs/Preferences/PreferencesWindow.vala:122 msgid "Create Tutorial Project" msgstr "创建教学项目" -#: src/Dialogs/Preferences/PreferencesWindow.vala:125 +#: src/Dialogs/Preferences/PreferencesWindow.vala:123 msgid "Learn the app step by step with a short tutorial project." msgstr "在教学任务中一步步学习如何使用此应用。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:131 +#: src/Dialogs/Preferences/PreferencesWindow.vala:129 +#: src/Dialogs/Preferences/Pages/Backup.vala:28 +#, fuzzy +msgid "Backups" +msgstr "返回" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:136 msgid "Privacy" msgstr "隐私" -#: src/Dialogs/Preferences/PreferencesWindow.vala:137 +#: src/Dialogs/Preferences/PreferencesWindow.vala:142 msgid "Delete Planify Data" msgstr "删除 Planify 数据" -#: src/Dialogs/Preferences/PreferencesWindow.vala:144 +#: src/Dialogs/Preferences/PreferencesWindow.vala:149 msgid "A tutorial project has been created." msgstr "教学项目已创建。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:160 -msgid "Sort Settings" -msgstr "对设置排序" +#: src/Dialogs/Preferences/PreferencesWindow.vala:176 +msgid "Home Page" +msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:167 +#: src/Dialogs/Preferences/PreferencesWindow.vala:189 msgid "Sort projects" msgstr "对项目排序" -#: src/Dialogs/Preferences/PreferencesWindow.vala:174 +#: src/Dialogs/Preferences/PreferencesWindow.vala:194 msgid "Ascending" msgstr "升序" -#: src/Dialogs/Preferences/PreferencesWindow.vala:175 +#: src/Dialogs/Preferences/PreferencesWindow.vala:195 msgid "Descending" msgstr "降序" -#: src/Dialogs/Preferences/PreferencesWindow.vala:178 +#: src/Dialogs/Preferences/PreferencesWindow.vala:198 msgid "Sort by" msgstr "按…排序" -#: src/Dialogs/Preferences/PreferencesWindow.vala:185 +#: src/Dialogs/Preferences/PreferencesWindow.vala:203 +msgid "Sort Settings" +msgstr "对设置排序" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:208 msgid "DE Integration" msgstr "桌面环境集成" -#: src/Dialogs/Preferences/PreferencesWindow.vala:193 +#: src/Dialogs/Preferences/PreferencesWindow.vala:216 msgid "Run in background" msgstr "后台运行" -#: src/Dialogs/Preferences/PreferencesWindow.vala:194 +#: src/Dialogs/Preferences/PreferencesWindow.vala:217 msgid "Let Planify run in background and send notifications." msgstr "让 Planify 在系统后台运行并发送通知。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:206 +#: src/Dialogs/Preferences/PreferencesWindow.vala:229 msgid "Run on startup" msgstr "开机运行" -#: src/Dialogs/Preferences/PreferencesWindow.vala:207 +#: src/Dialogs/Preferences/PreferencesWindow.vala:230 msgid "Whether Planify should run on startup." msgstr "是否让 Planify 随开机运行。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:219 +#: src/Dialogs/Preferences/PreferencesWindow.vala:242 msgid "Calendar Events" msgstr "日历事件" -#: src/Dialogs/Preferences/PreferencesWindow.vala:226 +#: src/Dialogs/Preferences/PreferencesWindow.vala:249 msgid "Date and Time" msgstr "日期和时间" -#: src/Dialogs/Preferences/PreferencesWindow.vala:229 +#: src/Dialogs/Preferences/PreferencesWindow.vala:252 msgid "24h" msgstr "24 小时制" -#: src/Dialogs/Preferences/PreferencesWindow.vala:230 +#: src/Dialogs/Preferences/PreferencesWindow.vala:253 msgid "12h" msgstr "12 小时制" -#: src/Dialogs/Preferences/PreferencesWindow.vala:233 +#: src/Dialogs/Preferences/PreferencesWindow.vala:256 msgid "Clock Format" msgstr "时间格式" -#: src/Dialogs/Preferences/PreferencesWindow.vala:249 +#: src/Dialogs/Preferences/PreferencesWindow.vala:272 msgid "Start of the week" msgstr "一周的起始日" -#: src/Dialogs/Preferences/PreferencesWindow.vala:256 +#: src/Dialogs/Preferences/PreferencesWindow.vala:279 msgid "Task settings" msgstr "任务设置" -#: src/Dialogs/Preferences/PreferencesWindow.vala:259 +#: src/Dialogs/Preferences/PreferencesWindow.vala:282 msgid "Instantly" msgstr "立即" -#: src/Dialogs/Preferences/PreferencesWindow.vala:260 +#: src/Dialogs/Preferences/PreferencesWindow.vala:283 msgid "Wait 2500 milliseconds" msgstr "等待 2500 毫秒" -#: src/Dialogs/Preferences/PreferencesWindow.vala:263 +#: src/Dialogs/Preferences/PreferencesWindow.vala:286 msgid "Complete task" msgstr "完成任务" -#: src/Dialogs/Preferences/PreferencesWindow.vala:264 +#: src/Dialogs/Preferences/PreferencesWindow.vala:287 msgid "" "Complete your to-do instantly or wait 2500 milliseconds with the undo option." msgstr "立即完成你的待办事项,或者等待 2500 毫秒(具备撤销选项)。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:271 +#: src/Dialogs/Preferences/PreferencesWindow.vala:294 msgid "Priority 1" msgstr "优先级 1" -#: src/Dialogs/Preferences/PreferencesWindow.vala:272 +#: src/Dialogs/Preferences/PreferencesWindow.vala:295 msgid "Priority 2" msgstr "优先级 2" -#: src/Dialogs/Preferences/PreferencesWindow.vala:273 +#: src/Dialogs/Preferences/PreferencesWindow.vala:296 msgid "Priority 3" msgstr "优先级 3" -#: src/Dialogs/Preferences/PreferencesWindow.vala:277 +#: src/Dialogs/Preferences/PreferencesWindow.vala:300 msgid "Default priority" msgstr "默认优先级" -#: src/Dialogs/Preferences/PreferencesWindow.vala:289 +#: src/Dialogs/Preferences/PreferencesWindow.vala:312 msgid "Description preview" msgstr "描述预览" -#: src/Dialogs/Preferences/PreferencesWindow.vala:301 +#: src/Dialogs/Preferences/PreferencesWindow.vala:324 msgid "Underline completed tasks" msgstr "为完成的任务添加下划线" -#: src/Dialogs/Preferences/PreferencesWindow.vala:390 -msgid "" -"When you open up Planify, make sure you see the to-dos that are most " -"important. The default homepage is your Inbox view, but you can " -"change it to whatever you'd like." -msgstr "" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:506 +#: src/Dialogs/Preferences/PreferencesWindow.vala:429 msgid "App Theme" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:514 +#: src/Dialogs/Preferences/PreferencesWindow.vala:437 msgid "Use system settings" msgstr "使用系统设置" -#: src/Dialogs/Preferences/PreferencesWindow.vala:523 +#: src/Dialogs/Preferences/PreferencesWindow.vala:446 #, fuzzy msgid "Light Style" msgstr "浅蓝色" -#: src/Dialogs/Preferences/PreferencesWindow.vala:532 +#: src/Dialogs/Preferences/PreferencesWindow.vala:455 #, fuzzy msgid "Dark Style" msgstr "深蓝色" -#: src/Dialogs/Preferences/PreferencesWindow.vala:541 +#: src/Dialogs/Preferences/PreferencesWindow.vala:464 #, fuzzy msgid "Dark Blue Style" msgstr "深蓝色" -#: src/Dialogs/Preferences/PreferencesWindow.vala:579 +#: src/Dialogs/Preferences/PreferencesWindow.vala:502 msgid "Sidebar Width" msgstr "" -#: src/Dialogs/Preferences/PreferencesWindow.vala:696 +#: src/Dialogs/Preferences/PreferencesWindow.vala:578 +#: src/Dialogs/Preferences/PreferencesWindow.vala:663 +msgid "Accounts" +msgstr "账户" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:589 msgid "Default Inbox Project" msgstr "默认待办收件箱项目" -#: src/Dialogs/Preferences/PreferencesWindow.vala:763 +#: src/Dialogs/Preferences/PreferencesWindow.vala:621 +msgid "Synchronize with your Todoist Account" +msgstr "与你的 Todoist 账户同步" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:655 msgid "Synchronize with your Google Account" msgstr "与你的 Google 账户同步" -#: src/Dialogs/Preferences/PreferencesWindow.vala:917 +#: src/Dialogs/Preferences/PreferencesWindow.vala:800 msgid "Sync Server" msgstr "同步服务器" -#: src/Dialogs/Preferences/PreferencesWindow.vala:918 +#: src/Dialogs/Preferences/PreferencesWindow.vala:801 msgid "" "Activate this setting so that Planner automatically synchronizes with your " "Todoist account every 15 minutes." msgstr "激活此设置后 Planner 将每隔 15 分钟自动通过您的待办清单帐号进行同步。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:932 +#: src/Dialogs/Preferences/PreferencesWindow.vala:815 msgid "Last Sync" msgstr "上次同步" -#: src/Dialogs/Preferences/PreferencesWindow.vala:967 +#: src/Dialogs/Preferences/PreferencesWindow.vala:862 msgid "" "Use Quick Add to create to-dos from anywhere on your desktop with just a few " "keystrokes. You don’t even have to leave the app you’re currently in." @@ -1472,11 +1552,7 @@ msgstr "" "使用 ‘快速添加’,只需敲击几下键盘,就可以在桌面上的任何地方创建待办事项。你甚" "至不需要离开你目前所在的应用程序。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:973 -msgid "Set a custom shortcut in System Settings" -msgstr "在系统设置中设置自定义快捷键" - -#: src/Dialogs/Preferences/PreferencesWindow.vala:974 +#: src/Dialogs/Preferences/PreferencesWindow.vala:873 msgid "" "Head to System Settings → Keyboard → Shortcuts → Custom, then add a new " "shortcut with the following:" @@ -1484,28 +1560,139 @@ msgstr "" "前往 ‘系统设置’ → ‘键盘’ → ‘快捷键’ → ‘自定义’,然后一个新的快捷键,内容如" "下:" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1020 +#: src/Dialogs/Preferences/PreferencesWindow.vala:901 +#, fuzzy +msgid "Settings" +msgstr "对设置排序" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:909 +#, fuzzy +msgid "Save Last Selected Project" +msgstr "删除项目" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:910 +msgid "If unchecked, the default project selected is Inbox." +msgstr "" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:944 msgid "The command was copied to the clipboard." msgstr "命令已复制到剪切板。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1034 +#: src/Dialogs/Preferences/PreferencesWindow.vala:959 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1051 +#, fuzzy +msgid "Loading…" +msgstr "加载中" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1035 +msgid "Synchronizing. Wait a moment please." +msgstr "同步中,请稍候。" + +#: src/Dialogs/Preferences/PreferencesWindow.vala:1150 msgid "" "Are you sure you want to remove the Todoist sync? This action will delete " "all your tasks and settings." msgstr "你确定要移除 Todoist 同步吗?此操作将会删除你所有的任务和设置。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1036 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1152 msgid "" "Are you sure you want to remove the Google Tasks sync? This action will " "delete all your tasks and settings." msgstr "你确定要移除 Todoist 同步吗?此操作将会删除你所有的任务和设置。" -#: src/Dialogs/Preferences/PreferencesWindow.vala:1040 +#: src/Dialogs/Preferences/PreferencesWindow.vala:1156 msgid "Sign off" msgstr "登出" -#~ msgid "Toggle Sidebar" -#~ msgstr "打开或关闭侧边栏" +#: src/Dialogs/Preferences/Pages/Backup.vala:51 +msgid "" +"Never worry about losing your data. You can create backups of your active " +"projects, tasks and comments and import them later." +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:61 +#, fuzzy +msgid "Create backup" +msgstr "创建一个项目" + +#: src/Dialogs/Preferences/Pages/Backup.vala:65 +msgid "Import backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:67 +msgid "Backups files" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:123 +msgid "Selected file is invalid" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:140 +msgid "Import Overview" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:168 +msgid "Items" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:189 +msgid "Confirm" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +msgid "Restore backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:238 +#, fuzzy +msgid "" +"Are you sure you want to continue? This operation will delete your current " +"data and replace it with the backup data." +msgstr "你确定要移除 Todoist 同步吗?此操作将会删除你所有的任务和设置。" + +#: src/Dialogs/Preferences/Pages/Backup.vala:242 +msgid "Restore Backup" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Backup.vala:297 +msgid "Download" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:30 +#, fuzzy +msgid "Show in sidebar" +msgstr "显示或隐藏侧边栏" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:55 +msgid "Show task count" +msgstr "" + +#: src/Dialogs/Preferences/Pages/Sidebar.vala:69 +msgid "You can sort your views by dragging and dropping" +msgstr "" + +#: quick-add/MainWindow.vala:6 +msgid "Planify - Quick Add" +msgstr "Planify - 快速添加" + +#, c-format +#~ msgid "priority" +#~ msgstr "优先级" + +#~ msgid "Save" +#~ msgstr "保存" + +#~ msgid "AM" +#~ msgstr "上午" + +#~ msgid "PM" +#~ msgstr "下午" + +#~ msgid ":" +#~ msgstr ":" + +#~ msgid "Set a custom shortcut in System Settings" +#~ msgstr "在系统设置中设置自定义快捷键" #~ msgid "Move to project" #~ msgstr "移动到项目" @@ -1513,9 +1700,6 @@ msgstr "登出" #~ msgid "Add Project" #~ msgstr "添加项目" -#~ msgid "Add To-Do" -#~ msgstr "添加待办事项" - #~ msgid "No label available, click to add one" #~ msgstr "尚无可用标签,点击创建" @@ -1524,9 +1708,6 @@ msgstr "登出" #~ "button" #~ msgstr "你的过滤器列表将显示在这里,点击 ‘+’ 按钮创建" -#~ msgid "Back" -#~ msgstr "返回" - #~ msgid "Sync" #~ msgstr "同步" @@ -1542,24 +1723,6 @@ msgstr "登出" #~ msgid "Dark mode" #~ msgstr "深色模式" -#~ msgid "To-do name" -#~ msgstr "待办事项名称" - -#~ msgid "Add a description…" -#~ msgstr "添加一个描述…" - -#~ msgid "Planify - Quick Add" -#~ msgstr "Planify - 快速添加" - -#~ msgid "" -#~ "I'm sorry, Quick Add can't find any project available, try creating a " -#~ "project from Planify." -#~ msgstr "" -#~ "很抱歉,‘快速添加’ 无法找到任何可用的项目,请尝试从 Planify 创建一个项目。" - -#~ msgid "To-do added" -#~ msgstr "待办事项已添加" - #~ msgctxt "shortcut window" #~ msgid "Used anywhere" #~ msgstr "任何地方使用" @@ -1600,10 +1763,6 @@ msgstr "登出" #~ msgid "Open preferences" #~ msgstr "打开偏好设置" -#~ msgctxt "shortcut window" -#~ msgid "Show/hide Sidebar" -#~ msgstr "显示或隐藏侧边栏" - #~ msgctxt "shortcut window" #~ msgid "Open Keyboard Shortcuts" #~ msgstr "打开快捷键" diff --git a/quick-add/MainWindow.vala b/quick-add/MainWindow.vala index a4475989a..5dfec353c 100644 --- a/quick-add/MainWindow.vala +++ b/quick-add/MainWindow.vala @@ -1,22 +1,12 @@ public class MainWindow : Adw.ApplicationWindow { - public Objects.Item item { get; set; } - - private Gtk.CheckButton checked_button; - private Gtk.Entry content_entry; - private Widgets.LoadingButton submit_button; - private Widgets.HyperTextView description_textview; - private Widgets.IconColorProject icon_project; - private Gtk.Label name_label; - private Gtk.Image added_image; - private Gtk.Stack main_stack; - public MainWindow (QuickAdd application) { Object ( application: application, icon_name: "io.github.alainm23.planify", title: _("Planify - Quick Add"), - width_request: 500, - resizable: false + resizable: false, + width_request: 600, + halign: Gtk.Align.START ); } @@ -26,244 +16,13 @@ public class MainWindow : Adw.ApplicationWindow { } construct { - item = new Objects.Item (); - item.project_id = Services.Settings.get_default ().settings.get_string ("inbox-project-id"); - - checked_button = new Gtk.CheckButton () { - valign = Gtk.Align.CENTER - }; - - checked_button.add_css_class ("priority-color"); - - content_entry = new Gtk.Entry () { - hexpand = true, - placeholder_text = _("To-do name") - }; - - content_entry.add_css_class (Granite.STYLE_CLASS_FLAT); - - var content_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { - valign = Gtk.Align.CENTER, - hexpand = true, - margin_top = 12, - margin_start = 12, - margin_end = 12 - }; - content_box.append (checked_button); - content_box.append (content_entry); - - description_textview = new Widgets.HyperTextView (_("Add a description…")) { - height_request = 64, - left_margin = 39, - right_margin = 6, - top_margin = 6, - bottom_margin = 12, - wrap_mode = Gtk.WrapMode.WORD_CHAR, - hexpand = true - }; - - description_textview.remove_css_class ("view"); - - var action_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) { - margin_start = 31, - margin_top = 6, - margin_bottom = 6, - hexpand = true - }; - - var quick_add_content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - margin_top = 12, - margin_bottom = 12, - margin_start = 12, - margin_end = 12, - vexpand = true - }; - quick_add_content.add_css_class (Granite.STYLE_CLASS_CARD); - quick_add_content.add_css_class ("sidebar-card"); - quick_add_content.append (content_box); - quick_add_content.append (description_textview); - quick_add_content.append (action_box); - - submit_button = new Widgets.LoadingButton (LoadingButtonType.LABEL, _("Add To-Do")); - submit_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); - submit_button.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); - submit_button.add_css_class ("border-radius-6"); - submit_button.add_css_class ("action-button"); - - var cancel_button = new Gtk.Button.with_label (_("Cancel")); - cancel_button.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); - cancel_button.add_css_class ("border-radius-6"); - cancel_button.add_css_class ("action-button"); - - icon_project = new Widgets.IconColorProject (19); - - name_label = new Gtk.Label (null); - name_label.valign = Gtk.Align.CENTER; - name_label.ellipsize = Pango.EllipsizeMode.END; - - var project_box = new Gtk.Box (HORIZONTAL, 6) { - valign = CENTER - }; - project_box.append (icon_project); - project_box.append (name_label); - - var project_picker = new Widgets.ProjectPicker (); - - var project_button = new Gtk.MenuButton () { - hexpand = true, - halign = END, - margin_end = 12, - margin_bottom = 12, - popover = project_picker, - child = project_box - }; - - project_button.add_css_class (Granite.STYLE_CLASS_FLAT); - - var submit_cancel_grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { - margin_bottom = 12, - margin_start = 12, - halign = Gtk.Align.START, - homogeneous = true - }; - submit_cancel_grid.append (cancel_button); - submit_cancel_grid.append (submit_button); - - var footer_content = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { - hexpand = true - }; - - footer_content.append (submit_cancel_grid); - footer_content.append (project_button); - - var main_content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); - main_content.append (quick_add_content); - main_content.append (footer_content); - - var warning_image = new Gtk.Image (); - warning_image.gicon = new ThemedIcon ("dialog-warning"); - warning_image.pixel_size = 32; - - var warning_label = new Gtk.Label (_("I'm sorry, Quick Add can't find any project available, try creating a project from Planify.")); - warning_label.wrap = true; - warning_label.max_width_chars = 42; - warning_label.xalign = 0; - - var warning_box = new Gtk.Box (HORIZONTAL, 12) { - margin_start = 12 - }; - warning_box.halign = Gtk.Align.CENTER; - warning_box.valign = Gtk.Align.CENTER; - warning_box.append (warning_image); - warning_box.append (warning_label); - - main_stack = new Gtk.Stack () { - hexpand = true, - vexpand = true, - transition_type = Gtk.StackTransitionType.CROSSFADE - }; - - added_image = new Gtk.Image (); - added_image.gicon = new ThemedIcon ("planner-completed"); - added_image.pixel_size = 64; - - var added_label = new Gtk.Label (_("To-do added")); - - var added_box = new Gtk.Box (VERTICAL, 0); - added_box.halign = Gtk.Align.CENTER; - added_box.valign = Gtk.Align.CENTER; - added_box.append (added_image); - added_box.append (added_label); - - main_stack.add_named (main_content, "main"); - main_stack.add_named (warning_box, "warning"); - main_stack.add_named (added_box, "added"); - - var window = new Gtk.WindowHandle (); - window.set_child (main_stack); - - set_content (window); - update_project_request (); - - Timeout.add (225, () => { - if (Services.Database.get_default ().is_database_empty ()) { - main_stack.visible_child_name = "warning"; - } else { - main_stack.visible_child_name = "main"; - content_entry.grab_focus (); - } - - return GLib.Source.REMOVE; - }); - - var granite_settings = Granite.Settings.get_default (); - granite_settings.notify["prefers-color-scheme"].connect (() => { - if (Services.Settings.get_default ().settings.get_boolean ("system-appearance")) { - Services.Settings.get_default ().settings.set_boolean ( - "dark-mode", - granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK - ); - Util.get_default ().update_theme (); - } - }); - - Services.Settings.get_default ().settings.changed.connect ((key) => { - if (key == "system-appearance") { - Services.Settings.get_default ().settings.set_boolean ( - "dark-mode", - granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK - ); - Util.get_default ().update_theme (); - } else if (key == "appearance" || key == "dark-mode") { - Util.get_default ().update_theme (); - } - }); - - content_entry.activate.connect (add_item); - submit_button.clicked.connect (add_item); - cancel_button.clicked.connect (hide_destroy); - - project_picker.selected.connect ((project) => { - item.project_id = project.id; - update_project_request (); - }); - } - - private void add_item () { - if (content_entry.buffer.text.length <= 0) { - hide_destroy (); - return; - } - - item.content = content_entry.get_text (); - item.description = description_textview.get_text (); + Services.Database.get_default ().init_database (); - if (item.project.backend_type == BackendType.TODOIST) { - submit_button.is_loading = true; - Services.Todoist.get_default ().add.begin (item, (obj, res) => { - string? id = Services.Todoist.get_default ().add.end (res); - if (id != null) { - item.id = id; - add_item_db (item); - } - }); - } else if (item.project.backend_type == BackendType.LOCAL) { - item.id = Util.get_default ().generate_id (); - add_item_db (item); - } - } - - private void add_item_db (Objects.Item item) { - if (Services.Database.get_default ().insert_item (item)) { - send_interface_id (item.id); - main_stack.visible_child_name = "added"; - added_image.add_css_class ("fancy-turn-animation"); + var quick_add_widget = new Layouts.QuickAdd (true); + set_content (quick_add_widget); - Timeout.add (750, () => { - hide_destroy (); - return GLib.Source.REMOVE; - }); - } + quick_add_widget.hide_destroy.connect (hide_destroy); + quick_add_widget.send_interface_id.connect (send_interface_id); } private void send_interface_id (string id) { @@ -282,10 +41,4 @@ public class MainWindow : Adw.ApplicationWindow { return GLib.Source.REMOVE; }); } - - public void update_project_request () { - name_label.label = item.project.is_inbox_project ? _("Inbox") : item.project.name; - icon_project.project = item.project; - icon_project.update_request (); - } } \ No newline at end of file diff --git a/quick-add/Objects/BaseObject.vala b/quick-add/Objects/BaseObject.vala deleted file mode 100644 index 0caa5a38f..000000000 --- a/quick-add/Objects/BaseObject.vala +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Copyright © 2019 Alain M. (https://github.com/alainm23/planner) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Objects.BaseObject : GLib.Object { - public string id { get; set; default = ""; } - public string name { get; set; default = ""; } - public string keywords { get; set; default = ""; } - public signal void deleted (); - public signal void updated (); - - public uint update_timeout_id { get; set; default = 0; } - - string _id_string; - public string id_string { - get { - _id_string = id.to_string (); - return _id_string; - } - } - - public string type_delete { - get { - if (this is Objects.Item) { - return "item_delete"; - } else if (this is Objects.Project) { - return "project_delete"; - } else { - return ""; - } - } - } - - public string type_add { - get { - if (this is Objects.Item) { - return "item_add"; - } else if (this is Objects.Project) { - return "project_add"; - } else { - return ""; - } - } - } - - public string type_update { - get { - if (this is Objects.Item) { - return "item_update"; - } else if (this is Objects.Project) { - return "project_update"; - } else { - return ""; - } - } - } - - public ObjectType object_type { - get { - if (this is Objects.Project) { - return ObjectType.PROJECT; - } else if (this is Objects.Item) { - return ObjectType.ITEM; - } else { - return ObjectType.FILTER; - } - } - } - - public string object_type_string { - get { - if (this is Objects.Project) { - return "project"; - } else if (this is Objects.Item) { - return "item"; - } else { - return "filter"; - } - } - } - - public string table_name { - get { - if (this is Objects.Item) { - return "Items"; - } else if (this is Objects.Project) { - return "Projects"; - } else { - return ""; - } - } - } - - public string column_order_name { - get { - if (this is Objects.Item) { - return "child_order"; - } else if (this is Objects.Project) { - return "child_order"; - } else { - return ""; - } - } - } - - public virtual string get_update_json (string uuid, string? temp_id = null) { - return ""; - } - - public virtual string get_add_json (string temp_id, string uuid) { - return ""; - } - - public virtual string get_move_json (string uuid, int64 new_project_id) { - return ""; - } - - public virtual string to_json () { - return ""; - } -} \ No newline at end of file diff --git a/quick-add/Objects/Color.vala b/quick-add/Objects/Color.vala deleted file mode 100644 index 5269364ce..000000000 --- a/quick-add/Objects/Color.vala +++ /dev/null @@ -1,13 +0,0 @@ -public class Objects.Color : GLib.Object { - public int id { get; construct; } - public string name { get; construct; } - public string hexadecimal { get; construct; } - - public Color (int id, string name, string hexadecimal) { - Object ( - id: id, - name: name, - hexadecimal: hexadecimal - ); - } -} \ No newline at end of file diff --git a/quick-add/Objects/DueDate.vala b/quick-add/Objects/DueDate.vala deleted file mode 100644 index 53385a63c..000000000 --- a/quick-add/Objects/DueDate.vala +++ /dev/null @@ -1,96 +0,0 @@ -public class Objects.DueDate : GLib.Object { - public string date { get; set; default = ""; } - public string timezone { get; set; default = ""; } - public bool is_recurring { get; set; default = false; } - public RecurrencyType recurrency_type { get; set; default = RecurrencyType.NONE; } - public int recurrency_interval { get; set; default = 0; } - - GLib.DateTime? _datetime = null; - public GLib.DateTime? datetime { - get { - if (_datetime == null) { - _datetime = Util.get_default ().get_todoist_datetime (date); - } - - return _datetime; - } - } - - public DueDate.from_json (Json.Object object) { - update_from_json (object); - } - - construct { - notify["date"].connect (() => { - _datetime = null; - }); - } - - public void update_from_json (Json.Object object) { - if (object.has_member ("date")) { - date = object.get_string_member ("date"); - } - - if (object.has_member ("timezone")) { - timezone = object.get_string_member ("timezone"); - } - - if (object.has_member ("is_recurring")) { - is_recurring = object.get_boolean_member ("is_recurring"); - } - - if (object.has_member ("recurrency_type")) { - recurrency_type = (RecurrencyType) int.parse (object.get_string_member ("recurrency_type")); - } - - if (object.has_member ("recurrency_interval")) { - recurrency_interval = int.parse (object.get_string_member ("recurrency_interval")); - } - } - - public void reset () { - date = ""; - timezone = ""; - recurrency_type = RecurrencyType.NONE; - recurrency_interval = 0; - is_recurring = false; - } - - public string to_string () { - var builder = new Json.Builder (); - builder.begin_object (); - - builder.set_member_name ("date"); - builder.add_string_value (date); - - builder.set_member_name ("timezone"); - builder.add_string_value (timezone); - - builder.set_member_name ("is_recurring"); - builder.add_boolean_value (is_recurring); - - builder.set_member_name ("recurrency_type"); - builder.add_string_value (((int)recurrency_type).to_string ()); - - builder.set_member_name ("recurrency_interval"); - builder.add_string_value (recurrency_interval.to_string ()); - - builder.end_object (); - - Json.Generator generator = new Json.Generator (); - Json.Node root = builder.get_root (); - generator.set_root (root); - - return generator.to_data (null); - } - - public bool is_recurrency_equal (Objects.DueDate duedate) { - return ((int) recurrency_type == (int) duedate.recurrency_type && - recurrency_interval == duedate.recurrency_interval && - is_recurring == duedate.is_recurring); - } - - public string to_friendly_string () { - return recurrency_type.to_friendly_string (recurrency_interval); - } -} \ No newline at end of file diff --git a/quick-add/Objects/Item.vala b/quick-add/Objects/Item.vala deleted file mode 100644 index 99a44be84..000000000 --- a/quick-add/Objects/Item.vala +++ /dev/null @@ -1,231 +0,0 @@ -/* -* Copyright © 2019 Alain M. (https://github.com/alainm23/planner) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Objects.Item : Objects.BaseObject { - public string content { get; set; default = ""; } - public string description { get; set; default = ""; } - public Objects.DueDate due { get; set; default = new Objects.DueDate (); } - public string added_at { get; set; default = new GLib.DateTime.now_local ().to_string (); } - public string completed_at { get; set; default = ""; } - public string updated_at { get; set; default = ""; } - public string section_id { get; set; default = ""; } - public string project_id { get; set; default = ""; } - public string parent_id { get; set; default = ""; } - - public int priority { get; set; default = 0; } - - public string priority_icon { - get { - if (priority == Constants.PRIORITY_1) { - return "planner-priority-1"; - } else if (priority == Constants.PRIORITY_2) { - return "planner-priority-2"; - } else if (priority == Constants.PRIORITY_3) { - return "planner-priority-3"; - } else { - return "planner-flag"; - } - } - } - - public string priority_color { - get { - if (priority == Constants.PRIORITY_1) { - return "#ff7066"; - } else if (priority == Constants.PRIORITY_2) { - return "#ff9914"; - } else if (priority == Constants.PRIORITY_3) { - return "#5297ff"; - } else { - return "@text_color"; - } - } - } - - public string priority_text { - get { - if (priority == Constants.PRIORITY_1) { - return _("Priority 1: high"); - } else if (priority == Constants.PRIORITY_2) { - return _("Priority 2: medium"); - } else if (priority == Constants.PRIORITY_3) { - return _("Priority 3: low"); - } else { - return _("Priority 4: none"); - } - } - } - - public int child_order { get; set; default = 0; } - public int day_order { get; set; default = 0; } - public bool checked { get; set; default = false; } - public bool is_deleted { get; set; default = false; } - public bool collapsed { get; set; default = false; } - - public bool pinned { get; set; default = false; } - public string pinned_icon { - get { - return pinned ? "planner-pinned-activated" : "planner-pinned"; - } - } - - public bool completed { - get { - return checked; - } - } - - public bool has_due { - get { - return due.datetime != null; - } - } - - public bool has_section { - get { - return section_id != ""; - } - } - - GLib.DateTime _added_datetime; - public GLib.DateTime added_datetime { - get { - _added_datetime = new GLib.DateTime.from_iso8601 (added_at, new GLib.TimeZone.local ()); - return _added_datetime; - } - } - - GLib.DateTime _updated_datetime; - public GLib.DateTime updated_datetime { - get { - _updated_datetime = new GLib.DateTime.from_iso8601 (updated_at, new GLib.TimeZone.local ()); - return _updated_datetime; - } - } - - Json.Builder _builder; - public Json.Builder builder { - get { - if (_builder == null) { - _builder = new Json.Builder (); - } - - return _builder; - } - } - - Objects.Project? _project; - public Objects.Project project { - get { - _project = Services.Database.get_default ().get_project (project_id); - return _project; - } - } - - construct { - - } - - public override string get_add_json (string temp_id, string uuid) { - return get_update_json (uuid, temp_id); - } - - public override string get_update_json (string uuid, string? temp_id = null) { - builder.reset (); - - builder.begin_array (); - builder.begin_object (); - - builder.set_member_name ("type"); - builder.add_string_value (temp_id == null ? "item_update" : "item_add"); - - builder.set_member_name ("uuid"); - builder.add_string_value (uuid); - - if (temp_id != null) { - builder.set_member_name ("temp_id"); - builder.add_string_value (temp_id); - } - - builder.set_member_name ("args"); - builder.begin_object (); - - if (temp_id == null) { - builder.set_member_name ("id"); - builder.add_string_value (id); - } - - if (temp_id != null) { - builder.set_member_name ("project_id"); - builder.add_string_value (project_id); - - if (parent_id != "") { - builder.set_member_name ("parent_id"); - builder.add_string_value (parent_id); - } - - if (section_id != "") { - builder.set_member_name ("section_id"); - builder.add_string_value (section_id); - } - } - - builder.set_member_name ("content"); - builder.add_string_value (Util.get_default ().get_encode_text (content)); - - builder.set_member_name ("description"); - builder.add_string_value (Util.get_default ().get_encode_text (description)); - - builder.set_member_name ("priority"); - if (priority == 0) { - builder.add_int_value (Constants.PRIORITY_4); - } else { - builder.add_int_value (priority); - } - - if (has_due) { - builder.set_member_name ("due"); - builder.begin_object (); - - builder.set_member_name ("date"); - builder.add_string_value (due.date); - - builder.end_object (); - } else { - builder.set_member_name ("due"); - builder.add_null_value (); - } - - builder.set_member_name ("labels"); - builder.begin_array (); - builder.end_array (); - builder.end_object (); - builder.end_object (); - builder.end_array (); - - Json.Generator generator = new Json.Generator (); - Json.Node root = builder.get_root (); - generator.set_root (root); - - print ("%s\n".printf (generator.to_data (null))); - return generator.to_data (null); - } -} \ No newline at end of file diff --git a/quick-add/Objects/Project.vala b/quick-add/Objects/Project.vala deleted file mode 100644 index 66125b019..000000000 --- a/quick-add/Objects/Project.vala +++ /dev/null @@ -1,37 +0,0 @@ -public class Objects.Project : Objects.BaseObject { - public int64 parent_id { get; set; default = 0; } - public string due_date { get; set; default = ""; } - public string color { get; set; default = ""; } - public string emoji { get; set; default = ""; } - public string description { get; set; default = ""; } - public ProjectIconStyle icon_style { get; set; default = ProjectIconStyle.PROGRESS; } - public BackendType backend_type { get; set; default = BackendType.NONE; } - public bool inbox_project { get; set; default = false; } - public bool team_inbox { get; set; default = false; } - public bool is_deleted { get; set; default = false; } - public bool is_archived { get; set; default = false; } - public bool is_favorite { get; set; default = false; } - public bool shared { get; set; default = false; } - public bool collapsed { get; set; default = false; } - - ProjectViewStyle _view_style = ProjectViewStyle.LIST; - public ProjectViewStyle view_style { - get { - return _view_style; - } - - set { - _view_style = value; - } - } - - public int child_order { get; set; default = 0; } - - public bool is_inbox_project { - get { - return id == Services.Settings.get_default ().settings.get_string ("inbox-project-id"); - } - } - - construct {} -} \ No newline at end of file diff --git a/quick-add/Objects/Queue.vala b/quick-add/Objects/Queue.vala deleted file mode 100644 index e416310f2..000000000 --- a/quick-add/Objects/Queue.vala +++ /dev/null @@ -1,29 +0,0 @@ -/* -* Copyright © 2019 Alain M. (https://github.com/alainm23/planner) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Objects.Queue : GLib.Object { - public string uuid { get; set; default = ""; } - public string object_id { get; set; default = ""; } - public string temp_id { get; set; default = ""; } - public string query { get; set; default = ""; } - public string args { get; set; default = ""; } - public string date_added { get; set; default = new GLib.DateTime.now_local ().to_string (); } -} \ No newline at end of file diff --git a/quick-add/ObjectsPatch.vala b/quick-add/ObjectsPatch.vala deleted file mode 100644 index 3f3d2176d..000000000 --- a/quick-add/ObjectsPatch.vala +++ /dev/null @@ -1,3 +0,0 @@ -public class Layouts.ItemRow { - -} \ No newline at end of file diff --git a/quick-add/Services/Database.vala b/quick-add/Services/Database.vala deleted file mode 100644 index f0f92dc93..000000000 --- a/quick-add/Services/Database.vala +++ /dev/null @@ -1,350 +0,0 @@ -public class Services.Database : GLib.Object { - private Sqlite.Database db; - private string db_path; - private string sql; - - public signal void opened (); - public signal void reset (); - - private static Database? _instance; - public static Database get_default () { - if (_instance == null) { - _instance = new Database (); - } - - return _instance; - } - - Gee.ArrayList _projects = null; - public Gee.ArrayList projects { - get { - if (_projects == null) { - _projects = get_projects_collection (); - } - return _projects; - } - } - - construct { - db_path = Environment.get_user_data_dir () + "/io.github.alainm23.planify/database.db"; - Sqlite.Database.open (db_path, out db); - } - - public bool is_database_empty () { - return projects.size <= 0; - } - - /* - Projects - */ - - public Gee.ArrayList get_projects_collection () { - Gee.ArrayList return_value = new Gee.ArrayList (); - - Sqlite.Statement stmt; - - sql = """ - SELECT * FROM Projects WHERE is_deleted = 0 ORDER BY child_order; - """; - - db.prepare_v2 (sql, sql.length, out stmt); - - while (stmt.step () == Sqlite.ROW) { - return_value.add (_fill_project (stmt)); - } - stmt.reset (); - return return_value; - } - - public Objects.Project _fill_project (Sqlite.Statement stmt) { - Objects.Project return_value = new Objects.Project (); - return_value.id = stmt.column_text (0); - return_value.name = stmt.column_text (1); - return_value.color = stmt.column_text (2); - return_value.backend_type = get_backend_type_by_text (stmt, 3); - return_value.inbox_project = get_parameter_bool (stmt, 4); - return_value.team_inbox = get_parameter_bool (stmt, 5); - return_value.child_order = stmt.column_int (6); - return_value.is_deleted = get_parameter_bool (stmt, 7); - return_value.is_archived = get_parameter_bool (stmt, 8); - return_value.is_favorite = get_parameter_bool (stmt, 9); - return_value.shared = get_parameter_bool (stmt, 10); - return_value.view_style = get_view_style_by_text (stmt, 11); - return_value.parent_id = stmt.column_int64 (13); - return_value.collapsed = get_parameter_bool (stmt, 14); - return_value.icon_style = get_icon_style_by_text (stmt, 15); - return_value.emoji = stmt.column_text (16); - return_value.description = stmt.column_text (18); - return_value.due_date = stmt.column_text (19); - return return_value; - } - - private ProjectViewStyle get_view_style_by_text (Sqlite.Statement stmt, int col) { - if (stmt.column_text (col) == "board") { - return ProjectViewStyle.BOARD; - } - - return ProjectViewStyle.LIST; - } - - private ProjectIconStyle get_icon_style_by_text (Sqlite.Statement stmt, int col) { - if (stmt.column_text (col) == "emoji") { - return ProjectIconStyle.EMOJI; - } - - return ProjectIconStyle.PROGRESS; - } - - private BackendType get_backend_type_by_text (Sqlite.Statement stmt, int col) { - if (stmt.column_text (col) == "local") { - return BackendType.LOCAL; - } else if (stmt.column_text (col) == "todoist") { - return BackendType.TODOIST; - } else if (stmt.column_text (col) == "caldav") { - return BackendType.CALDAV; - } else { - return BackendType.NONE; - } - } - - public Objects.Project get_project (string id) { - Objects.Project? return_value = null; - lock (_projects) { - foreach (var project in projects) { - if (project.id == id) { - return_value = project; - break; - } - } - - return return_value; - } - } - - public Gee.ArrayList get_projects_by_backend_type (BackendType backend_type) { - Gee.ArrayList return_value = new Gee.ArrayList (); - lock (_projects) { - foreach (var project in projects) { - if (project.backend_type == backend_type) { - return_value.add (project); - } - } - - return return_value; - } - } - - /* - Items - */ - - public bool insert_item (Objects.Item item) { - Sqlite.Statement stmt; - - sql = """ - INSERT OR IGNORE INTO Items (id, content, description, due, added_at, completed_at, - updated_at, section_id, project_id, parent_id, priority, child_order, - checked, is_deleted, day_order, collapsed, pinned) - VALUES ($id, $content, $description, $due, $added_at, $completed_at, - $updated_at, $section_id, $project_id, $parent_id, $priority, $child_order, - $checked, $is_deleted, $day_order, $collapsed, $pinned); - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_str (stmt, "$id", item.id); - set_parameter_str (stmt, "$content", item.content); - set_parameter_str (stmt, "$description", item.description); - set_parameter_str (stmt, "$due", item.due.to_string ()); - set_parameter_str (stmt, "$added_at", item.added_at); - set_parameter_str (stmt, "$completed_at", item.completed_at); - set_parameter_str (stmt, "$updated_at", item.updated_at); - set_parameter_str (stmt, "$section_id", item.section_id); - set_parameter_str (stmt, "$project_id", item.project_id); - set_parameter_str (stmt, "$parent_id", item.parent_id); - set_parameter_int (stmt, "$priority", item.priority); - set_parameter_int (stmt, "$child_order", item.child_order); - set_parameter_bool (stmt, "$checked", item.checked); - set_parameter_bool (stmt, "$is_deleted", item.is_deleted); - set_parameter_int (stmt, "$day_order", item.day_order); - set_parameter_bool (stmt, "$collapsed", item.collapsed); - set_parameter_bool (stmt, "$pinned", item.pinned); - - if (stmt.step () != Sqlite.DONE) { - warning ("Error: %d: %s", db.errcode (), db.errmsg ()); - } - - stmt.reset (); - return stmt.step () == Sqlite.DONE; - } - - /* - * Queue - */ - - public void insert_queue (Objects.Queue queue) { - Sqlite.Statement stmt; - - sql = """ - INSERT OR IGNORE INTO Queue (uuid, object_id, query, temp_id, args, date_added) - VALUES ($uuid, $object_id, $query, $temp_id, $args, $date_added); - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_str (stmt, "$uuid", queue.uuid); - set_parameter_str (stmt, "$object_id", queue.object_id); - set_parameter_str (stmt, "$query", queue.query); - set_parameter_str (stmt, "$temp_id", queue.temp_id); - set_parameter_str (stmt, "$args", queue.args); - set_parameter_str (stmt, "$date_added", queue.date_added); - - if (stmt.step () != Sqlite.DONE) { - warning ("Error: %d: %s", db.errcode (), db.errmsg ()); - } - - stmt.reset (); - } - - public Gee.ArrayList get_all_queue () { - Gee.ArrayList return_value = new Gee.ArrayList (); - Sqlite.Statement stmt; - - sql = """ - SELECT * FROM Queue ORDER BY date_added; - """; - - db.prepare_v2 (sql, sql.length, out stmt); - - while (stmt.step () == Sqlite.ROW) { - return_value.add (_fill_queue (stmt)); - } - stmt.reset (); - return return_value; - } - - public Objects.Queue _fill_queue (Sqlite.Statement stmt) { - Objects.Queue return_value = new Objects.Queue (); - return_value.uuid = stmt.column_text (0); - return_value.object_id = stmt.column_text (1); - return_value.query = stmt.column_text (2); - return_value.temp_id = stmt.column_text (3); - return_value.args = stmt.column_text (4); - return_value.date_added = stmt.column_text (5); - return return_value; - } - - public void insert_CurTempIds (string id, string temp_id, string object) { // vala-lint=naming-convention - Sqlite.Statement stmt; - - sql = """ - INSERT OR IGNORE INTO CurTempIds (id, temp_id, object) - VALUES ($id, $temp_id, $object); - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_str (stmt, "$id", id); - set_parameter_str (stmt, "$temp_id", temp_id); - set_parameter_str (stmt, "$object", object); - - if (stmt.step () != Sqlite.DONE) { - warning ("Error: %d: %s", db.errcode (), db.errmsg ()); - } - - stmt.reset (); - } - - public bool curTempIds_exists (int64 id) { // vala-lint=naming-convention - bool returned = false; - Sqlite.Statement stmt; - - sql = """ - SELECT COUNT (*) FROM CurTempIds WHERE id = $id; - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_int64 (stmt, "$id", id); - - if (stmt.step () == Sqlite.ROW) { - returned = stmt.column_int (0) > 0; - } - - stmt.reset (); - return returned; - } - - public string get_temp_id (int64 id) { - string returned = ""; - Sqlite.Statement stmt; - - sql = """ - SELECT temp_id FROM CurTempIds WHERE id = $id; - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_int64 (stmt, "$id", id); - - if (stmt.step () == Sqlite.ROW) { - returned = stmt.column_text (0); - } - - stmt.reset (); - return returned; - } - - public void remove_CurTempIds (int64 id) { // vala-lint=naming-convention - Sqlite.Statement stmt; - - sql = """ - DELETE FROM CurTempIds WHERE id = $id; - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_int64 (stmt, "$id", id); - - if (stmt.step () != Sqlite.DONE) { - warning ("Error: %d: %s", db.errcode (), db.errmsg ()); - } - - stmt.reset (); - } - - public void remove_queue (string uuid) { - Sqlite.Statement stmt; - - sql = """ - DELETE FROM Queue WHERE uuid = $uuid; - """; - - db.prepare_v2 (sql, sql.length, out stmt); - set_parameter_str (stmt, "$uuid", uuid); - - if (stmt.step () != Sqlite.DONE) { - warning ("Error: %d: %s", db.errcode (), db.errmsg ()); - } - - stmt.reset (); - } - - // PARAMETER REGION - private void set_parameter_int (Sqlite.Statement? stmt, string par, int val) { - int par_position = stmt.bind_parameter_index (par); - stmt.bind_int (par_position, val); - } - - private void set_parameter_int64 (Sqlite.Statement? stmt, string par, int64 val) { - int par_position = stmt.bind_parameter_index (par); - stmt.bind_int64 (par_position, val); - } - private void set_parameter_str (Sqlite.Statement? stmt, string par, string val) { - int par_position = stmt.bind_parameter_index (par); - stmt.bind_text (par_position, val); - } - - private void set_parameter_bool (Sqlite.Statement? stmt, string par, bool val) { - int par_position = stmt.bind_parameter_index (par); - stmt.bind_int (par_position, val ? 1 : 0); - } - - private bool get_parameter_bool (Sqlite.Statement stmt, int col) { - return stmt.column_int (col) == 1; - } -} diff --git a/quick-add/Services/Todoist.vala b/quick-add/Services/Todoist.vala deleted file mode 100644 index c164191a2..000000000 --- a/quick-add/Services/Todoist.vala +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Copyright © 2019 Alain M. (https://github.com/alainm23/planner) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Services.Todoist : GLib.Object { - private Soup.Session session; - private Json.Parser parser; - - private const string TODOIST_SYNC_URL = "https://api.todoist.com/sync/v9/sync"; - - private static Todoist? _instance; - public static Todoist get_default () { - if (_instance == null) { - _instance = new Todoist (); - } - - return _instance; - } - - - public Todoist () { - session = new Soup.Session (); - parser = new Json.Parser (); - } - - public async string? add (Objects.BaseObject object) { - string temp_id = Util.get_default ().generate_string (); - string uuid = Util.get_default ().generate_string (); - string? id = null; - - string url = "%s?commands=%s".printf ( - TODOIST_SYNC_URL, - object.get_add_json (temp_id, uuid) - ); - - var message = new Soup.Message ("POST", url); - message.request_headers.append ("Authorization", "Bearer %s".printf (Services.Settings.get_default ().settings.get_string ("todoist-access-token"))); - - try { - GLib.Bytes stream = yield session.send_and_read_async (message, GLib.Priority.HIGH, null); - parser.load_from_data ((string) stream.get_data ()); - - // Debug - print_root (parser.get_root ()); - - var sync_status = parser.get_root ().get_object ().get_object_member ("sync_status"); - var uuid_member = sync_status.get_member (uuid); - - if (uuid_member.get_node_type () == Json.NodeType.VALUE) { - Services.Settings.get_default ().settings.set_string ("todoist-sync-token", parser.get_root ().get_object ().get_string_member ("sync_token")); - id = parser.get_root ().get_object ().get_object_member ("temp_id_mapping").get_string_member (temp_id); - } else { - debug_error ( - (int32) sync_status.get_object_member (uuid).get_int_member ("http_code"), - sync_status.get_object_member (uuid).get_string_member ("error") - ); - } - } catch (Error e) { - if (Util.get_default ().is_todoist_error ((int32) message.status_code)) { - debug_error ( - (int32) message.status_code, - Util.get_default ().get_todoist_error ((int32) message.status_code) - ); - } else if ((int32) message.status_code == 0) { - debug_error ( - (int32) message.status_code, - e.message - ); - } else { - id = Util.get_default ().generate_id (); - - object.id = id; - - var queue = new Objects.Queue (); - queue.uuid = uuid; - queue.object_id = id; - queue.temp_id = temp_id; - queue.query = object.type_add; - queue.args = object.to_json (); - - Services.Database.get_default ().insert_queue (queue); - Services.Database.get_default ().insert_CurTempIds (object.id, temp_id, object.object_type_string); - } - } - - return id; - } - - private void debug_error (int status_code, string message) { - debug ("Code: %d - %s".printf (status_code, message)); - } - - private void print_root (Json.Node root) { - Json.Generator generator = new Json.Generator (); - generator.set_root (root); - debug (generator.to_data (null) + "\n"); - } -} \ No newline at end of file diff --git a/quick-add/Util.vala b/quick-add/Util.vala deleted file mode 100644 index fa2ca4fc1..000000000 --- a/quick-add/Util.vala +++ /dev/null @@ -1,527 +0,0 @@ -public class Util : GLib.Object { - private static Util? _instance; - public static Util get_default () { - if (_instance == null) { - _instance = new Util (); - } - - return _instance; - } - - public string generate_id (int len=10) { - string allowed_characters = "0123456789"; - - var password_builder = new StringBuilder (); - for (var i = 0; i < len; i++) { - var random_index = Random.int_range (0, allowed_characters.length); - password_builder.append_c (allowed_characters[random_index]); - } - - if (int64.parse (password_builder.str) <= 0) { - return generate_id (); - } - - return password_builder.str; - } - - public string generate_string () { - string allowed_characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789"; - - var password_builder = new StringBuilder (); - for (var i = 0; i < 36; i++) { - var random_index = Random.int_range (0, allowed_characters.length); - password_builder.append_c (allowed_characters[random_index]); - } - - return password_builder.str; - } - - public string generate_temp_id () { - return "_" + generate_id (13).to_string (); - } - - public string get_encode_text (string text) { - return text.replace ("&", "%26").replace ("#", "%23"); - } - - public void update_theme () { - string _css = """ - @define-color window_bg_color %s; - @define-color popover_bg_color %s; - @define-color sidebar_bg_color %s; - @define-color item_border_color %s; - @define-color upcoming_bg_color %s; - @define-color upcoming_fg_color %s; - @define-color selected_color %s; - """; - - int appearance_mode = Services.Settings.get_default ().settings.get_enum ("appearance"); - bool dark_mode = Services.Settings.get_default ().settings.get_boolean ("dark-mode"); - bool system_appearance = Services.Settings.get_default ().settings.get_boolean ("system-appearance"); - - var granite_settings = Granite.Settings.get_default (); - - if (system_appearance) { - dark_mode = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK; - } - - var provider = new Gtk.CssProvider (); - - string window_bg_color = ""; - string popover_bg_color = ""; - string sidebar_bg_color = ""; - string item_border_color = ""; - string upcoming_bg_color = ""; - string upcoming_fg_color = ""; - string selected_color = ""; - - if (dark_mode) { - if (appearance_mode == 1) { - window_bg_color = "#151515"; - popover_bg_color = "shade(#151515, 1.4)"; - sidebar_bg_color = "#1e1e1e"; - item_border_color = "#333333"; - upcoming_bg_color = "#313234"; - upcoming_fg_color = "#ededef"; - selected_color = "@popover_bg_color"; - Adw.StyleManager.get_default ().set_color_scheme (Adw.ColorScheme.FORCE_DARK); - } else if (appearance_mode == 2) { - window_bg_color = "#0B0B11"; - popover_bg_color = "#15151B"; - sidebar_bg_color = "#15161b"; - item_border_color = "shade(#333333, 1.35)"; - upcoming_bg_color = "#313234"; - upcoming_fg_color = "#ededef"; - selected_color = "@popover_bg_color"; - Adw.StyleManager.get_default ().set_color_scheme (Adw.ColorScheme.FORCE_DARK); - } - } else { - window_bg_color = "#ffffff"; - popover_bg_color = "#ffffff"; - sidebar_bg_color = "#fafafa"; - item_border_color = "@borders"; - upcoming_bg_color = "#ededef"; - upcoming_fg_color = "shade(#ededef, 0)"; - selected_color = "alpha(@shade_color, 0.65)"; - Adw.StyleManager.get_default ().set_color_scheme (Adw.ColorScheme.FORCE_LIGHT); - } - - var css = _css.printf ( - window_bg_color, - popover_bg_color, - sidebar_bg_color, - item_border_color, - upcoming_bg_color, - upcoming_fg_color, - selected_color - ); - - provider.load_from_string (css); - - Gtk.StyleContext.add_provider_for_display ( - Gdk.Display.get_default (), provider, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION - ); - } - - /* - Icons - */ - - private Gee.HashMap? _dynamic_icons; - public Gee.HashMap dynamic_icons { - get { - if (_dynamic_icons == null) { - _dynamic_icons = new Gee.HashMap (); - _dynamic_icons.set ("planner-calendar", true); - _dynamic_icons.set ("planner-search", true); - _dynamic_icons.set ("planner-plus", true); - _dynamic_icons.set ("chevron-right", true); - _dynamic_icons.set ("chevron-down", true); - _dynamic_icons.set ("chevron-left", true); - _dynamic_icons.set ("planner-plus-circle", true); - _dynamic_icons.set ("planner-refresh", true); - _dynamic_icons.set ("planner-edit", true); - _dynamic_icons.set ("planner-trash", true); - _dynamic_icons.set ("planner-star", true); - _dynamic_icons.set ("planner-note", true); - _dynamic_icons.set ("planner-close-circle", true); - _dynamic_icons.set ("planner-check-circle", true); - _dynamic_icons.set ("planner-flag", true); - _dynamic_icons.set ("dots-horizontal", true); - _dynamic_icons.set ("planner-tag", true); - _dynamic_icons.set ("planner-pinned", true); - _dynamic_icons.set ("planner-settings", true); - _dynamic_icons.set ("planner-bell", true); - _dynamic_icons.set ("sidebar-left", true); - _dynamic_icons.set ("sidebar-right", true); - _dynamic_icons.set ("planner-mail", true); - _dynamic_icons.set ("planner-note", true); - _dynamic_icons.set ("planner-settings-sliders", true); - _dynamic_icons.set ("planner-list", true); - _dynamic_icons.set ("planner-board", true); - _dynamic_icons.set ("color-swatch", true); - _dynamic_icons.set ("emoji-happy", true); - _dynamic_icons.set ("planner-clipboard", true); - _dynamic_icons.set ("planner-copy", true); - _dynamic_icons.set ("planner-rotate", true); - _dynamic_icons.set ("planner-section", true); - _dynamic_icons.set ("unordered-list", true); - _dynamic_icons.set ("menu", true); - } - - return _dynamic_icons; - } - } - - public bool is_dynamic_icon (string icon_name) { - return dynamic_icons.has_key (icon_name); - } - - /* - DateTime - */ - - public GLib.DateTime? get_todoist_datetime (string date) { - if (date == "") { - return null; - } - - GLib.DateTime datetime = null; - - // YYYY-MM-DD - if (date.length == 10) { - var _date = date.split ("-"); - - datetime = new GLib.DateTime.local ( - int.parse (_date [0]), - int.parse (_date [1]), - int.parse (_date [2]), - 0, - 0, - 0 - ); - // YYYY-MM-DDTHH:MM:SS - } else if (date.length == 19) { - var _date = date.split ("T") [0].split ("-"); - var _time = date.split ("T") [1].split (":"); - - datetime = new GLib.DateTime.local ( - int.parse (_date [0]), - int.parse (_date [1]), - int.parse (_date [2]), - int.parse (_time [0]), - int.parse (_time [1]), - int.parse (_time [2]) - ); - // YYYY-MM-DDTHH:MM:SSZ - } else { - var _date = date.split ("T") [0].split ("-"); - datetime = new GLib.DateTime.local ( - int.parse (_date [0]), - int.parse (_date [1]), - int.parse (_date [2]), - 0, - 0, - 0 - ); - } - - return datetime; - } - - public string get_relative_date_from_date (GLib.DateTime datetime) { - string returned = ""; - - if (is_today (datetime)) { - returned = _("Today"); - } else if (is_tomorrow (datetime)) { - returned = _("Tomorrow"); - } else if (is_yesterday (datetime)) { - returned = _("Yesterday"); - } else { - returned = get_default_date_format_from_date (datetime); - } - - if (has_time (datetime)) { - returned = "%s %s".printf (returned, datetime.format (get_default_time_format ())); - } - - return returned; - } - - public bool has_time (GLib.DateTime datetime) { - if (datetime == null) { - return false; - } - - bool returned = true; - if (datetime.get_hour () == 0 && datetime.get_minute () == 0 && datetime.get_second () == 0) { - returned = false; - } - return returned; - } - - public string get_default_time_format () { - return Granite.DateTime.get_default_time_format ( - is_clock_format_12h (), false - ); - } - - public bool is_clock_format_12h () { - return Services.Settings.get_default ().settings.get_string ("clock-format").contains ("12h"); - } - - public string get_calendar_icon (GLib.DateTime date) { - if (is_today (date)) { - return "planner-today"; - } else { - return "planner-scheduled"; - } - } - - public bool is_today (GLib.DateTime date) { - return Granite.DateTime.is_same_day (date, new GLib.DateTime.now_local ()); - } - - public bool is_tomorrow (GLib.DateTime date) { - return Granite.DateTime.is_same_day (date, new GLib.DateTime.now_local ().add_days (1)); - } - - public bool is_yesterday (GLib.DateTime date) { - return Granite.DateTime.is_same_day (date, new GLib.DateTime.now_local ().add_days (-1)); - } - - public bool is_same_day (GLib.DateTime day1, GLib.DateTime day2) { - return Granite.DateTime.is_same_day (day1, day2); - } - - public bool is_overdue (GLib.DateTime date) { - if (get_format_date (date).compare (get_format_date (new DateTime.now_local ())) == -1) { - return true; - } - - return false; - } - - public GLib.DateTime get_format_date (GLib.DateTime date) { - return new DateTime.local ( - date.get_year (), - date.get_month (), - date.get_day_of_month (), - 0, - 0, - 0 - ); - } - - public GLib.DateTime next_recurrency (GLib.DateTime datetime, Objects.DueDate duedate) { - GLib.DateTime returned = datetime; - - if (duedate.recurrency_type == RecurrencyType.EVERY_DAY) { - returned = returned.add_days (duedate.recurrency_interval); - } else if (duedate.recurrency_type == RecurrencyType.EVERY_WEEK) { - returned = returned.add_days (duedate.recurrency_interval * 7); - } else if (duedate.recurrency_type == RecurrencyType.EVERY_MONTH) { - returned = returned.add_months (duedate.recurrency_interval); - } else if (duedate.recurrency_type == RecurrencyType.EVERY_YEAR) { - returned = returned.add_years (duedate.recurrency_interval); - } - - return returned; - } - - public string next_x_recurrency (GLib.DateTime datetime, Objects.DueDate duedate) { - string[] list = {"", ""}; - GLib.DateTime _datetime = datetime; - - for (int i = 0; i < 1; i++) { - _datetime = next_recurrency (_datetime, duedate); - string text = Util.get_default ().get_default_date_format_from_date (_datetime); - list[i] = text; - } - - list[1] = "…"; - - return string.joinv (", ", list); - } - - public string get_default_date_format_from_date (GLib.DateTime date) { - var format = date.format (Granite.DateTime.get_default_date_format ( - false, - true, - date.get_year () != new GLib.DateTime.now_local ().get_year () - )); - return format; - } - - public bool is_todoist_error (int status_code) { - return (status_code == 400 || status_code == 401 || - status_code == 403 || status_code == 404 || - status_code == 429 || status_code == 500 || - status_code == 503); - } - - public string get_todoist_error (int code) { - var messages = new Gee.HashMap (); - - messages.set (400, _("The request was incorrect.")); - messages.set (401, _("Authentication is required, and has failed, or has not yet been provided.")); - messages.set (403, _("The request was valid, but for something that is forbidden.")); - messages.set (404, _("The requested resource could not be found.")); - messages.set (429, _("The user has sent too many requests in a given amount of time.")); - messages.set (500, _("The request failed due to a server error.")); - messages.set (503, _("The server is currently unable to handle the request.")); - - return messages.get (code); - } - - /* - Calendar Utils - */ - - public int get_days_of_month (int index, int year_nav) { - if ((index == 1) || (index == 3) || (index == 5) || (index == 7) || (index == 8) || (index == 10) || (index == 12)) { // vala-lint=line-length - return 31; - } else { - if (index == 2) { - if (year_nav % 4 == 0) { - return 29; - } else { - return 28; - } - } else { - return 30; - } - } - } - - public GLib.DateTime get_start_of_month (owned GLib.DateTime? date = null) { - if (date == null) { - date = new GLib.DateTime.now_local (); - } - - return new GLib.DateTime.local (date.get_year (), date.get_month (), 1, 0, 0, 0); - } - - public bool is_current_month (GLib.DateTime date) { - var now = new GLib.DateTime.now_local (); - - if (date.get_year () == now.get_year ()) { - if (date.get_month () == now.get_month ()) { - return true; - } else { - return false; - } - } else { - return false; - } - } - - public string get_todoist_datetime_format (GLib.DateTime date) { - string returned = ""; - - if (has_time (date)) { - returned = date.format ("%F") + "T" + date.format ("%T"); - } else { - returned = date.format ("%F"); - } - - return returned; - } - - private Gee.HashMap? providers; - public void set_widget_color (string color, Gtk.Widget widget) { - if (providers == null) { - providers = new Gee.HashMap (); - } - - if (!providers.has_key (color)) { - string style = """ - @define-color colorAccent %s; - @define-color accent_color %s; - """.printf (color, color); - - var style_provider = new Gtk.CssProvider (); - style_provider.load_from_string (style); - - providers[color] = style_provider; - } - - unowned Gtk.StyleContext style_context = widget.get_style_context (); - style_context.add_provider (providers[color], Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - } - - private Gee.HashMap? colors; - public Gee.HashMap get_colors () { - if (colors == null) { - colors = new Gee.HashMap (); - - colors.set ("berry_red", new Objects.Color (30, _("Berry Red"), "#b8256f")); - colors.set ("#b8256f", new Objects.Color (30, _("Berry Red"), "berry_red")); - - colors.set ("red", new Objects.Color (31, _("Red"), "#db4035")); - colors.set ("#db4035", new Objects.Color (31, _("Red"), "red")); - - colors.set ("orange", new Objects.Color (32, _("Orange"), "#ff9933")); - colors.set ("#ff9933", new Objects.Color (32, _("Orange"), "orange")); - - colors.set ("yellow", new Objects.Color (33, _("Olive Green"), "#fad000")); - colors.set ("#fad000", new Objects.Color (33, _("Olive Green"), "yellow")); - - colors.set ("olive_green", new Objects.Color (34, _("Yellow"), "#afb83b")); - colors.set ("#afb83b", new Objects.Color (34, _("Yellow"), "olive_green")); - - colors.set ("lime_green", new Objects.Color (35, _("Lime Green"), "#7ecc49")); - colors.set ("#7ecc49", new Objects.Color (35, _("Lime Green"), "lime_green")); - - colors.set ("green", new Objects.Color (36, _("Green"), "#299438")); - colors.set ("#299438", new Objects.Color (36, _("Green"), "green")); - - colors.set ("mint_green", new Objects.Color (37, _("Mint Green"), "#6accbc")); - colors.set ("#6accbc", new Objects.Color (37, _("Mint Green"), "mint_green")); - - colors.set ("teal", new Objects.Color (38, _("Teal"), "#158fad")); - colors.set ("#158fad", new Objects.Color (38, _("Teal"), "teal")); - - colors.set ("sky_blue", new Objects.Color (39, _("Sky Blue"), "#14aaf5")); - colors.set ("#14aaf5", new Objects.Color (39, _("Sky Blue"), "sky_blue")); - - colors.set ("light_blue", new Objects.Color (40, _("Light Blue"), "#96c3eb")); - colors.set ("#96c3eb", new Objects.Color (40, _("Light Blue"), "light_blue")); - - colors.set ("blue", new Objects.Color (41, _("Blue"), "#4073ff")); - colors.set ("#4073ff", new Objects.Color (41, _("Blue"), "blue")); - - colors.set ("grape", new Objects.Color (42, _("Grape"), "#884dff")); - colors.set ("#884dff", new Objects.Color (42, _("Grape"), "grape")); - - colors.set ("violet", new Objects.Color (43, _("Violet"), "#af38eb")); - colors.set ("#af38eb", new Objects.Color (43, _("Violet"), "violet")); - - colors.set ("lavender", new Objects.Color (44, _("Lavander"), "#eb96eb")); - colors.set ("#eb96eb", new Objects.Color (44, _("Lavander"), "lavender")); - - colors.set ("magenta", new Objects.Color (45, _("Magenta"), "#e05194")); - colors.set ("#e05194", new Objects.Color (45, _("Magenta"), "magenta")); - - colors.set ("salmon", new Objects.Color (46, _("Salmon"), "#ff8d85")); - colors.set ("#ff8d85", new Objects.Color (46, _("Salmon"), "salmon")); - - colors.set ("charcoal", new Objects.Color (47, _("Charcoal"), "#808080")); - colors.set ("#808080", new Objects.Color (47, _("Charcoal"), "charcoal")); - - colors.set ("grey", new Objects.Color (48, _("Grey"), "#b8b8b8")); - colors.set ("#b8b8b8", new Objects.Color (48, _("Grey"), "grey")); - - colors.set ("taupe", new Objects.Color (49, _("Taupe"), "#ccac93")); - colors.set ("#ccac93", new Objects.Color (49, _("Taupe"), "taupe")); - } - - return colors; - } - - public string get_color (string key) { - return get_colors ().get (key).hexadecimal; - } -} \ No newline at end of file diff --git a/quick-add/Widgets/HeaderItem.vala b/quick-add/Widgets/HeaderItem.vala deleted file mode 100644 index bedc84e27..000000000 --- a/quick-add/Widgets/HeaderItem.vala +++ /dev/null @@ -1,277 +0,0 @@ - - -public class Widgets.HeaderItem : Gtk.Grid { - public string _header_title; - public string? header_title { - get { - return _header_title; - } - - set { - _header_title = value; - name_label.label = _header_title; - } - } - - public string _add_tooltip; - public string add_tooltip { - get { - return _add_tooltip; - } - - set { - _add_tooltip = value; - add_button.tooltip_markup = value; - } - } - - public string _placeholder_message; - public string placeholder_message { - get { - return _placeholder_message; - } - - set { - _placeholder_message = value; - placeholder_label.label = _placeholder_message; - } - } - - public bool reveal { - get { - return content_revealer.reveal_child; - } - - set { - content_revealer.reveal_child = value; - } - } - - public Gtk.ListBox items { - get { - return listbox; - } - } - - private Gtk.Label name_label; - private Gtk.Label placeholder_label; - private Gtk.ListBox listbox; - private Gtk.Button add_button; - private Gtk.Stack action_stack; - private Gtk.Grid content_grid; - public Gtk.Box header_box; - private Gtk.Revealer action_revealer; - private Gtk.Revealer content_revealer; - private Gtk.Revealer separator_revealer; - - public signal void add_activated (); - public signal void row_activated (Gtk.Widget widget); - - public bool is_loading { - set { - action_stack.visible_child_name = value ? "spinner" : "button"; - } - } - - public bool show_action { - set { - action_revealer.reveal_child = value; - } - } - - public bool show_separator { - set { - separator_revealer.reveal_child = value; - } - } - - public bool reveal_child { - set { - content_revealer.reveal_child = value; - } - } - - public bool card { - set { - if (value) { - content_grid.add_css_class (Granite.STYLE_CLASS_CARD); - } else { - content_grid.remove_css_class (Granite.STYLE_CLASS_CARD); - } - } - } - - public bool separator_space { - set { - if (value) { - listbox.add_css_class ("listbox-separator-3"); - } - } - } - - public HeaderItem (string? header_title) { - Object ( - header_title: header_title - ); - } - - construct { - name_label = new Gtk.Label (null) { - halign = Gtk.Align.START - }; - - name_label.add_css_class (Granite.STYLE_CLASS_H4_LABEL); - name_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); - - listbox = new Gtk.ListBox () { - hexpand = true - }; - - listbox.set_placeholder (get_placeholder ()); - listbox.add_css_class ("bg-transparent"); - - content_grid = new Gtk.Grid () { - margin_end = 1 - }; - - content_grid.add_css_class (Granite.STYLE_CLASS_CARD); - content_grid.add_css_class ("padding-3"); - content_grid.attach (listbox, 0, 0, 1, 1); - - var add_image = new Widgets.DynamicIcon () { - valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER, - }; - add_image.size = 21; - add_image.update_icon_name ("planner-plus-circle"); - - add_button = new Gtk.Button () { - valign = Gtk.Align.CENTER, - can_focus = false - }; - - add_button.child = add_image; - - add_button.add_css_class (Granite.STYLE_CLASS_FLAT); - add_button.add_css_class ("p3"); - - var spinner_loading = new Gtk.Spinner () { - valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER, - spinning = true - }; - - spinner_loading.start (); - - action_stack = new Gtk.Stack () { - halign = Gtk.Align.END, - hexpand = true, - valign = Gtk.Align.CENTER, - transition_type = Gtk.StackTransitionType.CROSSFADE - }; - - action_stack.add_named (add_button, "button"); - action_stack.add_named (spinner_loading, "spinner"); - - action_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.CROSSFADE, - reveal_child = true - }; - - action_revealer.child = action_stack; - - header_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { - hexpand = true, - margin_start = 6, - margin_end = 3 - }; - - header_box.append (name_label); - header_box.append (action_revealer); - - var separator = new Gtk.Separator (Gtk.Orientation.HORIZONTAL) { - margin_top = 3, - margin_start = 3, - margin_bottom = 3 - }; - - separator_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN - }; - - separator_revealer.child = separator; - - var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - hexpand = true, - margin_start = 3, - margin_top = 3, - margin_bottom = 3 - }; - - content_box.append (header_box); - content_box.append (separator_revealer); - content_box.append (content_grid); - - content_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN - }; - - content_revealer.child = content_box; - - attach(content_revealer, 0, 0); - - add_button.clicked.connect (() => { - add_activated (); - }); - - listbox.row_activated.connect ((row) => { - row_activated (row); - }); - } - - private Gtk.Widget get_placeholder () { - placeholder_label = new Gtk.Label (null) { - wrap = true, - justify = Gtk.Justification.CENTER - }; - - placeholder_label.add_css_class ("dim-label"); - placeholder_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); - - var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - margin_top = 12, - margin_bottom = 12, - margin_start = 12, - margin_end = 12, - }; - - content_box.append (placeholder_label); - - return content_box; - } - - - public void add_child (Gtk.Widget widget) { - listbox.append (widget); - } - - public void remove_child (Gtk.Widget widget) { - listbox.remove (widget); - } - - public void check_visibility (int size) { - content_revealer.reveal_child = size > 0; - } - - public void set_sort_func (Gtk.ListBoxSortFunc? sort_func) { - listbox.set_sort_func (sort_func); - } - - public void set_filter_func (Gtk.ListBoxFilterFunc? filter_func) { - listbox.set_filter_func (filter_func); - } - - public void invalidate_filter () { - listbox.invalidate_filter (); - } -} \ No newline at end of file diff --git a/quick-add/Widgets/HyperTextView.vala b/quick-add/Widgets/HyperTextView.vala deleted file mode 100644 index 4367aa5d2..000000000 --- a/quick-add/Widgets/HyperTextView.vala +++ /dev/null @@ -1,78 +0,0 @@ -public class Widgets.HyperTextView : Granite.HyperTextView { - public string placeholder_text { get; construct; } - - private uint changed_timeout_id { get; set; default = 0; } - - public signal void updated (); - - public bool is_valid { - get { - return buffer_get_text () != ""; - } - } - - public HyperTextView (string placeholder_text) { - Object ( - placeholder_text: placeholder_text - ); - } - - construct { - buffer.changed.connect (changed_timeout); - - var gesture = new Gtk.EventControllerFocus (); - add_controller (gesture); - - gesture.enter.connect (() => { - if (buffer_get_text () == placeholder_text) { - buffer.text = ""; - opacity = 1; - } - }); - - gesture.leave.connect (() => { - if (buffer_get_text () == "") { - buffer.text = placeholder_text; - opacity = 0.7; - } - }); - - set_text (""); - } - - private string buffer_get_text () { - Gtk.TextIter start; - Gtk.TextIter end; - - buffer.get_start_iter (out start); - buffer.get_end_iter (out end); - - return buffer.get_text (start, end, true); - } - - public void set_text (string text) { - buffer.text = text; - if (buffer_get_text () == "") { - buffer.text = placeholder_text; - opacity = 0.7; - } else { - opacity = 1; - } - } - - public string get_text () { - return buffer_get_text () == placeholder_text ? "" : buffer_get_text (); - } - - private void changed_timeout () { - if (changed_timeout_id != 0) { - Source.remove (changed_timeout_id); - } - - changed_timeout_id = Timeout.add (Constants.UPDATE_TIMEOUT, () => { - changed_timeout_id = 0; - updated (); - return GLib.Source.REMOVE; - }); - } -} \ No newline at end of file diff --git a/quick-add/Widgets/ScheduleButton.vala b/quick-add/Widgets/ScheduleButton.vala deleted file mode 100644 index 6bf320c27..000000000 --- a/quick-add/Widgets/ScheduleButton.vala +++ /dev/null @@ -1,100 +0,0 @@ -public class Widgets.ScheduleButton : Gtk.Button { - private Gtk.Label due_label; - - private Gtk.Label repeat_label; - - private Gtk.Box schedule_box; - private Widgets.DynamicIcon due_image; - - private Widgets.DateTimePicker.DateTimePicker datetime_picker = null; - public GLib.DateTime datetime { get; set; } - - public signal void date_changed (GLib.DateTime? date); - - public ScheduleButton () { - Object ( - can_focus: false, - valign: Gtk.Align.CENTER, - halign: Gtk.Align.CENTER, - tooltip_text: _("Schedule") - ); - } - - construct { - add_css_class (Granite.STYLE_CLASS_FLAT); - add_css_class ("toolbar-button"); - - due_image = new Widgets.DynamicIcon (); - due_image.update_icon_name ("planner-calendar"); - due_image.size = 19; - - due_label = new Gtk.Label (_("Schedule")) { - xalign = 0 - }; - - - schedule_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 3); - schedule_box.append (due_image); - schedule_box.append (due_label); - - set_child (schedule_box); - - var gesture = new Gtk.GestureClick (); - gesture.set_button (1); - add_controller (gesture); - - gesture.pressed.connect ((n_press, x, y) => { - gesture.set_state (Gtk.EventSequenceState.CLAIMED); - open_datetime_picker (); - }); - } - - private void open_datetime_picker () { - if (datetime_picker == null) { - datetime_picker = new Widgets.DateTimePicker.DateTimePicker (); - datetime_picker.set_parent (this); - - datetime_picker.date_changed.connect (() => { - date_changed (datetime_picker.datetime); - }); - } - - datetime_picker.visible_no_date = false; - if (datetime != null) { - datetime_picker.visible_no_date = true; - datetime_picker.datetime = datetime; - } - - datetime_picker.popup (); - } - - public void update_from_item (Objects.Item item) { - due_label.label = _("Schedule"); - tooltip_text = _("Schedule"); - repeat_label.label = ""; - - due_image.update_icon_name ("planner-calendar"); - datetime = null; - - if (item.has_due) { - datetime = new GLib.DateTime.local ( - item.due.datetime.get_year (), - item.due.datetime.get_month (), - item.due.datetime.get_day_of_month (), - item.due.datetime.get_hour (), - item.due.datetime.get_minute (), - item.due.datetime.get_second () - ); - - due_label.label = Util.get_default ().get_relative_date_from_date (item.due.datetime); - - if (Util.get_default ().is_today (item.due.datetime)) { - due_image.update_icon_name ("planner-today"); - } else if (Util.get_default ().is_overdue (item.due.datetime)) { - - } else { - due_image.update_icon_name ("planner-scheduled"); - } - } - } -} \ No newline at end of file diff --git a/quick-add/meson.build b/quick-add/meson.build index 8d12006d3..d74f05ba2 100644 --- a/quick-add/meson.build +++ b/quick-add/meson.build @@ -1,25 +1,8 @@ quick_find_sources = files( 'App.vala', 'MainWindow.vala', - 'Util.vala', - 'ObjectsPatch.vala', - 'Objects/BaseObject.vala', - 'Objects/Color.vala', - 'Objects/DueDate.vala', - 'Objects/Item.vala', - 'Objects/Project.vala', - 'Objects/Queue.vala', - - 'Services/Database.vala', 'Services/DBusClient.vala', - 'Services/Todoist.vala', - - 'Widgets/HyperTextView.vala', - 'Widgets/ProjectPickerRow.vala', - 'Widgets/IconColorProject.vala', - 'Widgets/HeaderItem.vala', - 'Widgets/ProjectPicker.vala' ) executable( diff --git a/src/App.vala b/src/App.vala index 25bd3580a..87a4d786a 100644 --- a/src/App.vala +++ b/src/App.vala @@ -59,6 +59,7 @@ public class Planify : Adw.Application { add_main_option_entries (OPTIONS); create_dir_with_parents ("/io.github.alainm23.planify"); + create_dir_with_parents ("/io.github.alainm23.planify/backups"); } protected override void activate () { @@ -67,7 +68,7 @@ public class Planify : Adw.Application { } if (version) { - print ("%s\n".printf (Build.VERSION)); + debug ("%s\n".printf (Build.VERSION)); return; } @@ -93,22 +94,17 @@ public class Planify : Adw.Application { var provider = new Gtk.CssProvider (); provider.load_from_resource ("/io/github/alainm23/planify/index.css"); + Gtk.StyleContext.add_provider_for_display ( Gdk.Display.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION ); Util.get_default ().update_theme (); - if (Services.Settings.get_default ().settings.get_string ("version") != Build.VERSION) { - Services.Settings.get_default ().settings.set_string ("version", Build.VERSION); - - // var dialog = new Dialogs.WhatsNew (); - // dialog.show (); - } - if (clear_database) { Util.get_default ().clear_database (_("Are you sure you want to reset all?"), - _("The process removes all stored information without the possibility of undoing it.")); + _("The process removes all stored information without the possibility of undoing it."), + main_window); } } @@ -120,8 +116,7 @@ public class Planify : Adw.Application { string reason = _( "Planify will automatically start when this device turns on " + - "and run when its window is closed so that it can send to-do notifications." - ); + "and run when its window is closed so that it can send to-do notifications."); var command = new GenericArray (2); foreach (unowned var arg in DAEMON_COMMAND) { command.add (arg); @@ -132,7 +127,7 @@ public class Planify : Adw.Application { try { return yield portal.request_background (window, reason, command, flags, null); } catch (Error e) { - print ("Error during portal request: %s".printf (e.message)); + debug ("Error during portal request: %s".printf (e.message)); return e is IOError.FAILED; } } diff --git a/src/Dialogs/Label.vala b/src/Dialogs/Label.vala index ca13ceb85..ef2dd9279 100644 --- a/src/Dialogs/Label.vala +++ b/src/Dialogs/Label.vala @@ -178,9 +178,15 @@ public class Dialogs.Label : Adw.Window { if (label.backend_type == BackendType.TODOIST) { submit_button.is_loading = true; Services.Todoist.get_default ().add.begin (label, (obj, res) => { - label.id = Services.Todoist.get_default ().add.end (res); - Services.Database.get_default ().insert_label (label); - hide_destroy (); + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + + if (response.status) { + label.id = response.data; + Services.Database.get_default ().insert_label (label); + hide_destroy (); + } else { + + } }); } else if (label.backend_type == BackendType.LOCAL) { diff --git a/src/Dialogs/Preferences/Pages/Backup.vala b/src/Dialogs/Preferences/Pages/Backup.vala new file mode 100644 index 000000000..42010cfce --- /dev/null +++ b/src/Dialogs/Preferences/Pages/Backup.vala @@ -0,0 +1,327 @@ +/* +* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 3 of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +* Boston, MA 02110-1301 USA +* +* Authored by: Alain M. +*/ + +public class Dialogs.Preferences.Pages.Backup : Adw.Bin { + private Gtk.Stack stack; + + public signal void pop_subpage (); + public signal void popup_toast (string message); + construct { + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Backups")); + + stack = new Gtk.Stack () { + hexpand = true, + vexpand = true, + transition_type = Gtk.StackTransitionType.SLIDE_LEFT_RIGHT + }; + + stack.add_named (get_backup_page (), "backup-page"); + + var toolbar_view = new Adw.ToolbarView (); + toolbar_view.add_top_bar (settings_header); + toolbar_view.content = stack; + + child = toolbar_view; + + settings_header.back_activated.connect (() => { + pop_subpage (); + }); + } + + private Gtk.Widget get_backup_page () { + var description_label = new Gtk.Label ( + _("Never worry about losing your data. You can create backups of your active projects, tasks and comments and import them later.") // vala-lint=line-length + ) { + justify = Gtk.Justification.FILL, + use_markup = true, + wrap = true, + xalign = 0, + margin_end = 6, + margin_start = 6 + }; + + var add_button = new Gtk.Button.with_label (_("Create backup")) { + margin_top = 12 + }; + + var import_button = new Gtk.Button.with_label (_("Import backup")); + + var backups_group = new Layouts.HeaderItem (_("Backups files")) { + margin_top = 12, + reveal = true + }; + + backups_group.set_sort_func (set_sort_func); + + var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) { + vexpand = true, + hexpand = true + }; + + content_box.append (description_label); + content_box.append (add_button); + content_box.append (import_button); + content_box.append (backups_group); + + var content_clamp = new Adw.Clamp () { + maximum_size = 400, + margin_start = 24, + margin_end = 24, + margin_top = 12, + margin_bottom = 12, + child = content_box + }; + + var scrolled_window = new Gtk.ScrolledWindow () { + hexpand = true, + vexpand = true, + hscrollbar_policy = Gtk.PolicyType.NEVER, + hscrollbar_policy = Gtk.PolicyType.NEVER, + child = content_clamp + }; + + add_button.clicked.connect (() => { + Services.Backups.get_default ().create_backup (); + }); + + import_button.clicked.connect (() => { + Services.Backups.get_default ().import_backup.begin ((obj, res) => { + GLib.File file = Services.Backups.get_default ().import_backup.end (res); + + var backup = new Objects.Backup.from_file (file); + + if (backup.valid ()) { + Gtk.Widget? import_page; + import_page = (Gtk.Widget) stack.get_child_by_name ("import-page"); + + if (import_page != null) { + stack.remove (import_page); + } + + stack.add_named (get_import_page (backup), "import-page"); + stack.set_visible_child_name ("import-page"); + } else { + debug ("%s", backup.error); + popup_toast (_("Selected file is invalid")); + } + }); + }); + + foreach (Objects.Backup backup in Services.Backups.get_default ().backups) { + add_backup_row (backup, backups_group); + } + + Services.Backups.get_default ().backup_added.connect ((backup) => { + add_backup_row (backup, backups_group); + }); + + return scrolled_window; + } + + private Gtk.Widget get_import_page (Objects.Backup backup) { + var title = new Gtk.Label (_("Import Overview")) { + halign = CENTER, + css_classes = { "h1" } + }; + var subtitle = new Gtk.Label (backup.title) { + halign = CENTER, + css_classes = { "dim-label" }, + margin_top = 3 + }; + + var todoist_row = new Adw.ActionRow (); + todoist_row.title = _("Todoist"); + todoist_row.add_suffix (generate_icon (backup.todoist_backend ? "object-select-symbolic" : "window-close-symbolic", 16)); + + var general_group = new Adw.PreferencesGroup () { + margin_top = 24 + }; + general_group.add (todoist_row); + + var projects_row = new Adw.ActionRow (); + projects_row.title = _("Projects"); + projects_row.add_suffix (new Gtk.Label (backup.projects.size.to_string ())); + + var sections_row = new Adw.ActionRow (); + sections_row.title = _("Sections"); + sections_row.add_suffix (new Gtk.Label (backup.sections.size.to_string ())); + + var items_row = new Adw.ActionRow (); + items_row.title = _("Items"); + items_row.add_suffix (new Gtk.Label (backup.items.size.to_string ())); + + var labels_row = new Adw.ActionRow (); + labels_row.title = _("Labels"); + labels_row.add_suffix (new Gtk.Label (backup.labels.size.to_string ())); + + var collection_group = new Adw.PreferencesGroup () { + margin_top = 24 + }; + + collection_group.add (projects_row); + collection_group.add (sections_row); + collection_group.add (items_row); + collection_group.add (labels_row); + + var cancel_button = new Gtk.Button.with_label (_("Cancel")) { + valign = CENTER, + css_classes = { "border-radius-6" } + }; + + var confirm_button = new Widgets.LoadingButton (LoadingButtonType.LABEL, _("Confirm")) { + valign = CENTER, + css_classes = { Granite.STYLE_CLASS_SUGGESTED_ACTION, "border-radius-6" } + }; + + var buttons_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + homogeneous = true, + hexpand = true, + vexpand = true, + valign = END, + margin_bottom = 12 + }; + buttons_box.append (cancel_button); + buttons_box.append (confirm_button); + + var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + vexpand = true, + hexpand = true + }; + + content_box.append (title); + content_box.append (subtitle); + content_box.append (general_group); + content_box.append (collection_group); + content_box.append (buttons_box); + + var content_clamp = new Adw.Clamp () { + maximum_size = 400, + margin_start = 24, + margin_end = 24, + margin_top = 12, + margin_bottom = 12, + child = content_box + }; + + var scrolled_window = new Gtk.ScrolledWindow () { + hexpand = true, + vexpand = true, + hscrollbar_policy = Gtk.PolicyType.NEVER, + hscrollbar_policy = Gtk.PolicyType.NEVER, + child = content_clamp + }; + + cancel_button.clicked.connect (() => { + stack.set_visible_child_name ("backup-page"); + }); + + confirm_button.clicked.connect (() => { + var dialog = new Adw.MessageDialog (Planify._instance.main_window, + _("Restore backup"), _("Are you sure you want to continue? This operation will delete your current data and replace it with the backup data.")); + + dialog.body_use_markup = true; + dialog.add_response ("cancel", _("Cancel")); + dialog.add_response ("restore", _("Restore Backup")); + dialog.set_response_appearance ("delete", Adw.ResponseAppearance.DESTRUCTIVE); + dialog.show (); + + dialog.response.connect ((response) => { + if (response == "restore") { + Services.Backups.get_default ().patch_backup (backup); + } + }); + }); + + return scrolled_window; + } + + private int set_sort_func (Gtk.ListBoxRow lbrow, Gtk.ListBoxRow lbbefore) { + Objects.Backup item1 = ((Widgets.BackupRow) lbrow).backup; + Objects.Backup item2 = ((Widgets.BackupRow) lbbefore).backup; + return item2.datetime.compare (item1.datetime); + } + + private void add_backup_row (Objects.Backup backup, Layouts.HeaderItem group) { + var row = new Widgets.BackupRow (backup); + group.insert_child (row, 0); + } + + private Gtk.Widget generate_icon (string icon_name, int size = 32) { + var icon = new Widgets.DynamicIcon.from_icon_name (icon_name); + icon.size = size; + return icon; + } +} + +public class Widgets.BackupRow : Gtk.ListBoxRow { + public Objects.Backup backup { get; construct; } + + public BackupRow (Objects.Backup backup) { + Object ( + backup: backup + ); + } + + construct { + add_css_class ("selectable-item"); + add_css_class ("transition"); + + var name_label = new Gtk.Label (backup.title); + name_label.valign = Gtk.Align.CENTER; + name_label.ellipsize = Pango.EllipsizeMode.END; + + var download_button = new Gtk.Button () { + valign = CENTER, + halign = END, + hexpand = true, + child = new Widgets.DynamicIcon.from_icon_name ("download"), + css_classes = { "flat" }, + tooltip_text = _("Download") + }; + + var content_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + margin_top = 3, + margin_start = 9, + margin_end = 3, + margin_bottom = 3 + }; + + content_box.append (new Widgets.DynamicIcon.from_icon_name ("file")); + content_box.append (name_label); + content_box.append (download_button); + + var main_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN, + child = content_box + }; + + child = main_revealer; + + Timeout.add (main_revealer.transition_duration, () => { + main_revealer.reveal_child = true; + return GLib.Source.REMOVE; + }); + + download_button.clicked.connect (() => { + Services.Backups.get_default ().save_file_as (backup); + }); + } +} diff --git a/src/Dialogs/Preferences/Pages/Sidebar.vala b/src/Dialogs/Preferences/Pages/Sidebar.vala new file mode 100644 index 000000000..9a6809d1e --- /dev/null +++ b/src/Dialogs/Preferences/Pages/Sidebar.vala @@ -0,0 +1,331 @@ +/* +* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 3 of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +* Boston, MA 02110-1301 USA +* +* Authored by: Alain M. +*/ + +public class Dialogs.Preferences.Pages.Sidebar : Adw.Bin { + + public signal void pop_subpage (); + public signal void popup_toast (string message); + + construct { + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Sidebar")); + + var views_group = new Layouts.HeaderItem (_("Show in sidebar")) { + separator_lines = true, + listbox_no_margin = true, + box_shadow = true, + reveal = true, + margin_top = 12 + }; + + var inbox_row = new Widgets.SidebarRow (FilterType.INBOX, _("Inbox"), "planner-inbox"); + var today_row = new Widgets.SidebarRow (FilterType.TODAY, _("Today"), "planner-today"); + var scheduled_row = new Widgets.SidebarRow (FilterType.SCHEDULED, _("Scheduled"), "planner-scheduled"); + var pinboard_row = new Widgets.SidebarRow (FilterType.PINBOARD, _("Pinboard"), "planner-pin-tack"); + var labels_row = new Widgets.SidebarRow (FilterType.LABELS, _("Labels"), "planner-tag-icon"); + + views_group.add_child (inbox_row); + views_group.add_child (today_row); + views_group.add_child (scheduled_row); + views_group.add_child (pinboard_row); + views_group.add_child (labels_row); + + var show_count_switch = new Gtk.Switch () { + valign = Gtk.Align.CENTER + }; + + var show_count_row = new Adw.ActionRow (); + show_count_row.title = _("Show task count"); + show_count_row.set_activatable_widget (show_count_switch); + show_count_row.add_suffix (show_count_switch); + + var count_group = new Adw.PreferencesGroup () { + margin_start = 3, + margin_end = 3, + margin_top = 12 + }; + count_group.add (show_count_row); + + var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); + content_box.append (count_group); + content_box.append (views_group); + content_box.append (new Gtk.Label (_("You can sort your views by dragging and dropping")) { + css_classes = { "small-label", "dim-label" }, + halign = START, + margin_start = 12, + margin_top = 3 + }); + + var content_clamp = new Adw.Clamp () { + maximum_size = 600, + margin_start = 24, + margin_end = 24, + margin_bottom = 24, + child = content_box + }; + + var scrolled_window = new Gtk.ScrolledWindow () { + hscrollbar_policy = Gtk.PolicyType.NEVER, + hexpand = true, + vexpand = true, + child = content_clamp + }; + + var toolbar_view = new Adw.ToolbarView () { + content = scrolled_window + }; + toolbar_view.add_top_bar (settings_header); + + child = toolbar_view; + Services.Settings.get_default ().settings.bind ("show-tasks-count", show_count_switch, "active", GLib.SettingsBindFlags.DEFAULT); + + views_group.set_sort_func ((child1, child2) => { + int item1 = ((Widgets.SidebarRow) child1).item_order (); + int item2 = ((Widgets.SidebarRow) child2).item_order (); + return item1 - item2; + }); + views_group.set_sort_func (null); + + settings_header.back_activated.connect (() => { + pop_subpage (); + }); + } +} + +public class Widgets.SidebarRow : Gtk.ListBoxRow { + public FilterType filter_type { get; construct; } + public string icon { get; construct; } + public string title { get; construct; } + + private Gtk.Box handle_grid; + private Gtk.CheckButton check_button; + + public bool active { + get { + return check_button.active; + } + } + + public SidebarRow (FilterType filter_type, string title, string icon) { + Object ( + filter_type: filter_type, + title: title, + icon: icon + ); + } + + construct { + add_css_class ("sidebar-row"); + add_css_class ("transition"); + + var name_label = new Gtk.Label (title); + name_label.valign = Gtk.Align.CENTER; + name_label.ellipsize = Pango.EllipsizeMode.END; + + check_button = new Gtk.CheckButton () { + valign = CENTER, + halign = END, + hexpand = true, + css_classes = { "flat" }, + active = check_active () + }; + + handle_grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 9) { + margin_top = 9, + margin_start = 9, + margin_end = 9, + margin_bottom = 9 + }; + + handle_grid.append (new Widgets.DynamicIcon.from_icon_name (icon) { + size = 19 + }); + handle_grid.append (name_label); + handle_grid.append (check_button); + + var main_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN, + child = handle_grid + }; + + child = main_revealer; + build_drag_and_drop (); + + Timeout.add (main_revealer.transition_duration, () => { + main_revealer.reveal_child = true; + return GLib.Source.REMOVE; + }); + + check_button.toggled.connect (() => { + updateView ( + get_views_array (), + filter_type.to_string (), + check_button.active + ); + }); + } + + private void updateView (Array views, string view, bool active) { + if (active) { + if (!find_view (views.data, view)) { + views.append_val (view); + } + } else { + int index = find_index (views.data, view); + if (index != -1) { + views.remove_index (index); + } + } + + Services.Settings.get_default ().settings.set_strv ("views-order-visible", views.data); + update_views_order ((Gtk.ListBox) parent); + } + + private Array get_views_array () { + string[] list = Services.Settings.get_default ().settings.get_strv ("views-order-visible"); + Array array = new Array (); + + foreach (string view in list) { + array.append_val (view); + } + + return array; + } + + private void build_drag_and_drop () { + var drag_source = new Gtk.DragSource (); + drag_source.set_actions (Gdk.DragAction.MOVE); + + drag_source.prepare.connect ((source, x, y) => { + return new Gdk.ContentProvider.for_value (this); + }); + + drag_source.drag_begin.connect ((source, drag) => { + var paintable = new Gtk.WidgetPaintable (handle_grid); + source.set_icon (paintable, 0, 0); + drag_begin (); + }); + + drag_source.drag_end.connect ((source, drag, delete_data) => { + drag_end (); + }); + + drag_source.drag_cancel.connect ((source, drag, reason) => { + drag_end (); + return false; + }); + + add_controller (drag_source); + + var drop_target = new Gtk.DropTarget (typeof (Widgets.SidebarRow), Gdk.DragAction.MOVE); + drop_target.preload = true; + + drop_target.drop.connect ((value, x, y) => { + var picked_widget = (Widgets.SidebarRow) value; + var target_widget = this; + + picked_widget.drag_end (); + target_widget.drag_end (); + + if (picked_widget == target_widget || target_widget == null) { + return false; + } + + var source_list = (Gtk.ListBox) picked_widget.parent; + var target_list = (Gtk.ListBox) target_widget.parent; + var position = 0; + + source_list.remove (picked_widget); + + if (target_widget.get_index () == 0) { + if (y > (target_widget.get_height () / 2)) { + position = target_widget.get_index () + 1; + } + } else { + position = target_widget.get_index () + 1; + } + + target_list.insert (picked_widget, position); + update_views_order (target_list); + + return true; + }); + + add_controller (drop_target); + } + + private void update_views_order (Gtk.ListBox listbox) { + Array list = new Array (); + unowned Widgets.SidebarRow? row = null; + var row_index = 0; + + do { + row = (Widgets.SidebarRow) listbox.get_row_at_index (row_index); + + if (row != null && row.active) { + list.append_val (row.filter_type.to_string ()); + } + + row_index++; + } while (row != null); + + Services.Settings.get_default ().settings.set_strv ("views-order-visible", list.data); + } + + public void drag_begin () { + handle_grid.add_css_class ("card"); + opacity = 0.3; + } + + public void drag_end () { + handle_grid.remove_css_class ("card"); + opacity = 1; + } + + public int item_order () { + var views_order = Services.Settings.get_default ().settings.get_strv ("views-order-visible"); + return find_index (views_order, filter_type.to_string ()); + } + + int find_index (string[] array, string elemento) { + for (int i = 0; i < array.length; i++) { + if (array[i] == elemento) { + return i; + } + } + + return -1; + } + + private bool check_active () { + var views_order = Services.Settings.get_default ().settings.get_strv ("views-order-visible"); + return find_view (views_order, filter_type.to_string ()); + } + + private bool find_view (string[] array, string elemento) { + for (int i = 0; i < array.length; i++) { + if (array[i] == elemento) { + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/src/Dialogs/Preferences/PreferencesWindow.vala b/src/Dialogs/Preferences/PreferencesWindow.vala index 9dcab7389..a71810d1c 100644 --- a/src/Dialogs/Preferences/PreferencesWindow.vala +++ b/src/Dialogs/Preferences/PreferencesWindow.vala @@ -20,8 +20,6 @@ */ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { - private string QUICK_ADD_COMMAND = "flatpak run --command=io.github.alainm23.planify.quick-add %s"; - public PreferencesWindow () { Object ( transient_for: (Gtk.Window) Planify.instance.main_window, @@ -48,7 +46,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { accounts_row.activatable = true; accounts_row.add_prefix (generate_icon ("planner-cloud")); accounts_row.add_suffix (generate_icon ("pan-end-symbolic", 16)); - accounts_row.title = _("Accounts"); + accounts_row.title = _("Integrations"); accounts_row.subtitle = _("Sync your favorite to-do providers."); accounts_row.activated.connect (() => { @@ -72,15 +70,15 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { push_subpage (get_general_page ()); }); - var homepage_row = new Adw.ActionRow (); - homepage_row.activatable = true; - homepage_row.add_prefix (generate_icon ("planner-home")); - homepage_row.add_suffix (generate_icon ("pan-end-symbolic", 16)); - homepage_row.title = _("Homepage"); - homepage_row.subtitle = _("Customize your homepage."); + var sidebar_row = new Adw.ActionRow (); + sidebar_row.activatable = true; + sidebar_row.add_prefix (generate_icon ("sidebar")); + sidebar_row.add_suffix (generate_icon ("pan-end-symbolic", 16)); + sidebar_row.title = _("Sidebar"); + sidebar_row.subtitle = _("Customize your sidebar."); - homepage_row.activated.connect (() => { - push_subpage (get_homepage_page ()); + sidebar_row.activated.connect (() => { + push_subpage (get_sidebar_page ()); }); var appearance_row = new Adw.ActionRow (); @@ -107,7 +105,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { var personalization_group = new Adw.PreferencesGroup (); personalization_group.add (general_row); - personalization_group.add (homepage_row); + personalization_group.add (sidebar_row); personalization_group.add (appearance_row); personalization_group.add (quick_add_row); @@ -124,7 +122,14 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { tutorial_row.title = _("Create Tutorial Project"); tutorial_row.subtitle = _("Learn the app step by step with a short tutorial project."); + var backups_row = new Adw.ActionRow (); + backups_row.activatable = true; + backups_row.add_prefix (generate_icon ("planner-upload")); + backups_row.add_suffix (generate_icon ("pan-end-symbolic", 16)); + backups_row.title = _("Backups"); + support_group.add (tutorial_row); + support_group.add (backups_row); page.add (support_group); var privacy_group = new Adw.PreferencesGroup (); @@ -144,20 +149,37 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { add_toast (Util.get_default ().create_toast (_("A tutorial project has been created."))); }); + backups_row.activated.connect (() => { + push_subpage (get_backups_page ()); + }); + delete_row.activated.connect (() => { destroy (); Util.get_default ().clear_database (_("Are you sure you want to reset all?"), - _("The process removes all stored information without the possibility of undoing it.")); + _("The process removes all stored information without the possibility of undoing it."), + Planify.instance.main_window); }); return page; } private Adw.NavigationPage get_general_page () { - var settings_header = new Widgets.SettingsHeader (_("General")); + var settings_header = new Dialogs.Preferences.SettingsHeader (_("General")); + + var home_page_model = new Gtk.StringList (null); + home_page_model.append (_("Inbox")); + home_page_model.append (_("Today")); + home_page_model.append (_("Scheduled")); + home_page_model.append (_("Labels")); + + var home_page_row = new Adw.ComboRow (); + home_page_row.title = _("Home Page"); + home_page_row.model = home_page_model; + home_page_row.selected = Services.Settings.get_default ().settings.get_enum ("homepage-item"); var general_group = new Adw.PreferencesGroup (); - general_group.title = _("Sort Settings"); + general_group.title = _("General"); + general_group.add (home_page_row); var sort_projects_model = new Gtk.StringList (null); sort_projects_model.append (_("Alphabetically")); @@ -168,8 +190,6 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { sort_projects_row.model = sort_projects_model; sort_projects_row.selected = Services.Settings.get_default ().settings.get_enum ("projects-sort-by"); - general_group.add (sort_projects_row); - var sort_order_projects_model = new Gtk.StringList (null); sort_order_projects_model.append (_("Ascending")); sort_order_projects_model.append (_("Descending")); @@ -179,7 +199,10 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { sort_order_projects_row.model = sort_order_projects_model; sort_order_projects_row.selected = Services.Settings.get_default ().settings.get_enum ("projects-ordered"); - general_group.add (sort_order_projects_row); + var sort_setting_group = new Adw.PreferencesGroup (); + sort_setting_group.title = _("Sort Settings"); + sort_setting_group.add (sort_order_projects_row); + sort_setting_group.add (sort_projects_row); var de_group = new Adw.PreferencesGroup (); de_group.title = _("DE Integration"); @@ -302,10 +325,11 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { underline_completed_row.set_activatable_widget (underline_completed_switch); underline_completed_row.add_suffix (underline_completed_switch); - // tasks_group.add (underline_completed_row); + tasks_group.add (underline_completed_row); var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12); content_box.append (general_group); + content_box.append (sort_setting_group); content_box.append (de_group); content_box.append (datetime_group); content_box.append (tasks_group); @@ -332,6 +356,10 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { var page = new Adw.NavigationPage (toolbar_view, "general"); + home_page_row.notify["selected"].connect (() => { + Services.Settings.get_default ().settings.set_enum ("homepage-item", (int) home_page_row.selected); + }); + sort_projects_row.notify["selected"].connect (() => { Services.Settings.get_default ().settings.set_enum ("projects-sort-by", (int) sort_projects_row.selected); }); @@ -383,124 +411,19 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { return page; } - private Adw.NavigationPage get_homepage_page () { - var settings_header = new Widgets.SettingsHeader (_("Homepage")); - - var description_label = new Gtk.Label ( - _("When you open up Planify, make sure you see the to-dos that are most important. The default homepage is your Inbox view, but you can change it to whatever you'd like.") // vala-lint=line-length - ) { - justify = Gtk.Justification.FILL, - use_markup = true, - wrap = true, - xalign = 0, - margin_top = 12, - margin_end = 6, - margin_start = 6 - }; - - var inbox_checkbutton = new Gtk.CheckButton () { - active = Services.Settings.get_default ().settings.get_enum ("homepage-item") == 0 - }; - var inbox_row = new Adw.ActionRow (); - - inbox_row.title = _("Inbox"); - inbox_row.add_prefix (generate_icon ("planner-inbox", 19)); - inbox_row.add_suffix (inbox_checkbutton); - inbox_row.set_activatable_widget (inbox_checkbutton); - - var today_checkbutton = new Gtk.CheckButton () { - active = Services.Settings.get_default ().settings.get_enum ("homepage-item") == 1 - }; - today_checkbutton.group = inbox_checkbutton; - - var today_row = new Adw.ActionRow (); - today_row.title = _("Today"); - today_row.add_prefix (generate_icon ("planner-today", 19)); - today_row.add_suffix (today_checkbutton); - today_row.set_activatable_widget (today_checkbutton); + private Adw.NavigationPage get_sidebar_page () { + var sidebar_page = new Dialogs.Preferences.Pages.Sidebar (); + var page = new Adw.NavigationPage (sidebar_page, "sidebar"); - var scheduled_checkbutton = new Gtk.CheckButton () { - active = Services.Settings.get_default ().settings.get_enum ("homepage-item") == 2 - }; - scheduled_checkbutton.group = inbox_checkbutton; - - var scheduled_row = new Adw.ActionRow (); - scheduled_row.title = _("Scheduled"); - scheduled_row.add_prefix (generate_icon ("planner-scheduled", 19)); - scheduled_row.add_suffix (scheduled_checkbutton); - scheduled_row.set_activatable_widget (scheduled_checkbutton); - - var labels_checkbutton = new Gtk.CheckButton () { - active = Services.Settings.get_default ().settings.get_enum ("homepage-item") == 3 - }; - labels_checkbutton.group = inbox_checkbutton; - - var labels_row = new Adw.ActionRow (); - labels_row.title = _("Labels"); - labels_row.add_prefix (generate_icon ("planner-tag-icon", 19)); - labels_row.add_suffix(labels_checkbutton); - labels_row.set_activatable_widget (labels_checkbutton); - - var group = new Adw.PreferencesGroup () { - margin_top = 12 - }; - - group.add (inbox_row); - group.add (today_row); - group.add (scheduled_row); - group.add (labels_row); - - var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12); - content_box.append (description_label); - content_box.append (group); - - var content_clamp = new Adw.Clamp () { - maximum_size = 600, - margin_start = 24, - margin_end = 24, - margin_bottom = 24 - }; - - content_clamp.child = content_box; - - var scrolled_window = new Gtk.ScrolledWindow () { - hscrollbar_policy = Gtk.PolicyType.NEVER, - hexpand = true, - vexpand = true - }; - scrolled_window.child = content_clamp; - - var toolbar_view = new Adw.ToolbarView (); - toolbar_view.add_top_bar (settings_header); - toolbar_view.content = scrolled_window; - - var page = new Adw.NavigationPage (toolbar_view, "homepage"); - - settings_header.back_activated.connect (() => { + sidebar_page.pop_subpage.connect (() => { pop_subpage (); }); - inbox_checkbutton.toggled.connect (() => { - Services.Settings.get_default ().settings.set_enum ("homepage-item", 0); - }); - - today_checkbutton.toggled.connect (() => { - Services.Settings.get_default ().settings.set_enum ("homepage-item", 1); - }); - - scheduled_checkbutton.toggled.connect (() => { - Services.Settings.get_default ().settings.set_enum ("homepage-item", 2); - }); - - labels_checkbutton.toggled.connect (() => { - Services.Settings.get_default ().settings.set_enum ("homepage-item", 3); - }); - return page; } private Adw.NavigationPage get_appearance_page () { - var settings_header = new Widgets.SettingsHeader (_("Appearance")); + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Appearance")); var appearance_group = new Adw.PreferencesGroup (); appearance_group.title = _("App Theme"); @@ -651,38 +574,8 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { return page; } - public bool is_dark_theme () { - var dark_mode = Services.Settings.get_default ().settings.get_boolean ("dark-mode"); - - if (Services.Settings.get_default ().settings.get_boolean ("system-appearance")) { - dark_mode = Granite.Settings.get_default ().prefers_color_scheme == Granite.Settings.ColorScheme.DARK; - } - - return dark_mode; - } - - public bool is_light_visible () { - bool system_appearance = Services.Settings.get_default ().settings.get_boolean ("system-appearance"); - - if (system_appearance) { - return !is_dark_theme (); - } - - return true; - } - - public bool is_dark_modes_visible () { - bool system_appearance = Services.Settings.get_default ().settings.get_boolean ("system-appearance"); - - if (system_appearance) { - return is_dark_theme (); - } - - return true; - } - private Adw.NavigationPage get_accounts_page () { - var settings_header = new Widgets.SettingsHeader (_("Accounts")); + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Accounts")); var default_group = new Adw.PreferencesGroup () { visible = Services.Todoist.get_default ().is_logged_in () @@ -705,17 +598,16 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { active = Services.Todoist.get_default ().is_logged_in () }; - var todoist_setting_image = new Widgets.DynamicIcon (); - todoist_setting_image.size = 16; - todoist_setting_image.update_icon_name ("planner-settings"); var todoist_setting_button = new Gtk.Button () { margin_end = 6, valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER + halign = Gtk.Align.CENTER, + child = new Widgets.DynamicIcon.from_icon_name ("planner-settings") { + size = 24 + }, + css_classes = { Granite.STYLE_CLASS_FLAT } }; - todoist_setting_button.child = todoist_setting_image; - todoist_setting_button.add_css_class (Granite.STYLE_CLASS_FLAT); var todoist_setting_revealer = new Gtk.Revealer () { transition_type = Gtk.RevealerTransitionType.CROSSFADE, @@ -771,7 +663,6 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { accounts_group.title = _("Accounts"); accounts_group.add (todoist_row); - // accounts_group.add (google_row); var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12); content_box.append (default_group); @@ -801,7 +692,9 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { if (todoist_switch.active) { todoist_switch.active = false; - Services.Todoist.get_default ().init (); + if (!Services.Todoist.get_default ().is_logged_in ()) { + push_subpage (get_oauth_todoist_page (todoist_switch)); + } } else { confirm_log_out (todoist_switch, BackendType.TODOIST); } @@ -873,7 +766,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { } private Adw.NavigationPage get_todoist_view () { - var settings_header = new Widgets.SettingsHeader (_("Todoist")); + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Todoist")); var todoist_avatar = new Adw.Avatar (84, Services.Settings.get_default ().settings.get_string ("todoist-user-name"), true); @@ -898,16 +791,6 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { user_box.append (todoist_user); user_box.append (todoist_email); - var default_group = new Adw.PreferencesGroup (); - - var content_clamp = new Adw.Clamp () { - maximum_size = 600, - margin_start = 24, - margin_end = 24 - }; - - content_clamp.child = default_group; - var sync_server_switch = new Gtk.Switch () { valign = Gtk.Align.CENTER, active = Services.Settings.get_default ().settings.get_boolean ("todoist-sync-server") @@ -932,9 +815,20 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { last_sync_row.title = _("Last Sync"); last_sync_row.add_suffix (last_sync_label); + var default_group = new Adw.PreferencesGroup () { + margin_top = 24 + }; + default_group.add (sync_server_row); default_group.add (last_sync_row); + var content_clamp = new Adw.Clamp () { + maximum_size = 600, + margin_start = 24, + margin_end = 24, + child = default_group + }; + var main_content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { vexpand = true, hexpand = true @@ -961,8 +855,9 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { } private Adw.NavigationPage get_quick_add_page () { - var settings_header = new Widgets.SettingsHeader (_("Quick Add")); - + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Quick Add")); + string quick_add_command = "flatpak run --command=io.github.alainm23.planify.quick-add %s".printf (Build.APPLICATION_ID); + var description_label = new Gtk.Label ( _("Use Quick Add to create to-dos from anywhere on your desktop with just a few keystrokes. You don’t even have to leave the app you’re currently in.") // vala-lint=line-length ) { @@ -993,7 +888,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { var command_entry = new Adw.ActionRow (); command_entry.add_suffix (copy_button); - command_entry.title = QUICK_ADD_COMMAND.printf (Build.APPLICATION_ID); + command_entry.title = quick_add_command; command_entry.add_css_class ("small-label"); command_entry.add_css_class ("monospace"); @@ -1002,6 +897,22 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { }; command_group.add (command_entry); + var settings_group = new Adw.PreferencesGroup (); + settings_group.title = _("Settings"); + + var save_last_switch = new Gtk.Switch () { + valign = Gtk.Align.CENTER, + active = Services.Settings.get_default ().settings.get_boolean ("quick-add-save-last-project") + }; + + var save_last_row = new Adw.ActionRow (); + save_last_row.title = _("Save Last Selected Project"); + save_last_row.subtitle = _("If unchecked, the default project selected is Inbox."); + save_last_row.set_activatable_widget (save_last_switch); + save_last_row.add_suffix (save_last_switch); + + settings_group.add (save_last_row); + var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) { vexpand = true, hexpand = true @@ -1010,6 +921,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { content_box.append (description_label); content_box.append (description2_label); content_box.append (command_group); + content_box.append (settings_group); var content_clamp = new Adw.Clamp () { maximum_size = 400, @@ -1028,7 +940,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { copy_button.clicked.connect (() => { Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard (); - clipboard.set_text (QUICK_ADD_COMMAND.printf (Build.APPLICATION_ID)); + clipboard.set_text (quick_add_command); add_toast (Util.get_default ().create_toast (_("The command was copied to the clipboard."))); }); @@ -1036,15 +948,207 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { pop_subpage (); }); + save_last_switch.notify["active"].connect (() => { + Services.Settings.get_default ().settings.set_boolean ("quick-add-save-last-project", save_last_switch.active); + }); + + return page; + } + + private Adw.NavigationPage get_oauth_todoist_page (Gtk.Switch switch_widget) { + var settings_header = new Dialogs.Preferences.SettingsHeader (_("Loading…")); + + string oauth_open_url = "https://todoist.com/oauth/authorize?client_id=%s&scope=%s&state=%s"; + string state = Util.get_default ().generate_string (); + oauth_open_url = oauth_open_url.printf (Constants.TODOIST_CLIENT_ID, Constants.TODOIST_SCOPE, state); + + WebKit.WebView webview = new WebKit.WebView (); + webview.zoom_level = 0.75; + webview.vexpand = true; + webview.hexpand = true; + + WebKit.WebContext.get_default ().set_preferred_languages (GLib.Intl.get_language_names ()); + webview.network_session.set_tls_errors_policy (WebKit.TLSErrorsPolicy.IGNORE); + + webview.load_uri (oauth_open_url); + + var sync_image = new Widgets.DynamicIcon () { + valign = Gtk.Align.CENTER, + halign = Gtk.Align.CENTER + }; + sync_image.update_icon_name ("planner-cloud"); + sync_image.size = 128; + + // Loading + var progress_bar = new Gtk.ProgressBar () { + margin_top = 6 + }; + + var sync_label = new Gtk.Label (_("Planner is sync your tasks, this may take a few minutes.")); + sync_label.wrap = true; + sync_label.justify = Gtk.Justification.CENTER; + sync_label.margin_top = 12; + sync_label.margin_start = 12; + sync_label.margin_end = 12; + + var sync_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { + margin_top = 24, + margin_start = 64, + margin_end = 64 + }; + sync_box.append (sync_image); + sync_box.append (progress_bar); + sync_box.append (sync_label); + + var stack = new Gtk.Stack (); + stack.vexpand = true; + stack.hexpand = true; + stack.transition_type = Gtk.StackTransitionType.CROSSFADE; + + stack.add_named (webview, "web_view"); + stack.add_named (sync_box, "spinner-view"); + + var scrolled_window = new Gtk.ScrolledWindow () { + hexpand = true, + vexpand = true, + hscrollbar_policy = Gtk.PolicyType.NEVER, + hscrollbar_policy = Gtk.PolicyType.NEVER, + child = stack + }; + + var toolbar_view = new Adw.ToolbarView (); + toolbar_view.add_top_bar (settings_header); + toolbar_view.content = scrolled_window; + + var page = new Adw.NavigationPage (toolbar_view, "oauth-todoist"); + + settings_header.back_activated.connect (() => { + switch_widget.active = false; + pop_subpage (); + }); + + webview.load_changed.connect ((load_event) => { + var redirect_uri = webview.get_uri (); + + if (("https://github.com/alainm23/planner?code=" in redirect_uri) && + ("&state=%s".printf (state) in redirect_uri)) { + settings_header.title = _("Synchronizing. Wait a moment please."); + get_todoist_token.begin (redirect_uri); + } + + if ("https://github.com/alainm23/planner?error=access_denied" in redirect_uri) { + debug ("access_denied"); + switch_widget.active = false; + pop_subpage (); + } + + if (load_event == WebKit.LoadEvent.FINISHED) { + settings_header.title = _("Please enter your credentials"); + return; + } + + if (load_event == WebKit.LoadEvent.STARTED) { + settings_header.title = _("Loading…"); + return; + } + + return; + }); + + webview.load_failed.connect ((load_event, failing_uri, _error) => { + var error = (GLib.Error)_error; + warning ("Loading uri '%s' failed, error : %s", failing_uri, error.message); + + if (GLib.strcmp (failing_uri, oauth_open_url) == 0) { + settings_header.title = _("Network Is Not Available"); + + var toast = new Adw.Toast (_("Network Is Not Available")); + toast.button_label = _("Ok"); + toast.timeout = 0; + + toast.button_clicked.connect (() => { + switch_widget.active = false; + pop_subpage (); + }); + + add_toast (toast); + } + + return true; + }); + + Services.Todoist.get_default ().first_sync_started.connect (() => { + stack.visible_child_name = "spinner-view"; + }); + + Services.Todoist.get_default ().first_sync_finished.connect (() => { + pop_subpage (); + }); + + Services.Todoist.get_default ().first_sync_progress.connect ((progress) => { + progress_bar.fraction = progress; + }); + return page; } + private Adw.NavigationPage get_backups_page () { + var backup_page = new Dialogs.Preferences.Pages.Backup (); + var page = new Adw.NavigationPage (backup_page, "backups-page"); + + backup_page.pop_subpage.connect (() => { + pop_subpage (); + }); + + backup_page.popup_toast.connect ((msg) => { + var toast = new Adw.Toast (msg); + toast.timeout = 3; + add_toast (toast); + }); + + return page; + } + + private async void get_todoist_token (string redirect_uri) { + yield Services.Todoist.get_default ().get_todoist_token (redirect_uri); + } + + public bool is_dark_theme () { + var dark_mode = Services.Settings.get_default ().settings.get_boolean ("dark-mode"); + + if (Services.Settings.get_default ().settings.get_boolean ("system-appearance")) { + dark_mode = Granite.Settings.get_default ().prefers_color_scheme == Granite.Settings.ColorScheme.DARK; + } + + return dark_mode; + } + + public bool is_light_visible () { + bool system_appearance = Services.Settings.get_default ().settings.get_boolean ("system-appearance"); + + if (system_appearance) { + return !is_dark_theme (); + } + + return true; + } + + public bool is_dark_modes_visible () { + bool system_appearance = Services.Settings.get_default ().settings.get_boolean ("system-appearance"); + + if (system_appearance) { + return is_dark_theme (); + } + + return true; + } + private void confirm_log_out (Gtk.Switch switch_widget, BackendType backend_type) { string message = ""; if (backend_type == BackendType.TODOIST) { message = _("Are you sure you want to remove the Todoist sync? This action will delete all your tasks and settings."); - } else if (backend_type == BackendType.GOOGLE_TASKS) { + } else if (backend_type == BackendType.GOOGLE_TASKS) { message = _("Are you sure you want to remove the Google Tasks sync? This action will delete all your tasks and settings."); } @@ -1061,7 +1165,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { if (response == "delete") { if (backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().remove_items (); - } else if (backend_type == BackendType.GOOGLE_TASKS) { + } else if (backend_type == BackendType.GOOGLE_TASKS) { Services.GoogleTasks.get_default ().remove_items (); } } else { @@ -1071,9 +1175,8 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow { } private Gtk.Widget generate_icon (string icon_name, int size = 32) { - var icon = new Widgets.DynamicIcon (); + var icon = new Widgets.DynamicIcon.from_icon_name (icon_name); icon.size = size; - icon.update_icon_name (icon_name); return icon; } } diff --git a/src/Dialogs/Preferences/SettingsHeader.vala b/src/Dialogs/Preferences/SettingsHeader.vala index e10402e6a..b7921f9d7 100644 --- a/src/Dialogs/Preferences/SettingsHeader.vala +++ b/src/Dialogs/Preferences/SettingsHeader.vala @@ -19,16 +19,23 @@ * Authored by: Alain M. */ -public class Widgets.SettingsHeader : Adw.Bin { - public string title_header { get; construct; } +public class Dialogs.Preferences.SettingsHeader : Adw.Bin { public bool show_back_button { get; construct; } + public string title { + set { + title_label.label = value; + } + } + + private Gtk.Label title_label; + public signal void done_activated (); public signal void back_activated (); - public SettingsHeader (string title_header, bool show_back_button = true) { + public SettingsHeader (string title, bool show_back_button = true) { Object ( - title_header: title_header, + title: title, show_back_button: show_back_button, hexpand: true ); @@ -48,10 +55,9 @@ public class Widgets.SettingsHeader : Adw.Bin { back_button.add_css_class (Granite.STYLE_CLASS_FLAT); - var title_label = new Gtk.Label (title_header); + title_label = new Gtk.Label (null); title_label.add_css_class (Granite.STYLE_CLASS_TITLE_LABEL); - var headerbar = new Gtk.HeaderBar () { title_widget = title_label, show_title_buttons = true, diff --git a/src/Dialogs/Project.vala b/src/Dialogs/Project.vala index 06532ec68..10adaf938 100644 --- a/src/Dialogs/Project.vala +++ b/src/Dialogs/Project.vala @@ -305,9 +305,15 @@ public class Dialogs.Project : Adw.Window { if (project.backend_type == BackendType.TODOIST) { submit_button.is_loading = true; Services.Todoist.get_default ().add.begin (project, (obj, res) => { - project.id = Services.Todoist.get_default ().add.end (res); - Services.Database.get_default().insert_project (project); - go_project (project.id_string); + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + + if (response.status) { + project.id = response.data; + Services.Database.get_default().insert_project (project); + go_project (project.id_string); + } else { + + } }); } else if (project.backend_type == BackendType.LOCAL || project.backend_type == BackendType.NONE) { diff --git a/src/Dialogs/ProjectPicker/ProjectPicker.vala b/src/Dialogs/ProjectPicker/ProjectPicker.vala index 8d362e4e9..50fd75dbd 100644 --- a/src/Dialogs/ProjectPicker/ProjectPicker.vala +++ b/src/Dialogs/ProjectPicker/ProjectPicker.vala @@ -71,8 +71,8 @@ public class Dialogs.ProjectPicker.ProjectPicker : Adw.Window { resizable: true, modal: true, title: _("Move"), - width_request: 400, - height_request: 600, + width_request: 375, + height_request: 500, transient_for: (Gtk.Window) Planify.instance.main_window ); } @@ -154,7 +154,9 @@ public class Dialogs.ProjectPicker.ProjectPicker : Adw.Window { } private Gtk.Widget build_projects_view () { - inbox_group = new Layouts.HeaderItem (null); + inbox_group = new Layouts.HeaderItem (null) { + margin_top = 12 + }; inbox_group.show_action = false; local_group = new Layouts.HeaderItem (_("On this Computer")); diff --git a/src/Dialogs/ProjectPicker/ProjectPickerRow.vala b/src/Dialogs/ProjectPicker/ProjectPickerRow.vala index 07618e29b..724332d30 100644 --- a/src/Dialogs/ProjectPicker/ProjectPickerRow.vala +++ b/src/Dialogs/ProjectPicker/ProjectPickerRow.vala @@ -36,7 +36,7 @@ public class Dialogs.ProjectPicker.ProjectPickerRow : Gtk.ListBoxRow { add_css_class ("selectable-item"); add_css_class ("transition"); - icon_project = new Widgets.IconColorProject (21); + icon_project = new Widgets.IconColorProject (12); icon_project.project = project; name_label = new Gtk.Label (null); @@ -61,10 +61,10 @@ public class Dialogs.ProjectPicker.ProjectPickerRow : Gtk.ListBoxRow { selected_revealer.child = selected_icon; var content_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { - margin_top = 3, - margin_start = 3, - margin_end = 3, - margin_bottom = 3 + margin_top = 6, + margin_start = 6, + margin_end = 6, + margin_bottom = 6 }; content_box.append (icon_project); content_box.append (name_label); diff --git a/src/Dialogs/ProjectPicker/SectionPickerRow.vala b/src/Dialogs/ProjectPicker/SectionPickerRow.vala index c787ca7c4..4451f0839 100644 --- a/src/Dialogs/ProjectPicker/SectionPickerRow.vala +++ b/src/Dialogs/ProjectPicker/SectionPickerRow.vala @@ -154,9 +154,6 @@ public class Dialogs.ProjectPicker.SectionPickerRow : Gtk.ListBoxRow { var picked_widget = (Dialogs.ProjectPicker.SectionPickerRow) value; var target_widget = this; - Gtk.Allocation alloc; - target_widget.get_allocation (out alloc); - picked_widget.drag_end (); target_widget.drag_end (); @@ -171,7 +168,7 @@ public class Dialogs.ProjectPicker.SectionPickerRow : Gtk.ListBoxRow { source_list.remove (picked_widget); if (target_widget.get_index () == 0) { - if (y > (alloc.height / 2)) { + if (y > (target_widget.get_height () / 2)) { position = target_widget.get_index () + 1; } } else { diff --git a/src/Dialogs/QuickAdd.vala b/src/Dialogs/QuickAdd.vala new file mode 100644 index 000000000..337c0502a --- /dev/null +++ b/src/Dialogs/QuickAdd.vala @@ -0,0 +1,71 @@ +/* +* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 3 of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +* Boston, MA 02110-1301 USA +* +* Authored by: Alain M. +*/ + +public class Dialogs.QuickAdd : Adw.Window { + private Layouts.QuickAdd quick_add_widget; + + public QuickAdd () { + Object ( + deletable: true, + resizable: true, + modal: true, + transient_for: (Gtk.Window) Planify.instance.main_window, + width_request: 600, + halign: Gtk.Align.START + ); + } + + construct { + quick_add_widget = new Layouts.QuickAdd (); + set_content (quick_add_widget); + + quick_add_widget.hide_destroy.connect (hide_destroy); + } + + public void hide_destroy () { + hide (); + + Timeout.add (500, () => { + destroy (); + return GLib.Source.REMOVE; + }); + } + + public void update_content (string content = "") { + quick_add_widget.update_content (content); + } + + public void set_project (Objects.Project project) { + quick_add_widget.set_project (project); + } + + public void set_due (GLib.DateTime date) { + quick_add_widget.set_due (date); + } + + public void set_pinned (bool pinned) { + quick_add_widget.set_pinned (pinned); + } + + public void set_priority (int priority) { + quick_add_widget.set_priority (priority); + } +} \ No newline at end of file diff --git a/src/Dialogs/QuickFind/QuickFind.vala b/src/Dialogs/QuickFind/QuickFind.vala index 2cbca7905..4c32d6ee7 100644 --- a/src/Dialogs/QuickFind/QuickFind.vala +++ b/src/Dialogs/QuickFind/QuickFind.vala @@ -28,7 +28,7 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { transient_for: Planify.instance.main_window, deletable: false, modal: true, - margin_bottom: 128, + margin_bottom: 164, width_request: 400, height_request: 325 ); @@ -57,23 +57,23 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { listbox.set_placeholder (get_placeholder ()); listbox.set_header_func (header_function); - var listbox_grid = new Gtk.Grid (); + var listbox_grid = new Gtk.Grid () { + margin_bottom = 12 + }; listbox_grid.attach (listbox, 0, 0); var listbox_scrolled = new Gtk.ScrolledWindow () { hexpand = true, vexpand = true, - hscrollbar_policy = Gtk.PolicyType.NEVER + hscrollbar_policy = Gtk.PolicyType.NEVER, + child = listbox_grid }; - listbox_scrolled.child = listbox_grid; - - var content_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); - - content_grid.append (headerbar); - content_grid.append (listbox_scrolled); + var toolbar_view = new Adw.ToolbarView (); + toolbar_view.add_top_bar (headerbar); + toolbar_view.content = listbox_scrolled; - content = content_grid; + content = toolbar_view; search_entry.search_changed.connect (() => { search_changed (); diff --git a/src/Dialogs/QuickFind/QuickFindItem.vala b/src/Dialogs/QuickFind/QuickFindItem.vala index 7d8c1e88f..e06a41a8d 100644 --- a/src/Dialogs/QuickFind/QuickFindItem.vala +++ b/src/Dialogs/QuickFind/QuickFindItem.vala @@ -46,7 +46,7 @@ public class Dialogs.QuickFind.QuickFindItem : Gtk.ListBoxRow { if (base_object is Objects.Project) { Objects.Project project = ((Objects.Project) base_object); - var icon_project = new Widgets.IconColorProject (19); + var icon_project = new Widgets.IconColorProject (12); icon_project.project = project; var name_label = new Gtk.Label (markup_string_with_search (project.name, pattern)) { diff --git a/src/Dialogs/TodoistOAuth.vala b/src/Dialogs/TodoistOAuth.vala deleted file mode 100644 index 3b08fc80f..000000000 --- a/src/Dialogs/TodoistOAuth.vala +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Dialogs.TodoistOAuth : Adw.Window { - private WebKit.WebView webview; - private string OAUTH_OPEN_URL = "https://todoist.com/oauth/authorize?client_id=%s&scope=%s&state=%s"; // vala-lint=line-length - private string STATE = Util.get_default ().generate_string (); - - public TodoistOAuth () { - Object ( - transient_for: (Gtk.Window) Planify.instance.main_window, - deletable: true, - destroy_with_parent: true, - modal: true, - title: _("Todoist Sync"), - height_request: 575, - width_request: 475 - ); - } - - construct { - OAUTH_OPEN_URL = OAUTH_OPEN_URL.printf (Constants.TODOIST_CLIENT_ID, Constants.TODOIST_SCOPE, STATE); - - var info_label = new Gtk.Label (_("Loading")); - - var spinner = new Gtk.Spinner (); - spinner.add_css_class ("text-color"); - spinner.start (); - - var container_grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); - container_grid.valign = Gtk.Align.CENTER; - container_grid.append (spinner); - container_grid.append (info_label); - - webview = new WebKit.WebView (); - webview.zoom_level = 0.75; - webview.vexpand = true; - webview.hexpand = true; - - WebKit.WebContext.get_default ().set_preferred_languages (GLib.Intl.get_language_names ()); - webview.network_session.set_tls_errors_policy (WebKit.TLSErrorsPolicy.IGNORE); - - webview.load_uri (OAUTH_OPEN_URL); - - var sync_image = new Widgets.DynamicIcon () { - valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER - }; - - sync_image.update_icon_name ("planner-cloud"); - sync_image.size = 128; - - // Loading - var progress_bar = new Gtk.ProgressBar () { - margin_top = 6 - }; - - var sync_label = new Gtk.Label (_("Planner is sync your tasks, this may take a few minutes.")); - sync_label.wrap = true; - sync_label.justify = Gtk.Justification.CENTER; - sync_label.margin_top = 12; - sync_label.margin_start = 12; - sync_label.margin_end = 12; - - var sync_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - margin_top = 24, - margin_start = 64, - margin_end = 64 - }; - sync_box.append (sync_image); - sync_box.append (progress_bar); - sync_box.append (sync_label); - - var stack = new Gtk.Stack (); - stack.vexpand = true; - stack.hexpand = true; - stack.transition_type = Gtk.StackTransitionType.CROSSFADE; - - stack.add_named (webview, "web_view"); - stack.add_named (sync_box, "spinner-view"); - - var scrolled = new Gtk.ScrolledWindow () { - hexpand = true, - vexpand = true, - hscrollbar_policy = Gtk.PolicyType.NEVER, - hscrollbar_policy = Gtk.PolicyType.NEVER - }; - - scrolled.child = stack; - - var header = new Adw.HeaderBar (); - header.add_css_class (Granite.STYLE_CLASS_FLAT); - header.title_widget = container_grid; - - var main_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); - main_grid.append (header); - main_grid.append (scrolled); - - content = main_grid; - - webview.load_changed.connect ((load_event) => { - var redirect_uri = webview.get_uri (); - if (("https://github.com/alainm23/planner?code=" in redirect_uri) && - ("&state=%s".printf (STATE) in redirect_uri)) { - info_label.label = _("Synchronizing. Wait a moment please."); - get_todoist_token.begin (redirect_uri); - } - - if ("https://github.com/alainm23/planner?error=access_denied" in redirect_uri) { - debug ("access_denied"); - hide_destroy (); - } - - if (load_event == WebKit.LoadEvent.FINISHED) { - info_label.label = _("Please enter your credentials"); - spinner.stop (); - spinner.hide (); - return; - } - - if (load_event == WebKit.LoadEvent.STARTED) { - info_label.label = _("Loading"); - spinner.start (); - spinner.show (); - return; - } - - return; - }); - - webview.load_failed.connect ((load_event, failing_uri, _error) => { - var error = (GLib.Error)_error; - warning ("Loading uri '%s' failed, error : %s", failing_uri, error.message); - if (GLib.strcmp (failing_uri, OAUTH_OPEN_URL) == 0) { - info_label.label = _("Network Is Not Available"); - stack.visible_child_name = "error_view"; - } - - return true; - }); - - Services.Todoist.get_default ().first_sync_started.connect (() => { - stack.visible_child_name = "spinner-view"; - }); - - Services.Todoist.get_default ().first_sync_finished.connect (() => { - hide_destroy (); - }); - - Services.Todoist.get_default ().first_sync_progress.connect ((progress) => { - progress_bar.fraction = progress; - }); - } - - public void hide_destroy () { - hide (); - - Timeout.add (500, () => { - destroy (); - return GLib.Source.REMOVE; - }); - } - - private async void get_todoist_token (string redirect_uri) { - yield Services.Todoist.get_default ().get_todoist_token (redirect_uri); - } -} diff --git a/src/Dialogs/WhatsNew.vala b/src/Dialogs/WhatsNew.vala index e9390bb89..88a9d8d1e 100644 --- a/src/Dialogs/WhatsNew.vala +++ b/src/Dialogs/WhatsNew.vala @@ -31,28 +31,29 @@ public class Dialogs.WhatsNew : Adw.Window { destroy_with_parent: true, modal: true, title: _("What's New"), - height_request: 475, - width_request: 375 - ); + default_width: 450, + height_request: 600 + ); } construct { var headerbar = new Adw.HeaderBar () { title_widget = new Gtk.Label (null), hexpand = true, - decoration_layout = ":close" + css_classes = { Granite.STYLE_CLASS_FLAT } }; - headerbar.add_css_class (Granite.STYLE_CLASS_FLAT); - var title_label = new Gtk.Label (_("What's New in Planify")) { - halign = START + var title_label = new Gtk.Label (_("What’s new in Planify")) { + hexpand = true, + halign = CENTER, + css_classes = { "h1" } }; - title_label.add_css_class ("h1"); - var version_label = new Gtk.Label (_("Version 4.1.1")) { - halign = START + var version_label = new Gtk.Label (Build.VERSION) { + hexpand = true, + halign = CENTER, + css_classes = { "dim-label" } }; - version_label.add_css_class ("dim-label"); feature_group = new Adw.PreferencesGroup () { margin_top = 24 @@ -67,10 +68,9 @@ public class Dialogs.WhatsNew : Adw.Window { right_margin = 12, top_margin = 12, bottom_margin = 12, - editable = false + editable = false, + css_classes = { "card", "small-label" } }; - textview.add_css_class ("card"); - textview.add_css_class ("small-label"); textview.remove_css_class ("view"); group.add (textview); @@ -89,20 +89,29 @@ public class Dialogs.WhatsNew : Adw.Window { content_box.append (feature_group); content_box.append (group_revealer); - var main_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); - main_grid.append (headerbar); - main_grid.append (content_box); + var content_clamp = new Adw.Clamp () { + maximum_size = 600, + margin_start = 12, + margin_end = 12, + margin_bottom = 12 + }; + + content_clamp.child = content_box; - content = main_grid; + var toolbar_view = new Adw.ToolbarView (); + toolbar_view.add_top_bar (headerbar); + toolbar_view.content = content_clamp; - add_feature (_("Todoist"), _("Synchronize with your Todoist Account"), "planner-todoist"); - add_feature (_("Todoist"), _("Synchronize with your Todoist Account"), "planner-todoist"); + content = toolbar_view; + add_feature (_("Quick Add Improvements"), _("Now supports project selection, due date, priority, labels and pinned.")); + add_feature (_("Sidebar filter settings"), _("It is now possible to re-order, hide filters and the task cutter.")); + add_feature (_("Backup support"), _("It is now possible to create a backup copy and import it from somewhere else. Planify will import all your tasks and settings.")); + add_feature (_("Offline support for Todoist"), _("You were without internet, keep using Planify with Todoist, the tasks will be saved locally and synchronized when the connection returns.")); } - public void add_feature (string title, string description, string icon) { + public void add_feature (string title, string description) { var row = new Adw.ActionRow (); - row.add_prefix (new Gtk.Image.from_icon_name (icon)); row.title = title; row.subtitle = description; diff --git a/src/Layouts/FilterPaneRow.vala b/src/Layouts/FilterPaneRow.vala index 909170c1e..111f7255e 100644 --- a/src/Layouts/FilterPaneRow.vala +++ b/src/Layouts/FilterPaneRow.vala @@ -20,7 +20,7 @@ * Authored by: Alain M. */ -public class Layouts.FilterPaneRow : Gtk.Grid { +public class Layouts.FilterPaneRow : Gtk.FlowBoxChild { public FilterType filter_type { get; construct; } public string title; @@ -55,7 +55,7 @@ public class Layouts.FilterPaneRow : Gtk.Grid { }; title_label.ellipsize = Pango.EllipsizeMode.END; title_label.add_css_class ("font-bold"); - + count_label = new Gtk.Label (null) { hexpand = true, halign = Gtk.Align.END, @@ -64,6 +64,11 @@ public class Layouts.FilterPaneRow : Gtk.Grid { count_label.add_css_class ("font-bold"); + var count_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.CROSSFADE, + child = count_label + }; + var main_grid = new Gtk.Grid () { column_spacing = 6, margin_start = 3, @@ -74,11 +79,12 @@ public class Layouts.FilterPaneRow : Gtk.Grid { }; main_grid.attach (title_image, 0, 0, 1, 1); - main_grid.attach (count_label, 1, 0, 1, 1); + main_grid.attach (count_revealer, 1, 0, 1, 1); main_grid.attach (title_label, 0, 1, 2, 2); - attach (main_grid, 0, 0); + child = main_grid; build_filter_data (); + Services.Settings.get_default ().settings.bind ("show-tasks-count", count_revealer, "reveal_child", GLib.SettingsBindFlags.DEFAULT); var select_gesture = new Gtk.GestureClick (); select_gesture.set_button (1); @@ -127,14 +133,14 @@ public class Layouts.FilterPaneRow : Gtk.Grid { } else if (filter_type == FilterType.PINBOARD) { title_label.label = _("Pinboard"); title_image.update_icon_name ("planner-pin-tack"); - } else if (filter_type == FilterType.FILTER) { + } else if (filter_type == FilterType.LABELS) { title_label.label = _("Labels"); title_image.update_icon_name ("planner-tag-icon"); } } private void update_count_label (int count) { - count_label.label = count.to_string (); + count_label.label = count <= 0 ? "" : count.to_string (); } public void init () { @@ -155,7 +161,7 @@ public class Layouts.FilterPaneRow : Gtk.Grid { Objects.Pinboard.get_default ().pinboard_count_updated.connect (() => { update_count_label (Objects.Pinboard.get_default ().pinboard_count); }); - } else if (filter_type == FilterType.FILTER) { + } else if (filter_type == FilterType.LABELS) { update_count_label (Objects.Filters.Labels.get_default ().count); Objects.Filters.Labels.get_default ().count_updated.connect (() => { update_count_label (Objects.Filters.Labels.get_default ().count); @@ -175,4 +181,31 @@ public class Layouts.FilterPaneRow : Gtk.Grid { update_count_label (inbox_project.project_count); }); } + + public int item_order () { + var views_order = Services.Settings.get_default ().settings.get_strv ("views-order-visible"); + return find_index (views_order, filter_type.to_string ()); + } + + public bool active () { + var views_order = Services.Settings.get_default ().settings.get_strv ("views-order-visible"); + + for (int i = 0; i < views_order.length; i++) { + if (views_order [i] == filter_type.to_string ()) { + return true; + } + } + + return false; + } + + private int find_index (string[] array, string elemento) { + for (int i = 0; i < array.length; i++) { + if (array [i] == elemento) { + return i; + } + } + + return -1; + } } \ No newline at end of file diff --git a/src/Layouts/ItemBoard.vala b/src/Layouts/ItemBoard.vala index 5a25122b6..e01987cdf 100644 --- a/src/Layouts/ItemBoard.vala +++ b/src/Layouts/ItemBoard.vala @@ -343,7 +343,7 @@ public class Layouts.ItemBoard : Gtk.ListBoxRow { checked_button.sensitive = false; is_loading = true; Services.Todoist.get_default ().complete_item.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().complete_item.end (res)) { + if (Services.Todoist.get_default ().complete_item.end (res).status) { Services.Database.get_default ().checked_toggled (item, old_checked); is_loading = false; checked_button.sensitive = true; @@ -380,7 +380,7 @@ public class Layouts.ItemBoard : Gtk.ListBoxRow { checked_button.sensitive = false; is_loading = true; Services.Todoist.get_default ().complete_item.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().complete_item.end (res)) { + if (Services.Todoist.get_default ().complete_item.end (res).status) { Services.Database.get_default ().checked_toggled (item, old_checked); is_loading = false; checked_button.sensitive = true; @@ -408,7 +408,7 @@ public class Layouts.ItemBoard : Gtk.ListBoxRow { checked_button.sensitive = false; is_loading = true; Services.Todoist.get_default ().update.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().update.end (res)) { + if (Services.Todoist.get_default ().update.end (res).status) { Services.Database.get_default ().update_item (item); is_loading = false; checked_button.sensitive = true; @@ -545,9 +545,6 @@ public class Layouts.ItemBoard : Gtk.ListBoxRow { var picked_widget = (Layouts.ItemBoard) value; var target_widget = this; - Gtk.Allocation alloc; - target_widget.get_allocation (out alloc); - picked_widget.drag_end (); target_widget.drag_end (); @@ -561,7 +558,7 @@ public class Layouts.ItemBoard : Gtk.ListBoxRow { source_list.remove (picked_widget); if (target_widget.get_index () == 0) { - if (y < (alloc.height / 2)) { + if (y < (target_widget.get_height () / 2)) { target_list.insert (picked_widget, 0); } else { target_list.insert (picked_widget, target_widget.get_index () + 1); diff --git a/src/Layouts/ItemRow.vala b/src/Layouts/ItemRow.vala index 1a6dd85df..289991993 100644 --- a/src/Layouts/ItemRow.vala +++ b/src/Layouts/ItemRow.vala @@ -30,6 +30,8 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { private Gtk.CheckButton checked_button; private Widgets.SourceView content_textview; private Gtk.Revealer hide_loading_revealer; + private Gtk.Revealer project_label_revealer; + private Gtk.Label project_label; private Gtk.CheckButton select_checkbutton; private Gtk.Revealer select_revealer; @@ -62,7 +64,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { private Widgets.ItemSummary item_summary; private Widgets.LabelsSummary labels_summary; private Widgets.PriorityButton priority_button; - private Widgets.LabelButton label_button; + private Widgets.LabelPicker.LabelButton label_button; private Widgets.PinButton pin_button; private Widgets.ReminderButton reminder_button; private Gtk.Button add_button; @@ -99,6 +101,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { detail_revealer.reveal_child = true; content_label_revealer.reveal_child = false; content_entry_revealer.reveal_child = true; + project_label_revealer.reveal_child = false; item_summary.reveal_child = false; labels_summary.reveal_child = false; hide_loading_button.remove_css_class ("no-padding"); @@ -131,6 +134,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { detail_revealer.reveal_child = false; content_label_revealer.reveal_child = true; content_entry_revealer.reveal_child = false; + project_label_revealer.reveal_child = show_project_label; item_summary.check_revealer (); labels_summary.check_revealer (); hide_loading_button.add_css_class ("no-padding"); @@ -197,6 +201,18 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { } } + private bool _show_project_label = false; + public bool show_project_label { + set { + _show_project_label = value; + project_label_revealer.reveal_child = _show_project_label; + } + + get { + return _show_project_label; + } + } + public uint destroy_timeout { get; set; default = 0; } public uint complete_timeout { get; set; default = 0; } public string update_id { get; set; default = Util.get_default ().generate_id (); } @@ -349,6 +365,16 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { child = select_checkbutton }; + project_label = new Gtk.Label (item.project.short_name) { + css_classes = { "small-label", "dim-label" }, + margin_start = 6 + }; + + project_label_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SLIDE_LEFT, + child = project_label + }; + var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { valign = Gtk.Align.CENTER, margin_start = 6 @@ -439,11 +465,8 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { schedule_button = new Widgets.ScheduleButton (); - priority_button = new Widgets.PriorityButton (); - - label_button = new Widgets.LabelButton (item); - + label_button = new Widgets.LabelPicker.LabelButton (item); pin_button = new Widgets.PinButton (item); reminder_button = new Widgets.ReminderButton (item) { @@ -465,7 +488,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { add_button.add_css_class (Granite.STYLE_CLASS_FLAT); - submit_button = new Widgets.LoadingButton (LoadingButtonType.LABEL, _("Save")) { + submit_button = new Widgets.LoadingButton (LoadingButtonType.LABEL, _("Add To-Do")) { margin_start = 6, margin_end = 3, can_focus = false @@ -573,6 +596,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { itemrow_eventbox_box.append (description_image_revealer); itemrow_eventbox_box.append (repeat_image_revealer); itemrow_eventbox_box.append (select_revealer); + itemrow_eventbox_box.append (project_label_revealer); subitems = new Widgets.SubItems (item); @@ -673,7 +697,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { if (!is_creating) { update (); } else { - submit_button.sensitive = Util.get_default ().is_text_valid (content_textview); + submit_button.sensitive = Util.get_default ().is_text_valid (content_textview.buffer.text); } } }); @@ -698,7 +722,12 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { } }); - submit_button.clicked.connect (() => { + var submit_gesture = new Gtk.GestureClick (); + submit_gesture.set_button (1); + submit_button.add_controller (submit_gesture); + + submit_gesture.pressed.connect (() => { + submit_gesture.set_state (Gtk.EventSequenceState.CLAIMED); add_item (); }); @@ -772,7 +801,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { }); Services.Settings.get_default ().settings.changed.connect ((key) => { - if (key == "underline-completed-tasks") { + if (key == "underline-completed-tasks" || key == "clock-format") { update_request (); } }); @@ -848,7 +877,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { Source.remove (destroy_timeout); } - if (!Util.get_default ().is_text_valid (content_textview)) { + if (!Util.get_default ().is_text_valid (content_textview.buffer.text)) { Services.EventBus.get_default ().new_item_deleted (item.project_id); hide_destroy (); return; @@ -860,9 +889,9 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { if (item.project.backend_type == BackendType.TODOIST) { submit_button.is_loading = true; Services.Todoist.get_default ().add.begin (item, (obj, res) => { - string? id = Services.Todoist.get_default ().add.end (res); - if (id != null) { - item.id = id; + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + if (response.status) { + item.id = response.data; item_added (); } }); @@ -1352,7 +1381,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { checked_button.sensitive = false; is_loading = true; Services.Todoist.get_default ().complete_item.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().complete_item.end (res)) { + if (Services.Todoist.get_default ().complete_item.end (res).status) { Services.Database.get_default ().checked_toggled (item, old_checked); is_loading = false; checked_button.sensitive = true; @@ -1397,7 +1426,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { checked_button.sensitive = false; is_loading = true; Services.Todoist.get_default ().complete_item.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().complete_item.end (res)) { + if (Services.Todoist.get_default ().complete_item.end (res).status) { Services.Database.get_default ().checked_toggled (item, old_checked); is_loading = false; checked_button.sensitive = true; @@ -1499,7 +1528,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { checked_button.sensitive = false; is_loading = true; Services.Todoist.get_default ().update.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().update.end (res)) { + if (Services.Todoist.get_default ().update.end (res).status) { Services.Database.get_default ().update_item (item); is_loading = false; checked_button.sensitive = true; @@ -1552,7 +1581,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { if (response == "delete") { if (item.project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().delete.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().delete.end (res)) { + if (Services.Todoist.get_default ().delete.end (res).status) { Services.Database.get_default ().delete_item (item); } }); @@ -1587,7 +1616,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { if (item.project.backend_type == BackendType.TODOIST) { is_loading = true; Services.Todoist.get_default ().delete.begin (item, (obj, res) => { - if (Services.Todoist.get_default ().delete.end (res)) { + if (Services.Todoist.get_default ().delete.end (res).status) { Services.Database.get_default ().delete_item (item); } else { is_loading = false; @@ -1628,7 +1657,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { } Services.Todoist.get_default ().move_item.begin (item, move_type, move_id, (obj, res) => { - if (Services.Todoist.get_default ().move_item.end (res)) { + if (Services.Todoist.get_default ().move_item.end (res).status) { move_item (project_id, section_id); is_loading = false; } else { @@ -1655,8 +1684,8 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { dialog.set_response_appearance ("ok", Adw.ResponseAppearance.SUGGESTED); dialog.show (); - dialog.response.connect ((response) => { - if (response == "ok") { + dialog.response.connect ((resp) => { + if (resp == "ok") { var new_item = item.generate_copy (); new_item.project_id = project.id; new_item.section_id = ""; @@ -1666,9 +1695,9 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { item.delete_item (); } else if (project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().add.begin (item, (obj, res) => { - string? id = Services.Todoist.get_default ().add.end (res); - if (id != null) { - new_item.id = id; + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + if (response.status) { + new_item.id = response.data; project.add_item_if_not_exists (new_item); item.delete_item (); } @@ -1723,9 +1752,6 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { var target_widget = this; var old_section_id = ""; - Gtk.Allocation alloc; - target_widget.get_allocation (out alloc); - picked_widget.drag_end (); target_widget.drag_end (); @@ -1766,7 +1792,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { } Services.Todoist.get_default ().move_item.begin (picked_widget.item, move_type, move_id, (obj, res) => { - if (Services.Todoist.get_default ().move_item.end (res)) { + if (Services.Todoist.get_default ().move_item.end (res).status) { Services.Database.get_default ().update_item (picked_widget.item); } }); @@ -1782,7 +1808,7 @@ public class Layouts.ItemRow : Gtk.ListBoxRow { source_list.remove (picked_widget); if (target_widget.get_index () == 0) { - if (y > (alloc.height / 2)) { + if (y > (target_widget.get_height () / 2)) { position = target_widget.get_index () + 1; } } else { diff --git a/src/Layouts/LabelRow.vala b/src/Layouts/LabelRow.vala index 75883761c..04f143d1a 100644 --- a/src/Layouts/LabelRow.vala +++ b/src/Layouts/LabelRow.vala @@ -204,9 +204,6 @@ public class Layouts.LabelRow : Gtk.ListBoxRow { drop_target.drop.connect ((target, value, x, y) => { var picked_widget = (Layouts.LabelRow) value; var target_widget = this; - - Gtk.Allocation alloc; - target_widget.get_allocation (out alloc); picked_widget.drag_end (); target_widget.drag_end (); @@ -222,7 +219,7 @@ public class Layouts.LabelRow : Gtk.ListBoxRow { source_list.remove (picked_widget); if (target_widget.get_index () == 0) { - if (y > (alloc.height / 2)) { + if (y > (target_widget.get_height () / 2)) { position = target_widget.get_index () + 1; } } else { diff --git a/src/Layouts/ProjectRow.vala b/src/Layouts/ProjectRow.vala index 3e913507b..2c554fa58 100644 --- a/src/Layouts/ProjectRow.vala +++ b/src/Layouts/ProjectRow.vala @@ -105,12 +105,10 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { count_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); count_revealer = new Gtk.Revealer () { - reveal_child = int.parse (count_label.label) > 0, - transition_type = Gtk.RevealerTransitionType.CROSSFADE + transition_type = Gtk.RevealerTransitionType.CROSSFADE, + child = count_label }; - count_revealer.child = count_label; - var chevron_right_image = new Widgets.DynamicIcon (); chevron_right_image.size = 16; chevron_right_image.update_icon_name ("chevron-right"); @@ -198,7 +196,8 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { child = main_revealer; update_request (); - + Services.Settings.get_default ().settings.bind ("show-tasks-count", count_revealer, "reveal_child", GLib.SettingsBindFlags.DEFAULT); + if (drag_n_drop) { build_drag_and_drop (); } @@ -281,9 +280,8 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { project.deleted.connect (hide_destroy); project.project_count_updated.connect (() => { - count_label.label = project.project_count.to_string (); + update_count_label (project.project_count); circular_progress_bar.percentage = project.percentage; - count_revealer.reveal_child = int.parse (count_label.label) > 0; }); project.subproject_added.connect ((subproject) => { @@ -304,6 +302,10 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { }); } + private void update_count_label (int count) { + count_label.label = count <= 0 ? "" : count.to_string (); + } + private void build_drag_and_drop () { var drag_source = new Gtk.DragSource (); drag_source.set_actions (Gdk.DragAction.MOVE); @@ -344,9 +346,6 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { var picked_widget = (Layouts.ProjectRow) value; var target_widget = this; - Gtk.Allocation alloc; - target_widget.get_allocation (out alloc); - picked_widget.drag_end (); target_widget.drag_end (); @@ -361,7 +360,7 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { source_list.remove (picked_widget); if (target_widget.get_index () == 0) { - if (y > (alloc.height / 2)) { + if (y > (target_widget.get_height () / 2)) { position = target_widget.get_index () + 1; } } else { @@ -484,7 +483,7 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { if (response == "delete") { if (project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().delete.begin (project, (obj, res) => { - if (Services.Todoist.get_default ().delete.end (res)) { + if (Services.Todoist.get_default ().delete.end (res).status) { Services.Database.get_default ().delete_project (project); } }); diff --git a/src/Layouts/SectionBoard.vala b/src/Layouts/SectionBoard.vala index 2e59eff16..745d85b49 100644 --- a/src/Layouts/SectionBoard.vala +++ b/src/Layouts/SectionBoard.vala @@ -530,9 +530,9 @@ public class Layouts.SectionBoard : Gtk.FlowBoxChild { add_button.is_loading = true; Services.Todoist.get_default ().add.begin (item, (obj, res) => { add_button.is_loading = false; - string? id = Services.Todoist.get_default ().add.end (res); - if (id != null) { - item.id = id; + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + if (response.status) { + item.id = response.data; item.activate_name_editable = true; Services.Database.get_default ().insert_item (item, false); add_item (item, 0); @@ -553,7 +553,7 @@ public class Layouts.SectionBoard : Gtk.FlowBoxChild { if (section.project.backend_type == BackendType.TODOIST) { // menu_loading_button.is_loading = true; Services.Todoist.get_default ().move_project_section.begin (section, project_id, (obj, res) => { - if (Services.Todoist.get_default ().move_project_section.end (res)) { + if (Services.Todoist.get_default ().move_project_section.end (res).status) { Services.Database.get_default ().move_section (section, old_section_id); // menu_loading_button.is_loading = false; } else { diff --git a/src/Layouts/SectionRow.vala b/src/Layouts/SectionRow.vala index 2991f05bc..d0d85945f 100644 --- a/src/Layouts/SectionRow.vala +++ b/src/Layouts/SectionRow.vala @@ -370,7 +370,9 @@ public class Layouts.SectionRow : Gtk.ListBoxRow { } }); - Services.EventBus.get_default ().update_inserted_item_map.connect ((row, old_section_id) => { + Services.EventBus.get_default ().update_inserted_item_map.connect ((_row, old_section_id) => { + var row = (Layouts.ItemRow) _row; + if (row.item.project_id == section.project_id && row.item.section_id == section.id) { if (!items.has_key (row.item.id)) { @@ -533,7 +535,7 @@ public class Layouts.SectionRow : Gtk.ListBoxRow { row.update_priority (Util.get_default ().get_default_priority ()); row.item_added.connect (() => { - Util.get_default ().item_added (row); + item_added (row); }); if (has_children) { @@ -543,12 +545,35 @@ public class Layouts.SectionRow : Gtk.ListBoxRow { } } + public void item_added (Layouts.ItemRow row) { + bool insert = row.project_id != row.item.project.id || row.section_id != row.item.section_id; + + if (row.item.section_id != "") { + Services.Database.get_default ().get_section (row.item.section_id) + .add_item_if_not_exists (row.item, insert); + } else { + Services.Database.get_default ().get_project (row.item.project_id) + .add_item_if_not_exists (row.item, insert); + } + + if (!insert) { + Services.EventBus.get_default ().update_inserted_item_map (row, ""); + row.update_inserted_item (); + } else { + row.hide_destroy (); + } + + Services.EventBus.get_default ().send_notification ( + Util.get_default ().create_toast (_("Task added to %s".printf (row.item.project.short_name)))); + Services.EventBus.get_default ().update_section_sort_func (row.item.project_id, row.item.section_id, false); + } + private int set_sort_func (Gtk.ListBoxRow lbrow, Gtk.ListBoxRow lbbefore) { Objects.Item item1 = ((Layouts.ItemRow) lbrow).item; Objects.Item item2 = ((Layouts.ItemRow) lbbefore).item; if (section.project.sort_order == 1) { - return item1.content.collate (item2.content); + return item1.content.strip ().collate (item2.content.strip ()); } if (section.project.sort_order == 2) { @@ -705,7 +730,7 @@ public class Layouts.SectionRow : Gtk.ListBoxRow { } Services.Todoist.get_default ().move_item.begin (picked_widget.item, type, id, (obj, res) => { - if (Services.Todoist.get_default ().move_item.end (res)) { + if (Services.Todoist.get_default ().move_item.end (res).status) { Services.Database.get_default ().update_item (picked_widget.item); } }); @@ -762,7 +787,7 @@ public class Layouts.SectionRow : Gtk.ListBoxRow { if (section.project.backend_type == BackendType.TODOIST) { // menu_loading_button.is_loading = true; Services.Todoist.get_default ().move_project_section.begin (section, project_id, (obj, res) => { - if (Services.Todoist.get_default ().move_project_section.end (res)) { + if (Services.Todoist.get_default ().move_project_section.end (res).status) { Services.Database.get_default ().move_section (section, old_section_id); // menu_loading_button.is_loading = false; } else { diff --git a/src/Layouts/Sidebar.vala b/src/Layouts/Sidebar.vala index 03fcecf59..e4fc5da87 100644 --- a/src/Layouts/Sidebar.vala +++ b/src/Layouts/Sidebar.vala @@ -19,52 +19,62 @@ * Authored by: Alain M. */ -public class Layouts.Sidebar : Gtk.Grid { - private Gtk.Grid filters_grid; +public class Layouts.Sidebar : Adw.Bin { + private Gtk.FlowBox filters_flow; private Layouts.FilterPaneRow inbox_filter; private Layouts.FilterPaneRow today_filter; private Layouts.FilterPaneRow scheduled_filter; - private Layouts.FilterPaneRow filters_filter; + private Layouts.FilterPaneRow labels_filter; + private Layouts.FilterPaneRow pinboard_filter; private Layouts.HeaderItem favorites_header; private Layouts.HeaderItem local_projects_header; private Layouts.HeaderItem todoist_projects_header; private Layouts.HeaderItem google_projects_header; - public Gee.HashMap local_hashmap; - public Gee.HashMap todoist_hashmap; - public Gee.HashMap google_hashmap; - public Gee.HashMap favorites_hashmap; + public Gee.HashMap local_hashmap = new Gee.HashMap (); + public Gee.HashMap todoist_hashmap = new Gee.HashMap (); + public Gee.HashMap google_hashmap = new Gee.HashMap (); + public Gee.HashMap favorites_hashmap = new Gee.HashMap (); public Sidebar () { Object (); } - construct { - local_hashmap = new Gee.HashMap (); - todoist_hashmap = new Gee.HashMap (); - google_hashmap = new Gee.HashMap (); - favorites_hashmap = new Gee.HashMap (); - - filters_grid= new Gtk.Grid () { + construct { + filters_flow = new Gtk.FlowBox () { + homogeneous = true, row_spacing = 9, column_spacing = 9, margin_start = 3, margin_end = 3, - column_homogeneous = true, - row_homogeneous = true + min_children_per_line = 2 }; + filters_flow.set_sort_func ((child1, child2) => { + int item1 = ((Layouts.FilterPaneRow) child1).item_order (); + int item2 = ((Layouts.FilterPaneRow) child2).item_order (); + + return item1 - item2; + }); + + filters_flow.set_filter_func ((child) => { + var row = ((Layouts.FilterPaneRow) child); + return row.active (); + }); + inbox_filter = new Layouts.FilterPaneRow (FilterType.INBOX); today_filter = new Layouts.FilterPaneRow (FilterType.TODAY); scheduled_filter = new Layouts.FilterPaneRow (FilterType.SCHEDULED); - filters_filter = new Layouts.FilterPaneRow (FilterType.FILTER); + labels_filter = new Layouts.FilterPaneRow (FilterType.LABELS); + pinboard_filter = new Layouts.FilterPaneRow (FilterType.PINBOARD); - filters_grid.attach (inbox_filter, 0, 0); - filters_grid.attach (today_filter, 1, 0); - filters_grid.attach (scheduled_filter, 0, 1); - filters_grid.attach (filters_filter, 1, 1); + filters_flow.append (inbox_filter); + filters_flow.append (today_filter); + filters_flow.append (scheduled_filter); + filters_flow.append (labels_filter); + filters_flow.append (pinboard_filter); favorites_header = new Layouts.HeaderItem (_("Favorites")); favorites_header.placeholder_message = _("No favorites available. Create one by clicking on the '+' button"); @@ -81,17 +91,54 @@ public class Layouts.Sidebar : Gtk.Grid { google_projects_header = new Layouts.HeaderItem (); google_projects_header.margin_top = 6; + var whats_new_icon = new Widgets.DynamicIcon.from_icon_name ("gift") { + css_classes = { "gift-animation" } + }; + + var whats_new_label = new Gtk.Label (_("What’s new in Planify")) { + css_classes = { "underline" } + }; + + var close_button = new Gtk.Button () { + child = new Widgets.DynamicIcon.from_icon_name ("window-close"), + css_classes = { "flat", "no-padding" }, + hexpand = true, + halign = END, + margin_end = 3 + }; + + var whats_new_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { + css_classes = { "card", "padding-9" }, + vexpand = true, + valign = END, + margin_start = 3, + margin_end = 3, + margin_top = 9, + margin_bottom = 3 + }; + + whats_new_box.append (whats_new_icon); + whats_new_box.append (whats_new_label); + whats_new_box.append (close_button); + + var whats_new_revealer = new Gtk.Revealer () { + transition_type = Gtk.RevealerTransitionType.SWING_UP, + child = whats_new_box, + reveal_child = verify_new_version () + }; + var content_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { margin_start = 12, margin_end = 12, margin_bottom = 12, margin_top = 3 }; - - content_box.append (filters_grid); + + content_box.append (filters_flow); content_box.append (favorites_header); content_box.append (local_projects_header); content_box.append (todoist_projects_header); + content_box.append (whats_new_revealer); // content_box.append (google_projects_header); var scrolled_window = new Gtk.ScrolledWindow () { @@ -102,7 +149,7 @@ public class Layouts.Sidebar : Gtk.Grid { scrolled_window.child = content_box; - attach (scrolled_window, 0, 0); + child = scrolled_window; update_projects_sort (); var add_local_button = new Gtk.Button () { @@ -139,14 +186,15 @@ public class Layouts.Sidebar : Gtk.Grid { if (is_logged_in) { prepare_new_project (BackendType.TODOIST); - } else { - Services.Todoist.get_default ().init (); } }); Services.Settings.get_default ().settings.changed.connect ((key) => { if (key == "projects-sort-by" || key == "projects-ordered") { update_projects_sort (); + } else if (key == "views-order-visible") { + filters_flow.invalidate_sort (); + filters_flow.invalidate_filter (); } }); @@ -199,6 +247,37 @@ public class Layouts.Sidebar : Gtk.Grid { todoist_hashmap.unset (project.id); } }); + + var whats_new_gesture = new Gtk.GestureClick (); + whats_new_gesture.set_button (1); + whats_new_box.add_controller (whats_new_gesture); + + whats_new_gesture.pressed.connect (() => { + var dialog = new Dialogs.WhatsNew (); + dialog.show (); + + update_version (); + whats_new_revealer.reveal_child = verify_new_version (); + }); + + var close_gesture = new Gtk.GestureClick (); + close_gesture.set_button (1); + close_button.add_controller (close_gesture); + + close_gesture.pressed.connect (() => { + close_gesture.set_state (Gtk.EventSequenceState.CLAIMED); + + update_version (); + whats_new_revealer.reveal_child = verify_new_version (); + }); + } + + public void update_version () { + Services.Settings.get_default ().settings.set_string ("version", Build.VERSION); + } + + public bool verify_new_version () { + return Services.Settings.get_default ().settings.get_string ("version") != Build.VERSION; } public void verify_todoist_account () { @@ -271,7 +350,8 @@ public class Layouts.Sidebar : Gtk.Grid { inbox_filter.init (); today_filter.init (); scheduled_filter.init (); - filters_filter.init (); + labels_filter.init (); + pinboard_filter.init (); local_projects_header.reveal = true; diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 526fb3c87..85b2606d2 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -175,7 +175,7 @@ public class MainWindow : Adw.ApplicationWindow { add_scheduled_view (); } else if (id == FilterType.PINBOARD.to_string ()) { add_pinboard_view (); - } else if (id == FilterType.FILTER.to_string ()) { + } else if (id == FilterType.LABELS.to_string ()) { add_filters_view (); } else if (id.has_prefix ("priority")) { add_priority_view (id); @@ -270,7 +270,7 @@ public class MainWindow : Adw.ApplicationWindow { private void add_inbox_view () { add_project_view ( Services.Database.get_default ().get_project (Services.Settings.get_default ().settings.get_string ("inbox-project-id")) - ); + ); } public void add_today_view () { @@ -381,20 +381,20 @@ public class MainWindow : Adw.ApplicationWindow { today_view.prepare_new_item (content); } } else if (views_stack.visible_child_name.has_prefix ("scheduled-view")) { - // Views.Scheduled.Scheduled? scheduled_view = (Views.Scheduled.Scheduled) views_stack.visible_child; - // if (scheduled_view != null) { - // scheduled_view.prepare_new_item (content); - // } + Views.Scheduled.Scheduled? scheduled_view = (Views.Scheduled.Scheduled) views_stack.visible_child; + if (scheduled_view != null) { + scheduled_view.prepare_new_item (content); + } } else if (views_stack.visible_child_name.has_prefix ("pinboard-view")) { - // Views.Pinboard? pinboard_view = (Views.Pinboard) views_stack.visible_child; - // if (pinboard_view != null) { - // pinboard_view.prepare_new_item (content); - // } - } else if (views_stack.visible_child_name.has_prefix ("tasklist")) { - // Views.Tasklist? tasklist_view = (Views.Tasklist) views_stack.visible_child; - // if (tasklist_view != null) { - // tasklist_view.prepare_new_item (content); - // } + Views.Pinboard? pinboard_view = (Views.Pinboard) views_stack.visible_child; + if (pinboard_view != null) { + pinboard_view.prepare_new_item (content); + } + } else if (views_stack.visible_child_name.has_prefix ("priority-view")) { + Views.Filter? filter_view = (Views.Filter) views_stack.get_child_by_name ("priority-view"); + if (filter_view != null) { + filter_view.prepare_new_item (content); + } } } @@ -409,8 +409,14 @@ public class MainWindow : Adw.ApplicationWindow { if (project_view.project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().add.begin (new_section, (obj, res) => { - new_section.id = Services.Todoist.get_default ().add.end (res); - project_view.project.add_section_if_not_exists (new_section); + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + + if (response.status) { + new_section.id = response.data; + project_view.project.add_section_if_not_exists (new_section); + } else { + + } }); } else { new_section.id = Util.get_default ().generate_id (new_section); @@ -495,19 +501,21 @@ public class MainWindow : Adw.ApplicationWindow { } private void about_dialog () { - var dialog = new Adw.AboutWindow () { + string appdata_path = "/io/github/alainm23/planify/" + Build.APPLICATION_ID + ".appdata.xml.in.in"; + debug (appdata_path); + + var dialog = new Adw.AboutWindow.from_appdata (appdata_path, Build.VERSION) { transient_for = (Gtk.Window) Planify.instance.main_window, - modal = true + modal = true, + application_icon = Build.APPLICATION_ID, + application_name = "Planify", + developer_name = "Alain", + designers = { "Alain" }, + website = "https://github.com/alainm23/planify", + developers = { "Alain" }, + issue_url = "https://github.com/alainm23/planify/issues" }; dialog.show (); - - dialog.application_icon = Build.APPLICATION_ID; - dialog.application_name = "Planify"; - dialog.version = Build.VERSION; - dialog.developer_name = "Alain"; - dialog.website = "https://github.com/alainm23/planify"; - dialog.developers = { "Alain" }; - dialog.issue_url = "https://github.com/alainm23/planify/issues"; } } diff --git a/src/Objects/Backup.vala b/src/Objects/Backup.vala new file mode 100644 index 000000000..9aadd506f --- /dev/null +++ b/src/Objects/Backup.vala @@ -0,0 +1,127 @@ +public class Objects.Backup : Object { + public string version { get; set; default = ""; } + public string date { get; set; default = new GLib.DateTime.now_local ().to_string (); } + + public int default_inbox { get; set; default = 0; } + public string inbox_project_id { get; set; default = ""; } + public string local_inbox_project_id { get; set; default = ""; } + public string todoist_inbox_project_id { get; set; default = ""; } + public string todoist_access_token { get; set; default = ""; } + public string todoist_sync_token { get; set; default = ""; } + public string todoist_user_name { get; set; default = ""; } + public string todoist_user_email { get; set; default = ""; } + public string todoist_user_image_id { get; set; default = ""; } + public string todoist_user_avatar { get; set; default = ""; } + public bool todoist_user_is_premium { get; set; default = false; } + + public Gee.ArrayList projects { get; set; default = new Gee.ArrayList (); } + public Gee.ArrayList sections { get; set; default = new Gee.ArrayList (); } + public Gee.ArrayList items { get; set; default = new Gee.ArrayList (); } + public Gee.ArrayList labels { get; set; default = new Gee.ArrayList (); } + + public string path { get; set; } + public string error { get; set; default = ""; } + + GLib.DateTime _datetime; + public GLib.DateTime datetime { + get { + _datetime = new GLib.DateTime.from_iso8601 (date, new GLib.TimeZone.local ()); + return _datetime; + } + } + + private string _title; + public string title { + get { + _title = datetime.format ("%c"); + return _title; + } + } + + private bool _todoist_backend; + public bool todoist_backend { + get { + _todoist_backend = todoist_access_token.strip () != ""; + return _todoist_backend; + } + } + public bool google_backend { get; set; default = false; } + + public Backup.from_file (File file) { + var parser = new Json.Parser (); + + try { + parser.load_from_file (file.get_path ()); + path = file.get_path (); + + var node = parser.get_root ().get_object (); + + version = node.get_string_member ("version"); + date = node.get_string_member ("date"); + + // Set Settings + var settings = node.get_object_member ("settings"); + default_inbox = (int32) settings.get_int_member ("default-inbox"); + inbox_project_id = settings.get_string_member ("inbox-project-id"); + local_inbox_project_id = settings.get_string_member ("local-inbox-project-id"); + todoist_inbox_project_id = settings.get_string_member ("todoist-inbox-project-id"); + todoist_access_token = settings.get_string_member ("todoist-access-token"); + todoist_sync_token = settings.get_string_member ("todoist-sync-token"); + todoist_user_name = settings.get_string_member ("todoist-user-name"); + todoist_user_email = settings.get_string_member ("todoist-user-email"); + todoist_user_image_id = settings.get_string_member ("todoist-user-image-id"); + todoist_user_avatar = settings.get_string_member ("todoist-user-avatar"); + todoist_user_is_premium = settings.get_boolean_member ("todoist-user-is-premium"); + + // Labels + labels.clear (); + unowned Json.Array _labels = node.get_array_member ("labels"); + foreach (unowned Json.Node item in _labels.get_elements ()) { + labels.add (new Objects.Label.from_import_json (item)); + } + + // Projects + projects.clear (); + unowned Json.Array _projects = node.get_array_member ("projects"); + foreach (unowned Json.Node item in _projects.get_elements ()) { + projects.add (new Objects.Project.from_import_json (item)); + } + + // Sections + sections.clear (); + unowned Json.Array _sections = node.get_array_member ("sections"); + foreach (unowned Json.Node item in _sections.get_elements ()) { + sections.add (new Objects.Section.from_import_json (item)); + } + + // Items + items.clear (); + unowned Json.Array _items = node.get_array_member ("items"); + foreach (unowned Json.Node item in _items.get_elements ()) { + items.add (new Objects.Item.from_import_json (item)); + } + } catch (Error e) { + error = e.message; + } + } + + public bool valid () { + if (error != "") { + return false; + } + + if (version == null || version == "") { + return false; + } + + if (date == null || date == "") { + return false; + } + + if (projects.is_empty) { + return false; + } + + return true; + } +} \ No newline at end of file diff --git a/src/Services/ActionManager.vala b/src/Services/ActionManager.vala index bab03eb51..a71d990cb 100644 --- a/src/Services/ActionManager.vala +++ b/src/Services/ActionManager.vala @@ -183,7 +183,7 @@ public class Services.ActionManager : Object { private void action_view_pinboard () { Services.EventBus.get_default ().unselect_all (); - Services.EventBus.get_default ().pane_selected (PaneType.FILTER, FilterType.FILTER.to_string ()); + Services.EventBus.get_default ().pane_selected (PaneType.FILTER, FilterType.LABELS.to_string ()); } private void action_esc () { diff --git a/src/Services/Backups.vala b/src/Services/Backups.vala new file mode 100644 index 000000000..f828882c9 --- /dev/null +++ b/src/Services/Backups.vala @@ -0,0 +1,529 @@ +/* +* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public +* License as published by the Free Software Foundation; either +* version 3 of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public +* License along with this program; if not, write to the +* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +* Boston, MA 02110-1301 USA +* +* Authored by: Alain M. +*/ + +public class Services.Backups : Object { + private Json.Generator generator; + private Json.Builder builder; + private Json.Parser parser; + private string path; + + private static Backups? _instance; + public static Backups get_default () { + if (_instance == null) { + _instance = new Backups (); + } + + return _instance; + } + + Gee.ArrayList _backups = null; + public Gee.ArrayList backups { + get { + if (_backups == null) { + _backups = get_backups_collection (); + } + + return _backups; + } + } + + public signal void backup_added (Objects.Backup backup); + + construct { + generator = new Json.Generator (); + generator.pretty = true; + + builder = new Json.Builder (); + parser = new Json.Parser (); + path = Environment.get_user_data_dir () + "/io.github.alainm23.planify/backups"; + } + + public Gee.ArrayList get_backups_collection () { + Gee.ArrayList return_value = new Gee.ArrayList (); + + File directory = File.new_for_path (path); + + try { + var children = directory.enumerate_children ("standard::*," + FileAttribute.STANDARD_CONTENT_TYPE + "," + FileAttribute.STANDARD_IS_HIDDEN + "," + FileAttribute.STANDARD_IS_SYMLINK + "," + FileAttribute.STANDARD_SYMLINK_TARGET, GLib.FileQueryInfoFlags.NONE); + FileInfo file_info = null; + + while ((file_info = children.next_file ()) != null) { + if (file_info.get_is_hidden ()) { + continue; + } + + if (file_info.get_is_symlink ()) { + continue; + } else if (file_info.get_file_type () == FileType.DIRECTORY) { + continue; + } else { + string mime_type = file_info.get_content_type (); + string uri = directory.get_uri () + "/" + file_info.get_name ().replace ("#", "%23"); + + if (is_backup_file (mime_type)) { + var file = File.new_for_uri (uri); + var backup = new Objects.Backup.from_file (file); + return_value.add (backup); + } + } + } + + children.close (); + children.dispose (); + } catch (Error err) { + warning ("%s\n", err.message); + } + + directory.dispose (); + + return return_value; + } + + public static bool is_backup_file (string mime_type) { + return mime_type == "application/json"; + } + + public string export_to_json () { + builder.begin_object (); + + builder.set_member_name ("version"); + builder.add_string_value (Constants.BACKUP_VERSION); + + builder.set_member_name ("date"); + builder.add_string_value (new GLib.DateTime.now_local ().to_string ()); + + // Preferences + builder.set_member_name ("settings"); + builder.begin_object (); + + builder.set_member_name ("default-inbox"); + builder.add_int_value (Services.Settings.get_default ().settings.get_enum ("default-inbox")); + + builder.set_member_name ("inbox-project-id"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("inbox-project-id")); + + builder.set_member_name ("local-inbox-project-id"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("local-inbox-project-id")); + + builder.set_member_name ("todoist-inbox-project-id"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-inbox-project-id")); + + builder.set_member_name ("todoist-access-token"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-access-token")); + + builder.set_member_name ("todoist-sync-token"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-sync-token")); + + builder.set_member_name ("todoist-user-name"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-user-name")); + + builder.set_member_name ("todoist-user-email"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-user-email")); + + builder.set_member_name ("todoist-user-image-id"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-user-image-id")); + + builder.set_member_name ("todoist-user-avatar"); + builder.add_string_value (Services.Settings.get_default ().settings.get_string ("todoist-user-avatar")); + + builder.set_member_name ("todoist-user-is-premium"); + builder.add_boolean_value (Services.Settings.get_default ().settings.get_boolean ("todoist-user-is-premium")); + + builder.end_object (); + + // Labels + builder.set_member_name ("labels"); + builder.begin_array (); + + foreach (Objects.Label label in Services.Database.get_default ().labels) { + builder.begin_object (); + + builder.set_member_name ("id"); + builder.add_string_value (label.id); + + builder.set_member_name ("name"); + builder.add_string_value (label.name); + + builder.set_member_name ("color"); + builder.add_string_value (label.color); + + builder.set_member_name ("backend_type"); + builder.add_string_value (label.backend_type.to_string ()); + + builder.set_member_name ("is_deleted"); + builder.add_boolean_value (label.is_deleted); + + builder.set_member_name ("is_favorite"); + builder.add_boolean_value (label.is_favorite); + + builder.end_object (); + } + + builder.end_array (); + + // Projects + builder.set_member_name ("projects"); + builder.begin_array (); + foreach (Objects.Project project in Services.Database.get_default ().projects) { + builder.begin_object (); + + builder.set_member_name ("id"); + builder.add_string_value (project.id); + + builder.set_member_name ("name"); + builder.add_string_value (project.name); + + builder.set_member_name ("color"); + builder.add_string_value (project.color); + + builder.set_member_name ("backend_type"); + builder.add_string_value (project.backend_type.to_string ()); + + builder.set_member_name ("inbox_project"); + builder.add_boolean_value (project.inbox_project); + + builder.set_member_name ("team_inbox"); + builder.add_boolean_value (project.team_inbox); + + builder.set_member_name ("child_order"); + builder.add_int_value (project.child_order); + + builder.set_member_name ("is_deleted"); + builder.add_boolean_value (project.is_deleted); + + builder.set_member_name ("is_archived"); + builder.add_boolean_value (project.is_archived); + + builder.set_member_name ("is_favorite"); + builder.add_boolean_value (project.is_favorite); + + builder.set_member_name ("shared"); + builder.add_boolean_value (project.shared); + + builder.set_member_name ("view_style"); + builder.add_string_value (project.view_style.to_string ()); + + builder.set_member_name ("sort_order"); + builder.add_int_value (project.sort_order); + + builder.set_member_name ("parent_id"); + builder.add_string_value (project.parent_id); + + builder.set_member_name ("collapsed"); + builder.add_boolean_value (project.collapsed); + + builder.set_member_name ("icon_style"); + builder.add_string_value (project.icon_style.to_string ()); + + builder.set_member_name ("emoji"); + builder.add_string_value (project.emoji); + + builder.set_member_name ("show_completed"); + builder.add_boolean_value (project.show_completed); + + builder.set_member_name ("description"); + builder.add_string_value (project.description); + + builder.set_member_name ("due_date"); + builder.add_string_value (project.due_date); + + builder.end_object (); + } + builder.end_array (); + + // Sections + builder.set_member_name ("sections"); + builder.begin_array (); + foreach (Objects.Section section in Services.Database.get_default ().sections) { + builder.begin_object (); + + builder.set_member_name ("id"); + builder.add_string_value (section.id); + + builder.set_member_name ("name"); + builder.add_string_value (section.name); + + builder.set_member_name ("archived_at"); + builder.add_string_value (section.archived_at); + + builder.set_member_name ("added_at"); + builder.add_string_value (section.added_at); + + builder.set_member_name ("project_id"); + builder.add_string_value (section.project_id); + + builder.set_member_name ("section_order"); + builder.add_int_value (section.section_order); + + builder.set_member_name ("collapsed"); + builder.add_boolean_value (section.collapsed); + + builder.set_member_name ("is_deleted"); + builder.add_boolean_value (section.is_deleted); + + builder.set_member_name ("is_archived"); + builder.add_boolean_value (section.is_archived); + + builder.end_object (); + } + builder.end_array (); + + // Items + builder.set_member_name ("items"); + builder.begin_array (); + foreach (Objects.Item item in Services.Database.get_default ().items) { + builder.begin_object (); + + builder.set_member_name ("id"); + builder.add_string_value (item.id); + + builder.set_member_name ("content"); + builder.add_string_value (item.content); + + builder.set_member_name ("description"); + builder.add_string_value (item.description); + + builder.set_member_name ("due"); + builder.add_string_value (item.due.to_string ()); + + builder.set_member_name ("added_at"); + builder.add_string_value (item.added_at); + + builder.set_member_name ("completed_at"); + builder.add_string_value (item.completed_at); + + builder.set_member_name ("updated_at"); + builder.add_string_value (item.updated_at); + + builder.set_member_name ("section_id"); + builder.add_string_value (item.section_id); + + builder.set_member_name ("project_id"); + builder.add_string_value (item.project_id); + + builder.set_member_name ("parent_id"); + builder.add_string_value (item.parent_id); + + builder.set_member_name ("priority"); + builder.add_int_value (item.priority); + + builder.set_member_name ("child_order"); + builder.add_int_value (item.child_order); + + builder.set_member_name ("checked"); + builder.add_boolean_value (item.checked); + + builder.set_member_name ("is_deleted"); + builder.add_boolean_value (item.is_deleted); + + builder.set_member_name ("day_order"); + builder.add_int_value (item.day_order); + + builder.set_member_name ("collapsed"); + builder.add_boolean_value (item.collapsed); + + builder.set_member_name ("pinned"); + builder.add_boolean_value (item.pinned); + + builder.set_member_name ("labels"); + builder.begin_array (); + foreach (Objects.ItemLabel item_label in item.labels.values) { + builder.add_string_value (item_label.label.name); + } + builder.end_array (); + builder.end_object (); + + builder.end_object (); + } + builder.end_array (); + + builder.end_object (); + + Json.Generator generator = new Json.Generator (); + Json.Node root = builder.get_root (); + generator.set_root (root); + + return generator.to_data (null); + } + + public void create_backup () { + var datetime = new GLib.DateTime.now_local (); + var file_name = "Planify backup %s.json".printf (datetime.format ("%c")); + var path = path + "/" + file_name; + + var file = File.new_for_path (path); + + try { + var stream = file.create (FileCreateFlags.NONE, null); + stream.write (export_to_json ().data, null); + stream.close (null); + + var file_path = File.new_for_path (path); + if (file_path.query_exists ()) { + var backup = new Objects.Backup.from_file (file_path); + backup_added (backup); + } + } catch (Error e) { + debug ("Error: %s\n", e.message); + } + } + + public void save_file_as (Objects.Backup backup) { + var dialog = new Gtk.FileDialog (); + dialog.initial_name = "Planify backup %s.json".printf (backup.title); + add_filters (dialog); + + dialog.save.begin (Planify._instance.main_window, null, (obj, res) => { + try { + var file = dialog.save.end (res); + + if (!file.get_basename ().down ().has_suffix (".json")) { + file = File.new_for_path (file.get_path () + ".json"); + } + + var source_file = File.new_for_path (backup.path); + if (source_file.query_exists ()) { + source_file.copy (file, GLib.FileCopyFlags.OVERWRITE); + } else { + debug ("Error during save backup"); + } + } catch (Error e) { + debug ("Error during save backup: %s".printf (e.message)); + } + }); + } + + public async GLib.File? import_backup () { + var dialog = new Gtk.FileDialog (); + add_filters (dialog); + + try { + var file = yield dialog.open (Planify._instance.main_window, null); + return file; + } catch (Error e) { + debug ("Error during import backup: %s".printf (e.message)); + } + + return null; + } + + public void patch_backup (Objects.Backup backup) { + Services.Settings.get_default ().reset_settings (); + + Services.Settings.get_default ().settings.set_enum ("default-inbox", backup.default_inbox); + Services.Settings.get_default ().settings.set_string ("inbox-project-id", backup.inbox_project_id); + Services.Settings.get_default ().settings.set_string ("local-inbox-project-id", backup.local_inbox_project_id); + + if (backup.todoist_backend) { + Services.Settings.get_default ().settings.set_string ("todoist-inbox-project-id", backup.todoist_inbox_project_id); + Services.Settings.get_default ().settings.set_string ("todoist-sync-token", backup.todoist_sync_token); + Services.Settings.get_default ().settings.set_string ("todoist-access-token", backup.todoist_access_token); + Services.Settings.get_default ().settings.set_string ("todoist-user-image-id", backup.todoist_user_image_id); + Services.Settings.get_default ().settings.set_string ("todoist-user-avatar", backup.todoist_user_avatar); + Services.Settings.get_default ().settings.set_string ("todoist-user-name", backup.todoist_user_name); + Services.Settings.get_default ().settings.set_string ("todoist-user-email", backup.todoist_user_email); + Services.Settings.get_default ().settings.set_string ("todoist-last-sync", new GLib.DateTime.now_local ().to_string ()); + Services.Settings.get_default ().settings.set_boolean ("todoist-user-is-premium", backup.todoist_user_is_premium); + Services.Settings.get_default ().settings.set_boolean ("todoist-sync-server", true); + } + + // Clear Database + Services.Database.get_default ().clear_database (); + Services.Database.get_default ().init_database (); + + // Create Labels + foreach (Objects.Label item in backup.labels) { + Services.Database.get_default ().insert_label (item); + } + + // Create Projects + foreach (Objects.Project item in backup.projects) { + if (item.parent_id != "") { + Objects.Project? project = Services.Database.get_default ().get_project (item.parent_id); + if (project != null) { + project.add_subproject_if_not_exists (item); + } + } else { + Services.Database.get_default ().insert_project (item); + } + } + + // Create Sections + foreach (Objects.Section item in backup.sections) { + Objects.Project? project = Services.Database.get_default ().get_project (item.project_id); + if (project != null) { + project.add_section_if_not_exists (item); + } + } + + // Create Items + foreach (Objects.Item item in backup.items) { + if (item.parent_id != "") { + Objects.Item? _item = Services.Database.get_default ().get_item (item.parent_id); + if (_item != null) { + _item.add_item_if_not_exists (item); + } + } else { + if (item.section_id != "") { + Objects.Section? section = Services.Database.get_default ().get_section (item.section_id); + if (section != null) { + section.add_item_if_not_exists (item); + } + } else { + Objects.Project? project = Services.Database.get_default ().get_project (item.project_id); + if (project != null) { + project.add_item_if_not_exists (item); + } + } + } + } + + if (backup.todoist_user_avatar != null) { + Util.get_default ().download_profile_image ( + "todoist-user", backup.todoist_user_avatar + ); + } + + show_message (); + } + + private void show_message () { + var dialog = new Adw.MessageDialog (Planify._instance.main_window, + _("Backup successfully imported"), + _("Process completed, you need to start Planify again.") + ); + + dialog.modal = true; + dialog.add_response ("ok", _("Ok")); + dialog.show (); + + dialog.response.connect ((response) => { + Planify._instance.main_window.destroy (); + }); + } + + private void add_filters (Gtk.FileDialog file_dialog) { + Gtk.FileFilter filter = new Gtk.FileFilter (); + filter.add_pattern ("*.json"); + filter.set_filter_name (_("Planify backup files")); + file_dialog.default_filter = filter; + } +} \ No newline at end of file diff --git a/src/Services/CalendarEvents/CalendarEvents.vala b/src/Services/CalendarEvents/CalendarEvents.vala index 84662f2bd..606bc579a 100644 --- a/src/Services/CalendarEvents/CalendarEvents.vala +++ b/src/Services/CalendarEvents/CalendarEvents.vala @@ -171,7 +171,7 @@ data_range = new CalendarEventsUtil.DateRange (data_range_first, data_range_last); num_weeks = data_range.to_list ().size / 7; - print (@"Date ranges: ($data_range_first <= $month_start < $month_end <= $data_range_last)"); + debug (@"Date ranges: ($data_range_first <= $month_start < $month_end <= $data_range_last)"); } private void load_source (E.Source source) { @@ -238,12 +238,6 @@ debug (@"Component ['$(comp.get_summary())', $(source.dup_display_name()), $(comp.get_uid()))]"); } - /* --- Signal Handlers ---// */ - private void on_parameter_changed () { - compute_ranges (); - load_all_sources (); - } - private ECal.ClientView on_client_view_received (AsyncResult results, E.Source source, ECal.Client client) { ECal.ClientView view; try { diff --git a/src/Services/CalendarEvents/Util.vala b/src/Services/CalendarEvents/Util.vala index 76d1f8519..ac6de21d8 100644 --- a/src/Services/CalendarEvents/Util.vala +++ b/src/Services/CalendarEvents/Util.vala @@ -101,32 +101,6 @@ } } - private Gee.HashMap? providers; - public void set_component_calendar_color (E.SourceSelectable selectable, Gtk.Widget widget) { - // if (providers == null) { - // providers = new Gee.HashMap (); - // } - - // var color = selectable.dup_color (); - // if (!providers.has_key (color)) { - // string style = """ - // @define-color accent_color %s; - // """.printf (color); - - // try { - // var style_provider = new Gtk.CssProvider (); - // style_provider.load_from_data (style, style.length); - - // providers[color] = style_provider; - // } catch (Error e) { - // critical ("Unable to set calendar color: %s", e.message); - // } - // } - - // unowned Gtk.StyleContext style_context = widget.get_style_context (); - // style_context.add_provider (providers[color], Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - } - /* * Gee Utility Functions */ diff --git a/src/Services/GoogleTasks.vala b/src/Services/GoogleTasks.vala index d9b6fce5f..0ecf6790a 100644 --- a/src/Services/GoogleTasks.vala +++ b/src/Services/GoogleTasks.vala @@ -193,6 +193,6 @@ public class Services.GoogleTasks : GLib.Object { private void print_root (Json.Node root) { Json.Generator generator = new Json.Generator (); generator.set_root (root); - print (generator.to_data (null) + "\n"); + debug (generator.to_data (null) + "\n"); } } \ No newline at end of file diff --git a/src/Services/TimeMonitor.vala b/src/Services/TimeMonitor.vala index 2a6c67d1c..54db64c65 100644 --- a/src/Services/TimeMonitor.vala +++ b/src/Services/TimeMonitor.vala @@ -42,18 +42,18 @@ public class Services.TimeMonitor : Object { DateTime now = new DateTime.now_local (); if (now.get_day_of_month () != last_registered_date.get_day_of_month() || - now.get_month() != last_registered_date.get_month() || - now.get_year() != last_registered_date.get_year()) { + now.get_month() != last_registered_date.get_month () || + now.get_year() != last_registered_date.get_year ()) { Services.EventBus.get_default ().day_changed (); Services.Notification.get_default ().regresh (); last_registered_date = now; - uint interval = calculate_seconds_until_midnight(); + uint interval = calculate_seconds_until_midnight (); Timeout.add_seconds(interval, on_timeout); } else { - uint interval = calculate_seconds_until_midnight(); + uint interval = calculate_seconds_until_midnight (); Timeout.add_seconds(interval, on_timeout); } @@ -64,7 +64,7 @@ public class Services.TimeMonitor : Object { DateTime now = new DateTime.now_local (); uint value = (24 * 60 * 60) - - (now.get_hour() * 60 * 60 + now.get_minute() * 60 + now.get_second()); + (now.get_hour () * 60 * 60 + now.get_minute () * 60 + now.get_second ()); return value; } diff --git a/src/Views/Date.vala b/src/Views/Date.vala deleted file mode 100644 index 5e0c47c95..000000000 --- a/src/Views/Date.vala +++ /dev/null @@ -1,756 +0,0 @@ -/* -* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Views.Date : Gtk.Grid { - public GLib.DateTime date { get; set; } - public bool is_today_view { get; construct; } - - private Gtk.ListBox overdue_listbox; - private Gtk.ListBox listbox; - private Gtk.ListBox checked_listbox; - private Gtk.Revealer checked_revealer; - private Gtk.Stack listbox_stack; - private Gtk.Revealer main_revealer; - private Gtk.Revealer overdue_revealer; - private Gtk.Revealer today_label_revealer; - - public Gee.HashMap overdue_items; - public Gee.HashMap items; - public Gee.HashMap items_checked; - - private bool overdue_has_children { - get { - return Util.get_default ().get_children (overdue_listbox).length () > 0; - } - } - - private bool has_children { - get { - return Util.get_default ().get_children (listbox).length () > 0; - } - } - - public Date (bool is_today_view = false) { - Object ( - is_today_view: is_today_view - ); - } - - construct { - overdue_items = new Gee.HashMap (); - items = new Gee.HashMap (); - items_checked = new Gee.HashMap (); - - var overdue_label = new Gtk.Label (_("Overdue")) { - halign = Gtk.Align.START, - valign = Gtk.Align.CENTER, - hexpand = true, - margin_start = 26, - margin_bottom = 6 - }; - overdue_label.add_css_class ("font-bold"); - - var reschedule_button = new Gtk.Button.with_label (_("Reschedule")) { - can_focus = false, - hexpand = true, - halign = Gtk.Align.END - }; - reschedule_button.add_css_class (Granite.STYLE_CLASS_FLAT); - reschedule_button.add_css_class ("primary-color"); - reschedule_button.clicked.connect (open_datetime_picker); - - var overdue_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - overdue_box.append (overdue_label); - overdue_box.append (reschedule_button); - - overdue_listbox = new Gtk.ListBox () { - valign = Gtk.Align.START, - activate_on_single_click = true, - selection_mode = Gtk.SelectionMode.SINGLE, - hexpand = true - }; - - overdue_listbox.add_css_class ("listbox-background"); - - var overdue_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - margin_bottom = 12 - }; - overdue_grid.append (overdue_box); - overdue_grid.append (overdue_listbox); - - overdue_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN - }; - overdue_revealer.child = overdue_grid; - - var today_label = new Gtk.Label (_("Today")) { - halign = Gtk.Align.START, - valign = Gtk.Align.CENTER, - hexpand = true, - margin_start = 26, - margin_bottom = 6 - }; - today_label.add_css_class ("font-bold"); - - today_label_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN - }; - today_label_revealer.child = today_label; - - listbox = new Gtk.ListBox () { - valign = Gtk.Align.START, - selection_mode = Gtk.SelectionMode.NONE, - hexpand = true, - }; - - if (!is_today_view) { - listbox.set_placeholder (get_placeholder ()); - } - - listbox.add_css_class ("listbox-background"); - - checked_listbox = new Gtk.ListBox () { - valign = Gtk.Align.START, - activate_on_single_click = true, - selection_mode = Gtk.SelectionMode.SINGLE, - hexpand = true, - vexpand = true - }; - - // checked_listbox.add_css_class ("listbox-background"); - - var checked_listbox_grid = new Gtk.Grid (); - checked_listbox_grid.attach (checked_listbox, 0, 0); - - checked_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN - }; - - checked_revealer.child = checked_listbox_grid; - - var listbox_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - valign = Gtk.Align.START - }; - - listbox_grid.append (listbox); - listbox_grid.append (checked_revealer); - - var listbox_placeholder = new Widgets.Placeholder ( - _("Press 'a' or tap the plus button to create a new to-do"), "planner-check-circle" - ); - - listbox_stack = new Gtk.Stack () { - vexpand = true, - hexpand = true, - transition_type = Gtk.StackTransitionType.CROSSFADE - }; - - listbox_stack.add_named (listbox_grid, "listbox"); - listbox_stack.add_named (listbox_placeholder, "placeholder"); - - var main_grid = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { - vexpand = true, - hexpand = true - }; - - // main_grid.append (event_list); - main_grid.append (overdue_revealer); - main_grid.append (today_label_revealer); - main_grid.append (listbox_stack); - - main_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN - }; - main_revealer.child = main_grid; - - attach (main_revealer, 0, 0); - - if (is_today_view) { - update_date (new GLib.DateTime.now_local ()); - } - - Timeout.add (main_revealer.transition_duration, () => { - validate_placeholder (); - main_revealer.reveal_child = true; - return GLib.Source.REMOVE; - }); - - // overdue_listbox.add.connect (update_headers); - // overdue_listbox.remove.connect (update_headers); - // listbox.add.connect (update_headers); - // listbox.remove.connect (update_headers); - - Services.Database.get_default ().item_added.connect (valid_add_item); - Services.Database.get_default ().item_deleted.connect (valid_delete_item); - Services.Database.get_default ().item_updated.connect (valid_update_item); - - Services.EventBus.get_default ().item_moved.connect ((item) => { - if (items.has_key (item.id_string)) { - items[item.id_string].update_request (); - } - - if (overdue_items.has_key (item.id_string)) { - items[item.id_string].update_request (); - } - }); - - // listbox.add.connect (validate_placeholder); - // listbox.remove.connect (validate_placeholder); - // overdue_listbox.add.connect (validate_placeholder); - // overdue_listbox.remove.connect (validate_placeholder); - - // Services.Settings.get_default ().settings.changed.connect ((key) => { - // if (key == "show-today-completed") { - // show_completed_changed (); - // } - // }); - } - - private void show_completed_changed () { - if (Services.Settings.get_default ().settings.get_boolean ("show-today-completed")) { - add_completed_items (); - } else { - items_checked.clear (); - - foreach (unowned Gtk.Widget child in Util.get_default ().get_children (checked_listbox)) { - checked_listbox.remove (child); - } - } - - // checked_revealer.reveal_child = section.project.show_completed; - } - - private void add_completed_items () { - items_checked.clear (); - - foreach (unowned Gtk.Widget child in Util.get_default ().get_children (checked_listbox)) { - checked_listbox.remove (child); - } - - foreach (Objects.Item item in Services.Database.get_default ().get_items_by_date (new GLib.DateTime.now_local (), true)) { - if (item.completed) { - add_complete_item (item); - } - } - - checked_revealer.reveal_child = Services.Settings.get_default ().settings.get_boolean ("show-today-completed"); - } - - public void add_complete_item (Objects.Item item) { - if (Services.Settings.get_default ().settings.get_boolean ("show-today-completed") && item.checked) { - if (!items_checked.has_key (item.id_string)) { - items_checked [item.id_string] = new Layouts.ItemRow (item); - checked_listbox.append (items_checked [item.id_string]); - } - } - } - - private void open_datetime_picker () { - // var datetime_picker = new Dialogs.DateTimePicker.DateTimePicker (); - // datetime_picker.popup (); - - // datetime_picker.date_changed.connect (() => { - // set_datetime (datetime_picker.datetime); - // }); - } - - public void set_datetime (GLib.DateTime? date) { - // foreach (string key in overdue_items.keys) { - // print ("Item: %s\n".printf (key)); - // // if (overdue_items.has_key (key)) { - // // overdue_items[key].update_due (date); - // // } - // } - - foreach (unowned Gtk.Widget child in Util.get_default ().get_children (overdue_listbox)) { - ((Layouts.ItemRow) child).update_due (date); - } - } - - public void update_date (GLib.DateTime newDate) { - date = newDate; - // event_list.date = date; - - if (is_today_view) { - add_today_items (); - // show_completed_changed (); - } else { - add_items (date); - } - } - - private void validate_placeholder () { - if (is_today_view) { - listbox_stack.visible_child_name = overdue_has_children || has_children ? "listbox" : "placeholder"; - } else { - listbox_stack.visible_child_name = has_children ? "listbox" : "placeholder"; - } - } - - private void valid_add_item (Objects.Item item, bool insert = true) { - if (!items.has_key (item.id_string) && - Services.Database.get_default ().valid_item_by_date (item, date, false)) { - add_item (item); - } - - if (is_today_view && !overdue_items.has_key (item.id_string) && - Services.Database.get_default ().valid_item_by_overdue (item, date, false)) { - add_overdue_item (item); - } - } - - // private void valid_add_task (ECal.Component task) { - // GLib.DateTime date_now = new GLib.DateTime.now_local (); - // GLib.DateTime datetime = CalDAVUtil.ical_to_date_time_local ( - // task.get_icalcomponent ().get_due () - // ); - - // if (!tasks_map.has_key (task.get_icalcomponent ().get_uid ()) && - // Granite.DateTime.is_same_day (datetime, date)) { - // add_task (tasks_store[task.get_icalcomponent ().get_uid ()]); - // } - - // if (!overdue_tasks_map.has_key (task.get_icalcomponent ().get_uid ()) && - // datetime.compare (date_now) < 0 && - // !Granite.DateTime.is_same_day (datetime, date_now)) { - // add_overdue_task (tasks_store[task.get_icalcomponent ().get_uid ()]); - // } - // } - - private void valid_delete_item (Objects.Item item) { - if (items.has_key (item.id_string)) { - items[item.id_string].hide_destroy (); - items.unset (item.id_string); - } - - if (overdue_items.has_key (item.id_string)) { - overdue_items[item.id_string].hide_destroy (); - overdue_items.unset (item.id_string); - } - } - - private void valid_update_item (Objects.Item item) { - if (items.has_key (item.id_string)) { - items[item.id_string].update_request (); - } - - if (overdue_items.has_key (item.id_string)) { - overdue_items[item.id_string].update_request (); - } - - if (items.has_key (item.id_string) && !item.has_due) { - items[item.id_string].hide_destroy (); - items.unset (item.id_string); - } - - if (overdue_items.has_key (item.id_string) && !item.has_due) { - overdue_items[item.id_string].hide_destroy (); - overdue_items.unset (item.id_string); - } - - if (items.has_key (item.id_string) && item.has_due) { - if (!Services.Database.get_default ().valid_item_by_date (item, date, false)) { - items[item.id_string].hide_destroy (); - items.unset (item.id_string); - } - } - - if (overdue_items.has_key (item.id_string) && item.has_due) { - if (!Services.Database.get_default ().valid_item_by_overdue (item, date, false)) { - overdue_items[item.id_string].hide_destroy (); - overdue_items.unset (item.id_string); - } - } - - if (item.has_due) { - valid_add_item (item); - } - } - - private void add_items (GLib.DateTime date) { - items.clear (); - // tasks_map.clear (); - - foreach (unowned Gtk.Widget child in Util.get_default ().get_children (listbox)) { - listbox.remove (child); - } - - // BackendType backend_type = (BackendType) Services.Settings.get_default ().settings.get_enum ("backend-type"); - // if (backend_type == BackendType.LOCAL || backend_type == BackendType.TODOIST) { - // foreach (Objects.Item item in Services.Database.get_default ().get_items_by_date (date, false)) { - // add_item (item); - // } - // } else if (backend_type == BackendType.CALDAV) { - // foreach (Objects.Task task in tasks_store.values) { - // add_task (task); - // } - // } - } - - private void add_today_items () { - items.clear (); - // tasks_map.clear (); - - foreach (unowned Gtk.Widget child in Util.get_default ().get_children (listbox)) { - listbox.remove (child); - } - - foreach (Objects.Item item in Services.Database.get_default ().get_items_by_date (date, false)) { - print ("Item: %s\n".printf (item.content)); - add_item (item); - } - - // overdue_items.clear (); - - // foreach (unowned Gtk.Widget child in Util.get_default ().get_children (overdue_listbox)) { - // overdue_listbox.remove (child); - // } - - // foreach (Objects.Item item in Services.Database.get_default ().get_items_by_overdeue_view (false)) { - // add_overdue_item (item); - // } - - // update_headers (); - - - // foreach (Objects.Task task in tasks_store.values) { - // add_task (task); - // } - - // overdue_tasks_map.clear (); - - // foreach (unowned Gtk.Widget child in overdue_listbox.get_children ()) { - // child.destroy (); - // } - - // foreach (Objects.Task task in tasks_store.values) { - // add_overdue_task (task); - // } - - // update_headers (); - } - - private void update_headers () { - overdue_revealer.reveal_child = is_today_view && overdue_has_children; - today_label_revealer.reveal_child = overdue_revealer.reveal_child && has_children; - } - - private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); - listbox.append (items [item.id_string]); - listbox.show (); - } - - // private void add_task (Objects.Task task) { - // if (tasks_map.has_key (task.task.get_icalcomponent ().get_uid ())) { - // return; - // } - - // GLib.DateTime datetime = CalDAVUtil.ical_to_date_time_local ( - // task.task.get_icalcomponent ().get_due () - // ); - - // if (Granite.DateTime.is_same_day (datetime, date)) { - // tasks_map [task.task.get_icalcomponent ().get_uid ()] = new Layouts.TaskRow.for_component (task.task, task.source); - // listbox.add (tasks_map [task.task.get_icalcomponent ().get_uid ()]); - // listbox.show_all (); - // } - // } - - // private void add_overdue_task (Objects.Task task) { - // GLib.DateTime date_now = new GLib.DateTime.now_local (); - // GLib.DateTime datetime = CalDAVUtil.ical_to_date_time_local ( - // task.task.get_icalcomponent ().get_due () - // ); - - // if (datetime.compare (date_now) < 0 && - // !Granite.DateTime.is_same_day (datetime, date_now)) { - // overdue_tasks_map [task.task.get_icalcomponent ().get_uid ()] = new Layouts.TaskRow.for_component (task.task, task.source); - // overdue_listbox.add (overdue_tasks_map [task.task.get_icalcomponent ().get_uid ()]); - // overdue_listbox.show_all (); - // } - // } - - private void add_overdue_item (Objects.Item item) { - overdue_items [item.id_string] = new Layouts.ItemRow (item); - overdue_listbox.append (overdue_items [item.id_string]); - } - - private Gtk.Widget get_placeholder () { - var calendar_image = new Widgets.DynamicIcon () { - opacity = 0.1 - }; - calendar_image.size = 96; - - calendar_image.update_icon_name ("planner-calendar"); - if (is_today_view) { - calendar_image.update_icon_name ("planner-star"); - } - - var grid = new Gtk.Grid () { - margin_top = 128, - halign = Gtk.Align.CENTER - }; - grid.attach (calendar_image, 0, 0); - - return grid; - } - - public void prepare_new_item (string content = "") { - // BackendType backend_type = (BackendType) Services.Settings.get_default ().settings.get_enum ("backend-type"); - // if (backend_type == BackendType.LOCAL || backend_type == BackendType.TODOIST) { - // Services.EventBus.get_default ().item_selected (null); - - // var row = new Layouts.ItemRow.for_project ( - // Planify.database.get_project (Services.Settings.get_default ().settings.get_int64 ("inbox-project-id")) - // ); - - // row.update_due (Util.get_default ().get_format_date (date)); - // row.update_content (content); - // row.update_priority (Util.get_default ().get_default_priority ()); - - // row.item_added.connect (() => { - // item_added (row); - // }); - - // listbox.add (row); - // listbox.show_all (); - // } else if (backend_type == BackendType.CALDAV) { - // try { - // var registry = Services.CalDAV.get_default ().get_registry_sync (); - - // var row = new Layouts.TaskRow.for_source (registry.default_task_list); - - // row.update_due (Util.get_default ().get_format_date (date)); - // row.update_content (content); - // row.update_priority (Util.get_default ().get_default_priority ()); - - // listbox.add (row); - // listbox.show_all (); - // } catch (Error e) { - // warning (e.message); - // } - // } - } - - private void item_added (Layouts.ItemRow row) { - bool insert = true; - if (row.item.has_due) { - insert = !Util.get_default ().is_same_day (date, row.item.due.datetime); - } - - if (!insert) { - valid_add_itemrow (row); - row.update_inserted_item (); - } - - if (row.item.section_id != "") { - Services.Database.get_default ().get_section (row.item.section_id) - .add_item_if_not_exists (row.item); - } else { - Services.Database.get_default ().get_project (row.item.project_id) - .add_item_if_not_exists (row.item); - } - - if (insert) { - row.hide_destroy (); - } - } - - private void valid_add_itemrow (Layouts.ItemRow row) { - if (is_today_view) { - if (!items.has_key (row.item.id_string) && - Services.Database.get_default ().valid_item_by_date (row.item, date, false)) { - items [row.item.id_string] = row; - listbox.append (items [row.item.id_string]); - } - - if (is_today_view && !overdue_items.has_key (row.item.id_string) && - Services.Database.get_default ().valid_item_by_overdue (row.item, date, false)) { - overdue_items [row.item.id_string] = row; - overdue_listbox.append (overdue_items [row.item.id_string]); - } - } else { - if (!items.has_key (row.item.id_string)) { - items [row.item.id_string] = row; - listbox.append (items [row.item.id_string]); - } - } - } - - // private void add_task_list (E.Source task_list) { - // if (!task_list.has_extension (E.SOURCE_EXTENSION_TASK_LIST)) { - // return; - // } - - // E.SourceTaskList list = (E.SourceTaskList) task_list.get_extension (E.SOURCE_EXTENSION_TASK_LIST); - - // if (list.selected == true && task_list.enabled == true && !task_list.has_extension (E.SOURCE_EXTENSION_COLLECTION)) { - // add_view (task_list, QUERY); - // } - // } - - // private void add_view (E.Source source, string query) { - // try { - // var view = Services.CalDAV.get_default ().create_task_list_view ( - // source, - // query, - // on_tasks_added, - // on_tasks_modified, - // on_tasks_removed - // ); - - // lock (views) { - // views.set (source, view); - // } - - // } catch (Error e) { - // critical (e.message); - // } - // } - - // private void on_tasks_added (Gee.Collection tasks, E.Source source) { - // if (tasks_store == null) { - // tasks_store = new Gee.HashMap (); - // } - - // foreach (ECal.Component task in tasks) { - // if (task != null && !tasks_store.has_key (task.get_icalcomponent ().get_uid ())) { - // tasks_store[task.get_icalcomponent ().get_uid ()] = new Objects.Task (task, source); - // } - // } - - // Layouts.TaskRow task_row = null; - // var row_index = 0; - - // if (tasks_map == null) { - // tasks_map = new Gee.HashMap (); - // } - - // do { - // task_row = (Layouts.TaskRow) listbox.get_row_at_index (row_index); - - // if (task_row != null) { - // foreach (ECal.Component task in tasks) { - // string uid = task.get_icalcomponent ().get_uid (); - // if (CalDAVUtil.calcomponent_equal_func (task_row.task, task) && !task_row.created) { - // task_row.task = task; - // tasks_map[uid] = task_row; - // task_row.edit = false; - - // break; - // } - // } - // } - - // row_index++; - // } while (task_row != null); - - // foreach (ECal.Component task in tasks) { - // add_task (new Objects.Task (task, source)); - - // if (is_today_view) { - // add_overdue_task (new Objects.Task (task, source)); - // } - // } - // } - - // private void on_tasks_modified (Gee.Collection tasks) { - // foreach (ECal.Component task in tasks) { - // if (task != null && tasks_store.has_key (task.get_icalcomponent ().get_uid ())) { - // tasks_store[task.get_icalcomponent ().get_uid ()].task = task; - // } - - // if (tasks_map.has_key (task.get_icalcomponent ().get_uid ())) { - // tasks_map[task.get_icalcomponent ().get_uid ()].task = task; - // } - - // if (overdue_tasks_map.has_key (task.get_icalcomponent ().get_uid ())) { - // overdue_tasks_map[task.get_icalcomponent ().get_uid ()].task = task; - // } - - // // if (tasks_map.has_key (task.get_icalcomponent ().get_uid ()) && - // // task.get_icalcomponent ().get_due ().is_null_time ()) { - // // tasks_map[task.get_icalcomponent ().get_uid ()].hide_destroy (); - // // tasks_map.unset (task.get_icalcomponent ().get_uid ()); - // // } - - // // if (overdue_tasks_map.has_key (task.get_icalcomponent ().get_uid ()) && - // // task.get_icalcomponent ().get_due ().is_null_time ()) { - // // overdue_tasks_map[task.get_icalcomponent ().get_uid ()].hide_destroy (); - // // overdue_tasks_map.unset (task.get_icalcomponent ().get_uid ()); - // // } - - // if (tasks_map.has_key (task.get_icalcomponent ().get_uid ()) && - // !task.get_icalcomponent ().get_due ().is_null_time ()) { - // GLib.DateTime datetime = CalDAVUtil.ical_to_date_time_local ( - // task.get_icalcomponent ().get_due () - // ); - - // if (!Granite.DateTime.is_same_day (datetime, date)) { - // tasks_map [task.get_icalcomponent ().get_uid ()].hide_destroy (); - // tasks_map.unset (task.get_icalcomponent ().get_uid ()); - // } - // } - - // if (overdue_tasks_map.has_key (task.get_icalcomponent ().get_uid ()) && - // !task.get_icalcomponent ().get_due ().is_null_time ()) { - // GLib.DateTime date_now = new GLib.DateTime.now_local (); - // GLib.DateTime datetime = CalDAVUtil.ical_to_date_time_local ( - // task.get_icalcomponent ().get_due () - // ); - - // if (!(datetime.compare (date_now) < 0 && - // !Granite.DateTime.is_same_day (datetime, date_now))) { - // overdue_tasks_map[task.get_icalcomponent ().get_uid ()].hide_destroy (); - // overdue_tasks_map.unset (task.get_icalcomponent ().get_uid ()); - // } - // } - - // if (!task.get_icalcomponent ().get_due ().is_null_time ()) { - // valid_add_task (task); - // } - // } - // } - - // private void on_tasks_removed (SList cids) { - // foreach (unowned ECal.ComponentId cid in cids) { - // if (cid == null) { - // continue; - // } else if (tasks_store.has_key (cid.get_uid ())) { - // tasks_store.unset (cid.get_uid ()); - // break; - // } - // } - - // foreach (unowned ECal.ComponentId cid in cids) { - // if (tasks_map.has_key (cid.get_uid ())) { - // tasks_map[cid.get_uid ()].hide_destroy (); - // tasks_map.unset (cid.get_uid ()); - // } - - // if (overdue_tasks_map.has_key (cid.get_uid ())) { - // overdue_tasks_map[cid.get_uid ()].hide_destroy (); - // overdue_tasks_map.unset (cid.get_uid ()); - // } - // } - // } -} diff --git a/src/Views/Filter.vala b/src/Views/Filter.vala index 39d078986..7cebcc574 100644 --- a/src/Views/Filter.vala +++ b/src/Views/Filter.vala @@ -24,6 +24,7 @@ public class Views.Filter : Adw.Bin { private Gtk.ListBox listbox; private Gtk.Grid listbox_grid; private Gtk.Stack listbox_stack; + private Widgets.MagicButton magic_button; public Gee.HashMap items; @@ -100,9 +101,19 @@ public class Views.Filter : Adw.Bin { scrolled_window.child = content_clamp; + magic_button = new Widgets.MagicButton (); + + var content_overlay = new Gtk.Overlay () { + hexpand = true, + vexpand = true + }; + + content_overlay.child = scrolled_window; + content_overlay.add_overlay (magic_button); + var toolbar_view = new Adw.ToolbarView (); toolbar_view.add_top_bar (headerbar); - toolbar_view.content = scrolled_window; + toolbar_view.content = content_overlay; child = toolbar_view; @@ -121,6 +132,26 @@ public class Views.Filter : Adw.Bin { items[item.id_string].update_request (); } }); + + magic_button.clicked.connect (() => { + prepare_new_item (); + }); + } + + public void prepare_new_item (string content = "") { + var inbox_project = Services.Database.get_default ().get_project ( + Services.Settings.get_default ().settings.get_string ("inbox-project-id") + ); + + var dialog = new Dialogs.QuickAdd (); + dialog.set_project (inbox_project); + dialog.update_content (content); + + if (filter is Objects.Priority) { + Objects.Priority priority = ((Objects.Priority) filter); + dialog.set_priority (priority.priority); + dialog.show (); + } } private void update_request () { @@ -129,10 +160,12 @@ public class Views.Filter : Adw.Bin { headerbar.title = priority.name; listbox.set_header_func (null); listbox_grid.margin_top = 12; + magic_button.visible = true; } else if (filter is Objects.Completed) { headerbar.title = _("Completed"); listbox.set_header_func (header_completed_function); listbox_grid.margin_top = 0; + magic_button.visible = false; } } @@ -156,7 +189,9 @@ public class Views.Filter : Adw.Bin { } private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } diff --git a/src/Views/Label/Label.vala b/src/Views/Label/Label.vala index 569205666..79e51135a 100644 --- a/src/Views/Label/Label.vala +++ b/src/Views/Label/Label.vala @@ -128,7 +128,7 @@ public class Views.Label : Adw.Bin { }); headerbar.back_activated.connect (() => { - Services.EventBus.get_default ().pane_selected (PaneType.FILTER, FilterType.FILTER.to_string ()); + Services.EventBus.get_default ().pane_selected (PaneType.FILTER, FilterType.LABELS.to_string ()); }); } @@ -178,7 +178,9 @@ public class Views.Label : Adw.Bin { } private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } diff --git a/src/Views/Pinboard.vala b/src/Views/Pinboard.vala index d0e7340a2..20f78f811 100644 --- a/src/Views/Pinboard.vala +++ b/src/Views/Pinboard.vala @@ -89,9 +89,19 @@ public class Views.Pinboard : Adw.Bin { scrolled_window.child = content_clamp; + var magic_button = new Widgets.MagicButton (); + + var content_overlay = new Gtk.Overlay () { + hexpand = true, + vexpand = true + }; + + content_overlay.child = scrolled_window; + content_overlay.add_overlay (magic_button); + var toolbar_view = new Adw.ToolbarView (); toolbar_view.add_top_bar (headerbar); - toolbar_view.content = scrolled_window; + toolbar_view.content = content_overlay; child = toolbar_view; add_items (); @@ -110,6 +120,10 @@ public class Views.Pinboard : Adw.Bin { items[item.id_string].update_request (); } }); + + magic_button.clicked.connect (() => { + prepare_new_item (); + }); } private void validate_placeholder () { @@ -117,59 +131,15 @@ public class Views.Pinboard : Adw.Bin { } public void prepare_new_item (string content = "") { - listbox_stack.visible_child_name = "listbox"; - Services.EventBus.get_default ().item_selected (null); - - var row = new Layouts.ItemRow.for_project ( - Services.Database.get_default ().get_project (Services.Settings.get_default ().settings.get_string ("inbox-project-id")) + var inbox_project = Services.Database.get_default ().get_project ( + Services.Settings.get_default ().settings.get_string ("inbox-project-id") ); - row.update_content (content); - row.update_priority (Util.get_default ().get_default_priority ()); - row.update_pinned (true); - - row.item_added.connect (() => { - item_added (row); - }); - - row.widget_destroyed.connect (() => { - validate_placeholder (); - }); - - listbox.insert (row, 0); - - Timeout.add (225, () => { - scrolled_window.vadjustment.value = 0; - return GLib.Source.REMOVE; - }); - } - - private void item_added (Layouts.ItemRow row) { - bool insert = !row.item.pinned; - - if (!insert) { - valid_add_itemrow (row); - row.update_inserted_item (); - } - - if (row.item.section_id != "") { - Services.Database.get_default ().get_section (row.item.section_id) - .add_item_if_not_exists (row.item); - } else { - Services.Database.get_default ().get_project (row.item.project_id) - .add_item_if_not_exists (row.item); - } - - if (insert) { - row.hide_destroy (); - } - } - - private void valid_add_itemrow (Layouts.ItemRow row) { - if (!items.has_key (row.item.id_string) && row.item.pinned) { - items [row.item.id_string] = row; - listbox.append (items [row.item.id_string]); - } + var dialog = new Dialogs.QuickAdd (); + dialog.update_content (content); + dialog.set_project (inbox_project); + dialog.set_pinned (true); + dialog.show (); } private void valid_add_item (Objects.Item item, bool insert = true) { @@ -205,7 +175,9 @@ public class Views.Pinboard : Adw.Bin { } private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } } diff --git a/src/Views/Project/List.vala b/src/Views/Project/List.vala index a4334e564..1e4f5cefe 100644 --- a/src/Views/Project/List.vala +++ b/src/Views/Project/List.vala @@ -252,12 +252,10 @@ public class Views.List : Gtk.Grid { } public void prepare_new_item (string content = "") { - listbox_placeholder_stack.visible_child_name = "listbox"; - inbox_section.prepare_new_item (content); - Timeout.add (225, () => { - scrolled_window.vadjustment.value = 0; - return GLib.Source.REMOVE; - }); + var dialog = new Dialogs.QuickAdd (); + dialog.set_project (project); + dialog.update_content (content); + dialog.show (); } public bool validate_children () { diff --git a/src/Views/Project/Project.vala b/src/Views/Project/Project.vala index ab650976a..7bd56bb15 100644 --- a/src/Views/Project/Project.vala +++ b/src/Views/Project/Project.vala @@ -234,10 +234,14 @@ public class Views.Project : Gtk.Grid { if (project.backend_type == BackendType.TODOIST) { add_section_item.is_loading = true; Services.Todoist.get_default ().add.begin (new_section, (obj, res) => { - new_section.id = Services.Todoist.get_default ().add.end (res); - project.add_section_if_not_exists (new_section); - add_section_item.is_loading = false; - popover.popdown (); + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + + if (response.status) { + new_section.id = response.data; + project.add_section_if_not_exists (new_section); + add_section_item.is_loading = false; + popover.popdown (); + } }); } else { new_section.id = Util.get_default ().generate_id (new_section); @@ -282,7 +286,7 @@ public class Views.Project : Gtk.Grid { if (response == "delete") { if (project.backend_type == BackendType.TODOIST) { Services.Todoist.get_default ().delete.begin (project, (obj, res) => { - if (Services.Todoist.get_default ().delete.end (res)) { + if (Services.Todoist.get_default ().delete.end (res).status) { Services.Database.get_default ().delete_project (project); } }); diff --git a/src/Views/Scheduled/Scheduled.vala b/src/Views/Scheduled/Scheduled.vala index 6cbc535ac..ad8bbe547 100644 --- a/src/Views/Scheduled/Scheduled.vala +++ b/src/Views/Scheduled/Scheduled.vala @@ -69,12 +69,26 @@ public class Views.Scheduled.Scheduled : Adw.Bin { scrolled_window.child = content_clamp; + var magic_button = new Widgets.MagicButton (); + + var content_overlay = new Gtk.Overlay () { + hexpand = true, + vexpand = true + }; + + content_overlay.child = scrolled_window; + content_overlay.add_overlay (magic_button); + var toolbar_view = new Adw.ToolbarView (); toolbar_view.add_top_bar (headerbar); - toolbar_view.content = scrolled_window; + toolbar_view.content = content_overlay; child = toolbar_view; add_days (); + + magic_button.clicked.connect (() => { + prepare_new_item (); + }); } private void add_days () { @@ -108,4 +122,16 @@ public class Views.Scheduled.Scheduled : Adw.Bin { listbox.append (row); } } + + public void prepare_new_item (string content = "") { + var inbox_project = Services.Database.get_default ().get_project ( + Services.Settings.get_default ().settings.get_string ("inbox-project-id") + ); + + var dialog = new Dialogs.QuickAdd (); + dialog.update_content (content); + dialog.set_project (inbox_project); + dialog.set_due (Util.get_default ().get_format_date (new GLib.DateTime.now_local ().add_days (1))); + dialog.show (); + } } diff --git a/src/Views/Scheduled/ScheduledDay.vala b/src/Views/Scheduled/ScheduledDay.vala index 1bd5b7e86..5efb86fab 100644 --- a/src/Views/Scheduled/ScheduledDay.vala +++ b/src/Views/Scheduled/ScheduledDay.vala @@ -149,7 +149,9 @@ public class Views.Scheduled.ScheduledDay : Gtk.ListBoxRow { private void add_item (Objects.Item item) { if (!items.has_key (item.id_string)) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } } @@ -157,7 +159,9 @@ public class Views.Scheduled.ScheduledDay : Gtk.ListBoxRow { private void valid_add_item (Objects.Item item) { if (!items.has_key (item.id_string) && Services.Database.get_default ().valid_item_by_date (item, date, false)) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } diff --git a/src/Views/Scheduled/ScheduledMonth.vala b/src/Views/Scheduled/ScheduledMonth.vala index a4382d64b..b752f07dd 100644 --- a/src/Views/Scheduled/ScheduledMonth.vala +++ b/src/Views/Scheduled/ScheduledMonth.vala @@ -138,14 +138,18 @@ public class Views.Scheduled.ScheduledMonth : Gtk.ListBoxRow { } private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } private void valid_add_item (Objects.Item item) { if (!items.has_key (item.id_string) && Services.Database.get_default ().valid_item_by_month (item, date, false)) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } diff --git a/src/Views/Scheduled/ScheduledRange.vala b/src/Views/Scheduled/ScheduledRange.vala index eb78a8290..3c6e70240 100644 --- a/src/Views/Scheduled/ScheduledRange.vala +++ b/src/Views/Scheduled/ScheduledRange.vala @@ -149,14 +149,18 @@ public class Views.Scheduled.ScheduledRange : Gtk.ListBoxRow { } private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } private void valid_add_item (Objects.Item item) { if (!items.has_key (item.id_string) && Services.Database.get_default ().valid_item_by_date_range (item, start_date, end_date, false)) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); } diff --git a/src/Views/Today.vala b/src/Views/Today.vala index 00578f67e..4925ac977 100644 --- a/src/Views/Today.vala +++ b/src/Views/Today.vala @@ -304,14 +304,18 @@ public class Views.Today : Adw.Bin { } private void add_item (Objects.Item item) { - items [item.id_string] = new Layouts.ItemRow (item); + items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; listbox.append (items [item.id_string]); update_headers (); check_placeholder (); } private void add_overdue_item (Objects.Item item) { - overdue_items [item.id_string] = new Layouts.ItemRow (item); + overdue_items [item.id_string] = new Layouts.ItemRow (item) { + show_project_label = true + }; overdue_listbox.append (overdue_items [item.id_string]); update_headers (); check_placeholder (); @@ -389,67 +393,17 @@ public class Views.Today : Adw.Bin { } public void prepare_new_item (string content = "") { - listbox_placeholder_stack.visible_child_name = "listbox"; - Timeout.add (225, () => { - scrolled_window.vadjustment.value = 0; - return GLib.Source.REMOVE; - }); - - Services.EventBus.get_default ().item_selected (null); - - var row = new Layouts.ItemRow.for_project ( - Services.Database.get_default ().get_project (Services.Settings.get_default ().settings.get_string ("inbox-project-id")) + var inbox_project = Services.Database.get_default ().get_project ( + Services.Settings.get_default ().settings.get_string ("inbox-project-id") ); - row.update_due (Util.get_default ().get_format_date (date)); - row.update_content (content); - row.update_priority (Util.get_default ().get_default_priority ()); - - row.item_added.connect (() => { - item_added (row); - }); - - row.widget_destroyed.connect (() => { - check_placeholder (); - }); - - if (today_has_children) { - listbox.insert (row, 0); - } else { - listbox.append (row); - } - } - - private void item_added (Layouts.ItemRow row) { - bool insert = true; - if (row.item.has_due) { - insert = !Util.get_default ().is_same_day (date, row.item.due.datetime); - } - - if (!insert) { - if (!items.has_key (row.item.id_string)) { - items [row.item.id_string] = row; - } - - row.update_inserted_item (); - } - - if (row.item.section_id != "") { - Services.Database.get_default ().get_section (row.item.section_id) - .add_item_if_not_exists (row.item); - } else { - Services.Database.get_default ().get_project (row.item.project_id) - .add_item_if_not_exists (row.item); - } - - update_headers (); - check_placeholder (); - - if (insert) { - row.hide_destroy (); - } + var dialog = new Dialogs.QuickAdd (); + dialog.update_content (content); + dialog.set_project (inbox_project); + dialog.set_due (Util.get_default ().get_format_date (date)); + dialog.show (); } - + private void update_headers () { if (overdue_has_children) { overdue_revealer.reveal_child = true; diff --git a/src/Widgets/CalendarSourceRow.vala b/src/Widgets/CalendarSourceRow.vala deleted file mode 100644 index ba1485889..000000000 --- a/src/Widgets/CalendarSourceRow.vala +++ /dev/null @@ -1,68 +0,0 @@ -/* -* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Widgets.CalendarSourceRow : Gtk.ListBoxRow { - public E.Source source { get; construct; } - - public bool source_enabled { - get { - return checked_button.active; - } - } - - private Gtk.CheckButton checked_button; - - public signal void visible_changed (); - - public CalendarSourceRow (E.Source source) { - Object (source: source); - } - - construct { - E.SourceCalendar cal = (E.SourceCalendar)source.get_extension (E.SOURCE_EXTENSION_CALENDAR); - - checked_button = new Gtk.CheckButton.with_label (source.dup_display_name ()); - // checked_button.add_css_class ("default_check"); - - var source_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - source_box.append (checked_button); - - child = source_box; - - style_calendar_color (cal.dup_color ()); - checked_button.toggled.connect (() => { - visible_changed (); - }); - } - - private void style_calendar_color (string color) { - print ("COLOR: %s\n".printf (color)); - // string style = """ - // @define-color colorAccent %s; - // @define-color accent_color %s; - // """.printf (color.slice (0, 7), color.slice (0, 7)); - - // var style_provider = new Gtk.CssProvider (); - - // style_provider.load_from_data (style.data); - // checked_button.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - } -} \ No newline at end of file diff --git a/src/Widgets/DateTimePicker/TimePicker.vala b/src/Widgets/DateTimePicker/TimePicker.vala deleted file mode 100644 index c77d29a0f..000000000 --- a/src/Widgets/DateTimePicker/TimePicker.vala +++ /dev/null @@ -1,323 +0,0 @@ -/* -* Copyright © 2023 Alain M. (https://github.com/alainm23/planify) -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public -* License as published by the Free Software Foundation; either -* version 3 of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public -* License along with this program; if not, write to the -* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -* Boston, MA 02110-1301 USA -* -* Authored by: Alain M. -*/ - -public class Widgets.DateTimePicker.TimePicker : Gtk.Grid { - private Gtk.Button time_button; - private Gtk.ToggleButton am_togglebutton; - private Gtk.ToggleButton pm_togglebutton; - private Gtk.Box am_pm_box; - private Gtk.SpinButton hours_spinbutton; - private Gtk.SpinButton minutes_spinbutton; - private Gtk.Stack time_stack; - private Gtk.Revealer no_time_revealer; - private Gtk.Popover popover; - - public string format_12 { get; construct; } - public string format_24 { get; construct; } - - private GLib.DateTime _time = null; - public GLib.DateTime time { - get { - if (_time == null) { - time = new GLib.DateTime.now_local (); - } - - return _time; - } - - set { - _time = value; - changing_time = true; - - if (_time.get_hour () >= 12) { - pm_togglebutton.active = true; - } else { - am_togglebutton.active = true; - } - - update_text (true); - changing_time = false; - } - } - - public bool has_time { - get { - return time_stack.visible_child_name == "time-box"; - } - - set { - time_stack.visible_child_name = value ? "time-box" : "add-time"; - } - } - - public bool no_time_visible { - set { - no_time_revealer.reveal_child = value; - } - } - - private string old_string = ""; - private bool changing_time = false; - - public signal void time_changed (); - - construct { - time_button = new Gtk.Button.with_label ("") { - valign = Gtk.Align.CENTER - }; - - time_button.add_css_class ("time-button-picker"); - time_button.add_css_class (Granite.STYLE_CLASS_FLAT); - - var close_circle_icon = new Widgets.DynamicIcon (); - close_circle_icon.size = 16; - close_circle_icon.update_icon_name ("planner-close-circle"); - - var no_time_button = new Gtk.Button () { - valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER - }; - - no_time_button.child = close_circle_icon; - no_time_button.add_css_class (Granite.STYLE_CLASS_FLAT); - - no_time_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT, - reveal_child = true - }; - - no_time_revealer.child = no_time_button; - - var time_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0); - time_box.append (time_button); - time_box.append (no_time_revealer); - - var add_circle_icon = new Widgets.DynamicIcon (); - add_circle_icon.size = 16; - add_circle_icon.update_icon_name ("plus"); - - var add_time_button = new Gtk.Button () { - valign = Gtk.Align.CENTER, - halign = Gtk.Align.END - }; - - add_time_button.child = add_circle_icon; - add_time_button.add_css_class (Granite.STYLE_CLASS_FLAT); - - time_stack = new Gtk.Stack () { - transition_type = Gtk.StackTransitionType.CROSSFADE - }; - time_stack.add_named (add_time_button, "add-time"); - time_stack.add_named (time_box, "time-box"); - - var timepicker_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { - margin_start = 3, - hexpand = true - }; - - timepicker_box.append (time_stack); - - /* - * Build Time Popover - */ - - if (format_12 == null) { - format_12 = Granite.DateTime.get_default_time_format (true); - } - - if (format_24 == null) { - format_24 = Granite.DateTime.get_default_time_format (false); - } - - /// TRANSLATORS: this will only show up when 12-hours clock is in use - am_togglebutton = new Gtk.ToggleButton.with_label (_("AM")) { - vexpand = true - }; - - /// TRANSLATORS: this will only show up when 12-hours clock is in use - pm_togglebutton = new Gtk.ToggleButton.with_label (_("PM")) { - group = am_togglebutton, - vexpand = true - }; - - am_pm_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); - am_pm_box.add_css_class (Granite.STYLE_CLASS_LINKED); - am_pm_box.append (am_togglebutton); - am_pm_box.append (pm_togglebutton); - - if (Util.get_default ().is_clock_format_12h ()) { - hours_spinbutton = new Gtk.SpinButton.with_range (1, 12, 1); - } else { - hours_spinbutton = new Gtk.SpinButton.with_range (0, 23, 1); - } - - hours_spinbutton.orientation = Gtk.Orientation.VERTICAL; - hours_spinbutton.wrap = true; - hours_spinbutton.value_changed.connect (() => { - update_time (true); - }); - - minutes_spinbutton = new Gtk.SpinButton.with_range (0, 59, 1); - minutes_spinbutton.orientation = Gtk.Orientation.VERTICAL; - minutes_spinbutton.wrap = true; - minutes_spinbutton.value_changed.connect (() => { - update_time (false); - }); - - var separation_label = new Gtk.Label (_(":")); - - var pop_grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); - - pop_grid.append (hours_spinbutton); - pop_grid.append (separation_label); - pop_grid.append (minutes_spinbutton); - pop_grid.append (am_pm_box); - - popover = new Gtk.Popover (); - popover.position = Gtk.PositionType.BOTTOM; - popover.set_parent (time_button); - popover.child = pop_grid; - - var main_grid = new Gtk.Grid () { - hexpand = true - }; - - main_grid.attach (timepicker_box, 0, 0); - - attach (main_grid, 0, 0); - - time_button.clicked.connect (() => { - open_time_picker (); - }); - - add_time_button.clicked.connect (() => { - time_stack.visible_child_name = "time-box"; - update_text (); - open_time_picker (); - }); - - no_time_button.clicked.connect (() => { - time_stack.visible_child_name = "add-time"; - update_text (); - }); - - am_togglebutton.clicked.connect (() => { - update_am_pm (-12); - }); - - pm_togglebutton.clicked.connect (() => { - update_am_pm (12); - }); - } - - private void update_am_pm (int hours) { - if (changing_time) { - return; - } - - time = _time.add_hours (hours); - time_changed (); - - update_text (true); - } - - private void open_time_picker () { - // If the mode is changed from 12h to 24h or visa versa, the entry updates on icon press - update_text (); - changing_time = true; - - if (Util.get_default ().is_clock_format_12h () && time.get_hour () > 12) { - hours_spinbutton.set_value (time.get_hour () - 12); - } else { - hours_spinbutton.set_value (time.get_hour ()); - } - - if (Util.get_default ().is_clock_format_12h ()) { - am_pm_box.show (); - - if (time.get_hour () > 12) { - hours_spinbutton.set_value (time.get_hour () - 12); - } else if (time.get_hour () == 0) { - hours_spinbutton.set_value (12); - } else { - hours_spinbutton.set_value (time.get_hour ()); - } - - // Make sure that bounds are set correctly - hours_spinbutton.set_range (1, 12); - } else { - am_pm_box.hide (); - hours_spinbutton.set_value (time.get_hour ()); - hours_spinbutton.set_range (0, 23); - } - - minutes_spinbutton.set_value (time.get_minute ()); - changing_time = false; - - popover.popup (); - } - - private void update_time (bool is_hour) { - if (changing_time) { - return; - } - - if (is_hour) { - var new_hour = hours_spinbutton.get_value_as_int () - time.get_hour (); - - if (Util.get_default ().is_clock_format_12h ()) { - if (hours_spinbutton.get_value_as_int () == 12 && am_togglebutton.active = true) { - _time = _time.add_hours (-_time.get_hour ()); - } else if (hours_spinbutton.get_value_as_int () < 12 && am_togglebutton.active = true) { - _time = _time.add_hours (new_hour); - } else if (hours_spinbutton.get_value_as_int () == 12 && pm_togglebutton.active = true) { - _time = _time.add_hours (-_time.get_hour () + 12); - } else if (hours_spinbutton.get_value_as_int () < 12 && pm_togglebutton.active = true) { - _time = _time.add_hours (new_hour + 12); - - if (time.get_hour () <= 12) { - _time = _time.add_hours (12); - } - } - } else { - _time = _time.add_hours (new_hour); - } - } else { - _time = time.add_minutes (minutes_spinbutton.get_value_as_int () - time.get_minute ()); - } - - update_text (); - } - - private void update_text (bool no_signal = false) { - if (Util.get_default ().is_clock_format_12h ()) { - time_button.label = time.format (format_12); - } else { - time_button.label = time.format (format_24); - } - - old_string = time_button.label; - - if (no_signal == false) { - time_changed (); - } - } -} \ No newline at end of file diff --git a/src/Widgets/EventRow.vala b/src/Widgets/EventRow.vala index 8b3db0d98..5e9cfc1b0 100644 --- a/src/Widgets/EventRow.vala +++ b/src/Widgets/EventRow.vala @@ -35,7 +35,7 @@ public class Widgets.EventRow : Gtk.ListBoxRow { Object ( component: component, cal: (E.SourceCalendar?) source.get_extension (E.SOURCE_EXTENSION_CALENDAR) - ); + ); } construct { @@ -64,20 +64,20 @@ public class Widgets.EventRow : Gtk.ListBoxRow { is_allday = true; } - color_grid = new Gtk.Grid (); - color_grid.width_request = 3; - color_grid.height_request = 12; - color_grid.valign = Gtk.Align.CENTER; - color_grid.halign = Gtk.Align.CENTER; - color_grid.add_css_class ("event-%s".printf (component.get_uid ())); + color_grid = new Gtk.Grid () { + width_request = 3, + height_request = 12, + valign = Gtk.Align.CENTER, + halign = Gtk.Align.CENTER, + css_classes = { "event-bar" } + }; time_label = new Gtk.Label (null) { xalign = 0, valign = Gtk.Align.CENTER, - width_chars = 7 + width_chars = 7, + css_classes = { Granite.STYLE_CLASS_DIM_LABEL, Granite.STYLE_CLASS_SMALL_LABEL } }; - time_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL); - time_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); var name_label = new Gtk.Label (component.get_summary ()) { valign = Gtk.Align.CENTER, @@ -85,9 +85,9 @@ public class Widgets.EventRow : Gtk.ListBoxRow { wrap = true, use_markup = true, wrap_mode = Pango.WrapMode.WORD_CHAR, - margin_start = 3 + margin_start = 3, + css_classes = { Granite.STYLE_CLASS_SMALL_LABEL } }; - name_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); var grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { margin_top = 3, @@ -102,9 +102,9 @@ public class Widgets.EventRow : Gtk.ListBoxRow { grid.append (name_label); var main_revealer = new Gtk.Revealer () { - transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN + transition_type = Gtk.RevealerTransitionType.SLIDE_DOWN, + child = grid }; - main_revealer.child = grid; child = main_revealer; @@ -113,40 +113,36 @@ public class Widgets.EventRow : Gtk.ListBoxRow { return GLib.Source.REMOVE; }); - set_color (); - cal.notify["color"].connect (set_color); - + update_color (); + cal.notify["color"].connect (update_color); update_timelabel (); } private void update_timelabel () { - // var time_format = Granite.DateTime.get_default_time_format (true, false); - time_label.label = "%s".printf ( - start_time.format ("%I:%M %p") - ); + time_label.label = "%s".printf (start_time.format ("%I:%M %p")); } - private void set_color () { - var color = cal.dup_color (); - string color_css = """ - .event-%s { - background-color: %s; - border-radius: 1px; - } - """; + private void update_color () { + Util.get_default ().set_widget_color (cal.dup_color (), color_grid); + // string color_css = """ + // .event-%s { + // background-color: %s; + // border-radius: 1px; + // } + // """; - var provider = new Gtk.CssProvider (); + // var provider = new Gtk.CssProvider (); - var colored_css = color_css.printf ( - component.get_uid (), - color - ); + // var colored_css = color_css.printf ( + // component.get_uid (), + // color + // ); - provider.load_from_string (colored_css); + // provider.load_from_string (colored_css); - Gtk.StyleContext.add_provider_for_display ( - Gdk.Display.get_default (), provider, - Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION - ); + // Gtk.StyleContext.add_provider_for_display ( + // Gdk.Display.get_default (), provider, + // Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + // ); } } \ No newline at end of file diff --git a/src/Widgets/IconColorProject.vala b/src/Widgets/IconColorProject.vala deleted file mode 100644 index f81123084..000000000 --- a/src/Widgets/IconColorProject.vala +++ /dev/null @@ -1,54 +0,0 @@ -public class Widgets.IconColorProject : Gtk.Grid { - public Objects.Project project { get; set; } - public int pixel_size { get; construct; } - - private Gtk.Grid widget_color; - private Gtk.Stack stack; - - public IconColorProject (int pixel_size) { - Object ( - pixel_size: pixel_size - ); - } - - construct { - var inbox_icon = new Gtk.Image () { - gicon = new ThemedIcon ("planner-inbox"), - pixel_size = pixel_size, - valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER - }; - - widget_color = new Gtk.Grid () { - height_request = pixel_size - 3, - width_request = pixel_size - 3, - valign = Gtk.Align.CENTER, - halign = Gtk.Align.CENTER - }; - - widget_color.add_css_class ("label-color"); - - stack = new Gtk.Stack () { - transition_type = Gtk.StackTransitionType.CROSSFADE - }; - - stack.add_named (widget_color, "color"); - stack.add_named (inbox_icon, "icon"); - - attach (stack, 0, 0); - - notify["project"].connect (() => { - if (project != null) { - update_request (); - } - }); - } - - public void update_request () { - Util.get_default ().set_widget_color (Util.get_default ().get_color (project.color), widget_color); - Timeout.add (stack.transition_duration, () => { - stack.visible_child_name = project.inbox_project ? "icon" : "color"; - return GLib.Source.REMOVE; - }); - } -} \ No newline at end of file diff --git a/src/Widgets/ItemSummary.vala b/src/Widgets/ItemSummary.vala index 475c4c6a1..a19dba9d4 100644 --- a/src/Widgets/ItemSummary.vala +++ b/src/Widgets/ItemSummary.vala @@ -235,9 +235,6 @@ public class Widgets.ItemSummary : Gtk.Grid { } public void update_request () { - // update_due_label (); - // update_reminders (); - // update_subtasks (); update_labels (); description_label.label = Util.get_default ().line_break_to_space (item.description); @@ -246,48 +243,15 @@ public class Widgets.ItemSummary : Gtk.Grid { Services.Settings.get_default ().settings.get_boolean ("description-preview"); } - public void update_due_label () { - due_grid.remove_css_class ("overdue-grid"); - due_grid.remove_css_class ("today-grid"); - due_grid.remove_css_class ("upcoming-grid"); - - if (item.completed) { - due_label.label = Util.get_default ().get_relative_date_from_date ( - Util.get_default ().get_date_from_string (item.completed_at) - ); - due_grid.add_css_class ("completed-grid"); - due_revealer.reveal_child = true; - return; - } - - if (item.has_due) { - due_label.label = Util.get_default ().get_relative_date_from_date (item.due.datetime); - due_revealer.reveal_child = true; - - if (Util.get_default ().is_today (item.due.datetime)) { - due_grid.add_css_class ("today-grid"); - } else if (Util.get_default ().is_overdue (item.due.datetime)) { - due_grid.add_css_class ("overdue-grid"); - } else { - due_grid.add_css_class ("upcoming-grid"); - } - } else { - due_label.label = ""; - due_revealer.reveal_child = false; - } - } - public void check_revealer () { if (itemrow != null) { summary_revealer.reveal_child = due_revealer.reveal_child || - flowbox_revealer.reveal_child || // subtasks_revealer.reveal_child || - reminder_revealer.reveal_child || description_revealer.reveal_child; + flowbox_revealer.reveal_child || reminder_revealer.reveal_child || description_revealer.reveal_child; revealer.reveal_child = (description_label_revealer.reveal_child || summary_revealer.reveal_child) && !itemrow.edit; } else { summary_revealer.reveal_child = due_revealer.reveal_child || - flowbox_revealer.reveal_child || // subtasks_revealer.reveal_child || - reminder_revealer.reveal_child || description_revealer.reveal_child; + flowbox_revealer.reveal_child || reminder_revealer.reveal_child || description_revealer.reveal_child; revealer.reveal_child = (description_label_revealer.reveal_child || summary_revealer.reveal_child); } } @@ -334,20 +298,4 @@ public class Widgets.ItemSummary : Gtk.Grid { flowbox_revealer.reveal_child = labels.size > 0; } - - private void update_subtasks () { - int completed = 0; - foreach (Objects.Item item in item.items) { - if (item.checked) { - completed++; - } - } - - subtasks_label.label = "%d/%d".printf (completed, item.items.size); - subtasks_revealer.reveal_child = item.items.size > 0; - } - - private void update_reminders () { - reminder_revealer.reveal_child = item.reminders.size > 0; - } } \ No newline at end of file diff --git a/src/Widgets/MultiSelectToolbar.vala b/src/Widgets/MultiSelectToolbar.vala index ae7612099..cf88ee937 100644 --- a/src/Widgets/MultiSelectToolbar.vala +++ b/src/Widgets/MultiSelectToolbar.vala @@ -127,7 +127,9 @@ public class Widgets.MultiSelectToolbar : Gtk.Grid { attach (main_revealer, 0, 0); - Services.EventBus.get_default ().select_item.connect ((row) => { + Services.EventBus.get_default ().select_item.connect ((_row) => { + var row = (Layouts.ItemRow) _row; + if (items_selected.has_key (row.item.id_string)) { items_selected.unset (row.item.id_string); row.is_row_selected = false; @@ -139,7 +141,9 @@ public class Widgets.MultiSelectToolbar : Gtk.Grid { check_select_bar (); }); - Services.EventBus.get_default ().unselect_item.connect ((row) => { + Services.EventBus.get_default ().unselect_item.connect ((_row) => { + var row = (Layouts.ItemRow) _row; + if (items_selected.has_key (row.item.id_string)) { items_selected.unset (row.item.id_string); row.is_row_selected = false; diff --git a/src/Widgets/ReminderPicker/ReminderPicker.vala b/src/Widgets/ReminderPicker/ReminderPicker.vala index de6295c65..d8dbb96e9 100644 --- a/src/Widgets/ReminderPicker/ReminderPicker.vala +++ b/src/Widgets/ReminderPicker/ReminderPicker.vala @@ -162,15 +162,14 @@ public class Widgets.ReminderPicker.ReminderPicker : Gtk.Popover { if (item.project.backend_type == BackendType.TODOIST) { submit_button.is_loading = true; Services.Todoist.get_default ().add.begin (reminder, (obj, res) => { - string? id = Services.Todoist.get_default ().add.end (res); - if (id != null) { - reminder.id = id; + TodoistResponse response = Services.Todoist.get_default ().add.end (res); + if (response.status) { + reminder.id = response.data; } else { reminder.id = Util.get_default ().generate_id (); } item.add_reminder_if_not_exists (reminder); - main_stack.visible_child_name = "listbox"; submit_button.is_loading = false; }); diff --git a/src/Widgets/ReminderPicker/ReminderRow.vala b/src/Widgets/ReminderPicker/ReminderRow.vala index a5cab397d..0ae8b1d37 100644 --- a/src/Widgets/ReminderPicker/ReminderRow.vala +++ b/src/Widgets/ReminderPicker/ReminderRow.vala @@ -87,7 +87,11 @@ public class Dialogs.ReminderPicker.ReminderRow : Gtk.ListBoxRow { }); remove_button.clicked.connect (() => { - reminder.delete (remove_button); + reminder.delete (); + }); + + reminder.loading_changed.connect ((value) => { + remove_button.is_loading = value; }); } diff --git a/src/Widgets/SectionsOrderPopover.vala b/src/Widgets/SectionsOrderPopover.vala index 6ef46a615..f889d42b5 100644 --- a/src/Widgets/SectionsOrderPopover.vala +++ b/src/Widgets/SectionsOrderPopover.vala @@ -163,9 +163,6 @@ public class Widgets.SectionsOrderItem : Gtk.ListBoxRow { var picked_widget = (Widgets.SectionsOrderItem) value; var target_widget = this; - Gtk.Allocation alloc; - target_widget.get_allocation (out alloc); - picked_widget.drag_end (); target_widget.drag_end (); @@ -180,7 +177,7 @@ public class Widgets.SectionsOrderItem : Gtk.ListBoxRow { source_list.remove (picked_widget); if (target_widget.get_index () == 0) { - if (y > (alloc.height / 2)) { + if (y > (target_widget.get_height () / 2)) { position = target_widget.get_index () + 1; } } else { diff --git a/src/meson.build b/src/meson.build index 5ad02ad28..4fd4017e0 100644 --- a/src/meson.build +++ b/src/meson.build @@ -8,6 +8,7 @@ deps = [ webkitgtk_dep, granite_dep, json_dep, + libsoup_dep, libecal_dep, libedataserver_dep, libical_dep, @@ -18,16 +19,15 @@ deps = [ sources = files( 'App.vala', 'MainWindow.vala', - 'Util.vala', - 'Services/Database.vala', - 'Services/EventBus.vala', - 'Services/Todoist.vala', + 'Objects/Backup.vala', + 'Services/GoogleTasks.vala', 'Services/ActionManager.vala', 'Services/Notification.vala', 'Services/TimeMonitor.vala', 'Services/DBusServer.vala', + 'Services/Backups.vala', 'Services/CalendarEvents/CalendarEvents.vala', 'Services/CalendarEvents/DateIterator.vala', @@ -36,7 +36,6 @@ sources = files( 'Layouts/Sidebar.vala', 'Layouts/FilterPaneRow.vala', - 'Layouts/HeaderItem.vala', 'Layouts/ProjectRow.vala', 'Layouts/SectionRow.vala', 'Layouts/ItemRow.vala', @@ -45,55 +44,27 @@ sources = files( 'Layouts/ItemBoard.vala', 'Layouts/HeaderBar.vala', - # 'Widgets/DynamicIcon.vala', 'Widgets/ColorPickerRow.vala', - 'Widgets/CircularProgressBar.vala', 'Widgets/MagicButton.vala', 'Widgets/EditableLabel.vala', - 'Widgets/Entries.vala', 'Widgets/Placeholder.vala', 'Widgets/SyncButton.vala', - 'Widgets/ScheduleButton.vala', - 'Widgets/PriorityButton.vala', 'Widgets/ItemSummary.vala', - 'Widgets/PinButton.vala', - 'Widgets/LabelButton.vala', - 'Widgets/ItemLabels.vala', - 'Widgets/ItemLabelChild.vala', - 'Widgets/IconColorProject.vala', 'Widgets/ReminderButton.vala', 'Widgets/MultiSelectToolbar.vala', 'Widgets/EventsList.vala', 'Widgets/EventRow.vala', - 'Widgets/CalendarSourceRow.vala', 'Widgets/SubItems.vala', 'Widgets/LabelChild.vala', 'Widgets/LabelsSummary.vala', 'Widgets/SectionsOrderPopover.vala', - 'Widgets/Calendar/Calendar.vala', - 'Widgets/Calendar/CalendarDay.vala', - 'Widgets/Calendar/CalendarHeader.vala', - 'Widgets/Calendar/CalendarView.vala', - 'Widgets/Calendar/CalendarWeek.vala', - - 'Widgets/DateTimePicker/DateTimePicker.vala', - 'Widgets/DateTimePicker/TimePicker.vala', - - 'Widgets/LabelPicker/LabelPicker.vala', - 'Widgets/LabelPicker/LabelRow.vala', - 'Widgets/ReminderPicker/ReminderPicker.vala', 'Widgets/ReminderPicker/ReminderRow.vala', - - 'Widgets/ContextMenu/MenuItem.vala', - 'Widgets/ContextMenu/MenuSeparator.vala', - 'Widgets/ContextMenu/MenuPicker.vala', 'Views/Project/Project.vala', 'Views/Project/List.vala', 'Views/Project/Board.vala', - 'Views/Date.vala', 'Views/Today.vala', 'Views/Pinboard.vala', 'Views/Label/Label.vala', @@ -105,30 +76,12 @@ sources = files( 'Views/Scheduled/ScheduledRange.vala', 'Views/Scheduled/ScheduledMonth.vala', - 'Objects/BaseObject.vala', - 'Objects/Color.vala', - 'Objects/DueDate.vala', - 'Objects/Item.vala', - 'Objects/ItemLabel.vala', - 'Objects/Label.vala', - 'Objects/Project.vala', - 'Objects/Queue.vala', - 'Objects/Reminder.vala', - 'Objects/Section.vala', - - 'Objects/Filters/Pinboard.vala', - 'Objects/Filters/Scheduled.vala', - 'Objects/Filters/Today.vala', - 'Objects/Filters/Priority.vala', - 'Objects/Filters/Completed.vala', - 'Objects/Filters/Labels.vala', - 'Dialogs/Project.vala', 'Dialogs/Label.vala', 'Dialogs/Item.vala', - 'Dialogs/TodoistOAuth.vala', 'Dialogs/GoogleOAuth.vala', 'Dialogs/WhatsNew.vala', + 'Dialogs/QuickAdd.vala', 'Dialogs/ProjectDescription.vala', 'Dialogs/ManageSectionOrder.vala', 'Dialogs/ProjectPicker/ProjectPicker.vala', @@ -145,6 +98,8 @@ sources = files( 'Dialogs/Preferences/PreferencesWindow.vala', 'Dialogs/Preferences/SettingsHeader.vala', + 'Dialogs/Preferences/Pages/Backup.vala', + 'Dialogs/Preferences/Pages/Sidebar.vala' ) executable(