diff --git a/ChangeLog b/ChangeLog index b8c27359..bab69169 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * THANKS, doc/geany.txt, doc/geany.html: Add documentation for several options in the preferences dialog (patch from Robert McGinley, thanks). + * src/filetypes.c, src/ui_utils.c: + Revert the translatable filetype name of filetype All, add a + workaround in ui_update_statusbar() instead. 2008-04-10 Frank Lanitz diff --git a/src/filetypes.c b/src/filetypes.c index ba3fd107..456df655 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -476,7 +476,7 @@ void filetypes_init_types() #define ALL filetypes[GEANY_FILETYPES_ALL]->id = GEANY_FILETYPES_ALL; - filetypes[GEANY_FILETYPES_ALL]->name = g_strdup(_("None")); + filetypes[GEANY_FILETYPES_ALL]->name = g_strdup("None"); filetypes[GEANY_FILETYPES_ALL]->uid = FILETYPE_UID_ALL; filetypes[GEANY_FILETYPES_ALL]->lang = -2; filetypes[GEANY_FILETYPES_ALL]->title = g_strdup(_("All files")); diff --git a/src/ui_utils.c b/src/ui_utils.c index 88bdd846..b096cebf 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -128,6 +128,13 @@ void ui_update_statusbar(gint idx, gint pos) const gchar sp[] = " "; guint line, col; const gchar *cur_tag; + gchar *filetype_name; + + /* workaround to make the name of filetype GEANY_FILETYPES_ALL translatable */ + if (doc_list[idx].file_type == NULL || doc_list[idx].file_type->id == GEANY_FILETYPES_ALL) + filetype_name = _("None"); + else + filetype_name = doc_list[idx].file_type->name; if (stats_str == NULL) stats_str = g_string_sized_new(120); @@ -166,9 +173,7 @@ void ui_update_statusbar(gint idx, gint pos) /* BOM = byte order mark */ ((doc_list[idx].has_bom) ? _("(with BOM)") : "") : ""); g_string_append(stats_str, sp); - g_string_append_printf(stats_str, _("filetype: %s"), - (doc_list[idx].file_type) ? doc_list[idx].file_type->name : - filetypes[GEANY_FILETYPES_ALL]->name); + g_string_append_printf(stats_str, _("filetype: %s"), filetype_name); g_string_append(stats_str, sp); if (doc_list[idx].changed) {