bugfix: store translations in the C locale so we can still provide a package name in C even if there are no translations
This commit is contained in:
parent
2661b12271
commit
abcd1d57ad
@ -157,6 +157,11 @@ pk_desktop_process_desktop (const gchar *package_name, const gchar *filename)
|
||||
|
||||
/* get the default entry */
|
||||
name_unlocalised = g_key_file_get_string (key, G_KEY_FILE_DESKTOP_GROUP, "Name", NULL);
|
||||
if (!egg_strzero (name_unlocalised)) {
|
||||
g_print ("C");
|
||||
pk_extra_set_locale (extra, "C");
|
||||
pk_extra_set_data_locale (extra, package_name, name_unlocalised);
|
||||
}
|
||||
|
||||
/* for each locale */
|
||||
for (i=0; i<locale_array->len; i++) {
|
||||
|
@ -229,6 +229,16 @@ pk_extra_populate_locale_cache (PkExtra *extra)
|
||||
sqlite3_free (error_msg);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* get summary packages - no translation */
|
||||
statement = g_strdup_printf ("SELECT package, summary FROM localised WHERE locale = '%s'", "C");
|
||||
rc = sqlite3_exec (extra->priv->db, statement, pk_extra_populate_locale_cache_callback, extra, &error_msg);
|
||||
g_free (statement);
|
||||
if (rc != SQLITE_OK) {
|
||||
egg_warning ("SQL error: %s\n", error_msg);
|
||||
sqlite3_free (error_msg);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user