[gom] po: Remove i18n support
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] po: Remove i18n support
- Date: Tue, 7 Mar 2017 23:43:23 +0000 (UTC)
commit 325a4e1827311a67b512df28cce08e4da5fc0837
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 8 00:38:03 2017 +0100
po: Remove i18n support
None of the translatable strings are useful to end-users, and are
usually programming errors, or actions that don't correspond to
user actions.
Let the front-ends provide their own user-friendly error messages. If
error codes are missing for particular types of error, please make sure
to file bugs.
https://bugzilla.gnome.org/show_bug.cgi?id=779714
Makefile.am | 2 +-
autogen.sh | 8 --
configure.ac | 17 ----
gom/gom-adapter.c | 3 +-
gom/gom-command-builder.c | 34 ++++----
gom/gom-command.c | 15 ++--
gom/gom-cursor.c | 6 +-
gom/gom-filter.c | 10 +--
gom/gom-repository.c | 10 +--
gom/gom-resource-group.c | 34 ++++----
gom/gom-resource.c | 10 +-
gom/gom-sorting.c | 2 -
po/.gitignore | 3 -
po/LINGUAS | 16 ----
po/POTFILES.in | 8 --
po/bs.po | 199 -----------------------------------------
po/cs.po | 211 -------------------------------------------
po/de.po | 217 --------------------------------------------
po/el.po | 218 ---------------------------------------------
po/es.po | 215 --------------------------------------------
po/hu.po | 216 --------------------------------------------
po/id.po | 191 ---------------------------------------
po/pl.po | 211 -------------------------------------------
po/pt.po | 212 -------------------------------------------
po/pt_BR.po | 214 --------------------------------------------
po/sl.po | 215 --------------------------------------------
po/sr.po | 213 -------------------------------------------
po/sr latin po | 213 -------------------------------------------
po/sv.po | 213 -------------------------------------------
po/tr.po | 213 -------------------------------------------
30 files changed, 57 insertions(+), 3292 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8ce24d3..0f9a6ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ include examples/Makefile.include
include gom/Makefile.include
include tests/Makefile.include
-SUBDIRS = . doc po
+SUBDIRS = . doc
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS = \
diff --git a/autogen.sh b/autogen.sh
index 3f414ce..9100f80 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,7 +9,6 @@ cd $srcdir
AUTORECONF=$(which autoreconf 2>/dev/null)
GTKDOCIZE=$(which gtkdocize 2>/dev/null)
-INTLTOOLIZE=$(which intltoolize 2>/dev/null)
set -x
@@ -20,13 +19,6 @@ else
${GTKDOCIZE} || exit $?
fi
-if test -z $INTLTOOLIZE; then
- echo "*** No intltoolize found, please install intltool ***"
- exit 1
-else
- ${INTLTOOLIZE} --force --copy --automake || exit $?
-fi
-
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please install autoconf ***"
exit 1
diff --git a/configure.ac b/configure.ac
index 1e58668..eb19766 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,23 +112,6 @@ AS_CASE([$enable_debug],
[AC_MSG_ERROR([Unknown argument to --enable-debug])]
)
-dnl -------------------------------------------------------------------
-dnl Use intltools.
-dnl -------------------------------------------------------------------
-IT_PROG_INTLTOOL([0.40.0])
-
-AC_SUBST([GETTEXT_PACKAGE], [gom])
-AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package name.])
-
-
-dnl gettext library
-AC_CHECK_LIB([gettextpo], [po_message_is_format],
- [GETTEXT_LIBS=-lgettextpo], [
- AC_MSG_ERROR(Missing gettext library)])
-
-AC_SUBST([GETTEXT_LIBS])
-
-
dnl **************************************************************************
dnl Unit Tests
dnl **************************************************************************
diff --git a/gom/gom-adapter.c b/gom/gom-adapter.c
index e8201bb..f3fae36 100644
--- a/gom/gom-adapter.c
+++ b/gom/gom-adapter.c
@@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
#include <sqlite3.h>
#include "gom-adapter.h"
@@ -195,7 +194,7 @@ open_callback (GomAdapter *adapter,
if (ret != SQLITE_OK) {
g_simple_async_result_set_error(simple, GOM_ERROR,
GOM_ERROR_ADAPTER_OPEN,
- _("Failed to open database at %s"), uri);
+ "Failed to open database at %s", uri);
}
g_simple_async_result_set_op_res_gboolean(simple, ret == SQLITE_OK);
if (!queue)
diff --git a/gom/gom-command-builder.c b/gom/gom-command-builder.c
index a87f5de..4fc2723 100644
--- a/gom/gom-command-builder.c
+++ b/gom/gom-command-builder.c
@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
-
#include "gom-adapter.h"
#include "gom-command.h"
#include "gom-command-builder.h"
@@ -1033,8 +1031,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_ADAPTER] =
g_param_spec_object("adapter",
- _("Adapter"),
- _("The GomAdapter."),
+ "Adapter",
+ "The GomAdapter.",
GOM_TYPE_ADAPTER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_ADAPTER,
@@ -1042,8 +1040,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_FILTER] =
g_param_spec_object("filter",
- _("Filter"),
- _("The filter for the command."),
+ "Filter",
+ "The filter for the command.",
GOM_TYPE_FILTER,
G_PARAM_READWRITE);
g_object_class_install_property(object_class, PROP_FILTER,
@@ -1051,8 +1049,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_SORTING] =
g_param_spec_object("sorting",
- _("Sorting"),
- _("The sorting for the command."),
+ "Sorting",
+ "The sorting for the command.",
GOM_TYPE_SORTING,
G_PARAM_READWRITE);
g_object_class_install_property(object_class, PROP_SORTING,
@@ -1060,8 +1058,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_LIMIT] =
g_param_spec_uint("limit",
- _("Limit"),
- _("The maximum number of results."),
+ "Limit",
+ "The maximum number of results.",
0,
G_MAXUINT,
0,
@@ -1071,8 +1069,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_M2M_TABLE] =
g_param_spec_string("m2m-table",
- _("Many-to-many table"),
- _("The table to use for many-to-many queries."),
+ "Many-to-many table",
+ "The table to use for many-to-many queries.",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_M2M_TABLE,
@@ -1080,8 +1078,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_M2M_TYPE] =
g_param_spec_gtype("m2m-type",
- _("Many-to-many type"),
- _("The type for the join within m2m-table."),
+ "Many-to-many type",
+ "The type for the join within m2m-table.",
GOM_TYPE_RESOURCE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_M2M_TYPE,
@@ -1089,8 +1087,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_OFFSET] =
g_param_spec_uint("offset",
- _("Offset"),
- _("The number of results to skip."),
+ "Offset",
+ "The number of results to skip.",
0,
G_MAXUINT,
0,
@@ -1100,8 +1098,8 @@ gom_command_builder_class_init (GomCommandBuilderClass *klass)
gParamSpecs[PROP_RESOURCE_TYPE] =
g_param_spec_gtype("resource-type",
- _("Resource Type"),
- _("The resource type to query for."),
+ "Resource Type",
+ "The resource type to query for.",
GOM_TYPE_RESOURCE,
G_PARAM_READWRITE);
g_object_class_install_property(object_class, PROP_RESOURCE_TYPE,
diff --git a/gom/gom-command.c b/gom/gom-command.c
index 8584707..a66050c 100644
--- a/gom/gom-command.c
+++ b/gom/gom-command.c
@@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
#include <sqlite3.h>
#include <string.h>
@@ -284,14 +283,14 @@ gom_command_prepare (GomCommand *command,
if (!priv->sql) {
g_set_error(error, GOM_ERROR, GOM_ERROR_COMMAND_NO_SQL,
- _("The command does not contain any SQL"));
+ "The command does not contain any SQL");
return FALSE;
}
if (!(ret = (SQLITE_OK == sqlite3_prepare_v2(db, priv->sql, -1,
&priv->stmt, NULL)))) {
g_set_error(error, GOM_ERROR, GOM_ERROR_COMMAND_SQLITE,
- _("sqlite3_prepare_v2 failed: %s: %s"),
+ "sqlite3_prepare_v2 failed: %s: %s",
sqlite3_errmsg(db), priv->sql);
}
@@ -318,7 +317,7 @@ gom_command_execute (GomCommand *command,
if (!priv->adapter || !(db = gom_adapter_get_handle(priv->adapter))) {
g_set_error(error, GOM_ERROR, GOM_ERROR_COMMAND_SQLITE,
- _("Failed to access SQLite handle."));
+ "Failed to access SQLite handle.");
return FALSE;
}
@@ -550,8 +549,8 @@ gom_command_class_init (GomCommandClass *klass)
gParamSpecs[PROP_ADAPTER] =
g_param_spec_object("adapter",
- _("Adapter"),
- _("The GomAdapter for the command."),
+ "Adapter",
+ "The GomAdapter for the command.",
GOM_TYPE_ADAPTER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_ADAPTER,
@@ -559,8 +558,8 @@ gom_command_class_init (GomCommandClass *klass)
gParamSpecs[PROP_SQL] =
g_param_spec_string("sql",
- _("SQL"),
- _("The SQL for the command."),
+ "SQL",
+ "The SQL for the command.",
NULL,
G_PARAM_WRITABLE);
g_object_class_install_property(object_class, PROP_SQL,
diff --git a/gom/gom-cursor.c b/gom/gom-cursor.c
index 7a9f6d6..6d21ae4 100644
--- a/gom/gom-cursor.c
+++ b/gom/gom-cursor.c
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
#include <sqlite3.h>
+#include <string.h>
#include "gom-cursor.h"
@@ -296,8 +296,8 @@ gom_cursor_class_init (GomCursorClass *klass)
gParamSpecs[PROP_STATEMENT] =
g_param_spec_pointer("statement",
- _("Statement"),
- _("A pointer to a sqlite3_stmt."),
+ "Statement",
+ "A pointer to a sqlite3_stmt.",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_STATEMENT,
gParamSpecs[PROP_STATEMENT]);
diff --git a/gom/gom-filter.c b/gom/gom-filter.c
index 51c8a80..5e9618a 100644
--- a/gom/gom-filter.c
+++ b/gom/gom-filter.c
@@ -18,8 +18,6 @@
#include <stdarg.h>
-#include <glib/gi18n.h>
-
#include "gom-filter.h"
#include "gom-resource.h"
@@ -702,8 +700,8 @@ gom_filter_class_init (GomFilterClass *klass)
gParamSpecs[PROP_MODE] =
g_param_spec_enum("mode",
- _("Mode"),
- _("The mode of the filter."),
+ "Mode",
+ "The mode of the filter.",
GOM_TYPE_FILTER_MODE,
GOM_FILTER_SQL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
@@ -712,8 +710,8 @@ gom_filter_class_init (GomFilterClass *klass)
gParamSpecs[PROP_SQL] =
g_param_spec_string("sql",
- _("SQL"),
- _("The SQL for the filter."),
+ "SQL",
+ "The SQL for the filter.",
NULL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_SQL,
diff --git a/gom/gom-repository.c b/gom/gom-repository.c
index ca0cf89..2f52ff7 100644
--- a/gom/gom-repository.c
+++ b/gom/gom-repository.c
@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
-
#include "gom-command.h"
#include "gom-command-builder.h"
#include "gom-cursor.h"
@@ -745,7 +743,7 @@ gom_repository_find_one_cb (GObject *object,
if (!gom_resource_group_get_count(group)) {
g_simple_async_result_set_error(simple, GOM_ERROR,
GOM_ERROR_REPOSITORY_EMPTY_RESULT,
- _("No resources were found."));
+ "No resources were found.");
g_simple_async_result_complete_in_idle(simple);
g_object_unref(simple);
g_object_unref(group);
@@ -791,7 +789,7 @@ gom_repository_find_one_sync (GomRepository *repository,
if (!gom_resource_group_get_count(group)) {
g_set_error(error, GOM_ERROR,
GOM_ERROR_REPOSITORY_EMPTY_RESULT,
- _("No resources were found."));
+ "No resources were found.");
g_object_unref(group);
return NULL;
}
@@ -945,8 +943,8 @@ gom_repository_class_init (GomRepositoryClass *klass)
gParamSpecs[PROP_ADAPTER] =
g_param_spec_object("adapter",
- _("Adapter"),
- _("The adapter for the repository."),
+ "Adapter",
+ "The adapter for the repository.",
GOM_TYPE_ADAPTER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_ADAPTER,
diff --git a/gom/gom-resource-group.c b/gom/gom-resource-group.c
index ad83b23..97dc44e 100644
--- a/gom/gom-resource-group.c
+++ b/gom/gom-resource-group.c
@@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
-
#include "gom-adapter.h"
#include "gom-command.h"
#include "gom-command-builder.h"
@@ -1013,8 +1011,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_COUNT] =
g_param_spec_uint("count",
- _("Count"),
- _("The size of the resource group."),
+ "Count",
+ "The size of the resource group.",
0,
G_MAXUINT,
0,
@@ -1024,8 +1022,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_FILTER] =
g_param_spec_object("filter",
- _("Filter"),
- _("The query filter."),
+ "Filter",
+ "The query filter.",
GOM_TYPE_FILTER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_FILTER,
@@ -1033,8 +1031,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_SORTING] =
g_param_spec_object("sorting",
- _("Sorting"),
- _("The query sorting."),
+ "Sorting",
+ "The query sorting.",
GOM_TYPE_SORTING,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_SORTING,
@@ -1042,8 +1040,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_M2M_TABLE] =
g_param_spec_string("m2m-table",
- _("Many-to-Many Table"),
- _("The table used to join a Many to Many query."),
+ "Many-to-Many Table",
+ "The table used to join a Many to Many query.",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_M2M_TABLE,
@@ -1051,8 +1049,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_M2M_TYPE] =
g_param_spec_gtype("m2m-type",
- _("Many-to-Many type"),
- _("The type used in the m2m-table join."),
+ "Many-to-Many type",
+ "The type used in the m2m-table join.",
GOM_TYPE_RESOURCE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_M2M_TYPE,
@@ -1060,8 +1058,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_REPOSITORY] =
g_param_spec_object("repository",
- _("Repository"),
- _("The repository for object storage."),
+ "Repository",
+ "The repository for object storage.",
GOM_TYPE_REPOSITORY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_REPOSITORY,
@@ -1069,8 +1067,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_RESOURCE_TYPE] =
g_param_spec_gtype("resource-type",
- _("Resource Type"),
- _("The type of resources contained."),
+ "Resource Type",
+ "The type of resources contained.",
GOM_TYPE_RESOURCE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_RESOURCE_TYPE,
@@ -1078,8 +1076,8 @@ gom_resource_group_class_init (GomResourceGroupClass *klass)
gParamSpecs[PROP_IS_WRITABLE] =
g_param_spec_boolean("is-writable",
- _("Is Writable"),
- _("Whether the group contains resources to be written."),
+ "Is Writable",
+ "Whether the group contains resources to be written.",
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property(object_class, PROP_IS_WRITABLE,
diff --git a/gom/gom-resource.c b/gom/gom-resource.c
index 4e6a521..25d934e 100644
--- a/gom/gom-resource.c
+++ b/gom/gom-resource.c
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glib/gi18n.h>
#include <sqlite3.h>
+#include <string.h>
#include "gom-command.h"
#include "gom-command-builder.h"
@@ -742,7 +742,7 @@ gom_resource_save_sync (GomResource *resource,
if (!priv->repository) {
g_set_error(error, GOM_ERROR, GOM_ERROR_COMMAND_NO_REPOSITORY,
- _("Cannot save resource, no repository set"));
+ "Cannot save resource, no repository set");
return FALSE;
}
@@ -872,7 +872,7 @@ gom_resource_fetch_m2m_cb (GomAdapter *adapter,
if (!gom_cursor_next(cursor)) {
g_simple_async_result_set_error(simple, GOM_ERROR,
GOM_ERROR_RESOURCE_CURSOR,
- _("No result was returned from the cursor."));
+ "No result was returned from the cursor.");
goto out;
}
@@ -1052,8 +1052,8 @@ gom_resource_class_init (GomResourceClass *klass)
gParamSpecs[PROP_REPOSITORY] =
g_param_spec_object("repository",
- _("Repository"),
- _("The resources repository."),
+ "Repository",
+ "The resources repository.",
GOM_TYPE_REPOSITORY,
G_PARAM_READWRITE);
g_object_class_install_property(object_class, PROP_REPOSITORY,
diff --git a/gom/gom-sorting.c b/gom/gom-sorting.c
index 879b338..b7b02f5 100644
--- a/gom/gom-sorting.c
+++ b/gom/gom-sorting.c
@@ -18,8 +18,6 @@
#include <stdarg.h>
-#include <glib/gi18n.h>
-
#include "gom-sorting.h"
#include "gom-resource.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]