[evolution-kolab] ECalBackendKolab: marked strings as translatable
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] ECalBackendKolab: marked strings as translatable
- Date: Thu, 26 Jul 2012 09:02:47 +0000 (UTC)
commit a4f7eb672ed8a2bf733434d5fa091312ea23b287
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Jul 26 10:26:27 2012 +0200
ECalBackendKolab: marked strings as translatable
* also always init local vars, even if they're
instantly assigned to afterwards
src/calendar/e-cal-backend-kolab.c | 34 ++++++++++++++++------------------
1 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index c4532ae..6a37714 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -256,19 +256,19 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
{
ECalBackendKolab *self = NULL;
ECalBackendKolabPrivate *priv = NULL;
- ESourceRegistry *registry;
+ ESourceRegistry *registry = NULL;
ESource *esource = NULL;
- ESourceKolabFolder *extension;
- CamelKolabIMAPXSettings *kolab_settings;
- CamelNetworkSettings *network_settings;
+ ESourceKolabFolder *extension = NULL;
+ CamelKolabIMAPXSettings *kolab_settings = NULL;
+ CamelNetworkSettings *network_settings = NULL;
KolabSettingsHandler *ksettings = NULL;
KolabMailAccess *tmp_koma = NULL;
KolabSyncStrategyID sync_value = KOLAB_SYNC_STRATEGY_DEFAULT;
icalcomponent_kind icalkind = ICAL_VEVENT_COMPONENT;
- const gchar *extension_name;
- const gchar *foldername;
- const gchar *cache_dir;
- gchar *cache_filename;
+ const gchar *extension_name = NULL;
+ const gchar *foldername = NULL;
+ const gchar *cache_dir = NULL;
+ gchar *cache_filename = NULL;
gchar *servername = NULL;
gchar *username = NULL;
gchar *user_at_server = NULL;
@@ -307,15 +307,14 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
g_set_error (&tmp_err,
KOLAB_BACKEND_ERROR,
KOLAB_BACKEND_ERROR_GENERIC,
- "Unknown type used in e-cal-backend-kolab initialization");
+ _("Unknown type used in e-cal-backend-kolab initialization"));
goto exit;
}
esource = e_backend_get_source (E_BACKEND (backend));
if (! E_IS_SOURCE (esource)) {
- /* FIXME mark this as a translatable string */
tmp_err = e_data_cal_create_error (OtherError,
- "Could not get ESource for backend");
+ _("Could not get ESource for backend"));
goto exit;
}
@@ -928,7 +927,7 @@ e_cal_backend_kolab_create_objects (ECalBackendSync *backend,
e_return_data_cal_error_if_fail (new_components != NULL && *new_components == NULL, InvalidArg);
if (calobjs->next) {
- g_propagate_error (error, e_data_cal_create_error (UnsupportedMethod, "Kolab does not support bulk additions"));
+ g_propagate_error (error, e_data_cal_create_error (UnsupportedMethod, _("Kolab does not support bulk additions")));
return;
}
@@ -969,9 +968,8 @@ e_cal_backend_kolab_create_objects (ECalBackendSync *backend,
*/
g_free (tzid);
g_object_unref (ecalcomp);
- /* FIXME mark this as a translatable string */
tmp_err = e_data_cal_create_error (InvalidObject,
- "TZID is set, but no timezone is available. Currently this may happen if an object is copied to an empty calendar.");
+ _("TZID is set, but no timezone is available. Currently this may happen if an object is copied to an empty calendar."));
g_propagate_error (error, tmp_err);
return;
}
@@ -1271,7 +1269,7 @@ e_cal_backend_kolab_remove_objects (ECalBackendSync *backend,
e_return_data_cal_error_if_fail (new_components != NULL && *new_components == NULL, InvalidArg);
if (ids->next) {
- g_propagate_error (error, e_data_cal_create_error (UnsupportedMethod, "Kolab does not support bulk removals"));
+ g_propagate_error (error, e_data_cal_create_error (UnsupportedMethod, _("Kolab does not support bulk removals")));
return;
}
@@ -1691,11 +1689,11 @@ e_cal_backend_kolab_add_timezone (ECalBackendSync *backend,
icalcomp);
if (! e_cal_backend_cache_put_timezone (priv->cal_cache, icaltz)) {
- g_warning ("%s()[%u]: Putting timezone in cache failed.",
+ g_warning ("%s()[%u]: Putting timezone object into cache failed.",
__func__, __LINE__);
icaltimezone_free (icaltz, 1);
- /* TODO add a translatable string as custom message */
- tmp_err = e_data_cal_create_error (OtherError, NULL);
+ tmp_err = e_data_cal_create_error (OtherError,
+ _("Putting timezone object into cache failed."));
return;
}
icaltimezone_free (icaltz, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]