diff --git a/.gitignore b/.gitignore index 62bc73a8..e7c8321e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,15 +16,8 @@ config.log config.status config configure -data/gnome-documents-search-provider.ini -data/gnome-documents.desktop -data/gnome-documents.desktop.in -data/org.gnome.Documents.GDataMiner.service -data/org.gnome.documents.gschema.valid -data/org.gnome.documents.gschema.xml -intltool-extract.in -intltool-merge.in -intltool-update.in +data/org.gnome.Calendar.desktop +data/org.gnome.Calendar.gschema.valid libtool m4/ omf.make @@ -32,7 +25,6 @@ po/*.gmo po/*.header po/*.sed po/*.sin -po/.intltool-merge-cache po/Makefile.in.in po/Makevars.template po/POTFILES @@ -81,9 +73,6 @@ src/gcal-shell-search-provider-generated.h AUTHORS build-aux data/org.gnome.Calendar.desktop -data/org.gnome.Calendar.desktop.in -data/org.gnome.Calendar.search-provider.ini -data/org.gnome.Calendar.search-provider.ini.in data/org.gnome.Calendar.service data/appdata/org.gnome.Calendar.appdata.xml src/gcal-debug.h diff --git a/Makefile.am b/Makefile.am index 17cbfd7d..b4e297df 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,26 +1,14 @@ SUBDIRS = src data po doc DIST_SUBDIRS = src data po doc -INTLTOOL_FILES = \ - intltool-extract.in \ - intltool-merge.in \ - intltool-update.in - EXTRA_DIST = \ $(gnome_calendardoc_DATA) \ - $(INTLTOOL_FILES) \ INSTALL \ THANKS \ HACKING \ TODO \ autogen.sh -DISTCLEANFILES = \ - intltool-extract \ - intltool-merge \ - intltool-update \ - po/.intltool-merge-cache - DISTCHECK_CONFIGURE_FLAGS = \ --enable-appstream-util \ --disable-gtk-doc diff --git a/autogen.sh b/autogen.sh index 5d7e02fd..968cd034 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,7 +11,6 @@ cd $srcdir mkdir -p m4 gtkdocize || exit 1 autoreconf --verbose --force --install || exit $? -intltoolize --force --copy --automake || exit $? if test -z "$NOCONFIGURE"; then run_configure=true diff --git a/configure.ac b/configure.ac index b1befbd2..11dbed23 100644 --- a/configure.ac +++ b/configure.ac @@ -38,13 +38,16 @@ AM_MAINTAINER_MODE([enable]) dnl *************************************************************************** dnl Internationalization dnl *************************************************************************** -IT_PROG_INTLTOOL([0.40.6]) PKG_PROG_PKG_CONFIG([0.22]) GETTEXT_PACKAGE=AC_PACKAGE_TARNAME AC_SUBST([GETTEXT_PACKAGE]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name]) +AM_GNU_GETTEXT_VERSION([0.19.8]) +AM_GNU_GETTEXT([external]) + + AS_IF([test "x$USE_NLS" != "xno"], [AC_DEFINE([ENABLE_NLS], [1], [Native language support is enabled])]) @@ -173,8 +176,6 @@ AC_CONFIG_FILES([ src/Makefile src/gcal-debug.h data/Makefile - data/org.gnome.Calendar.desktop.in - data/org.gnome.Calendar.search-provider.ini.in data/icons/Makefile doc/Makefile doc/reference/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 888b3a1e..1d8363d2 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,21 +1,55 @@ SUBDIRS = icons +################ +# Desktop files +################ + desktopdir = $(datadir)/applications desktop_in_files = org.gnome.Calendar.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +%.desktop: %.desktop.in + $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ + + +############################## +# GNOME Shell search provider +############################## + searchproviderdir = $(datadir)/gnome-shell/search-providers searchprovider_DATA = org.gnome.Calendar.search-provider.ini -%.ini: %.ini.in - LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ -@INTLTOOL_XML_RULE@ +################ +# Appdata files +################ + appdatadir = $(datadir)/appdata appdata_DATA = $(appdata_in_files:.xml.in=.xml) appdata_in_files = $(srcdir)/appdata/org.gnome.Calendar.appdata.xml.in -@INTLTOOL_DESKTOP_RULE@ +%.xml: %.xml.in + $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ + + +################### +# GSettings schema +################### + +gsettings_ENUM_NAMESPACE = org.gnome.calendar +gsettings_ENUM_FILES = \ + $(top_srcdir)/src/gcal-utils.h + +gsettings_SCHEMAS = org.gnome.calendar.gschema.xml + +.PRECIOUS: $(gsettings_SCHEMAS) + +@GSETTINGS_RULES@ + + +##################### +# DBus service files +##################### servicedir = $(datadir)/dbus-1/services service_DATA = org.gnome.Calendar.service @@ -30,23 +64,8 @@ org.gnome.Calendar.service: echo 'Exec=${bindir}/gnome-calendar --gapplication-service') > $@.tmp && \ mv $@.tmp $@ -@GSETTINGS_RULES@ - -%.gschema.xml: %.gschema.xml.in - $(AM_V_GEN) $(INTLTOOL_MERGE) -x -u --no-translations $< $@ - -gsettings_ENUM_NAMESPACE = org.gnome.calendar -gsettings_ENUM_FILES = \ - $(top_srcdir)/src/gcal-utils.h - -gsettingsschema_in_files = org.gnome.calendar.gschema.xml.in -gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) -.PRECIOUS: $(gsettings_SCHEMAS) - EXTRA_DIST= \ appdata/org.gnome.Calendar.appdata.xml \ - org.gnome.Calendar.search-provider.ini.in.in \ - org.gnome.Calendar.desktop \ calendar.gresource.xml \ shell-search-provider-dbus-interfaces.xml \ ui/alarm-row.ui \ @@ -68,11 +87,10 @@ EXTRA_DIST= \ theme/gtk-styles.css \ $(appdata_in_files) \ $(desktop_in_files) \ - $(gsettingsschema_in_files) + $(gsettings_SCHEMAS) \ + $(searchprovider_DATA) CLEANFILES = \ + $(appdata_DATA) \ $(service_DATA) \ - $(desktop_DATA) \ - $(searchprovider_DATA) \ - $(gsettings_SCHEMAS) \ - $(appdata_DATA) + $(desktop_DATA) diff --git a/data/appdata/org.gnome.Calendar.appdata.xml.in b/data/appdata/org.gnome.Calendar.appdata.xml.in index c9f59f95..70b50383 100644 --- a/data/appdata/org.gnome.Calendar.appdata.xml.in +++ b/data/appdata/org.gnome.Calendar.appdata.xml.in @@ -4,16 +4,16 @@ org.gnome.Calendar.desktop CC0 GPL-3.0+ - <_name>Calendar - <_summary>Calendar for GNOME + Calendar + Calendar for GNOME - <_p> +

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. - - <_p> +

+

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! - +

@@ -21,11 +21,11 @@ https://git.gnome.org/browse/gnome-calendar/plain/data/appdata/default.png - <_caption>Search for events + Search for events https://git.gnome.org/browse/gnome-calendar/plain/data/appdata/search.png - <_caption>Calendar management + Calendar management https://git.gnome.org/browse/gnome-calendar/plain/data/appdata/calendar-management.png diff --git a/data/org.gnome.Calendar.desktop.in.in b/data/org.gnome.Calendar.desktop.in similarity index 69% rename from data/org.gnome.Calendar.desktop.in.in rename to data/org.gnome.Calendar.desktop.in index ee4b6cca..0421c4a3 100644 --- a/data/org.gnome.Calendar.desktop.in.in +++ b/data/org.gnome.Calendar.desktop.in @@ -1,12 +1,12 @@ [Desktop Entry] -_Name=Calendar -_Comment=Access, and manage calendar +Name=Calendar +Comment=Access and manage your calendars Exec=gnome-calendar Icon=org.gnome.Calendar Terminal=false Type=Application StartupNotify=true Categories=GNOME;GTK;Office;Calendar;Core; -_Keywords=Calendar;Event;Reminder; +Keywords=Calendar;Event;Reminder; MimeType=text/calendar; DBusActivatable=true diff --git a/data/org.gnome.Calendar.search-provider.ini.in.in b/data/org.gnome.Calendar.search-provider.ini similarity index 91% rename from data/org.gnome.Calendar.search-provider.ini.in.in rename to data/org.gnome.Calendar.search-provider.ini index 6f40131a..b81555e5 100644 --- a/data/org.gnome.Calendar.search-provider.ini.in.in +++ b/data/org.gnome.Calendar.search-provider.ini @@ -1,5 +1,4 @@ [Shell Search Provider] -_Title=Calendar Icon=gnome-calendar DesktopId=org.gnome.Calendar.desktop BusName=org.gnome.Calendar diff --git a/data/org.gnome.calendar.gschema.xml.in b/data/org.gnome.calendar.gschema.xml similarity index 54% rename from data/org.gnome.calendar.gschema.xml.in rename to data/org.gnome.calendar.gschema.xml index 99d20591..e938690f 100644 --- a/data/org.gnome.calendar.gschema.xml.in +++ b/data/org.gnome.calendar.gschema.xml @@ -3,23 +3,23 @@ true - <_summary>Window maximized - <_description>Window maximized state + Window maximized + Window maximized state [768, 600] - <_summary>Window size - <_description>Window size (width and height). + Window size + Window size (width and height). [] - <_summary>Window position - <_description>Window position (x and y). + Window position + Window position (x and y). 'month' - <_summary>Type of the active view - <_description>Type of the active window view, default value is: monthly view + Type of the active view + Type of the active window view, default value is: monthly view diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 00000000..a562a919 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,78 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = GNOME Calendar contributors + +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-calendar&keywords=I18N+L10N&component=General + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = yes + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = + +# These options get passed to msginit. +# If you want to disable line wrapping when writing PO files, add +# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and +# MSGINIT_OPTIONS. +MSGINIT_OPTIONS = + +# This tells whether or not to regenerate a PO file when $(DOMAIN).pot +# has changed. Possible values are "yes" and "no". Set this to no if +# the POT file is checked in the repository and the version control +# program ignores timestamps. +PO_DEPENDS_ON_POT = no + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = no diff --git a/po/POTFILES.in b/po/POTFILES.in index 6fa6536b..6ee1fc2a 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,19 +1,17 @@ # List of source files containing translatable strings. # Please keep this file sorted alphabetically. data/appdata/org.gnome.Calendar.appdata.xml.in -data/org.gnome.Calendar.desktop.in.in -data/org.gnome.calendar.gschema.xml.in -[type: gettext/ini]data/org.gnome.Calendar.search-provider.ini.in.in -[type: gettext/glade]data/ui/alarm-row.ui -[type: gettext/glade]data/ui/edit-dialog.ui -[type: gettext/glade]data/ui/help-overlay.ui -[type: gettext/glade]data/ui/menus.ui -[type: gettext/glade]data/ui/quick-add-popover.ui -[type: gettext/glade]data/ui/search-view.ui -[type: gettext/glade]data/ui/source-dialog.ui -[type: gettext/glade]data/ui/time-selector.ui -[type: gettext/glade]data/ui/window.ui -[type: gettext/glade]data/ui/year-view.ui +data/org.gnome.Calendar.desktop.in +data/ui/alarm-row.ui +data/ui/edit-dialog.ui +data/ui/help-overlay.ui +data/ui/menus.ui +data/ui/quick-add-popover.ui +data/ui/search-view.ui +data/ui/source-dialog.ui +data/ui/time-selector.ui +data/ui/window.ui +data/ui/year-view.ui src/views/gcal-month-view.c src/views/gcal-week-grid.c src/views/gcal-week-header.c diff --git a/po/POTFILES.skip b/po/POTFILES.skip deleted file mode 100644 index 4858618f..00000000 --- a/po/POTFILES.skip +++ /dev/null @@ -1,4 +0,0 @@ -# List of source files that should *not* be translated. -# Please keep this file sorted alphabetically. -data/org.gnome.Calendar.desktop.in -sub/data/org.gnome.Calendar.desktop.in