[gnome-control-center] cc-common-language.c: Don't check if we have translations here
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] cc-common-language.c: Don't check if we have translations here
- Date: Wed, 29 Oct 2014 14:07:02 +0000 (UTC)
commit ed273aa8f157d991f4e538b7f1d813dabeeaa87b
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Apr 14 15:27:57 2014 +0200
cc-common-language.c: Don't check if we have translations here
The list of locales returned from gnome_get_all_locales() already
filters out the locales for which we don't have translations so this
is a redundant check since users of get_initial_languages() only show
a language if it exists in gnome_get_all_locales() .
In fact, this code stopped working correctly since we started passing
locales including the codeset suffix to insert_language() because the
translation directories usually don't include the suffix and we
weren't stripping the suffix here.
https://bugzilla.gnome.org/show_bug.cgi?id=710412
panels/common/cc-common-language.c | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
---
diff --git a/panels/common/cc-common-language.c b/panels/common/cc-common-language.c
index 2f75431..9d68ef2 100644
--- a/panels/common/cc-common-language.c
+++ b/panels/common/cc-common-language.c
@@ -210,24 +210,11 @@ static void
insert_language (GHashTable *ht,
const char *lang)
{
- gboolean has_translations;
char *label_own_lang;
char *label_current_lang;
char *label_untranslated;
char *key;
- has_translations = gnome_language_has_translations (lang);
- if (!has_translations) {
- char *lang_code = g_strndup (lang, 2);
- has_translations = gnome_language_has_translations (lang_code);
- g_free (lang_code);
-
- if (!has_translations)
- return;
- }
-
- g_debug ("We have translations for %s", lang);
-
key = g_strdup (lang);
label_own_lang = gnome_get_language_from_locale (key, key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]