diff --git a/.gitlab/issue_templates/Epic.md b/.gitlab/issue_templates/Epic.md new file mode 100644 index 00000000..aa7c6a3b --- /dev/null +++ b/.gitlab/issue_templates/Epic.md @@ -0,0 +1,41 @@ +# Current problems + + +# Goals & use cases + + +# Requirements + + +# Relevant art + + +# Proposal & plan + + +/label ~"1. Epic" diff --git a/data/appdata/org.gnome.Calendar.appdata.xml.in b/data/appdata/org.gnome.Calendar.appdata.xml.in index e8a8ddfa..64124e18 100644 --- a/data/appdata/org.gnome.Calendar.appdata.xml.in +++ b/data/appdata/org.gnome.Calendar.appdata.xml.in @@ -10,7 +10,7 @@

GNOME Calendar is a simple and beautiful calendar application designed to perfectly fit the GNOME - desktop. By reusing the components which the GNOME desktop is build on, Calendar nicely integrates + desktop. By reusing the components which the GNOME desktop is built on, Calendar nicely integrates with the GNOME ecosystem.

diff --git a/data/theme/Adwaita.css b/data/theme/Adwaita.css index 6c93756b..78427a80 100644 --- a/data/theme/Adwaita.css +++ b/data/theme/Adwaita.css @@ -424,7 +424,7 @@ monthcell { border: solid 1px alpha(@borders, 0.3); border-width: 1px 0 0 1px; background: transparent; - padding: 1px 0 1px 0; + padding: 1px 3px 0 3px; transition: background-color 200ms; } diff --git a/data/ui/event-widget.ui b/data/ui/event-widget.ui index f98b09ea..53a6f04a 100644 --- a/data/ui/event-widget.ui +++ b/data/ui/event-widget.ui @@ -22,6 +22,10 @@ True False + center + center + 16 + 16 @@ -48,6 +52,7 @@ True False + True diff --git a/data/ui/month-popover.ui b/data/ui/month-popover.ui index 3fc31166..3433e05c 100644 --- a/data/ui/month-popover.ui +++ b/data/ui/month-popover.ui @@ -89,7 +89,7 @@ true none New Event… - + diff --git a/meson.build b/meson.build index 0c1f0afa..00c6a20f 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ calendar_schemadir = join_paths(calendar_datadir, 'glib-2.0', 'schemas') calendar_buildtype = get_option('buildtype') calendar_debug = calendar_minor_version.is_odd() or buildtype.contains('debug') enable_tracing = get_option('tracing') -enable_gtk_doc = get_option('gtk_doc') +enable_gtk_doc = get_option('documentation') cc = meson.get_compiler('c') diff --git a/meson_options.txt b/meson_options.txt index 063b8cb0..27e07971 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,2 +1,2 @@ option('tracing', type: 'boolean', value: false, description: 'add extra debugging information') -option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation') +option('documentation', type: 'boolean', value: false, description: 'use gtk-doc to build documentation') diff --git a/org.gnome.Calendar.json b/org.gnome.Calendar.json index 81c337b4..cda2b3cf 100644 --- a/org.gnome.Calendar.json +++ b/org.gnome.Calendar.json @@ -162,7 +162,8 @@ } ], "config-opts" : [ - "-Dtracing=true" + "-Dtracing=true", + "-Ddocumentation=true" ] } ] diff --git a/po/be.po b/po/be.po index 40434c61..05815571 100644 --- a/po/be.po +++ b/po/be.po @@ -7,10 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: gnome-calendar gnome-3-24\n" -"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" -"calendar&keywords=I18N+L10N&component=General\n" -"POT-Creation-Date: 2017-08-23 09:38+0000\n" -"PO-Revision-Date: 2017-09-01 16:37+0300\n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-calendar/issues\n" +"POT-Creation-Date: 2018-03-20 20:44+0000\n" +"PO-Revision-Date: 2018-04-05 15:39+0300\n" "Last-Translator: Yuras Shumovich \n" "Language-Team: Belarusian \n" "Language: be\n" @@ -19,11 +18,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -"X-Generator: Poedit 1.8.11\n" +"X-Generator: Poedit 2.0.6\n" #: data/appdata/org.gnome.Calendar.appdata.xml.in:7 #: data/org.gnome.Calendar.desktop.in:3 data/ui/quick-add-popover.ui:187 -#: data/ui/window.ui:184 src/gcal-application.c:479 +#: data/ui/window.ui:187 src/gcal-application.c:640 src/main.c:36 msgid "Calendar" msgstr "Каляндар" @@ -79,38 +78,50 @@ msgstr "org.gnome.Calendar" msgid "Calendar;Event;Reminder;" msgstr "Каляндар;Падзея;Напамін;" -#: data/org.gnome.calendar.gschema.xml:6 +#: data/org.gnome.calendar.gschema.xml.in:6 msgid "Window maximized" msgstr "Акно разгорнута" -#: data/org.gnome.calendar.gschema.xml:7 +#: data/org.gnome.calendar.gschema.xml.in:7 msgid "Window maximized state" msgstr "Стан разгорнутага вакна" -#: data/org.gnome.calendar.gschema.xml:11 +#: data/org.gnome.calendar.gschema.xml.in:11 msgid "Window size" msgstr "Памер акна" -#: data/org.gnome.calendar.gschema.xml:12 +#: data/org.gnome.calendar.gschema.xml.in:12 msgid "Window size (width and height)." msgstr "Памер акна (шырыня і вышыня)." -#: data/org.gnome.calendar.gschema.xml:16 +#: data/org.gnome.calendar.gschema.xml.in:16 msgid "Window position" msgstr "Знаходжанне вакна" -#: data/org.gnome.calendar.gschema.xml:17 +#: data/org.gnome.calendar.gschema.xml.in:17 msgid "Window position (x and y)." msgstr "Знаходжанне вакна (x і y)." -#: data/org.gnome.calendar.gschema.xml:21 +#: data/org.gnome.calendar.gschema.xml.in:21 msgid "Type of the active view" msgstr "Тып актыўнага выгляда" -#: data/org.gnome.calendar.gschema.xml:22 +#: data/org.gnome.calendar.gschema.xml.in:22 msgid "Type of the active window view, default value is: monthly view" msgstr "Тып актыўнага выгляда вакна, значэнне па змаўчанні: штомесячны выгляд" +#: data/org.gnome.calendar.gschema.xml.in:26 +msgid "Weather Service Configuration" +msgstr "Канфігурацыя службы надвор'я" + +#: data/org.gnome.calendar.gschema.xml.in:27 +msgid "" +"Whether weather reports are shown, automatic locations are used and a " +"location-name" +msgstr "" +"Ці паказваць надвор'е, ці вызначаць месцазнаходжанне аўтаматычна і " +"месцазнаходжанне" + #: data/ui/alarm-row.ui:34 msgid "Toggles the sound of the alarm" msgstr "Уключае гук будзільніка" @@ -119,124 +130,124 @@ msgstr "Уключае гук будзільніка" msgid "Remove the alarm" msgstr "Выдаліць будзільнік" -#: data/ui/edit-dialog.ui:18 data/ui/source-dialog.ui:762 -#: data/ui/source-dialog.ui:869 src/gcal-source-dialog.c:1102 +#: data/ui/edit-dialog.ui:16 data/ui/source-dialog.ui:762 +#: data/ui/source-dialog.ui:869 src/gcal-source-dialog.c:1162 msgid "Cancel" msgstr "Адмена" -#: data/ui/edit-dialog.ui:38 +#: data/ui/edit-dialog.ui:36 msgid "Click to select the calendar" msgstr "Націсніце каб выбраць каляндар" -#: data/ui/edit-dialog.ui:110 src/gcal-edit-dialog.c:688 +#: data/ui/edit-dialog.ui:108 src/gcal-edit-dialog.c:277 msgid "Done" msgstr "Выканана" -#: data/ui/edit-dialog.ui:140 +#: data/ui/edit-dialog.ui:146 msgid "Title" msgstr "Загаловак" -#: data/ui/edit-dialog.ui:158 +#: data/ui/edit-dialog.ui:164 msgid "Date" msgstr "Дата" -#: data/ui/edit-dialog.ui:174 +#: data/ui/edit-dialog.ui:180 msgid "Repeat" msgstr "Паўтараць" -#: data/ui/edit-dialog.ui:192 +#: data/ui/edit-dialog.ui:198 msgid "Reminders" msgstr "Напаміны" -#: data/ui/edit-dialog.ui:210 +#: data/ui/edit-dialog.ui:216 msgid "Notes" msgstr "Запісы" -#: data/ui/edit-dialog.ui:226 data/ui/source-dialog.ui:563 +#: data/ui/edit-dialog.ui:232 data/ui/source-dialog.ui:563 msgid "Location" msgstr "Знаходжанне" -#: data/ui/edit-dialog.ui:293 +#: data/ui/edit-dialog.ui:301 msgid "Time" msgstr "Час" -#: data/ui/edit-dialog.ui:348 +#: data/ui/edit-dialog.ui:354 msgid "All Day" msgstr "Увесь дзень" -#: data/ui/edit-dialog.ui:393 +#: data/ui/edit-dialog.ui:399 msgid "Add reminder…" msgstr "Дадаць напамін..." -#: data/ui/edit-dialog.ui:424 +#: data/ui/edit-dialog.ui:430 msgid "No Repeat" msgstr "Не паўтараць" -#: data/ui/edit-dialog.ui:425 +#: data/ui/edit-dialog.ui:431 msgid "Daily" msgstr "Штодзённа" -#: data/ui/edit-dialog.ui:426 +#: data/ui/edit-dialog.ui:432 msgid "Monday – Friday" msgstr "Панядзелак - Пятніца" -#: data/ui/edit-dialog.ui:427 +#: data/ui/edit-dialog.ui:433 msgid "Weekly" msgstr "Штотыдзень" -#: data/ui/edit-dialog.ui:428 +#: data/ui/edit-dialog.ui:434 msgid "Monthly" msgstr "Штомесяц" -#: data/ui/edit-dialog.ui:429 +#: data/ui/edit-dialog.ui:435 msgid "Yearly" msgstr "Штогод" -#: data/ui/edit-dialog.ui:457 +#: data/ui/edit-dialog.ui:463 msgid "Forever" msgstr "Заўсёды" -#: data/ui/edit-dialog.ui:458 +#: data/ui/edit-dialog.ui:464 msgid "No. of occurrences" msgstr "Колькасць уваходжанняў" -#: data/ui/edit-dialog.ui:459 +#: data/ui/edit-dialog.ui:465 msgid "Until Date" msgstr "Да даты" -#: data/ui/edit-dialog.ui:553 +#: data/ui/edit-dialog.ui:560 msgid "Delete Event" msgstr "Выдаліць Падзею" -#: data/ui/edit-dialog.ui:590 +#: data/ui/edit-dialog.ui:599 msgid "5 minutes" msgstr "5 хвілінаў" -#: data/ui/edit-dialog.ui:599 +#: data/ui/edit-dialog.ui:608 msgid "10 minutes" msgstr "10 хвілінаў" -#: data/ui/edit-dialog.ui:608 +#: data/ui/edit-dialog.ui:617 msgid "30 minutes" msgstr "30 хвілінаў" -#: data/ui/edit-dialog.ui:617 +#: data/ui/edit-dialog.ui:626 msgid "1 hour" msgstr "1 гадзіна" -#: data/ui/edit-dialog.ui:625 +#: data/ui/edit-dialog.ui:634 msgid "1 day" msgstr "1 дзень" -#: data/ui/edit-dialog.ui:634 +#: data/ui/edit-dialog.ui:643 msgid "2 days" msgstr "2 дні" -#: data/ui/edit-dialog.ui:643 +#: data/ui/edit-dialog.ui:652 msgid "3 days" msgstr "3 дні" -#: data/ui/edit-dialog.ui:652 +#: data/ui/edit-dialog.ui:661 msgid "1 week" msgstr "1 тыдзень" @@ -320,7 +331,7 @@ msgctxt "shortcut window" msgid "Year view" msgstr "Гадавы выгляд" -#: data/ui/menus.ui:6 data/ui/menus.ui:36 +#: data/ui/menus.ui:6 msgid "Add Eve_nt…" msgstr "Дадаць па_дзею…" @@ -340,22 +351,22 @@ msgstr "_Пра дастасаванне" msgid "_Quit" msgstr "_Выхад" -#: data/ui/menus.ui:40 -msgid "_Synchronize" -msgstr "_Сінхранізацыя" - -#: data/ui/menus.ui:49 +#: data/ui/menus.ui:36 msgid "From Web…" msgstr "З інтэрнэту…" -#: data/ui/menus.ui:53 +#: data/ui/menus.ui:40 msgid "New Local Calendar…" msgstr "Новы лакальны каляндар…" -#: data/ui/menus.ui:57 +#: data/ui/menus.ui:44 msgid "From File…" msgstr "З файла…" +#: data/ui/month-popover.ui:91 +msgid "New Event…" +msgstr "Новая падзея…" + #: data/ui/quick-add-popover.ui:117 msgid "Edit Details…" msgstr "Рэдагавваць падрабязнасці…" @@ -365,15 +376,15 @@ msgstr "Рэдагавваць падрабязнасці…" msgid "Add" msgstr "Дадаць" -#: data/ui/search-view.ui:76 +#: data/ui/search-popover.ui:76 msgid "No results found" msgstr "Вынікаў не знойдзена" -#: data/ui/search-view.ui:92 +#: data/ui/search-popover.ui:92 msgid "Try a different search" msgstr "Паспрабаваць разнастайны пошук" -#: data/ui/source-dialog.ui:53 src/gcal-window.c:1129 src/gcal-window.c:1133 +#: data/ui/source-dialog.ui:53 src/gcal-window.c:1039 src/gcal-window.c:1043 msgid "Undo" msgstr "Адмяніць апошняе дзеянне" @@ -456,11 +467,16 @@ msgstr "" msgid "Calendar Address" msgstr "Адрас каляндара" -#: data/ui/source-dialog.ui:729 src/gcal-source-dialog.c:2193 -#: src/gcal-source-dialog.c:2199 +#: data/ui/source-dialog.ui:729 src/gcal-source-dialog.c:2285 +#: src/gcal-source-dialog.c:2291 msgid "Add Calendar" msgstr "Дадаць каляндар" +#: data/ui/source-dialog.ui:745 data/ui/window.ui:344 +#: src/gcal-source-dialog.c:862 src/gcal-source-dialog.c:2314 +msgid "Calendar Settings" +msgstr "Налады каляндара" + #: data/ui/source-dialog.ui:806 msgid "User" msgstr "Карыстальнік" @@ -469,12 +485,16 @@ msgstr "Карыстальнік" msgid "Password" msgstr "Пароль" +#: data/ui/source-dialog.ui:866 +msgid "Enter your credentials" +msgstr "Увядзіце мандаты" + #: data/ui/source-dialog.ui:878 msgid "Connect" msgstr "Далучыцца" -#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:763 -#: src/views/gcal-week-view.c:287 +#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:754 +#: src/views/gcal-week-view.c:278 msgid "00:00" msgstr "00:00" @@ -482,94 +502,104 @@ msgstr "00:00" msgid ":" msgstr ":" -#: data/ui/time-selector.ui:78 src/views/gcal-week-view.c:442 +#: data/ui/time-selector.ui:78 src/views/gcal-week-view.c:432 msgid "AM" msgstr "AM" -#: data/ui/time-selector.ui:79 src/views/gcal-week-view.c:442 +#: data/ui/time-selector.ui:79 src/views/gcal-week-view.c:432 msgid "PM" msgstr "PM" -#: data/ui/window.ui:64 +#: data/ui/weather-settings.ui:12 data/ui/window.ui:407 +msgid "_Weather" +msgstr "_Надвор'е" + +#: data/ui/weather-settings.ui:30 +msgid "Show Weather" +msgstr "Паказаць надвор'е" + +#: data/ui/weather-settings.ui:53 +msgid "Automatic Location" +msgstr "Аўтаматычна вызначаць месцазнаходжанне" + +#: data/ui/window.ui:67 msgid "Week" msgstr "Тыдзень" -#: data/ui/window.ui:79 +#: data/ui/window.ui:82 msgid "Month" msgstr "Месяц" -#: data/ui/window.ui:93 +#: data/ui/window.ui:96 msgid "Year" msgstr "Год" -#: data/ui/window.ui:187 data/ui/year-view.ui:84 src/views/gcal-year-view.c:275 -#: src/views/gcal-year-view.c:509 +#: data/ui/window.ui:190 data/ui/year-view.ui:88 src/views/gcal-year-view.c:279 +#: src/views/gcal-year-view.c:514 msgid "Today" msgstr "Сёння" -#: data/ui/window.ui:261 +#: data/ui/window.ui:271 msgid "Manage your calendars" msgstr "Кіраванне вашым каляндаром" -#: data/ui/window.ui:278 +#: data/ui/window.ui:288 msgctxt "tooltip" msgid "Search for events" msgstr "Пошук падзей" -#: data/ui/window.ui:334 src/gcal-source-dialog.c:844 -#: src/gcal-source-dialog.c:2222 -msgid "Calendar Settings" -msgstr "Налады каляндара" +#: data/ui/window.ui:391 +msgid "Add Eve_nt" +msgstr "Дадаць па_дзею" -#: data/ui/year-view.ui:95 +#: data/ui/window.ui:400 +msgid "_Synchronize" +msgstr "_Сінхранізацыя" + +#: data/ui/year-view.ui:133 msgid "No events" msgstr "Няма падзеяў" -#: data/ui/year-view.ui:117 src/views/gcal-month-view.c:2322 +#: data/ui/year-view.ui:155 msgid "Add Event…" msgstr "Дадаць падзею…" -#: src/gcal-application.c:89 +#: src/gcal-application.c:88 +msgid "Quit GNOME Calendar" +msgstr "Выйсці з календара GNOME" + +#: src/gcal-application.c:93 msgid "Display version number" msgstr "Паказаць нумар версіі" -#: src/gcal-application.c:94 +#: src/gcal-application.c:98 msgid "Enable debug messages" msgstr "Уключыць адладачныя паведамленні" -#: src/gcal-application.c:99 +#: src/gcal-application.c:103 msgid "Open calendar on the passed date" msgstr "Адкрыць паляндар на прайшоўшую дату" -#: src/gcal-application.c:104 +#: src/gcal-application.c:108 msgid "Open calendar showing the passed event" msgstr "Адкрыць каляндар і паказаць прайшоўшыя падзеі" -#: src/gcal-application.c:285 -msgid "— Calendar management" -msgstr "— Кіраванне каляндаром" - -#: src/gcal-application.c:467 +#: src/gcal-application.c:595 #, c-format -msgid "Copyright © %d The Calendar authors" -msgstr "Аўтарскія правы © %d аўтары Каляндара" +msgid "Copyright © 2012–%d The Calendar authors" +msgstr "Аўтаркія правы © 2012–%d аўтары Календара" -#: src/gcal-application.c:473 -#, c-format -msgid "Copyright © %d–%d The Calendar authors" -msgstr "Аўтаркія правы © %d–%d аўтары Каляндара" - -#: src/gcal-application.c:486 +#: src/gcal-application.c:646 msgid "translator-credits" msgstr "" "Uladzimir Manulenka \n" "Юрась Шумовіч " -#: src/gcal-edit-dialog.c:688 +#: src/gcal-edit-dialog.c:277 msgid "Save" msgstr "Захаваць" -#: src/gcal-edit-dialog.c:1001 +#: src/gcal-edit-dialog.c:1037 #, c-format msgid "%d minute before" msgid_plural "%d minutes before" @@ -577,7 +607,7 @@ msgstr[0] "%d хвіліна да" msgstr[1] "%d хвіліны да" msgstr[2] "%d хвілінаў да" -#: src/gcal-edit-dialog.c:1009 +#: src/gcal-edit-dialog.c:1045 #, c-format msgid "%d hour before" msgid_plural "%d hours before" @@ -585,7 +615,7 @@ msgstr[0] "%d гадзіна да" msgstr[1] "%d гадзіны да" msgstr[2] "%d гадзінаў да" -#: src/gcal-edit-dialog.c:1017 +#: src/gcal-edit-dialog.c:1053 #, c-format msgid "%d day before" msgid_plural "%d days before" @@ -593,7 +623,7 @@ msgstr[0] "%d дзень да" msgstr[1] "%d дні да" msgstr[2] "%d дзён да" -#: src/gcal-edit-dialog.c:1025 +#: src/gcal-edit-dialog.c:1061 #, c-format msgid "%d week before" msgid_plural "%d weeks before" @@ -601,12 +631,12 @@ msgstr[0] "%d тыдзень да" msgstr[1] "%d тыдні да" msgstr[2] "%d тыдняў да" -#: src/gcal-edit-dialog.c:1328 src/gcal-quick-add-popover.c:680 +#: src/gcal-edit-dialog.c:1367 src/gcal-quick-add-popover.c:682 msgid "Unnamed event" msgstr "Падзея без назвы" #. Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") -#: src/gcal-event-widget.c:364 +#: src/gcal-event-widget.c:420 #, c-format msgid "At %s" msgstr "У %s" @@ -721,14 +751,17 @@ msgid "December" msgstr "Снежань" #: src/gcal-quick-add-popover.c:286 +#, c-format msgid "from Today" msgstr "з сённяшняга дня" #: src/gcal-quick-add-popover.c:290 +#, c-format msgid "from Tomorrow" msgstr "з заўтрашняга дня" #: src/gcal-quick-add-popover.c:294 +#, c-format msgid "from Yesterday" msgstr "з учарашняга дня" @@ -742,14 +775,17 @@ msgid "from %1$s %2$s" msgstr "з %1$s %2$s" #: src/gcal-quick-add-popover.c:323 +#, c-format msgid "to Today" msgstr "да сённяшняга дня" #: src/gcal-quick-add-popover.c:327 +#, c-format msgid "to Tomorrow" msgstr "да заўтрашняга дня" #: src/gcal-quick-add-popover.c:331 +#, c-format msgid "to Yesterday" msgstr "да учарашняга дня" @@ -769,14 +805,17 @@ msgid "New Event %1$s %2$s" msgstr "Новая падзея %1$s %2$s" #: src/gcal-quick-add-popover.c:373 +#, c-format msgid "New Event Today" msgstr "Новая падзея сёння" #: src/gcal-quick-add-popover.c:377 +#, c-format msgid "New Event Tomorrow" msgstr "Новая падзея заўтра" #: src/gcal-quick-add-popover.c:381 +#, c-format msgid "New Event Yesterday" msgstr "Новая падзея ўчора" @@ -875,61 +914,61 @@ msgstr "Новая падзея %d снежня" msgid "%1$s, %2$s – %3$s" msgstr "%1$s, %2$s – %3$s" -#: src/gcal-search-view.c:358 +#: src/gcal-search-popover.c:303 msgid "All day" msgstr "Увесь дзень" -#: src/gcal-search-view.c:563 +#: src/gcal-search-popover.c:563 msgid "Use the entry above to search for events." msgstr "Карыстайцеся полем зверху для пошуку падзеяў." #. Dialog -#: src/gcal-source-dialog.c:1099 +#: src/gcal-source-dialog.c:1159 msgid "Select a calendar file" msgstr "Выбраць файл каляндара" -#: src/gcal-source-dialog.c:1103 +#: src/gcal-source-dialog.c:1163 msgid "Open" msgstr "Адкрыць" -#: src/gcal-source-dialog.c:1110 +#: src/gcal-source-dialog.c:1170 msgid "Calendar files" msgstr "Файлы каляндара" #. update the source properties -#: src/gcal-source-dialog.c:1144 +#: src/gcal-source-dialog.c:1204 msgid "Unnamed Calendar" msgstr "Каляндар без назвы" #. Update notification label -#: src/gcal-source-dialog.c:1750 +#: src/gcal-source-dialog.c:1810 #, c-format msgid "Calendar %s removed" msgstr "Каляндар %s выдалены" -#: src/gcal-source-dialog.c:1953 src/gcal-source-dialog.c:2010 +#: src/gcal-source-dialog.c:1859 src/gcal-source-dialog.c:1915 msgid "Off" msgstr "Выключыць" -#: src/gcal-source-dialog.c:1953 src/gcal-source-dialog.c:2010 +#: src/gcal-source-dialog.c:1859 src/gcal-source-dialog.c:1915 msgid "On" msgstr "Уключыць" -#: src/gcal-source-dialog.c:2009 +#: src/gcal-source-dialog.c:1914 msgid "Expired" msgstr "Састарэў" -#: src/gcal-time-selector.c:84 +#: src/gcal-time-selector.c:83 #, c-format msgid "%s AM" msgstr "%s AM" -#: src/gcal-time-selector.c:86 +#: src/gcal-time-selector.c:85 #, c-format msgid "%s PM" msgstr "%s PM" -#: src/gcal-utils.c:1188 +#: src/gcal-utils.c:1120 msgid "" "The event you are trying to modify is recurring. The changes you have " "selected should be applied to:" @@ -937,44 +976,35 @@ msgstr "" "Вы спрабуеце змяніць перыядычную падзею. Вылучаныя змены павінны быць ужыты " "для:" -#: src/gcal-utils.c:1191 +#: src/gcal-utils.c:1123 msgid "_Cancel" msgstr "_Адмена" -#: src/gcal-utils.c:1193 +#: src/gcal-utils.c:1125 msgid "_Only This Event" msgstr "_Толькі гэтая падзея" -#: src/gcal-utils.c:1200 +#: src/gcal-utils.c:1132 msgid "_Subsequent events" msgstr "_Наступныя падзеі" -#: src/gcal-utils.c:1202 +#: src/gcal-utils.c:1134 msgid "_All events" msgstr "_Усе падзеі" -#: src/gcal-window.c:1129 +#: src/gcal-window.c:1039 msgid "Another event deleted" msgstr "Выдалена яшчэ адна падзея" -#: src/gcal-window.c:1133 +#: src/gcal-window.c:1043 msgid "Event deleted" msgstr "Пвдзея выдалена" -#. Translators: This is a date format in the sidebar of the year -#. * view when there is only one specified day selected. -#. Translators: This is a date format in the sidebar of the year view. -#: src/views/gcal-month-view.c:225 src/views/gcal-year-view.c:290 -#: src/views/gcal-year-view.c:512 -msgid "%B %d" -msgstr "%B %d" +#: src/views/gcal-week-grid.c:751 src/views/gcal-week-view.c:275 +msgid "00 AM" +msgstr "00 AM" -#: src/views/gcal-month-view.c:1186 -msgid "Other events" -msgstr "Іншыя падзеі" - -#. TODO: Warning: in some languages this string can be too long and may overlap with the number -#: src/views/gcal-month-view.c:1785 src/views/gcal-week-header.c:338 +#: src/views/gcal-week-header.c:398 #, c-format msgid "Other event" msgid_plural "Other %d events" @@ -982,11 +1012,7 @@ msgstr[0] "Іншая %d падзея" msgstr[1] "Іншыя %d падзеі" msgstr[2] "Іншых %d падзеяў" -#: src/views/gcal-week-grid.c:760 src/views/gcal-week-view.c:284 -msgid "00 AM" -msgstr "00 AM" - -#: src/views/gcal-week-header.c:871 +#: src/views/gcal-week-header.c:934 #, c-format msgid "week %d" msgstr "тыдзень %d" @@ -994,10 +1020,26 @@ msgstr "тыдзень %d" #. Translators: This is a date format in the sidebar of the year #. * view when the selection starts at the specified day and the #. * end is unspecified. -#: src/views/gcal-year-view.c:284 +#: src/views/gcal-year-view.c:288 msgid "%B %d…" msgstr "%B %d…" +#. Translators: This is a date format in the sidebar of the year +#. * view when there is only one specified day selected. +#. Translators: This is a date format in the sidebar of the year view. +#: src/views/gcal-year-view.c:294 src/views/gcal-year-view.c:517 +msgid "%B %d" +msgstr "%B %d" + +#~ msgid "— Calendar management" +#~ msgstr "— Кіраванне каляндаром" + +#~ msgid "Copyright © %d The Calendar authors" +#~ msgstr "Аўтарскія правы © %d аўтары Каляндара" + +#~ msgid "Other events" +#~ msgstr "Іншыя падзеі" + #~ msgid "%1$s %2$d" #~ msgstr "%1$s %2$d" diff --git a/po/cs.po b/po/cs.po index 5a741479..488b03dd 100644 --- a/po/cs.po +++ b/po/cs.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: gnome-calendar\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-calendar/issues\n" -"POT-Creation-Date: 2018-02-20 22:28+0000\n" -"PO-Revision-Date: 2018-02-22 09:54+0100\n" +"POT-Creation-Date: 2018-05-02 02:05+0000\n" +"PO-Revision-Date: 2018-05-04 00:26+0200\n" "Last-Translator: Marek Černocký \n" "Language-Team: čeština \n" "Language: cs\n" @@ -34,7 +34,7 @@ msgstr "Kalendář pro GNOME" msgid "" "GNOME Calendar is a simple and beautiful calendar application designed to " "perfectly fit the GNOME desktop. By reusing the components which the GNOME " -"desktop is build on, Calendar nicely integrates with the GNOME ecosystem." +"desktop is built on, Calendar nicely integrates with the GNOME ecosystem." msgstr "" "Kalendář GNOME je jednoduchá a hezká kalendářová aplikace navržená tak, aby " "skvěle zapadla do pracovního prostředí GNOME. Díky využití komponent, na " @@ -494,7 +494,7 @@ msgstr "Zadání přihlašovacích údajů" msgid "Connect" msgstr "Připojit se" -#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:754 +#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:753 #: src/views/gcal-week-view.c:278 msgid "00:00" msgstr "00∶00" @@ -637,7 +637,7 @@ msgid "Unnamed event" msgstr "Událost bez názvu" #. Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") -#: src/gcal-event-widget.c:420 +#: src/gcal-event-widget.c:422 #, c-format msgid "At %s" msgstr "v místě %s" @@ -969,7 +969,7 @@ msgstr "%s odp." msgid "%s PM" msgstr "%s dop." -#: src/gcal-utils.c:1093 +#: src/gcal-utils.c:1120 msgid "" "The event you are trying to modify is recurring. The changes you have " "selected should be applied to:" @@ -977,19 +977,19 @@ msgstr "" "Událost, kterou se snažíte změnit, se opakuje. Mají se změny, které jste " "zvolili, použít:" -#: src/gcal-utils.c:1096 +#: src/gcal-utils.c:1123 msgid "_Cancel" msgstr "_Zrušit" -#: src/gcal-utils.c:1098 +#: src/gcal-utils.c:1125 msgid "_Only This Event" msgstr "Jen na tut_o událost" -#: src/gcal-utils.c:1105 +#: src/gcal-utils.c:1132 msgid "_Subsequent events" msgstr "I na navazující událo_sti" -#: src/gcal-utils.c:1107 +#: src/gcal-utils.c:1134 msgid "_All events" msgstr "_Všechny události" @@ -1001,7 +1001,7 @@ msgstr "Smazána ještě jedna událost" msgid "Event deleted" msgstr "Událost smazána" -#: src/views/gcal-week-grid.c:751 src/views/gcal-week-view.c:275 +#: src/views/gcal-week-grid.c:750 src/views/gcal-week-view.c:275 msgid "00 AM" msgstr "0" diff --git a/po/es.po b/po/es.po index bf4711ea..0f659109 100644 --- a/po/es.po +++ b/po/es.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: gnome-calendar master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-calendar/issues\n" -"POT-Creation-Date: 2018-02-20 22:28+0000\n" -"PO-Revision-Date: 2018-02-21 17:13+0100\n" +"POT-Creation-Date: 2018-05-02 02:05+0000\n" +"PO-Revision-Date: 2018-05-08 14:48+0200\n" "Last-Translator: Daniel Mustieles \n" "Language-Team: es \n" "Language: es\n" @@ -30,10 +30,15 @@ msgid "Calendar for GNOME" msgstr "Calendario para GNOME" #: data/appdata/org.gnome.Calendar.appdata.xml.in:11 +#| msgid "" +#| "GNOME Calendar is a simple and beautiful calendar application designed to " +#| "perfectly fit the GNOME desktop. By reusing the components which the " +#| "GNOME desktop is build on, Calendar nicely integrates with the GNOME " +#| "ecosystem." msgid "" "GNOME Calendar is a simple and beautiful calendar application designed to " "perfectly fit the GNOME desktop. By reusing the components which the GNOME " -"desktop is build on, Calendar nicely integrates with the GNOME ecosystem." +"desktop is built on, Calendar nicely integrates with the GNOME ecosystem." msgstr "" "Calendario de GNOME es una aplicación de calendario bonita y sencilla " "diseñada para ajustarse perfectamente al escritorio GNOME. Al reutilizar " @@ -491,7 +496,7 @@ msgstr "Introduzca sus credenciales" msgid "Connect" msgstr "Conectar" -#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:754 +#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:753 #: src/views/gcal-week-view.c:278 msgid "00:00" msgstr "00:00" @@ -563,7 +568,6 @@ msgid "Add Event…" msgstr "Añadir evento…" #: src/gcal-application.c:88 -#| msgid "Edit Calendar" msgid "Quit GNOME Calendar" msgstr "Salir de calendario de GNOME" @@ -629,7 +633,7 @@ msgid "Unnamed event" msgstr "Evento sin nombre" #. Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") -#: src/gcal-event-widget.c:420 +#: src/gcal-event-widget.c:422 #, c-format msgid "At %s" msgstr "El %s" @@ -961,7 +965,7 @@ msgstr "%s AM" msgid "%s PM" msgstr "%s PM" -#: src/gcal-utils.c:1093 +#: src/gcal-utils.c:1120 msgid "" "The event you are trying to modify is recurring. The changes you have " "selected should be applied to:" @@ -969,19 +973,19 @@ msgstr "" "El evento que intenta modificar es recurrente. Los cambios que ha " "seleccionado se deben aplicar a:" -#: src/gcal-utils.c:1096 +#: src/gcal-utils.c:1123 msgid "_Cancel" msgstr "_Cancelar" -#: src/gcal-utils.c:1098 +#: src/gcal-utils.c:1125 msgid "_Only This Event" msgstr "_Sólo este evento" -#: src/gcal-utils.c:1105 +#: src/gcal-utils.c:1132 msgid "_Subsequent events" msgstr "_Eventos próximos" -#: src/gcal-utils.c:1107 +#: src/gcal-utils.c:1134 msgid "_All events" msgstr "_Todos los eventos" @@ -993,7 +997,7 @@ msgstr "Otro evento eliminado" msgid "Event deleted" msgstr "Evento eliminado" -#: src/views/gcal-week-grid.c:751 src/views/gcal-week-view.c:275 +#: src/views/gcal-week-grid.c:750 src/views/gcal-week-view.c:275 msgid "00 AM" msgstr "00 AM" diff --git a/po/fur.po b/po/fur.po index f38c3a7a..5c7bce06 100644 --- a/po/fur.po +++ b/po/fur.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: gnome-calendar master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-calendar/issues\n" -"POT-Creation-Date: 2018-01-10 15:33+0000\n" -"PO-Revision-Date: 2018-01-15 12:00+0100\n" +"POT-Creation-Date: 2018-05-02 02:05+0000\n" +"PO-Revision-Date: 2018-05-06 16:46+0200\n" "Last-Translator: Fabio Tomat \n" "Language-Team: Friulian \n" "Language: fur\n" @@ -16,11 +16,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.0.3\n" +"X-Generator: Poedit 2.0.7\n" #: data/appdata/org.gnome.Calendar.appdata.xml.in:7 #: data/org.gnome.Calendar.desktop.in:3 data/ui/quick-add-popover.ui:187 -#: data/ui/window.ui:187 src/gcal-application.c:540 +#: data/ui/window.ui:187 src/gcal-application.c:640 src/main.c:36 msgid "Calendar" msgstr "Calendari" @@ -32,11 +32,12 @@ msgstr "Calendari par GNOME" msgid "" "GNOME Calendar is a simple and beautiful calendar application designed to " "perfectly fit the GNOME desktop. By reusing the components which the GNOME " -"desktop is build on, Calendar nicely integrates with the GNOME ecosystem." +"desktop is built on, Calendar nicely integrates with the GNOME ecosystem." msgstr "" "GNOME Calendari a je une semplice e biele aplicazion calendari progjetade " -"par incjastrâsi ben tal desktop GNOME. Doprant i components cun la cuâl il " -"desktop GNOME al è costruît, Calendari si integre ben cul ecosisteme GNOME." +"par incjastrâsi in maniere perfete tal scritori GNOME. Doprant i components " +"che cun chei al è costruît il scritori GNOME, Calendari si integre ben cul " +"ecosisteme GNOME." #: data/appdata/org.gnome.Calendar.appdata.xml.in:16 msgid "" @@ -75,44 +76,44 @@ msgstr "org.gnome.Calendar" msgid "Calendar;Event;Reminder;" msgstr "Calendari;Lunari;Event;Events;Promemorie;" -#: data/org.gnome.calendar.gschema.xml:6 +#: data/org.gnome.calendar.gschema.xml.in:6 msgid "Window maximized" msgstr "Barcon slargjât" -#: data/org.gnome.calendar.gschema.xml:7 +#: data/org.gnome.calendar.gschema.xml.in:7 msgid "Window maximized state" msgstr "Il stât slargjât dal barcon" -#: data/org.gnome.calendar.gschema.xml:11 +#: data/org.gnome.calendar.gschema.xml.in:11 msgid "Window size" msgstr "Dimension barcon" -#: data/org.gnome.calendar.gschema.xml:12 +#: data/org.gnome.calendar.gschema.xml.in:12 msgid "Window size (width and height)." msgstr "La dimension dal barcon (largjece e altece)." -#: data/org.gnome.calendar.gschema.xml:16 +#: data/org.gnome.calendar.gschema.xml.in:16 msgid "Window position" msgstr "Posizion barcon" -#: data/org.gnome.calendar.gschema.xml:17 +#: data/org.gnome.calendar.gschema.xml.in:17 msgid "Window position (x and y)." msgstr "La posizion dal barcon (x e y)." -#: data/org.gnome.calendar.gschema.xml:21 +#: data/org.gnome.calendar.gschema.xml.in:21 msgid "Type of the active view" msgstr "Mût de viste ative" -#: data/org.gnome.calendar.gschema.xml:22 +#: data/org.gnome.calendar.gschema.xml.in:22 msgid "Type of the active window view, default value is: monthly view" msgstr "" "Il mût de viste dal barcon atîf, il valôr predefinît al è: viste mensîl" -#: data/org.gnome.calendar.gschema.xml:26 +#: data/org.gnome.calendar.gschema.xml.in:26 msgid "Weather Service Configuration" msgstr "Configurazion dal servizi meteorologjic" -#: data/org.gnome.calendar.gschema.xml:27 +#: data/org.gnome.calendar.gschema.xml.in:27 msgid "" "Whether weather reports are shown, automatic locations are used and a " "location-name" @@ -137,7 +138,7 @@ msgstr "Anule" msgid "Click to select the calendar" msgstr "Fâs clic par selezionâ il calendari" -#: data/ui/edit-dialog.ui:108 src/gcal-edit-dialog.c:275 +#: data/ui/edit-dialog.ui:108 src/gcal-edit-dialog.c:277 msgid "Done" msgstr "Fat" @@ -374,15 +375,15 @@ msgstr "Modifiche detais…" msgid "Add" msgstr "Zonte" -#: data/ui/search-view.ui:76 +#: data/ui/search-popover.ui:76 msgid "No results found" msgstr "Nissun risultât cjatât" -#: data/ui/search-view.ui:92 +#: data/ui/search-popover.ui:92 msgid "Try a different search" msgstr "Prove une ricercje diferente" -#: data/ui/source-dialog.ui:53 src/gcal-window.c:1272 src/gcal-window.c:1276 +#: data/ui/source-dialog.ui:53 src/gcal-window.c:1039 src/gcal-window.c:1043 msgid "Undo" msgstr "Anule" @@ -491,8 +492,8 @@ msgstr "Inserìs lis tôs credenziâls" msgid "Connect" msgstr "Conet" -#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:758 -#: src/views/gcal-week-view.c:287 +#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:753 +#: src/views/gcal-week-view.c:278 msgid "00:00" msgstr "00:00" @@ -500,14 +501,26 @@ msgstr "00:00" msgid ":" msgstr ":" -#: data/ui/time-selector.ui:78 src/views/gcal-week-view.c:442 +#: data/ui/time-selector.ui:78 src/views/gcal-week-view.c:432 msgid "AM" msgstr "AM" -#: data/ui/time-selector.ui:79 src/views/gcal-week-view.c:442 +#: data/ui/time-selector.ui:79 src/views/gcal-week-view.c:432 msgid "PM" msgstr "PM" +#: data/ui/weather-settings.ui:12 data/ui/window.ui:407 +msgid "_Weather" +msgstr "_Timp" + +#: data/ui/weather-settings.ui:30 +msgid "Show Weather" +msgstr "Mostre timp" + +#: data/ui/weather-settings.ui:53 +msgid "Automatic Location" +msgstr "Posizion automatiche" + #: data/ui/window.ui:67 msgid "Week" msgstr "Setemane" @@ -520,8 +533,8 @@ msgstr "Mês" msgid "Year" msgstr "An" -#: data/ui/window.ui:190 data/ui/year-view.ui:88 src/views/gcal-year-view.c:285 -#: src/views/gcal-year-view.c:520 +#: data/ui/window.ui:190 data/ui/year-view.ui:88 src/views/gcal-year-view.c:279 +#: src/views/gcal-year-view.c:514 msgid "Today" msgstr "Vuê" @@ -542,18 +555,6 @@ msgstr "_Zonte event" msgid "_Synchronize" msgstr "_Sincronize" -#: data/ui/window.ui:407 data/ui/window.ui:428 -msgid "_Weather" -msgstr "_Timp" - -#: data/ui/window.ui:446 -msgid "Show Weather" -msgstr "Mostre timp" - -#: data/ui/window.ui:469 -msgid "Automatic Location" -msgstr "Posizion automatiche" - #: data/ui/year-view.ui:133 msgid "No events" msgstr "Nissun event" @@ -562,73 +563,73 @@ msgstr "Nissun event" msgid "Add Event…" msgstr "Zonte event…" -#: src/gcal-application.c:90 +#: src/gcal-application.c:88 msgid "Quit GNOME Calendar" msgstr "Jes di Calendari GNOME" -#: src/gcal-application.c:95 +#: src/gcal-application.c:93 msgid "Display version number" msgstr "Mostre il numar di version" -#: src/gcal-application.c:100 +#: src/gcal-application.c:98 msgid "Enable debug messages" msgstr "Abilite messaçs di debug" -#: src/gcal-application.c:105 +#: src/gcal-application.c:103 msgid "Open calendar on the passed date" msgstr "Vierç il calendari te zornade dade" -#: src/gcal-application.c:110 +#: src/gcal-application.c:108 msgid "Open calendar showing the passed event" msgstr "Vierç il calendari mostrant l'event dât" -#: src/gcal-application.c:497 +#: src/gcal-application.c:595 #, c-format msgid "Copyright © 2012–%d The Calendar authors" msgstr "Copyright © 2012–%d i autôrs di Calendari" -#: src/gcal-application.c:546 +#: src/gcal-application.c:646 msgid "translator-credits" msgstr "Fabio Tomat " -#: src/gcal-edit-dialog.c:275 +#: src/gcal-edit-dialog.c:277 msgid "Save" msgstr "Salve" -#: src/gcal-edit-dialog.c:1019 +#: src/gcal-edit-dialog.c:1037 #, c-format msgid "%d minute before" msgid_plural "%d minutes before" msgstr[0] "%d minût prime" msgstr[1] "%d minûts prime" -#: src/gcal-edit-dialog.c:1027 +#: src/gcal-edit-dialog.c:1045 #, c-format msgid "%d hour before" msgid_plural "%d hours before" msgstr[0] "%d ore prime" msgstr[1] "%d oris prime" -#: src/gcal-edit-dialog.c:1035 +#: src/gcal-edit-dialog.c:1053 #, c-format msgid "%d day before" msgid_plural "%d days before" msgstr[0] "%d zornade prime" msgstr[1] "%d dîs prime" -#: src/gcal-edit-dialog.c:1043 +#: src/gcal-edit-dialog.c:1061 #, c-format msgid "%d week before" msgid_plural "%d weeks before" msgstr[0] "%d setemane prime" msgstr[1] "%d setemanis prime" -#: src/gcal-edit-dialog.c:1347 src/gcal-quick-add-popover.c:680 +#: src/gcal-edit-dialog.c:1367 src/gcal-quick-add-popover.c:682 msgid "Unnamed event" msgstr "Event cence non" #. Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") -#: src/gcal-event-widget.c:420 +#: src/gcal-event-widget.c:422 #, c-format msgid "At %s" msgstr "A %s" @@ -743,14 +744,17 @@ msgid "December" msgstr "Dicembar" #: src/gcal-quick-add-popover.c:286 +#, c-format msgid "from Today" msgstr "di vuê" #: src/gcal-quick-add-popover.c:290 +#, c-format msgid "from Tomorrow" msgstr "di doman" #: src/gcal-quick-add-popover.c:294 +#, c-format msgid "from Yesterday" msgstr "di îr" @@ -764,14 +768,17 @@ msgid "from %1$s %2$s" msgstr "dal/dai %2$s di %1$s" #: src/gcal-quick-add-popover.c:323 +#, c-format msgid "to Today" msgstr "a doman" #: src/gcal-quick-add-popover.c:327 +#, c-format msgid "to Tomorrow" msgstr "a doman" #: src/gcal-quick-add-popover.c:331 +#, c-format msgid "to Yesterday" msgstr "a îr" @@ -791,14 +798,17 @@ msgid "New Event %1$s %2$s" msgstr "Gnûf event %1$s %2$s" #: src/gcal-quick-add-popover.c:373 +#, c-format msgid "New Event Today" msgstr "Gnûf event vuê" #: src/gcal-quick-add-popover.c:377 +#, c-format msgid "New Event Tomorrow" msgstr "Gnûf event doman" #: src/gcal-quick-add-popover.c:381 +#, c-format msgid "New Event Yesterday" msgstr "Gnûf event îr" @@ -897,11 +907,11 @@ msgstr "Gnûf event al/ai %d di dicembar" msgid "%1$s, %2$s – %3$s" msgstr "%1$s, %2$s – %3$s" -#: src/gcal-search-view.c:358 +#: src/gcal-search-popover.c:303 msgid "All day" msgstr "Dut il dì" -#: src/gcal-search-view.c:563 +#: src/gcal-search-popover.c:563 msgid "Use the entry above to search for events." msgstr "Dopre la casele di test parsore par cirî i events." @@ -942,17 +952,17 @@ msgstr "On" msgid "Expired" msgstr "Scjadût" -#: src/gcal-time-selector.c:84 +#: src/gcal-time-selector.c:83 #, c-format msgid "%s AM" msgstr "%s AM" -#: src/gcal-time-selector.c:86 +#: src/gcal-time-selector.c:85 #, c-format msgid "%s PM" msgstr "%s PM" -#: src/gcal-utils.c:1090 +#: src/gcal-utils.c:1120 msgid "" "The event you are trying to modify is recurring. The changes you have " "selected should be applied to:" @@ -960,42 +970,42 @@ msgstr "" "L'event che si sta cirint di modificâ al è ciclic. Lis modifichis " "selezionadis e varessin di jessi aplicadis a:" -#: src/gcal-utils.c:1093 +#: src/gcal-utils.c:1123 msgid "_Cancel" msgstr "_Anule" -#: src/gcal-utils.c:1095 +#: src/gcal-utils.c:1125 msgid "_Only This Event" msgstr "_Dome chest event" -#: src/gcal-utils.c:1102 +#: src/gcal-utils.c:1132 msgid "_Subsequent events" msgstr "_Events seguitîfs" -#: src/gcal-utils.c:1104 +#: src/gcal-utils.c:1134 msgid "_All events" msgstr "_Ducj i events" -#: src/gcal-window.c:1272 +#: src/gcal-window.c:1039 msgid "Another event deleted" msgstr "Un altri event eliminât" -#: src/gcal-window.c:1276 +#: src/gcal-window.c:1043 msgid "Event deleted" msgstr "Event eliminât" -#: src/views/gcal-week-grid.c:755 src/views/gcal-week-view.c:284 +#: src/views/gcal-week-grid.c:750 src/views/gcal-week-view.c:275 msgid "00 AM" msgstr "00 AM" -#: src/views/gcal-week-header.c:400 +#: src/views/gcal-week-header.c:398 #, c-format msgid "Other event" msgid_plural "Other %d events" msgstr[0] "Altri event" msgstr[1] "Altris %d events" -#: src/views/gcal-week-header.c:933 +#: src/views/gcal-week-header.c:934 #, c-format msgid "week %d" msgstr "setemane %d" @@ -1003,14 +1013,14 @@ msgstr "setemane %d" #. Translators: This is a date format in the sidebar of the year #. * view when the selection starts at the specified day and the #. * end is unspecified. -#: src/views/gcal-year-view.c:294 +#: src/views/gcal-year-view.c:288 msgid "%B %d…" msgstr "%d di %B…" #. Translators: This is a date format in the sidebar of the year #. * view when there is only one specified day selected. #. Translators: This is a date format in the sidebar of the year view. -#: src/views/gcal-year-view.c:300 src/views/gcal-year-view.c:523 +#: src/views/gcal-year-view.c:294 src/views/gcal-year-view.c:517 msgid "%B %d" msgstr "%d di %B" diff --git a/po/zh_CN.po b/po/zh_CN.po index fee8c57c..614d4d60 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -6,14 +6,14 @@ # Bin Li , 2016. # Qizhi Zhou , 2016. # Dinzhong Chen , 2017. +# Mingcong Bai , 2018. # msgid "" msgstr "" "Project-Id-Version: gnome-calendar master\n" -"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" -"calendar&keywords=I18N+L10N&component=General\n" -"POT-Creation-Date: 2017-04-29 14:10+0000\n" -"PO-Revision-Date: 2017-03-22 02:07+0800\n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-calendar/issues\n" +"POT-Creation-Date: 2018-03-20 20:44+0000\n" +"PO-Revision-Date: 2018-03-25 02:09+0800\n" "Last-Translator: Dingzhong Chen \n" "Language-Team: Chinese (China) \n" "Language: zh_CN\n" @@ -22,425 +22,1018 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Launchpad-Export-Date: 2016-03-22 14:52+0000\n" -"X-Generator: Poedit 1.8.12\n" +"X-Generator: Poedit 2.0.6\n" -#: ../data/org.gnome.calendar.gschema.xml.h:1 -msgid "Window maximized" -msgstr "窗口最大化" - -#: ../data/org.gnome.calendar.gschema.xml.h:2 -msgid "Window maximized state" -msgstr "窗口最大化状态" - -#: ../data/org.gnome.calendar.gschema.xml.h:3 -msgid "Window size" -msgstr "窗口大小" - -#: ../data/org.gnome.calendar.gschema.xml.h:4 -msgid "Window size (width and height)." -msgstr "窗口大小(宽度和高度)。" - -#: ../data/org.gnome.calendar.gschema.xml.h:5 -msgid "Window position" -msgstr "窗口位置" - -#: ../data/org.gnome.calendar.gschema.xml.h:6 -msgid "Window position (x and y)." -msgstr "窗口位置(水平和垂直)。" - -#: ../data/org.gnome.calendar.gschema.xml.h:7 -msgid "Type of the active view" -msgstr "活动视图类型" - -#: ../data/org.gnome.calendar.gschema.xml.h:8 -msgid "Type of the active window view, default value is: monthly view" -msgstr "活动窗口视图类型,默认值为:月份视图" - -#: ../src/gcal-application.c:87 -msgid "Display version number" -msgstr "显示版本号" - -#: ../src/gcal-application.c:92 -msgid "Open calendar on the passed date" -msgstr "打开日历显示过去的日期" - -#: ../src/gcal-application.c:97 -msgid "Open calendar showing the passed event" -msgstr "打开日历显示过去的事件" - -#: ../src/gcal-application.c:278 -msgid "— Calendar management" -msgstr "——日历管理" - -#: ../src/gcal-application.c:457 -#, c-format -msgid "Copyright © %d The Calendar authors" -msgstr "Copyright © %d 日历作者" - -#: ../src/gcal-application.c:463 -#, c-format -msgid "Copyright © %d–%d The Calendar authors" -msgstr "Copyright © %d–%d 日历作者" - -#: ../src/gcal-application.c:469 +#: data/appdata/org.gnome.Calendar.appdata.xml.in:7 +#: data/org.gnome.Calendar.desktop.in:3 data/ui/quick-add-popover.ui:187 +#: data/ui/window.ui:187 src/gcal-application.c:640 src/main.c:36 msgid "Calendar" msgstr "日历" -#: ../src/gcal-application.c:476 +#: data/appdata/org.gnome.Calendar.appdata.xml.in:8 +msgid "Calendar for GNOME" +msgstr "GNOME 日历" + +#: data/appdata/org.gnome.Calendar.appdata.xml.in:11 +msgid "" +"GNOME Calendar is a simple and beautiful calendar application designed to " +"perfectly fit the GNOME desktop. By reusing the components which the GNOME " +"desktop is build on, Calendar nicely integrates with the GNOME ecosystem." +msgstr "" +"GNOME 日历设计简洁美观,符合 GNOME 桌面风格。通过重用组件,日历能够很好地与 " +"GNOME 生态系统结合。" + +#: data/appdata/org.gnome.Calendar.appdata.xml.in:16 +msgid "" +"We aim to find the perfect balance between nicely crafted features and user-" +"centred usability. No excess, no lacks. You’ll feel comfortable using " +"Calendar, like you’ve been using it for ages!" +msgstr "" +"我们的目标是找到很好的功能和用户为中心的易用性之间的完美平衡。既不多余,也不" +"缺乏。使用日历,您会感觉很舒服!" + +#: data/appdata/org.gnome.Calendar.appdata.xml.in:27 +msgid "Week view" +msgstr "周视图" + +#: data/appdata/org.gnome.Calendar.appdata.xml.in:31 +msgid "Search for events" +msgstr "搜索事件" + +#: data/appdata/org.gnome.Calendar.appdata.xml.in:35 +msgid "Calendar management" +msgstr "日历管理" + +#: data/org.gnome.Calendar.desktop.in:4 +msgid "Access and manage your calendars" +msgstr "访问并管理日历" + +#. Translators: Do NOT translate or transliterate this text (this is an icon file name)! +#: data/org.gnome.Calendar.desktop.in:7 +msgid "org.gnome.Calendar" +msgstr "org.gnome.Calendar" + +#. Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! +#: data/org.gnome.Calendar.desktop.in:13 +msgid "Calendar;Event;Reminder;" +msgstr "Calendar;Event;Reminder;日历;事件;提醒;" + +#: data/org.gnome.calendar.gschema.xml.in:6 +msgid "Window maximized" +msgstr "窗口最大化" + +#: data/org.gnome.calendar.gschema.xml.in:7 +msgid "Window maximized state" +msgstr "窗口最大化状态" + +#: data/org.gnome.calendar.gschema.xml.in:11 +msgid "Window size" +msgstr "窗口大小" + +#: data/org.gnome.calendar.gschema.xml.in:12 +msgid "Window size (width and height)." +msgstr "窗口大小(宽度和高度)。" + +#: data/org.gnome.calendar.gschema.xml.in:16 +msgid "Window position" +msgstr "窗口位置" + +#: data/org.gnome.calendar.gschema.xml.in:17 +msgid "Window position (x and y)." +msgstr "窗口位置(水平和垂直)。" + +#: data/org.gnome.calendar.gschema.xml.in:21 +msgid "Type of the active view" +msgstr "活动视图类型" + +#: data/org.gnome.calendar.gschema.xml.in:22 +msgid "Type of the active window view, default value is: monthly view" +msgstr "活动窗口视图类型,默认值为:月份视图" + +#: data/org.gnome.calendar.gschema.xml.in:26 +msgid "Weather Service Configuration" +msgstr "天气服务配置" + +#: data/org.gnome.calendar.gschema.xml.in:27 +msgid "" +"Whether weather reports are shown, automatic locations are used and a " +"location-name" +msgstr "是否显示天气预报,默认情况下使用自动位置探测,也可以使用 location-name" + +#: data/ui/alarm-row.ui:34 +msgid "Toggles the sound of the alarm" +msgstr "切换闹钟的声音" + +#: data/ui/alarm-row.ui:54 +msgid "Remove the alarm" +msgstr "删除闹钟" + +#: data/ui/edit-dialog.ui:16 data/ui/source-dialog.ui:762 +#: data/ui/source-dialog.ui:869 src/gcal-source-dialog.c:1162 +msgid "Cancel" +msgstr "取消" + +#: data/ui/edit-dialog.ui:36 +msgid "Click to select the calendar" +msgstr "单击选中日历" + +#: data/ui/edit-dialog.ui:108 src/gcal-edit-dialog.c:277 +msgid "Done" +msgstr "完成" + +#: data/ui/edit-dialog.ui:146 +msgid "Title" +msgstr "标题" + +#: data/ui/edit-dialog.ui:164 +msgid "Date" +msgstr "日期" + +#: data/ui/edit-dialog.ui:180 +msgid "Repeat" +msgstr "重复" + +#: data/ui/edit-dialog.ui:198 +msgid "Reminders" +msgstr "提醒" + +#: data/ui/edit-dialog.ui:216 +msgid "Notes" +msgstr "备注" + +#: data/ui/edit-dialog.ui:232 data/ui/source-dialog.ui:563 +msgid "Location" +msgstr "位置" + +#: data/ui/edit-dialog.ui:301 +msgid "Time" +msgstr "时间" + +#: data/ui/edit-dialog.ui:354 +msgid "All Day" +msgstr "全天" + +#: data/ui/edit-dialog.ui:399 +msgid "Add reminder…" +msgstr "添加提醒…" + +#: data/ui/edit-dialog.ui:430 +msgid "No Repeat" +msgstr "不重复" + +#: data/ui/edit-dialog.ui:431 +msgid "Daily" +msgstr "每天" + +#: data/ui/edit-dialog.ui:432 +msgid "Monday – Friday" +msgstr "工作日" + +#: data/ui/edit-dialog.ui:433 +msgid "Weekly" +msgstr "每周" + +#: data/ui/edit-dialog.ui:434 +msgid "Monthly" +msgstr "每月" + +#: data/ui/edit-dialog.ui:435 +msgid "Yearly" +msgstr "每年" + +#: data/ui/edit-dialog.ui:463 +msgid "Forever" +msgstr "总是" + +#: data/ui/edit-dialog.ui:464 +msgid "No. of occurrences" +msgstr "重复次数" + +#: data/ui/edit-dialog.ui:465 +msgid "Until Date" +msgstr "截止日期" + +#: data/ui/edit-dialog.ui:560 +msgid "Delete Event" +msgstr "删除事件" + +#: data/ui/edit-dialog.ui:599 +msgid "5 minutes" +msgstr "5 分钟" + +#: data/ui/edit-dialog.ui:608 +msgid "10 minutes" +msgstr "10 分钟" + +#: data/ui/edit-dialog.ui:617 +msgid "30 minutes" +msgstr "30 分钟" + +#: data/ui/edit-dialog.ui:626 +msgid "1 hour" +msgstr "1 小时" + +#: data/ui/edit-dialog.ui:634 +msgid "1 day" +msgstr "1 天" + +#: data/ui/edit-dialog.ui:643 +msgid "2 days" +msgstr "2 天" + +#: data/ui/edit-dialog.ui:652 +msgid "3 days" +msgstr "3 天" + +#: data/ui/edit-dialog.ui:661 +msgid "1 week" +msgstr "1 周" + +#: data/ui/help-overlay.ui:13 +msgctxt "shortcut window" +msgid "General" +msgstr "通用" + +#: data/ui/help-overlay.ui:17 +msgctxt "shortcut window" +msgid "New event" +msgstr "新事件" + +#: data/ui/help-overlay.ui:24 +msgctxt "shortcut window" +msgid "Close window" +msgstr "关闭窗口" + +#: data/ui/help-overlay.ui:31 +msgctxt "shortcut window" +msgid "Search" +msgstr "搜索" + +#: data/ui/help-overlay.ui:38 +msgctxt "shortcut window" +msgid "Show help" +msgstr "显示帮助" + +#: data/ui/help-overlay.ui:45 +msgctxt "shortcut window" +msgid "Shortcuts" +msgstr "快捷键" + +#: data/ui/help-overlay.ui:54 +msgctxt "shortcut window" +msgid "Navigation" +msgstr "导航" + +#: data/ui/help-overlay.ui:58 +msgctxt "shortcut window" +msgid "Go back" +msgstr "返回" + +#: data/ui/help-overlay.ui:65 +msgctxt "shortcut window" +msgid "Go forward" +msgstr "前进" + +#: data/ui/help-overlay.ui:72 +msgctxt "shortcut window" +msgid "Show today" +msgstr "显示今天" + +#: data/ui/help-overlay.ui:79 +msgctxt "shortcut window" +msgid "Next view" +msgstr "下一视图" + +#: data/ui/help-overlay.ui:86 +msgctxt "shortcut window" +msgid "Previous view" +msgstr "上一视图" + +#: data/ui/help-overlay.ui:95 +msgctxt "shortcut window" +msgid "View" +msgstr "视图" + +#: data/ui/help-overlay.ui:99 +msgctxt "shortcut window" +msgid "Week view" +msgstr "周视图" + +#: data/ui/help-overlay.ui:106 +msgctxt "shortcut window" +msgid "Month view" +msgstr "月视图" + +#: data/ui/help-overlay.ui:113 +msgctxt "shortcut window" +msgid "Year view" +msgstr "年视图" + +#: data/ui/menus.ui:6 +msgid "Add Eve_nt…" +msgstr "添加事件(_N)…" + +#: data/ui/menus.ui:13 +msgid "_Calendars" +msgstr "日历(_C)" + +#: data/ui/menus.ui:19 +msgid "_Keyboard Shortcuts" +msgstr "键盘快捷键(_K)" + +#: data/ui/menus.ui:23 +msgid "_About" +msgstr "关于(_A)" + +#: data/ui/menus.ui:27 +msgid "_Quit" +msgstr "退出(_Q)" + +#: data/ui/menus.ui:36 +msgid "From Web…" +msgstr "从网络…" + +#: data/ui/menus.ui:40 +msgid "New Local Calendar…" +msgstr "新建本地日历…" + +#: data/ui/menus.ui:44 +msgid "From File…" +msgstr "从文件…" + +#: data/ui/month-popover.ui:91 +msgid "New Event…" +msgstr "新建事件…" + +#: data/ui/quick-add-popover.ui:117 +msgid "Edit Details…" +msgstr "编辑细节…" + +#: data/ui/quick-add-popover.ui:130 data/ui/source-dialog.ui:389 +#: data/ui/source-dialog.ui:773 +msgid "Add" +msgstr "添加" + +#: data/ui/search-popover.ui:76 +msgid "No results found" +msgstr "未发现结果" + +#: data/ui/search-popover.ui:92 +msgid "Try a different search" +msgstr "尝试不同的搜索" + +#: data/ui/source-dialog.ui:53 src/gcal-window.c:1039 src/gcal-window.c:1043 +msgid "Undo" +msgstr "撤消" + +#: data/ui/source-dialog.ui:135 +msgid "Online Accounts" +msgstr "在线帐户" + +#: data/ui/source-dialog.ui:151 +msgid "Open online account settings" +msgstr "打开在线帐户设置" + +#: data/ui/source-dialog.ui:198 +msgid "Google" +msgstr "Google" + +#: data/ui/source-dialog.ui:209 data/ui/source-dialog.ui:260 +#: data/ui/source-dialog.ui:311 +msgid "Click to set up" +msgstr "点击设置" + +#: data/ui/source-dialog.ui:249 +msgid "Nextcloud" +msgstr "Nextcloud" + +#: data/ui/source-dialog.ui:300 +msgid "Microsoft Exchange" +msgstr "微软 Exchange" + +#: data/ui/source-dialog.ui:346 data/ui/source-dialog.ui:682 +msgid "Calendars" +msgstr "日历" + +#: data/ui/source-dialog.ui:421 +msgid "Overview" +msgstr "概览" + +#: data/ui/source-dialog.ui:441 +msgid "Add new events to this calendar by default" +msgstr "默认情况下将新事件添加到该日历中" + +#: data/ui/source-dialog.ui:454 +msgid "Remove Calendar" +msgstr "移除日历" + +#: data/ui/source-dialog.ui:483 +msgid "Display calendar" +msgstr "显示日历" + +#: data/ui/source-dialog.ui:521 +msgid "Calendar name" +msgstr "日历名称" + +#: data/ui/source-dialog.ui:535 +msgid "Color" +msgstr "颜色" + +#: data/ui/source-dialog.ui:549 +msgid "Account" +msgstr "帐户" + +#: data/ui/source-dialog.ui:587 +msgid "Settings" +msgstr "设置" + +#: data/ui/source-dialog.ui:618 +msgid "Edit Calendar" +msgstr "编辑日历" + +#: data/ui/source-dialog.ui:631 +msgid "" +"Enter the address of the calendar that you want to add. If the calendar " +"belongs to one of your online accounts, you can add it through the online account settings." +msgstr "" +"输入您要添加的日历地址。如果您是在线帐户,可以通过在线帐户设" +"置来添加。" + +#: data/ui/source-dialog.ui:646 +msgid "Calendar Address" +msgstr "日历地址" + +#: data/ui/source-dialog.ui:729 src/gcal-source-dialog.c:2285 +#: src/gcal-source-dialog.c:2291 +msgid "Add Calendar" +msgstr "添加日历" + +#: data/ui/source-dialog.ui:745 data/ui/window.ui:344 +#: src/gcal-source-dialog.c:862 src/gcal-source-dialog.c:2314 +msgid "Calendar Settings" +msgstr "日历设置" + +#: data/ui/source-dialog.ui:806 +msgid "User" +msgstr "用户" + +#: data/ui/source-dialog.ui:820 +msgid "Password" +msgstr "密码" + +#: data/ui/source-dialog.ui:866 +msgid "Enter your credentials" +msgstr "输入您的凭据" + +#: data/ui/source-dialog.ui:878 +msgid "Connect" +msgstr "连接" + +#: data/ui/time-selector.ui:9 src/views/gcal-week-grid.c:754 +#: src/views/gcal-week-view.c:278 +msgid "00:00" +msgstr "00:00" + +#: data/ui/time-selector.ui:65 +msgid ":" +msgstr ":" + +#: data/ui/time-selector.ui:78 src/views/gcal-week-view.c:432 +msgid "AM" +msgstr "上午" + +#: data/ui/time-selector.ui:79 src/views/gcal-week-view.c:432 +msgid "PM" +msgstr "下午" + +#: data/ui/weather-settings.ui:12 data/ui/window.ui:407 +msgid "_Weather" +msgstr "天气(_W)" + +#: data/ui/weather-settings.ui:30 +msgid "Show Weather" +msgstr "显示天气" + +#: data/ui/weather-settings.ui:53 +msgid "Automatic Location" +msgstr "自动定位" + +#: data/ui/window.ui:67 +msgid "Week" +msgstr "星期" + +#: data/ui/window.ui:82 +msgid "Month" +msgstr "月份" + +#: data/ui/window.ui:96 +msgid "Year" +msgstr "年份" + +#: data/ui/window.ui:190 data/ui/year-view.ui:88 src/views/gcal-year-view.c:279 +#: src/views/gcal-year-view.c:514 +msgid "Today" +msgstr "今天" + +#: data/ui/window.ui:271 +msgid "Manage your calendars" +msgstr "管理您的日历" + +#: data/ui/window.ui:288 +msgctxt "tooltip" +msgid "Search for events" +msgstr "搜索事件" + +#: data/ui/window.ui:391 +msgid "Add Eve_nt" +msgstr "添加事件(_N)" + +#: data/ui/window.ui:400 +msgid "_Synchronize" +msgstr "同步(_S)" + +#: data/ui/year-view.ui:133 +msgid "No events" +msgstr "无事件" + +#: data/ui/year-view.ui:155 +msgid "Add Event…" +msgstr "添加事件…" + +#: src/gcal-application.c:88 +msgid "Quit GNOME Calendar" +msgstr "退出 GNOME 日历" + +#: src/gcal-application.c:93 +msgid "Display version number" +msgstr "显示版本号" + +#: src/gcal-application.c:98 +msgid "Enable debug messages" +msgstr "显示调试消息" + +#: src/gcal-application.c:103 +msgid "Open calendar on the passed date" +msgstr "打开日历显示过去的日期" + +#: src/gcal-application.c:108 +msgid "Open calendar showing the passed event" +msgstr "打开日历显示过去的事件" + +#: src/gcal-application.c:595 +#, c-format +msgid "Copyright © 2012–%d The Calendar authors" +msgstr "Copyright © 2012–%d The Calendar 作者" + +#: src/gcal-application.c:646 msgid "translator-credits" msgstr "" "tuhaihe <1132321739qq@gmail.com>, 2013\n" "Cheng Lu , 2016\n" "Bin Li , 2016\n" "Qizhi Zhou , 2016\n" -"Dinzhong Chen , 2017" +"Dinzhong Chen , 2017\n" +"Mingcong Bai , 2018" -#: ../src/gcal-edit-dialog.c:608 +#: src/gcal-edit-dialog.c:277 msgid "Save" msgstr "保存" -#: ../src/gcal-edit-dialog.c:608 -msgid "Done" -msgstr "完成" - -#: ../src/gcal-edit-dialog.c:878 +#: src/gcal-edit-dialog.c:1037 #, c-format msgid "%d minute before" msgid_plural "%d minutes before" msgstr[0] "%d 分钟前" -#: ../src/gcal-edit-dialog.c:886 +#: src/gcal-edit-dialog.c:1045 #, c-format msgid "%d hour before" msgid_plural "%d hours before" msgstr[0] "%d 小时前" -#: ../src/gcal-edit-dialog.c:894 +#: src/gcal-edit-dialog.c:1053 #, c-format msgid "%d day before" msgid_plural "%d days before" msgstr[0] "%d 天前" -#: ../src/gcal-edit-dialog.c:902 +#: src/gcal-edit-dialog.c:1061 #, c-format msgid "%d week before" msgid_plural "%d weeks before" msgstr[0] "%d 周前" -#: ../src/gcal-edit-dialog.c:1162 ../src/gcal-quick-add-popover.c:501 +#: src/gcal-edit-dialog.c:1367 src/gcal-quick-add-popover.c:682 msgid "Unnamed event" msgstr "未命名事件" -#: ../src/gcal-event-widget.c:363 +#. Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") +#: src/gcal-event-widget.c:420 #, c-format msgid "At %s" -msgstr "" +msgstr "位于 %s" -#: ../src/gcal-quick-add-popover.c:119 +#: src/gcal-quick-add-popover.c:119 #, c-format msgid "%s (this calendar is read-only)" msgstr "%s(这个日历是只读的)" +#: src/gcal-quick-add-popover.c:244 +msgid "from next Monday" +msgstr "下周一开始" + +#: src/gcal-quick-add-popover.c:245 +msgid "from next Tuesday" +msgstr "下周二开始" + +#: src/gcal-quick-add-popover.c:246 +msgid "from next Wednesday" +msgstr "下周三开始" + +#: src/gcal-quick-add-popover.c:247 +msgid "from next Thursday" +msgstr "下周四开始" + +#: src/gcal-quick-add-popover.c:248 +msgid "from next Friday" +msgstr "下周五开始" + +#: src/gcal-quick-add-popover.c:249 +msgid "from next Saturday" +msgstr "下周六开始" + +#: src/gcal-quick-add-popover.c:250 +msgid "from next Sunday" +msgstr "下周日开始" + +#: src/gcal-quick-add-popover.c:255 +msgid "to next Monday" +msgstr "到下周一" + +#: src/gcal-quick-add-popover.c:256 +msgid "to next Tuesday" +msgstr "到下周二" + +#: src/gcal-quick-add-popover.c:257 +msgid "to next Wednesday" +msgstr "到下周三" + +#: src/gcal-quick-add-popover.c:258 +msgid "to next Thursday" +msgstr "到下周四" + +#: src/gcal-quick-add-popover.c:259 +msgid "to next Friday" +msgstr "到下周五" + +#: src/gcal-quick-add-popover.c:260 +msgid "to next Saturday" +msgstr "到下周六" + +#: src/gcal-quick-add-popover.c:261 +msgid "to next Sunday" +msgstr "到下周日" + +#: src/gcal-quick-add-popover.c:266 +msgid "January" +msgstr "一月" + +#: src/gcal-quick-add-popover.c:267 +msgid "February" +msgstr "二月" + +#: src/gcal-quick-add-popover.c:268 +msgid "March" +msgstr "三月" + +#: src/gcal-quick-add-popover.c:269 +msgid "April" +msgstr "四月" + +#: src/gcal-quick-add-popover.c:270 +msgid "May" +msgstr "五月" + +#: src/gcal-quick-add-popover.c:271 +msgid "June" +msgstr "六月" + +#: src/gcal-quick-add-popover.c:272 +msgid "July" +msgstr "七月" + +#: src/gcal-quick-add-popover.c:273 +msgid "August" +msgstr "八月" + +#: src/gcal-quick-add-popover.c:274 +msgid "September" +msgstr "九月" + +#: src/gcal-quick-add-popover.c:275 +msgid "October" +msgstr "十月" + +#: src/gcal-quick-add-popover.c:276 +msgid "November" +msgstr "十一月" + +#: src/gcal-quick-add-popover.c:277 +msgid "December" +msgstr "十二月" + +#: src/gcal-quick-add-popover.c:286 +#, c-format +msgid "from Today" +msgstr "今天开始" + +#: src/gcal-quick-add-popover.c:290 +#, c-format +msgid "from Tomorrow" +msgstr "明天开始" + +#: src/gcal-quick-add-popover.c:294 +#, c-format +msgid "from Yesterday" +msgstr "昨天开始" + #. Translators: -#. * this is the format string for representing a date consisting of a month name -#. * and a date of month. +#. * this is the format string for representing a date consisting of a month +#. * name and a date of month. #. -#: ../src/gcal-quick-add-popover.c:234 ../src/gcal-quick-add-popover.c:264 -msgctxt "event date format" -msgid "%B %d" -msgstr "%B %d" - -#: ../src/gcal-quick-add-popover.c:266 +#: src/gcal-quick-add-popover.c:312 #, c-format -msgid "New Event from %s to %s" -msgstr "新建事件从 %s 到 %s" +msgid "from %1$s %2$s" +msgstr "从 %1$s 月 %2$s 日" -#: ../src/gcal-quick-add-popover.c:283 +#: src/gcal-quick-add-popover.c:323 #, c-format -msgid "New Event on %s, %s – %s" -msgstr "新建事件于 %s,%s – %s" +msgid "to Today" +msgstr "到今天" -#: ../src/gcal-quick-add-popover.c:293 +#: src/gcal-quick-add-popover.c:327 #, c-format -msgid "New Event on %s" -msgstr "新建事件于 %s" +msgid "to Tomorrow" +msgstr "到明天" -#: ../src/gcal-search-view.c:358 +#: src/gcal-quick-add-popover.c:331 +#, c-format +msgid "to Yesterday" +msgstr "到昨天" + +#. Translators: +#. * this is the format string for representing a date consisting of a month +#. * name and a date of month. +#. +#: src/gcal-quick-add-popover.c:349 +#, c-format +msgid "to %1$s %2$s" +msgstr "到 %1$s 月 %2$s 日" + +#. Translators: %1$s is the start date (e.g. "from Today") and %2$s is the end date (e.g. "to Tomorrow") +#: src/gcal-quick-add-popover.c:356 +#, c-format +msgid "New Event %1$s %2$s" +msgstr "为 %1$s 月 %2$s 日新建事件" + +#: src/gcal-quick-add-popover.c:373 +#, c-format +msgid "New Event Today" +msgstr "为今天新建事件" + +#: src/gcal-quick-add-popover.c:377 +#, c-format +msgid "New Event Tomorrow" +msgstr "为明天新建事件" + +#: src/gcal-quick-add-popover.c:381 +#, c-format +msgid "New Event Yesterday" +msgstr "为昨天新建事件" + +#: src/gcal-quick-add-popover.c:387 +msgid "New Event next Monday" +msgstr "为下周一新建事件" + +#: src/gcal-quick-add-popover.c:388 +msgid "New Event next Tuesday" +msgstr "为下周二新建事件" + +#: src/gcal-quick-add-popover.c:389 +msgid "New Event next Wednesday" +msgstr "为下周三新建事件" + +#: src/gcal-quick-add-popover.c:390 +msgid "New Event next Thursday" +msgstr "为下周四新建事件" + +#: src/gcal-quick-add-popover.c:391 +msgid "New Event next Friday" +msgstr "为下周五新建事件" + +#: src/gcal-quick-add-popover.c:392 +msgid "New Event next Saturday" +msgstr "为下周六新建事件" + +#: src/gcal-quick-add-popover.c:393 +msgid "New Event next Sunday" +msgstr "为下周日新建事件" + +#. Translators: %d is the numeric day of month +#: src/gcal-quick-add-popover.c:405 +#, c-format +msgid "New Event on January %d" +msgstr "为 1 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:406 +#, c-format +msgid "New Event on February %d" +msgstr "为 2 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:407 +#, c-format +msgid "New Event on March %d" +msgstr "为 3 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:408 +#, c-format +msgid "New Event on April %d" +msgstr "为 4 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:409 +#, c-format +msgid "New Event on May %d" +msgstr "为 5 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:410 +#, c-format +msgid "New Event on June %d" +msgstr "为 6 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:411 +#, c-format +msgid "New Event on July %d" +msgstr "为 7 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:412 +#, c-format +msgid "New Event on August %d" +msgstr "为 8 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:413 +#, c-format +msgid "New Event on September %d" +msgstr "为 9 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:414 +#, c-format +msgid "New Event on October %d" +msgstr "为 10 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:415 +#, c-format +msgid "New Event on November %d" +msgstr "为 11 月 %d 日新建事件" + +#: src/gcal-quick-add-popover.c:416 +#, c-format +msgid "New Event on December %d" +msgstr "为 12 月 %d 日新建事件" + +#. Translators: %1$s is the event name, %2$s is the start hour, and %3$s is the end hour +#: src/gcal-quick-add-popover.c:464 +#, c-format +msgid "%1$s, %2$s – %3$s" +msgstr "%1$s,%2$s – %3$s" + +#: src/gcal-search-popover.c:303 msgid "All day" msgstr "全天" -#: ../src/gcal-search-view.c:563 +#: src/gcal-search-popover.c:563 msgid "Use the entry above to search for events." msgstr "使用上面的条目搜索事件。" -#: ../src/gcal-source-dialog.c:790 ../src/gcal-source-dialog.c:2168 -msgid "Calendar Settings" -msgstr "日历设置" - #. Dialog -#: ../src/gcal-source-dialog.c:1045 +#: src/gcal-source-dialog.c:1159 msgid "Select a calendar file" msgstr "选择一个日历文件" -#: ../src/gcal-source-dialog.c:1048 -msgid "Cancel" -msgstr "取消" - -#: ../src/gcal-source-dialog.c:1049 +#: src/gcal-source-dialog.c:1163 msgid "Open" msgstr "打开" -#: ../src/gcal-source-dialog.c:1056 +#: src/gcal-source-dialog.c:1170 msgid "Calendar files" msgstr "日历文件" #. update the source properties -#: ../src/gcal-source-dialog.c:1090 +#: src/gcal-source-dialog.c:1204 msgid "Unnamed Calendar" -msgstr "未命名日历 " +msgstr "未命名日历" #. Update notification label -#: ../src/gcal-source-dialog.c:1696 +#: src/gcal-source-dialog.c:1810 #, c-format msgid "Calendar %s removed" msgstr "日历%s 已被删除" -#: ../src/gcal-source-dialog.c:1899 ../src/gcal-source-dialog.c:1956 +#: src/gcal-source-dialog.c:1859 src/gcal-source-dialog.c:1915 msgid "Off" msgstr "关闭" -#: ../src/gcal-source-dialog.c:1899 ../src/gcal-source-dialog.c:1956 +#: src/gcal-source-dialog.c:1859 src/gcal-source-dialog.c:1915 msgid "On" msgstr "开启" -#: ../src/gcal-source-dialog.c:1955 +#: src/gcal-source-dialog.c:1914 msgid "Expired" -msgstr "" +msgstr "已过期" -#: ../src/gcal-source-dialog.c:2139 ../src/gcal-source-dialog.c:2145 -msgid "Add Calendar" -msgstr "添加日历" - -#: ../src/gcal-time-selector.c:84 +#: src/gcal-time-selector.c:83 #, c-format msgid "%s AM" -msgstr "%s AM" +msgstr "上午 %s" -#: ../src/gcal-time-selector.c:86 +#: src/gcal-time-selector.c:85 #, c-format msgid "%s PM" -msgstr "%s PM" +msgstr "下午 %s" -#: ../src/gcal-window.c:1103 +#: src/gcal-utils.c:1120 +msgid "" +"The event you are trying to modify is recurring. The changes you have " +"selected should be applied to:" +msgstr "您正在修改的事件是重复事件。您所作的修改会应用到:" + +#: src/gcal-utils.c:1123 +msgid "_Cancel" +msgstr "取消(_C)" + +#: src/gcal-utils.c:1125 +msgid "_Only This Event" +msgstr "仅此事件(_O)" + +#: src/gcal-utils.c:1132 +msgid "_Subsequent events" +msgstr "后续事件(_S)" + +#: src/gcal-utils.c:1134 +msgid "_All events" +msgstr "所有事件(_A)" + +#: src/gcal-window.c:1039 msgid "Another event deleted" msgstr "另一个事件已删除" -#: ../src/gcal-window.c:1103 ../src/gcal-window.c:1107 -msgid "Undo" -msgstr "撤消" - -#: ../src/gcal-window.c:1107 +#: src/gcal-window.c:1043 msgid "Event deleted" msgstr "事件已删除" -#: ../src/views/gcal-month-view.c:1172 -msgid "Other events" -msgstr "其他事件" +#: src/views/gcal-week-grid.c:751 src/views/gcal-week-view.c:275 +msgid "00 AM" +msgstr "上午 00" -#. TODO: Warning: in some languages this string can be too long and may overlap with the number -#: ../src/views/gcal-month-view.c:1638 ../src/views/gcal-week-header.c:339 -#, fuzzy, c-format +#: src/views/gcal-week-header.c:398 +#, c-format msgid "Other event" msgid_plural "Other %d events" msgstr[0] "其他 %d 个事件" -#: ../src/views/gcal-month-view.c:2238 -msgid "Add Event…" -msgstr "添加事件…" - -#: ../src/views/gcal-week-grid.c:754 ../src/views/gcal-week-view.c:256 -msgid "00 AM" -msgstr "上午 00" - -#: ../src/views/gcal-week-grid.c:757 ../src/views/gcal-week-view.c:259 -msgid "00:00" -msgstr "00:00" - -#: ../src/views/gcal-week-header.c:872 +#: src/views/gcal-week-header.c:934 #, c-format msgid "week %d" msgstr "第 %d 周" -#: ../src/views/gcal-week-view.c:414 -msgid "PM" -msgstr "下午" +#. Translators: This is a date format in the sidebar of the year +#. * view when the selection starts at the specified day and the +#. * end is unspecified. +#: src/views/gcal-year-view.c:288 +msgid "%B %d…" +msgstr "%-m月%-d日…" -#: ../src/views/gcal-week-view.c:414 -msgid "AM" -msgstr "上午" +#. Translators: This is a date format in the sidebar of the year +#. * view when there is only one specified day selected. +#. Translators: This is a date format in the sidebar of the year view. +#: src/views/gcal-year-view.c:294 src/views/gcal-year-view.c:517 +msgid "%B %d" +msgstr "%-m月%-d日" -#: ../src/views/gcal-year-view.c:275 ../src/views/gcal-year-view.c:500 -msgid "Today" -msgstr "今天" +#~ msgid "— Calendar management" +#~ msgstr "——日历管理" -#~ msgid "Calendar for GNOME" -#~ msgstr "GNOME 日历" +#~ msgid "Copyright © %d The Calendar authors" +#~ msgstr "Copyright © %d 日历作者" -#~ msgid "" -#~ "GNOME Calendar is a simple and beautiful calendar application designed to " -#~ "perfectly fit the GNOME desktop. By reusing the components which the " -#~ "GNOME desktop is build on, Calendar nicely integrates with the GNOME " -#~ "ecosystem." -#~ msgstr "" -#~ "GNOME 日历设计简洁美观,符合 GNOME 桌面风格。通过重用组件,日历能够很好地" -#~ "与 GNOME 生态系统结合。" +#~ msgid "New Event from %s to %s" +#~ msgstr "新建事件从 %s 到 %s" -#~ msgid "" -#~ "We aim to find the perfect balance between nicely crafted features and " -#~ "user-centred usability. No excess, no lacks. You’ll feel comfortable " -#~ "using Calendar, like you’ve been using it for ages!" -#~ msgstr "" -#~ "我们的目标是找到很好的功能和用户为中心的易用性之间的完美平衡。既不多余,也" -#~ "不缺乏。使用日历,您会感觉很舒服!" +#~ msgid "New Event on %s, %s – %s" +#~ msgstr "新建事件于 %s,%s – %s" -#~ msgid "Search for events" -#~ msgstr "搜索事件" - -#~ msgid "Calendar management" -#~ msgstr "日历管理 " - -#~ msgid "Access, and manage calendar" -#~ msgstr "访问并管理日历" - -#~ msgid "Calendar;Event;Reminder;" -#~ msgstr "Calendar;Event;Reminder;日历;事件;提醒;" - -#~ msgid "Toggles the sound of the alarm" -#~ msgstr "切换闹钟的声音" - -#~ msgid "Remove the alarm" -#~ msgstr "删除闹钟" - -#~ msgid "Click to select the calendar" -#~ msgstr "单击选中日历" - -#~ msgid "Title" -#~ msgstr "标题" - -#~ msgid "Date" -#~ msgstr "日期" - -#~ msgid "Reminders" -#~ msgstr "提醒" - -#~ msgid "Notes" -#~ msgstr "备注" - -#~ msgid "Location" -#~ msgstr "位置" - -#~ msgid "Time" -#~ msgstr "时间" - -#~ msgid "All Day" -#~ msgstr "全天" - -#~ msgid "Add reminder…" -#~ msgstr "添加提醒…" - -#~ msgid "Delete Event" -#~ msgstr "删除事件" - -#~ msgid "5 minutes" -#~ msgstr "5 分钟" - -#~ msgid "10 minutes" -#~ msgstr "10 分钟" - -#~ msgid "30 minutes" -#~ msgstr "30 分钟" - -#~ msgid "1 hour" -#~ msgstr "1 小时" - -#~ msgid "1 day" -#~ msgstr "1 天" - -#~ msgid "2 days" -#~ msgstr "2 天" - -#~ msgid "3 days" -#~ msgstr "3 天" - -#~ msgid "1 week" -#~ msgstr "1 周" - -#~ msgctxt "shortcut window" -#~ msgid "General" -#~ msgstr "通用" - -#~ msgctxt "shortcut window" -#~ msgid "New event" -#~ msgstr "新事件" - -#~ msgctxt "shortcut window" -#~ msgid "Close window" -#~ msgstr "关闭窗口" - -#~ msgctxt "shortcut window" -#~ msgid "Search" -#~ msgstr "搜索" - -#~ msgctxt "shortcut window" -#~ msgid "Show help" -#~ msgstr "显示帮助" - -#~ msgctxt "shortcut window" -#~ msgid "Shortcuts" -#~ msgstr "快捷键" - -#~ msgctxt "shortcut window" -#~ msgid "Navigation" -#~ msgstr "导航" - -#~ msgctxt "shortcut window" -#~ msgid "Go back" -#~ msgstr "返回" - -#~ msgctxt "shortcut window" -#~ msgid "Go forward" -#~ msgstr "前进" - -#~ msgctxt "shortcut window" -#~ msgid "Show today" -#~ msgstr "显示今天" - -#~ msgctxt "shortcut window" -#~ msgid "Next view" -#~ msgstr "下一视图" - -#~ msgctxt "shortcut window" -#~ msgid "Previous view" -#~ msgstr "上一视图" - -#~ msgctxt "shortcut window" -#~ msgid "View" -#~ msgstr "视图" - -#~ msgctxt "shortcut window" -#~ msgid "Week view" -#~ msgstr "周视图" - -#~ msgctxt "shortcut window" -#~ msgid "Month view" -#~ msgstr "月视图" - -#~ msgctxt "shortcut window" -#~ msgid "Year view" -#~ msgstr "年视图" - -#~ msgid "Add Eve_nt…" -#~ msgstr "添加事件(_N)…" +#~ msgid "Other events" +#~ msgstr "其他事件" #~ msgid "_Search…" #~ msgstr "搜索(_S)…" @@ -448,125 +1041,6 @@ msgstr "今天" #~ msgid "_Calendars…" #~ msgstr "日历(_C)…" -#~ msgid "_Keyboard Shortcuts" -#~ msgstr "键盘快捷键(_K)" - -#~ msgid "_About" -#~ msgstr "关于(_A)" - -#~ msgid "_Quit" -#~ msgstr "退出(_Q)" - -#~ msgid "_Synchronize" -#~ msgstr "同步(_S)" - -#~ msgid "From Web…" -#~ msgstr "从网络…" - -#~ msgid "New Local Calendar…" -#~ msgstr "新建本地日历…" - -#~ msgid "From File…" -#~ msgstr "从文件…" - -#~ msgid "Edit Details…" -#~ msgstr "编辑细节…" - -#~ msgid "Add" -#~ msgstr "添加" - -#~ msgid "No results found" -#~ msgstr "未发现结果" - -#~ msgid "Try a different search" -#~ msgstr "尝试不同的搜索" - -#~ msgid "Online Accounts" -#~ msgstr "在线帐户" - -#~ msgid "Open online account settings" -#~ msgstr "打开在线帐户设置" - -#~ msgid "Google" -#~ msgstr "Google" - -#~ msgid "Click to set up" -#~ msgstr "点击设置" - -#~ msgid "Nextcloud" -#~ msgstr "Nextcloud" - -#~ msgid "Microsoft Exchange" -#~ msgstr "微软 Exchange" - -#~ msgid "Calendars" -#~ msgstr "日历" - -#~ msgid "Overview" -#~ msgstr "概览" - -#~ msgid "Add new events to this calendar by default" -#~ msgstr "默认情况下将新事件添加到该日历中" - -#~ msgid "Remove Calendar" -#~ msgstr "移除日历" - -#~ msgid "Display calendar" -#~ msgstr "显示日历 " - -#~ msgid "Calendar name" -#~ msgstr "日历名称" - -#~ msgid "Color" -#~ msgstr "颜色" - -#~ msgid "Account" -#~ msgstr "帐户" - -#~ msgid "Settings" -#~ msgstr "设置" - -#~ msgid "Edit Calendar" -#~ msgstr "编辑日历" - -#~ msgid "" -#~ "Enter the address of the calendar that you want to add. If the calendar " -#~ "belongs to one of your online accounts, you can add it through the online account settings." -#~ msgstr "" -#~ "输入您要添加的日历地址。如果您是在线帐户,可以通过在线帐户" -#~ "设置来添加。" - -#~ msgid "Calendar Address" -#~ msgstr "日历地址" - -#~ msgid "User" -#~ msgstr "用户" - -#~ msgid "Password" -#~ msgstr "密码" - -#~ msgid "Connect" -#~ msgstr "连接" - -#~ msgid ":" -#~ msgstr ":" - -#~ msgid "Week" -#~ msgstr "星期" - -#~ msgid "Month" -#~ msgstr "月份" - -#~ msgid "Year" -#~ msgstr "年份" - -#~ msgid "Manage your calendars" -#~ msgstr "管理您的日历" - -#~ msgid "No events" -#~ msgstr "没有事件 " - #~ msgid "List of the disabled sources" #~ msgstr "已禁用源列表" @@ -587,6 +1061,3 @@ msgstr "今天" #~ msgid "Ends" #~ msgstr "结束时间" - -#~ msgid "Day" -#~ msgstr "工作日" diff --git a/src/gcal-application.c b/src/gcal-application.c index 94e06c8e..31d95513 100644 --- a/src/gcal-application.c +++ b/src/gcal-application.c @@ -55,6 +55,8 @@ struct _GcalApplication GcalWeatherService *weather_service; GcalShellSearchProvider *search_provider; + + GcalClock *clock; }; static void gcal_application_create_new_event (GSimpleAction *new_event, @@ -121,6 +123,7 @@ static const GActionEntry gcal_app_entries[] = { enum { PROP_0, + PROP_CLOCK, PROP_MANAGER, PROP_TIME_FORMAT, PROP_WEATHER_SERVICE, @@ -229,6 +232,7 @@ gcal_application_finalize (GObject *object) g_clear_pointer (&self->initial_date, g_free); g_clear_pointer (&self->uuid, g_free); g_clear_object (&self->colors_provider); + g_clear_object (&self->clock); g_clear_object (&self->desktop_settings); g_clear_object (&self->manager); g_clear_object (&self->provider); @@ -250,6 +254,10 @@ gcal_application_get_property (GObject *object, switch (property_id) { + case PROP_CLOCK: + g_value_set_object (value, self->clock); + break; + case PROP_MANAGER: g_value_set_object (value, self->manager); break; @@ -506,6 +514,12 @@ gcal_application_class_init (GcalApplicationClass *klass) application_class->dbus_register = gcal_application_dbus_register; application_class->dbus_unregister = gcal_application_dbus_unregister; + properties[PROP_CLOCK] = g_param_spec_object ("clock", + "Clock", + "The internal clock of Calendar", + GCAL_TYPE_CLOCK, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + properties[PROP_MANAGER] = g_param_spec_object ("manager", "The manager object", "The manager object", @@ -533,6 +547,7 @@ gcal_application_init (GcalApplication *self) { g_application_add_main_option_entries (G_APPLICATION (self), gcal_application_goptions); + self->clock = gcal_clock_new (); self->manager = gcal_manager_new (); g_signal_connect_swapped (self->manager, "source-added", G_CALLBACK (process_sources), self); g_signal_connect_swapped (self->manager, "source-changed", G_CALLBACK (process_sources), self); @@ -729,3 +744,11 @@ gcal_application_set_initial_date (GcalApplication *self, g_clear_pointer (&self->initial_date, g_date_time_unref); self->initial_date = datetime_to_icaltime (initial_date); } + +GcalClock* +gcal_application_get_clock (GcalApplication *self) +{ + g_return_val_if_fail (GCAL_IS_APPLICATION (self), NULL); + + return self->clock; +} diff --git a/src/gcal-application.h b/src/gcal-application.h index 224f1929..7caa9aff 100644 --- a/src/gcal-application.h +++ b/src/gcal-application.h @@ -20,6 +20,7 @@ #ifndef _GCAL_APPLICATION_H_ #define _GCAL_APPLICATION_H_ +#include "gcal-clock.h" #include "gcal-weather-service.h" #include "gcal-manager.h" @@ -43,6 +44,8 @@ void gcal_application_set_uuid (GcalApplicatio void gcal_application_set_initial_date (GcalApplication *self, GDateTime *initial_date); +GcalClock* gcal_application_get_clock (GcalApplication *self); + G_END_DECLS #endif /* _GCAL_APPLICATION_H_ */ diff --git a/src/gcal-event-widget.c b/src/gcal-event-widget.c index 903d24dd..01c726ef 100644 --- a/src/gcal-event-widget.c +++ b/src/gcal-event-widget.c @@ -22,6 +22,8 @@ #include #include +#include "gcal-application.h" +#include "gcal-clock.h" #include "gcal-event-widget.h" #include "gcal-utils.h" @@ -310,9 +312,6 @@ gcal_event_widget_set_event_tooltip (GcalEventWidget *self, escaped_summary = g_markup_escape_text (gcal_event_get_summary (event), -1); g_string_append_printf (tooltip_mesg, "%s", escaped_summary); - tooltip_start = g_date_time_to_local (gcal_event_get_date_start (event)); - tooltip_end = g_date_time_to_local (gcal_event_get_date_end (event)); - allday = gcal_event_get_all_day (event); multiday = gcal_event_is_multiday (event); @@ -320,6 +319,10 @@ gcal_event_widget_set_event_tooltip (GcalEventWidget *self, if (allday) { + /* All day events span from [ start, end - 1 day ] */ + tooltip_start = g_date_time_ref (gcal_event_get_date_start (event)); + tooltip_end = g_date_time_add_days (gcal_event_get_date_end (event), -1); + if (multiday) { start = g_date_time_format (tooltip_start, "%x"); @@ -333,6 +336,9 @@ gcal_event_widget_set_event_tooltip (GcalEventWidget *self, } else { + tooltip_start = g_date_time_to_local (gcal_event_get_date_start (event)); + tooltip_end = g_date_time_to_local (gcal_event_get_date_end (event)); + if (multiday) { if (self->clock_format_24h) @@ -395,9 +401,7 @@ gcal_event_widget_set_event_tooltip (GcalEventWidget *self, if (allday && !multiday) { - g_string_append_printf (tooltip_mesg, - "\n%s", - start); + g_string_append_printf (tooltip_mesg, "\n%s", start); } else { @@ -948,6 +952,7 @@ gcal_event_widget_class_init (GcalEventWidgetClass *klass) static void gcal_event_widget_init (GcalEventWidget *self) { + GcalApplication *application; GtkWidget *widget; widget = GTK_WIDGET (self); @@ -964,6 +969,17 @@ gcal_event_widget_init (GcalEventWidget *self) /* Starts with horizontal */ self->orientation = GTK_ORIENTATION_HORIZONTAL; gtk_style_context_add_class (gtk_widget_get_style_context (widget), "horizontal"); + + /* Connect to the wall clock */ + application = GCAL_APPLICATION (g_application_get_default ()); + + g_assert (application != NULL); + + g_signal_connect_object (gcal_application_get_clock (application), + "minute-changed", + G_CALLBACK (update_color), + self, + G_CONNECT_SWAPPED); } GtkWidget* diff --git a/src/gcal-event.c b/src/gcal-event.c index 81e3655d..c318f830 100644 --- a/src/gcal-event.c +++ b/src/gcal-event.c @@ -1492,43 +1492,50 @@ gcal_event_get_uid (GcalEvent *self) * gcal_event_is_multiday: * @self: a #GcalEvent * - * Whether the event spans more than 1 day. + * Whether the event visibly spans more than one day in the + * calendar. + * + * This function can return different values for the same event + * depending on your timezone. For example, an event that spans + * [ 02:00, 22:00 ) +0000 would assume the following values: + * + * |[ + * D-1 D D+1 + * -0600 [ ---][------- ][ ] (multiday) + * +0000 [ ][ ---------- ][ ] (single day) + * +0800 [ ][ -------][--- ] (multiday) + * ]| * * Returns: %TRUE if @self spans more than 1 day, %FALSE otherwise. */ gboolean gcal_event_is_multiday (GcalEvent *self) { - g_autoptr (GDateTime) real_end_date = NULL; - gboolean is_multiday; - gint n_days; + g_autoptr (GDateTime) inclusive_end_date = NULL; + g_autoptr (GDateTime) local_start_date = NULL; + g_autoptr (GDateTime) local_end_date = NULL; + GDate start_dt; + GDate end_dt; g_return_val_if_fail (GCAL_IS_EVENT (self), FALSE); - real_end_date = g_date_time_add_seconds (gcal_event_get_date_end (self), -1); - n_days = g_date_time_difference (real_end_date, self->dt_start) / G_TIME_SPAN_DAY; - is_multiday = FALSE; + inclusive_end_date = g_date_time_add_seconds (gcal_event_get_date_end (self), -1); + local_start_date = g_date_time_to_local (self->dt_start); + local_end_date = g_date_time_to_local (inclusive_end_date); - /* - * An all-day event with only 1 day of time span is treated as a - * single-day event. - */ - if (self->all_day && n_days == 1) - is_multiday = FALSE; + g_date_clear (&start_dt, 1); + g_date_set_dmy (&start_dt, + g_date_time_get_day_of_month (local_start_date), + g_date_time_get_month (local_start_date), + g_date_time_get_year (local_start_date)); - /* - * If any of the following fields are different, we're certain that - * it's a multiday event. Otherwise, we're certain it's NOT a multiday - * event. - */ - if (g_date_time_get_year (self->dt_start) != g_date_time_get_year (real_end_date) || - g_date_time_get_month (self->dt_start) != g_date_time_get_month (real_end_date) || - g_date_time_get_day_of_month (self->dt_start) != g_date_time_get_day_of_month (real_end_date)) - { - is_multiday = TRUE; - } + g_date_clear (&end_dt, 1); + g_date_set_dmy (&end_dt, + g_date_time_get_day_of_month (local_end_date), + g_date_time_get_month (local_end_date), + g_date_time_get_year (local_end_date)); - return is_multiday; + return g_date_days_between (&start_dt, &end_dt) > 0; } /** diff --git a/src/gcal-manager.c b/src/gcal-manager.c index 385d7e09..54131aa8 100644 --- a/src/gcal-manager.c +++ b/src/gcal-manager.c @@ -90,8 +90,6 @@ struct _GcalManager GoaClient *goa_client; - GcalClock *clock; - /* state flags */ gboolean goa_client_ready; gint sources_at_launch; @@ -108,7 +106,6 @@ G_DEFINE_TYPE (GcalManager, gcal_manager, G_TYPE_OBJECT) enum { PROP_0, - PROP_CLOCK, PROP_DEFAULT_CALENDAR, PROP_LOADING, PROP_SETTINGS, @@ -776,7 +773,6 @@ gcal_manager_finalize (GObject *object) GCAL_ENTRY; - g_clear_object (&self->clock); g_clear_object (&self->settings); g_clear_object (&self->goa_client); g_clear_object (&self->e_data_model); @@ -871,17 +867,6 @@ gcal_manager_class_init (GcalManagerClass *klass) object_class->set_property = gcal_manager_set_property; object_class->get_property = gcal_manager_get_property; - /** - * GcalManager:clock: - * - * The internal clock of Calendar. - */ - properties[PROP_CLOCK] = g_param_spec_object ("clock", - "Clock", - "The internal clock of Calendar", - GCAL_TYPE_CLOCK, - G_PARAM_READWRITE); - /** * GcalManager:default-calendar: * @@ -964,7 +949,6 @@ gcal_manager_class_init (GcalManagerClass *klass) static void gcal_manager_init (GcalManager *self) { - self->clock = gcal_clock_new (); self->settings = g_settings_new ("org.gnome.calendar"); self->system_timezone = e_cal_util_get_system_timezone (); } @@ -1715,7 +1699,7 @@ gcal_manager_remove_event (GcalManager *self, (ECalObjModType) mod, self->async_ops, on_event_removed, - event); + g_object_ref (event)); g_free (rid); @@ -1856,22 +1840,6 @@ gcal_manager_get_loading (GcalManager *self) return !self->goa_client_ready || self->sources_at_launch > 0; } -/** - * gcal_manager_get_clock: - * @self: a #GcalManager - * - * Retrieves the internal #GcalClock of @self. - * - * Returns: (transfer none): a #GcalClock. - */ -GcalClock* -gcal_manager_get_clock (GcalManager *self) -{ - g_return_val_if_fail (GCAL_IS_MANAGER (self), NULL); - - return self->clock; -} - /** * gcal_manager_get_event_from_shell_search: * @self: a #GcalManager diff --git a/src/gcal-manager.h b/src/gcal-manager.h index 56f44555..ce47016e 100644 --- a/src/gcal-manager.h +++ b/src/gcal-manager.h @@ -20,7 +20,6 @@ #define __GCAL_MANAGER_H__ #include "e-cal-data-model.h" -#include "gcal-clock.h" #include "gcal-event.h" #include @@ -107,9 +106,6 @@ GList* gcal_manager_get_events (GcalManager gboolean gcal_manager_get_loading (GcalManager *self); -/* Clock */ -GcalClock* gcal_manager_get_clock (GcalManager *self); - /* Online Accounts */ GoaClient* gcal_manager_get_goa_client (GcalManager *self); diff --git a/src/views/gcal-month-cell.c b/src/views/gcal-month-cell.c index cf6d7140..652b15de 100644 --- a/src/views/gcal-month-cell.c +++ b/src/views/gcal-month-cell.c @@ -20,6 +20,8 @@ #define G_LOG_DOMAIN "GcalMonthCell" #include "config.h" +#include "gcal-application.h" +#include "gcal-clock.h" #include "gcal-event-widget.h" #include "gcal-utils.h" #include "gcal-month-cell.h" @@ -445,8 +447,9 @@ gcal_month_cell_class_init (GcalMonthCellClass *klass) static void gcal_month_cell_init (GcalMonthCell *self) { - gtk_widget_init_template (GTK_WIDGET (self)); + GcalApplication *application; + gtk_widget_init_template (GTK_WIDGET (self)); /* Setup the month cell as a drag n' drop destination */ gtk_drag_dest_set (GTK_WIDGET (self), @@ -454,6 +457,18 @@ gcal_month_cell_init (GcalMonthCell *self) NULL, 0, GDK_ACTION_MOVE); + + /* Connect to the wall clock */ + application = GCAL_APPLICATION (g_application_get_default ()); + + g_assert (application != NULL); + + g_signal_connect_object (gcal_application_get_clock (application), + "day-changed", + G_CALLBACK (day_changed_cb), + self, + 0); + } GtkWidget* @@ -576,14 +591,7 @@ gcal_month_cell_set_manager (GcalMonthCell *self, g_return_if_fail (GCAL_IS_MONTH_CELL (self)); if (g_set_object (&self->manager, manager)) - { - g_signal_connect_swapped (gcal_manager_get_clock (manager), - "day-changed", - G_CALLBACK (day_changed_cb), - self); - - g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MANAGER]); - } + g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MANAGER]); } guint diff --git a/src/views/gcal-month-popover.c b/src/views/gcal-month-popover.c index 042af573..c21f17a4 100644 --- a/src/views/gcal-month-popover.c +++ b/src/views/gcal-month-popover.c @@ -18,6 +18,7 @@ #define G_LOG_DOMAIN "GcalMonthPopover" +#include "gcal-debug.h" #include "gcal-event-widget.h" #include "gcal-month-popover.h" #include "gcal-utils.h" @@ -25,6 +26,7 @@ #include #define RATIO_TO_RELATIVE 1.25 +#define MIN_WIDTH 250 struct _GcalMonthPopover { @@ -274,6 +276,8 @@ reposition_popover (GcalMonthPopover *self, gtk_window_move (GTK_WINDOW (self), alloc.x - diff_w / 2, alloc.y - diff_h / 2); + alloc.width = MAX (MIN_WIDTH, alloc.width); + if (animate) { gtk_widget_set_size_request (GTK_WIDGET (self), alloc.width, alloc.height); @@ -399,10 +403,16 @@ new_event_button_clicked_cb (GtkWidget *button, GActionMap *map; GAction *action; + GCAL_ENTRY; + map = G_ACTION_MAP (g_application_get_default ()); action = g_action_map_lookup_action (map, "new"); + gcal_month_popover_popdown (self); + g_action_activate (action, NULL); + + GCAL_EXIT; } static void @@ -846,6 +856,8 @@ gcal_month_popover_popdown (GcalMonthPopover *self) gtk_widget_get_toplevel (self->relative_to), 0, 0, &alloc.x, &alloc.y); adjust_margin (self, &alloc); + alloc.width = MAX (MIN_WIDTH, alloc.width); + animate_opacity (self, 0.0); animate_position (self, 0.0, 0.0); animate_size (self, alloc.width, alloc.height); diff --git a/src/views/gcal-month-view.c b/src/views/gcal-month-view.c index 5c28cb09..18d27044 100644 --- a/src/views/gcal-month-view.c +++ b/src/views/gcal-month-view.c @@ -21,6 +21,8 @@ #include "config.h" #include "e-cal-data-model-subscriber.h" +#include "gcal-application.h" +#include "gcal-clock.h" #include "gcal-debug.h" #include "gcal-month-cell.h" #include "gcal-month-popover.h" @@ -124,14 +126,24 @@ struct _GcalMonthView gboolean pending_event_allocation; }; + static void gcal_view_interface_init (GcalViewInterface *iface); static void gtk_buildable_interface_init (GtkBuildableIface *iface); static void e_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface); -static void update_weather (GcalMonthView *self, - gboolean clear_old); +static void on_event_activated_cb (GcalEventWidget *widget, + GcalMonthView *self); + +static void on_event_widget_visibility_changed_cb (GtkWidget *event_widget, + GParamSpec *pspec, + GcalMonthView *self); + +static void on_month_cell_show_overflow_popover_cb (GcalMonthCell *cell, + GtkWidget *button, + GcalMonthView *self); + G_DEFINE_TYPE_WITH_CODE (GcalMonthView, gcal_month_view, GTK_TYPE_CONTAINER, G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init) @@ -162,28 +174,13 @@ cancel_selection (GcalMonthView *self) } static void -event_activated (GcalMonthView *self, - GcalEventWidget *widget, - gpointer unused) +activate_event (GcalMonthView *self, + GcalEventWidget *event_widget) { cancel_selection (self); gcal_month_popover_popdown (self->overflow_popover); - g_signal_emit_by_name (self, "event-activated", widget); -} - -static void -event_widget_visibility_changed_cb (GcalMonthView *self) -{ - self->pending_event_allocation = TRUE; - gtk_widget_queue_resize (GTK_WIDGET (self)); -} - -static void -weather_changed_cb (GcalWeatherService *weather_service, - GcalMonthView *self) -{ - update_weather (self, TRUE); + g_signal_emit_by_name (self, "event-activated", event_widget); } static void @@ -193,8 +190,8 @@ setup_child_widget (GcalMonthView *self, if (!gtk_widget_get_parent (widget)) gtk_widget_set_parent (widget, GTK_WIDGET (self)); - g_signal_connect_swapped (widget, "activate", G_CALLBACK (event_activated), self); - g_signal_connect_swapped (widget, "notify::visible", G_CALLBACK (event_widget_visibility_changed_cb), self); + g_signal_connect (widget, "activate", G_CALLBACK (on_event_activated_cb), self); + g_signal_connect (widget, "notify::visible", G_CALLBACK (on_event_widget_visibility_changed_cb), self); } static gboolean @@ -835,22 +832,6 @@ allocate_single_day_events (GcalMonthView *self, } } -static void -show_overflow_popover_cb (GcalMonthCell *cell, - GtkWidget *button, - GcalMonthView *self) -{ - GcalMonthPopover *popover; - - popover = GCAL_MONTH_POPOVER (self->overflow_popover); - - cancel_selection (self); - - gcal_month_popover_set_relative_to (popover, GTK_WIDGET (cell)); - gcal_month_popover_set_date (popover, gcal_month_cell_get_date (cell)); - gcal_month_popover_popup (popover); -} - static void setup_header_widget (GcalMonthView *self, GtkWidget *widget) @@ -876,10 +857,7 @@ setup_month_grid (GcalMonthView *self, cell = gcal_month_cell_new (); - g_signal_connect (cell, - "show-overflow", - G_CALLBACK (show_overflow_popover_cb), - self); + g_signal_connect (cell, "show-overflow", G_CALLBACK (on_month_cell_show_overflow_popover_cb), self); self->month_cell[row][col] = cell; @@ -1040,7 +1018,7 @@ static void queue_update_month_cells (GcalMonthView *self) { if (self->update_grid_id > 0) - g_source_remove (self->update_grid_id); + return; self->update_grid_id = g_idle_add ((GSourceFunc) update_month_cells, self); } @@ -1071,164 +1049,11 @@ update_weekday_labels (GcalMonthView *self) } } + /* - * GtkWidget overrides + * Callbacks */ -static gboolean -gcal_month_view_key_press (GtkWidget *widget, - GdkEventKey *event) -{ - GcalMonthView *self; - gboolean create_event; - gboolean selection; - gboolean valid_key; - gboolean is_ltr; - gint min, max, diff, month_change, current_day; - gint row, col; - - g_return_val_if_fail (GCAL_IS_MONTH_VIEW (widget), FALSE); - - self = GCAL_MONTH_VIEW (widget); - selection = event->state & GDK_SHIFT_MASK; - create_event = FALSE; - valid_key = FALSE; - diff = 0; - month_change = 0; - current_day = self->keyboard_cell - self->days_delay + 1; - min = self->days_delay; - max = self->days_delay + icaltime_days_in_month (self->date->month, self->date->year) - 1; - is_ltr = gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL; - - /* - * If it's starting the selection right now, it should mark the current keyboard - * focused cell as the start, and then update the end mark after updating the - * focused cell. - */ - if (selection && self->start_mark_cell == NULL) - self->start_mark_cell = g_date_time_new_local (self->date->year, self->date->month, current_day, 0, 0, 0); - - switch (event->keyval) - { - case GDK_KEY_Up: - valid_key = TRUE; - diff = -7; - break; - - case GDK_KEY_Down: - valid_key = TRUE; - diff = 7; - break; - - case GDK_KEY_Left: - valid_key = TRUE; - diff = is_ltr ? -1 : 1; - break; - - case GDK_KEY_Right: - valid_key = TRUE; - diff = is_ltr ? 1 : -1; - break; - - case GDK_KEY_Return: - /* - * If it's not on the selection mode (i.e. shift is not pressed), we should - * simulate it by changing the start & end selected cells = keyboard cell. - */ - if (!selection && !self->start_mark_cell && !self->end_mark_cell) - self->start_mark_cell = self->end_mark_cell = g_date_time_new_local (self->date->year, self->date->month, current_day, 0, 0, 0); - - create_event = TRUE; - break; - - case GDK_KEY_Escape: - cancel_selection (GCAL_MONTH_VIEW (widget)); - break; - - default: - return GDK_EVENT_PROPAGATE; - } - - if (self->keyboard_cell + diff <= max && self->keyboard_cell + diff >= min) - { - self->keyboard_cell += diff; - } - else - { - month_change = self->keyboard_cell + diff > max ? 1 : -1; - self->date->month += month_change; - *self->date = icaltime_normalize (*self->date); - - self->days_delay = (time_day_of_week (1, self->date->month - 1, self->date->year) - self->first_weekday + 7) % 7; - - /* - * Set keyboard cell value to the sum or difference of days delay of successive - * month or last day of preceeding month and overload value depending on - * month_change. Overload value is the equal to the deviation of the value - * of keboard_cell from the min or max value of the current month depending - * on the overload point. - */ - if (month_change == 1) - self->keyboard_cell = self->days_delay + self->keyboard_cell + diff - max - 1; - else - self->keyboard_cell = self->days_delay + icaltime_days_in_month (self->date->month, self->date->year) - min + self->keyboard_cell + diff; - } - - /* Focus the selected month cell */ - row = self->keyboard_cell / 7; - col = self->keyboard_cell % 7; - - gtk_widget_grab_focus (self->month_cell[row][col]); - - current_day = self->keyboard_cell - self->days_delay + 1; - self->date->day = current_day; - - /* - * We can only emit the :create-event signal ~after~ grabbing the focus, otherwise - * the popover is instantly hidden. - */ - if (create_event) - emit_create_event (self); - - g_object_notify (G_OBJECT (widget), "active-date"); - - if (selection) - { - self->end_mark_cell = g_date_time_new_local (self->date->year, self->date->month, current_day, 0, 0, 0); - } - else if (!selection && valid_key) - { - /* Cancel selection if SHIFT is not pressed */ - cancel_selection (GCAL_MONTH_VIEW (widget)); - } - - return GDK_EVENT_STOP; -} - -static gboolean -gcal_month_view_scroll_event (GtkWidget *widget, - GdkEventScroll *scroll_event) -{ - GcalMonthView *self = GCAL_MONTH_VIEW (widget); - - /* - * If we accumulated enough scrolling, change the month. Otherwise, we'd scroll - * waaay too fast. - */ - if (should_change_date_for_scroll (&self->scroll_value, scroll_event)) - { - self->date->month += self->scroll_value > 0 ? 1 : -1; - *self->date = icaltime_normalize (*self->date); - self->scroll_value = 0; - - gtk_widget_queue_draw (widget); - - g_object_notify (G_OBJECT (widget), "active-date"); - } - - return GDK_EVENT_STOP; -} - static void add_new_event_button_cb (GtkWidget *button, gpointer user_data) @@ -1249,7 +1074,58 @@ add_new_event_button_cb (GtkWidget *button, g_date_time_unref (start_date); } -/* GcalView Interface API */ +static void +on_event_activated_cb (GcalEventWidget *widget, + GcalMonthView *self) +{ + activate_event (self, widget); +} + +static void +on_event_widget_visibility_changed_cb (GtkWidget *event_widget, + GParamSpec *pspec, + GcalMonthView *self) +{ + self->pending_event_allocation = TRUE; + gtk_widget_queue_resize (GTK_WIDGET (self)); +} + +static void +on_month_cell_show_overflow_popover_cb (GcalMonthCell *cell, + GtkWidget *button, + GcalMonthView *self) +{ + GcalMonthPopover *popover; + + popover = GCAL_MONTH_POPOVER (self->overflow_popover); + + cancel_selection (self); + + gcal_month_popover_set_relative_to (popover, GTK_WIDGET (cell)); + gcal_month_popover_set_date (popover, gcal_month_cell_get_date (cell)); + gcal_month_popover_popup (popover); +} + +static void +on_month_popover_event_activated_cb (GcalMonthPopover *month_popover, + GcalEventWidget *event_widget, + GcalMonthView *self) +{ + activate_event (self, event_widget); +} + +static void +on_weather_service_weather_changed_cb (GcalWeatherService *weather_service, + GcalMonthView *self) +{ + update_weather (self, TRUE); +} + + +/* + * GcalView interface + */ + static icaltimetype* gcal_month_view_get_date (GcalView *view) { @@ -1348,6 +1224,7 @@ gtk_buildable_interface_init (GtkBuildableIface *iface) iface->add_child = gcal_month_view_add_child; } + /* * ECalDataModelSubscriber interface */ @@ -1494,6 +1371,7 @@ e_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface) iface->thaw = gcal_month_view_thaw; } + /* * GtkContainer overrides */ @@ -1690,7 +1568,7 @@ gcal_month_view_forall (GtkContainer *container, if (self->header) (*callback) (self->header, callback_data); - /* Header */ + /* Grid */ if (self->grid) (*callback) (self->grid, callback_data); @@ -1716,107 +1594,9 @@ gcal_month_view_forall (GtkContainer *container, /* - * GObject overrides + * GtkWidget overrides */ -static void -gcal_month_view_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - GcalMonthView *self = (GcalMonthView *) object; - gint i; - - switch (property_id) - { - case PROP_DATE: - gcal_view_set_date (GCAL_VIEW (object), g_value_get_boxed (value)); - break; - - case PROP_MANAGER: - self->manager = g_value_dup_object (value); - - g_signal_connect_swapped (gcal_manager_get_clock (self->manager), - "day-changed", - G_CALLBACK (update_month_cells), - self); - - for (i = 0; i < 42; i++) - gcal_month_cell_set_manager (GCAL_MONTH_CELL (self->month_cell[i / 7][i % 7]), self->manager); - - g_object_notify (object, "manager"); - break; - - case PROP_WEATHER_SERVICE: - gcal_view_set_weather_service_impl_helper (&self->weather_service, - g_value_get_object (value), - (GcalWeatherUpdateFunc) update_weather, - (GCallback) weather_changed_cb, - GTK_WIDGET (self)); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -static void -gcal_month_view_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - GcalMonthView *self = GCAL_MONTH_VIEW (object); - - switch (property_id) - { - case PROP_DATE: - g_value_set_boxed (value, self->date); - break; - - case PROP_MANAGER: - g_value_set_object (value, self->manager); - break; - - case PROP_WEATHER_SERVICE: - g_value_set_boxed (value, self->weather_service); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -static void -gcal_month_view_finalize (GObject *object) -{ - GcalMonthView *self = GCAL_MONTH_VIEW (object); - - if (self->weather_service) - g_signal_handlers_disconnect_by_func (self->weather_service, weather_changed_cb, self); - - g_clear_pointer (&self->date, g_free); - g_clear_pointer (&self->children, g_hash_table_destroy); - g_clear_pointer (&self->single_cell_children, g_hash_table_destroy); - g_clear_pointer (&self->overflow_cells, g_hash_table_destroy); - g_clear_pointer (&self->multi_cell_children, g_list_free); - - g_clear_object (&self->manager); - g_clear_object (&self->weather_service); - - if (self->update_grid_id > 0) - { - g_source_remove (self->update_grid_id); - self->update_grid_id = 0; - } - - /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (gcal_month_view_parent_class)->finalize (object); -} - static void gcal_month_view_realize (GtkWidget *widget) { @@ -2132,6 +1912,255 @@ gcal_month_view_direction_changed (GtkWidget *widget, gtk_widget_queue_resize (widget); } +static gboolean +gcal_month_view_key_press (GtkWidget *widget, + GdkEventKey *event) +{ + GcalMonthView *self; + gboolean create_event; + gboolean selection; + gboolean valid_key; + gboolean is_ltr; + gint min, max, diff, month_change, current_day; + gint row, col; + + g_return_val_if_fail (GCAL_IS_MONTH_VIEW (widget), FALSE); + + self = GCAL_MONTH_VIEW (widget); + selection = event->state & GDK_SHIFT_MASK; + create_event = FALSE; + valid_key = FALSE; + diff = 0; + month_change = 0; + current_day = self->keyboard_cell - self->days_delay + 1; + min = self->days_delay; + max = self->days_delay + icaltime_days_in_month (self->date->month, self->date->year) - 1; + is_ltr = gtk_widget_get_direction (widget) != GTK_TEXT_DIR_RTL; + + /* + * If it's starting the selection right now, it should mark the current keyboard + * focused cell as the start, and then update the end mark after updating the + * focused cell. + */ + if (selection && self->start_mark_cell == NULL) + self->start_mark_cell = g_date_time_new_local (self->date->year, self->date->month, current_day, 0, 0, 0); + + switch (event->keyval) + { + case GDK_KEY_Up: + valid_key = TRUE; + diff = -7; + break; + + case GDK_KEY_Down: + valid_key = TRUE; + diff = 7; + break; + + case GDK_KEY_Left: + valid_key = TRUE; + diff = is_ltr ? -1 : 1; + break; + + case GDK_KEY_Right: + valid_key = TRUE; + diff = is_ltr ? 1 : -1; + break; + + case GDK_KEY_Return: + /* + * If it's not on the selection mode (i.e. shift is not pressed), we should + * simulate it by changing the start & end selected cells = keyboard cell. + */ + if (!selection && !self->start_mark_cell && !self->end_mark_cell) + self->start_mark_cell = self->end_mark_cell = g_date_time_new_local (self->date->year, self->date->month, current_day, 0, 0, 0); + + create_event = TRUE; + break; + + case GDK_KEY_Escape: + cancel_selection (GCAL_MONTH_VIEW (widget)); + break; + + default: + return GDK_EVENT_PROPAGATE; + } + + if (self->keyboard_cell + diff <= max && self->keyboard_cell + diff >= min) + { + self->keyboard_cell += diff; + } + else + { + month_change = self->keyboard_cell + diff > max ? 1 : -1; + self->date->month += month_change; + *self->date = icaltime_normalize (*self->date); + + self->days_delay = (time_day_of_week (1, self->date->month - 1, self->date->year) - self->first_weekday + 7) % 7; + + /* + * Set keyboard cell value to the sum or difference of days delay of successive + * month or last day of preceeding month and overload value depending on + * month_change. Overload value is the equal to the deviation of the value + * of keboard_cell from the min or max value of the current month depending + * on the overload point. + */ + if (month_change == 1) + self->keyboard_cell = self->days_delay + self->keyboard_cell + diff - max - 1; + else + self->keyboard_cell = self->days_delay + icaltime_days_in_month (self->date->month, self->date->year) - min + self->keyboard_cell + diff; + } + + /* Focus the selected month cell */ + row = self->keyboard_cell / 7; + col = self->keyboard_cell % 7; + + gtk_widget_grab_focus (self->month_cell[row][col]); + + current_day = self->keyboard_cell - self->days_delay + 1; + self->date->day = current_day; + + /* + * We can only emit the :create-event signal ~after~ grabbing the focus, otherwise + * the popover is instantly hidden. + */ + if (create_event) + emit_create_event (self); + + g_object_notify (G_OBJECT (widget), "active-date"); + + if (selection) + { + self->end_mark_cell = g_date_time_new_local (self->date->year, self->date->month, current_day, 0, 0, 0); + } + else if (!selection && valid_key) + { + /* Cancel selection if SHIFT is not pressed */ + cancel_selection (GCAL_MONTH_VIEW (widget)); + } + + return GDK_EVENT_STOP; +} + +static gboolean +gcal_month_view_scroll_event (GtkWidget *widget, + GdkEventScroll *scroll_event) +{ + GcalMonthView *self = GCAL_MONTH_VIEW (widget); + + /* + * If we accumulated enough scrolling, change the month. Otherwise, we'd scroll + * waaay too fast. + */ + if (should_change_date_for_scroll (&self->scroll_value, scroll_event)) + { + self->date->month += self->scroll_value > 0 ? 1 : -1; + *self->date = icaltime_normalize (*self->date); + self->scroll_value = 0; + + gtk_widget_queue_draw (widget); + + g_object_notify (G_OBJECT (widget), "active-date"); + } + + return GDK_EVENT_STOP; +} + + +/* + * GObject overrides + */ + +static void +gcal_month_view_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{ + GcalMonthView *self = (GcalMonthView *) object; + gint i; + + switch (property_id) + { + case PROP_DATE: + gcal_view_set_date (GCAL_VIEW (object), g_value_get_boxed (value)); + break; + + case PROP_MANAGER: + self->manager = g_value_dup_object (value); + + for (i = 0; i < 42; i++) + gcal_month_cell_set_manager (GCAL_MONTH_CELL (self->month_cell[i / 7][i % 7]), self->manager); + + g_object_notify (object, "manager"); + break; + + case PROP_WEATHER_SERVICE: + gcal_view_set_weather_service_impl_helper (&self->weather_service, + g_value_get_object (value), + (GcalWeatherUpdateFunc) update_weather, + G_CALLBACK (on_weather_service_weather_changed_cb), + GTK_WIDGET (self)); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gcal_month_view_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + GcalMonthView *self = GCAL_MONTH_VIEW (object); + + switch (property_id) + { + case PROP_DATE: + g_value_set_boxed (value, self->date); + break; + + case PROP_MANAGER: + g_value_set_object (value, self->manager); + break; + + case PROP_WEATHER_SERVICE: + g_value_set_boxed (value, self->weather_service); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +gcal_month_view_finalize (GObject *object) +{ + GcalMonthView *self = GCAL_MONTH_VIEW (object); + + g_clear_pointer (&self->date, g_free); + g_clear_pointer (&self->children, g_hash_table_destroy); + g_clear_pointer (&self->single_cell_children, g_hash_table_destroy); + g_clear_pointer (&self->overflow_cells, g_hash_table_destroy); + g_clear_pointer (&self->multi_cell_children, g_list_free); + + g_clear_object (&self->manager); + g_clear_object (&self->weather_service); + + if (self->update_grid_id > 0) + { + g_source_remove (self->update_grid_id); + self->update_grid_id = 0; + } + + /* Chain up to parent's finalize() method. */ + G_OBJECT_CLASS (gcal_month_view_parent_class)->finalize (object); +} + static void gcal_month_view_class_init (GcalMonthViewClass *klass) { @@ -2188,6 +2217,8 @@ gcal_month_view_class_init (GcalMonthViewClass *klass) static void gcal_month_view_init (GcalMonthView *self) { + GcalApplication *application; + gtk_widget_init_template (GTK_WIDGET (self)); gtk_widget_set_has_window (GTK_WIDGET (self), FALSE); @@ -2221,9 +2252,18 @@ gcal_month_view_init (GcalMonthView *self) "manager", G_BINDING_DEFAULT); - g_signal_connect_swapped (self->overflow_popover, - "event-activated", - G_CALLBACK (event_activated), - self); + g_signal_connect (self->overflow_popover, "event-activated", G_CALLBACK (on_month_popover_event_activated_cb), self); + + + /* Connect to the wall clock */ + application = GCAL_APPLICATION (g_application_get_default ()); + + g_assert (application != NULL); + + g_signal_connect_object (gcal_application_get_clock (application), + "day-changed", + G_CALLBACK (update_month_cells), + self, + G_CONNECT_SWAPPED); } diff --git a/src/views/gcal-view.c b/src/views/gcal-view.c index fefefdc5..716fdb7b 100644 --- a/src/views/gcal-view.c +++ b/src/views/gcal-view.c @@ -218,7 +218,7 @@ gcal_view_set_weather_service_impl_helper (GcalWeatherService **old_service, g_set_object (old_service, new_service); if (*old_service) - g_signal_connect (*old_service, "weather-changed", weather_changed_cb, data); + g_signal_connect_object (*old_service, "weather-changed", weather_changed_cb, data, 0); update_func (data); g_object_notify (G_OBJECT (data), "weather-service"); diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c index a642fb5c..89252cf9 100644 --- a/src/views/gcal-week-grid.c +++ b/src/views/gcal-week-grid.c @@ -19,6 +19,8 @@ #define G_LOG_DOMAIN "GcalWeekGrid" +#include "gcal-application.h" +#include "gcal-clock.h" #include "gcal-debug.h" #include "gcal-week-grid.h" #include "gcal-week-view.h" @@ -152,11 +154,12 @@ get_event_range (GcalWeekGrid *self, if (end) { - - GDateTime *event_end; + g_autoptr (GDateTime) inclusive_end_date = NULL; + g_autoptr (GDateTime) event_end = NULL; gboolean event_end_dst; - event_end = g_date_time_to_local (gcal_event_get_date_end (event)); + inclusive_end_date = g_date_time_add_seconds (gcal_event_get_date_end (event), -1); + event_end = g_date_time_to_local (inclusive_end_date); event_end_dst = g_date_time_is_daylight_savings (event_end); diff = g_date_time_difference (event_end, week_start); @@ -171,8 +174,6 @@ get_event_range (GcalWeekGrid *self, */ if (start && *start == *end) *end = *end + 1; - - g_clear_pointer (&event_end, g_date_time_unref); } g_clear_pointer (&week_start, g_date_time_unref); @@ -1110,6 +1111,8 @@ gcal_week_grid_class_init (GcalWeekGridClass *klass) static void gcal_week_grid_init (GcalWeekGrid *self) { + GcalApplication *application; + gtk_widget_set_has_window (GTK_WIDGET (self), FALSE); self->selection_start = -1; @@ -1124,6 +1127,17 @@ gcal_week_grid_init (GcalWeekGrid *self) NULL, 0, GDK_ACTION_MOVE); + + /* Connect to the wall clock */ + application = GCAL_APPLICATION (g_application_get_default ()); + + g_assert (application != NULL); + + g_signal_connect_object (gcal_application_get_clock (application), + "minute-changed", + G_CALLBACK (gtk_widget_queue_draw), + self, + G_CONNECT_SWAPPED); } /* Public API */ @@ -1134,11 +1148,6 @@ gcal_week_grid_set_manager (GcalWeekGrid *self, g_return_if_fail (GCAL_IS_WEEK_GRID (self)); self->manager = manager; - - g_signal_connect_swapped (gcal_manager_get_clock (manager), - "minute-changed", - G_CALLBACK (gtk_widget_queue_draw), - self); } void diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c index 654001b5..c2ef011d 100644 --- a/src/views/gcal-week-header.c +++ b/src/views/gcal-week-header.c @@ -21,6 +21,8 @@ #define G_LOG_DOMAIN "GcalWeekHeader" +#include "gcal-application.h" +#include "gcal-clock.h" #include "gcal-debug.h" #include "gcal-event-widget.h" #include "gcal-utils.h" @@ -1095,13 +1097,7 @@ gcal_week_header_finalize (GObject *object) for (i = 0; i < 7; i++) g_list_free (self->events[i]); - if (self->weather_service != NULL) - { - g_signal_handlers_disconnect_by_func (self->weather_service, - (GCallback) on_weather_update, - self); - g_clear_object (&self->weather_service); - } + g_clear_object (&self->weather_service); for (i = 0; i < G_N_ELEMENTS (self->weather_infos); i++) wid_clear (&self->weather_infos[i]); @@ -1670,6 +1666,8 @@ gcal_week_header_class_init (GcalWeekHeaderClass *kclass) static void gcal_week_header_init (GcalWeekHeader *self) { + GcalApplication *application; + self->expanded = FALSE; self->selection_start = -1; self->selection_end = -1; @@ -1689,6 +1687,17 @@ G_GNUC_END_IGNORE_DEPRECATIONS NULL, 0, GDK_ACTION_MOVE); + + /* Connect to the wall clock */ + application = GCAL_APPLICATION (g_application_get_default ()); + + g_assert (application != NULL); + + g_signal_connect_object (gcal_application_get_clock (application), + "day-changed", + G_CALLBACK (gtk_widget_queue_draw), + self, + G_CONNECT_SWAPPED); } /* Private API */ @@ -1819,11 +1828,6 @@ gcal_week_header_set_manager (GcalWeekHeader *self, g_return_if_fail (GCAL_IS_WEEK_HEADER (self)); self->manager = manager; - - g_signal_connect_swapped (gcal_manager_get_clock (manager), - "day-changed", - G_CALLBACK (gtk_widget_queue_draw), - self); } void diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c index 1fb64e8e..14f5b9de 100644 --- a/src/views/gcal-year-view.c +++ b/src/views/gcal-year-view.c @@ -18,6 +18,8 @@ #define G_LOG_DOMAIN "GcalYearView" +#include "gcal-application.h" +#include "gcal-clock.h" #include "gcal-debug.h" #include "gcal-year-view.h" #include "gcal-view.h" @@ -1662,12 +1664,6 @@ gcal_year_view_set_property (GObject *object, case PROP_MANAGER: self->manager = g_value_dup_object (value); - - g_signal_connect_swapped (gcal_manager_get_clock (self->manager), - "day-changed", - G_CALLBACK (gtk_widget_queue_draw), - self->navigator); - g_object_notify (object, "manager"); break; @@ -2011,6 +2007,7 @@ gcal_year_view_class_init (GcalYearViewClass *klass) static void gcal_year_view_init (GcalYearView *self) { + GcalApplication *application; guint i; self->weather_service = NULL; @@ -2053,6 +2050,17 @@ gcal_year_view_init (GcalYearView *self) NULL, 0, GDK_ACTION_MOVE); + + /* Connect to the wall clock */ + application = GCAL_APPLICATION (g_application_get_default ()); + + g_assert (application != NULL); + + g_signal_connect_object (gcal_application_get_clock (application), + "day-changed", + G_CALLBACK (gtk_widget_queue_draw), + self, + G_CONNECT_SWAPPED); } static void diff --git a/tests/test-event.c b/tests/test-event.c index 40423d3a..956eab56 100644 --- a/tests/test-event.c +++ b/tests/test-event.c @@ -197,7 +197,7 @@ static void event_date_multiday (void) { const gchar * const events[] = { - EVENT_STRING_FOR_DATE ("20160229T000000Z", "20160301T000001Z"), + EVENT_STRING_FOR_DATE ("20160229T000000Z", "20160302T000001Z"), EVENT_STRING_FOR_DATE ("20160229T020000Z", "20160310T004500Z"), };