Skip to content

Commit

Permalink
g/c gnome-common glib-gettext and intltool
Browse files Browse the repository at this point in the history
  • Loading branch information
prlw1 committed Sep 1, 2016
1 parent 9ca542f commit b5595c7
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 769 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Expand Up @@ -21,12 +21,9 @@ stamp-*
/config.log
/config.status
/configure
/intltool-extract.in
/intltool-merge.in
/intltool-update.in
/libtool
/po/.intltool-merge-cache
/po/Makefile.in.in
/po/Makevars.template
/po/POTFILES
/Data/dasher.desktop
/Data/dasher.desktop.in
Expand Down
20 changes: 5 additions & 15 deletions Data/Makefile.am
@@ -1,19 +1,14 @@
SUBDIRS = training alphabets colours control settings GUI Help

desktopdir = $(datadir)/applications
desktop_in_files = dasher.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
if USE_INTLTOOL
@INTLTOOL_DESKTOP_RULE@
else
dist_desktop_DATA = dasher.desktop
dasher.desktop: dasher.desktop.in
cp dasher.desktop.in dasher.desktop
endif
$(AM_V_GEN)$(MSGFMT) --desktop --template dasher.desktop.in -d $(top_srcdir)/po -o dasher.desktop

icondir = $(datadir)/icons/hicolor/48x48/apps
icon_DATA = dasher.png
dist_icon_DATA = dasher.png
svgicondir = $(datadir)/icons/hicolor/scalable/apps
svgicon_DATA = dasher.svg
dist_svgicon_DATA = dasher.svg

gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor

Expand All @@ -30,9 +25,4 @@ update-icon-cache:
echo "*** $(gtk_update_icon_cache)"; \
fi

EXTRA_DIST = \
dasher.desktop \
$(icon_DATA) \
$(svgicon_DATA)

CLEANFILES = dasher.schemas dasher.gschema.xml
CLEANFILES = dasher.schemas dasher.gschema.xml dasher.desktop dasher.desktop.in
6 changes: 3 additions & 3 deletions Data/dasher.desktop.in.in
@@ -1,7 +1,7 @@
[Desktop Entry]
_Name=Dasher
_GenericName=Predictive text entry
_Comment=Enter text without a keyboard
Name=Dasher
GenericName=Predictive text entry
Comment=Enter text without a keyboard
Exec=dasher
Icon=dasher
Terminal=false
Expand Down
16 changes: 1 addition & 15 deletions Makefile.am
@@ -1,7 +1,4 @@
SUBDIRS = Src Data Doc
if USE_INTLTOOL
SUBDIRS += po
endif
SUBDIRS = Src Data Doc po

ACLOCAL_AMFLAGS = -I m4

Expand All @@ -16,22 +13,14 @@ EXTRA_DIST = \
INSTALL.Windows \
MAINTAINERS \
m4/pkg.m4 \
m4/glib-gettext.m4 \
m4/dgconf-2.m4 \
m4/gnome-doc-utils.m4 \
m4/intltool.m4 \
m4/nls.m4 \
intltool-merge.in \
intltool-extract.in \
intltool-update.in \
gnome-doc-utils.make \
.tarball-version \
build-aux/mkversion

DISTCLEANFILES = \
intltool-merge \
intltool-extract \
intltool-update \
Data/dasher.desktop \
Data/Help/Gnome/Makefile

Expand All @@ -51,9 +40,6 @@ MAINTAINERCLEANFILES = \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
$(srcdir)/intltool-extract.in \
$(srcdir)/intltool-merge.in \
$(srcdir)/intltool-update.in \
$(srcdir)/omf.make \
$(srcdir)/xmldocs.make \
$(srcdir)/po/Makefile.in.in
Expand Down
6 changes: 0 additions & 6 deletions Src/DasherCore/MandarinAlphMgr.cpp
Expand Up @@ -238,18 +238,12 @@ void CMandarinAlphMgr::CMandarinTrainer::Train(CAlphabetMap::SymbolStream &syms)
bHavePy=false; strPy.clear();
}
if (unannotated.size()) {
// AM_GLIB_GNU_GETTEXT sets HAVE_GETTEXT if it finds a version of gettext
// which includes ngettext() - there is no separate HAVE_NGETTEXT.
///TRANSLATORS: first string will be the filename; after the end of the string,
/// some number of output (e.g. Chinese) characters will be appended,
/// the number of which is the integer here
#ifdef HAVE_GETTEXT
const char* msg = ngettext("In file %s, the following %i symbol appeared without annotations saying how it should be entered, but it can be entered in several ways. Dasher will not be able to learn how you want to enter this symbol:",
"In file %s, the following %i symbols appeared without annotations saying how they should be entered, but each can be entered in several ways. Dasher will not be able to learn how you want to enter these symbols:",
unannotated.size());
#else
const char* msg = _("In file %s, the following %i symbols appeared without annotations saying how they should be entered, but each can be entered in several ways. Dasher will not be able to learn how you want to enter these symbols:");
#endif
char *buf(new char[strlen(msg) + GetDesc().length() + 10]);
sprintf(buf, msg, GetDesc().c_str(), unannotated.size());
ostringstream withChars;
Expand Down
4 changes: 1 addition & 3 deletions Src/Gtk2/Makefile.am
@@ -1,9 +1,7 @@
LIBS = @INTLLIBS@ @LIBS@

noinst_LTLIBRARIES = libdashergtk.la libdashercontrol.la

noinst_PROGRAMS = generate-schema
generate_schema_SOURCES = GenerateSchema.cpp ../DasherCore/Parameters.cpp
generate_schema_SOURCES = GenerateSchema.cpp $(top_srcdir)/Src/DasherCore/Parameters.cpp

#bin_PROGRAMS = dasher-config

Expand Down
2 changes: 0 additions & 2 deletions Src/Makefile.am
@@ -1,5 +1,3 @@
LIBS = @INTLLIBS@ @LIBS@

datadir = @datadir@
localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
Expand Down
2 changes: 1 addition & 1 deletion Src/main.cc
Expand Up @@ -170,7 +170,7 @@ int main(int argc, char *argv[]) {
//parse command line options
// Note to translators: This is the "--help" description of dasher.
GOptionContext *goptcontext = g_option_context_new(_("- A text input application honouring accessibility"));
g_option_context_add_main_entries(goptcontext, options, GETTEXT_PACKAGE);
g_option_context_add_main_entries(goptcontext, options, PACKAGE);
g_option_context_add_group(goptcontext, gtk_get_option_group(TRUE));
GError *error = nullptr;
if (!g_option_context_parse(goptcontext, &argc, &argv, &error)) {
Expand Down
24 changes: 2 additions & 22 deletions autogen.sh
@@ -1,23 +1,3 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

REQUIRED_AUTOMAKE_VERSION=1.8

PKG_NAME="dasher"

(test -f $srcdir/configure.ac \
&& test -f $srcdir/README \
&& test -d $srcdir/Src) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}

which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME CVS"
exit 1
}
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
autoreconf -vif
test -n "$NOCONFIGURE" || ./configure $*
20 changes: 2 additions & 18 deletions configure.ac
Expand Up @@ -22,24 +22,10 @@ AC_CONFIG_LIBOBJ_DIR([Src/Common])
AM_INIT_AUTOMAKE([1.8 gnu check-news dist-bzip2 subdir-objects])
AM_MAINTAINER_MODE

AC_PROG_MAKE_SET

# IT_PROG_INTLTOOL requires AM_NLS but ignores --enable-nls
AM_NLS
AM_CONDITIONAL(USE_INTLTOOL, test "x$USE_NLS" = "xyes")
AS_IF([test "x$USE_NLS" = "xyes"],[
IT_PROG_INTLTOOL([0.40.1])
],
[touch po/Makefile.in.in]) dnl as intltoolize insists

LT_INIT([disable-static])

dnl AM_ICONV

GETTEXT_PACKAGE=dasher
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([0.19])
AM_GNU_GETTEXT([external])

CXXFLAGS="$CXXFLAGS -std=c++0x"
AC_PROG_CXX
Expand Down Expand Up @@ -403,8 +389,6 @@ AC_SUBST(gthread_CFLAGS)
AC_SUBST(hildon_LIBS)
AC_SUBST(hildon_CFLAGS)

AC_SUBST(GETTEXT_PACKAGE)

AM_CONDITIONAL(DOGTK, test x$BUILDGTK = xtrue)
AM_CONDITIONAL(DOQTE, test x$WITHQTE = xtrue)
AM_CONDITIONAL(USE_SPEECHDISPATCHER, test $speech_module = speechdispatcher)
Expand Down
2 changes: 0 additions & 2 deletions m4/README
@@ -1,6 +1,4 @@
pkg.m4: pkg-config-0.27.1
glib-gettext.m4: glib of 2013-01-23 (2.35.4)
dgconf-2.m4: modified gconf-2.m4.in from gconf of 2009-04-28 (git HEAD)
gnome-doc-utils.m4: gnome-doc-utils-0.20.10
intltool.m4: intltool-0.50.2
nls.m4: gettext of 2009-04-28 (0.18)

0 comments on commit b5595c7

Please sign in to comment.