Created attachment 366692 [details] languagemix.jpeg While reviewing translations I got the following dialog - see attachment: "Cannot open file /home/frank/.gnucash/checks/KeinOffset.chk: Datei oder Verzeichnis nicht gefunden" To reproduce it: While I was in the gnucash session I removed ~/.gnucash/checks/ LANG=de_DE.utf8 gnucash Open or create a file with a bank account, File->Print checks ...(Datei->Schecks drucken) Choose Check format: Userdefined (Benutzerdefiniert) Select tab "User defined format" (Benutzerdefiniertes Format) Save Check format enter some name e.g. "KeinOffset" Press OK if ~/.gnucash/checks/ does not exist, the dialog appears. In this case - others might exist, too - we have src/gnome/dialog-print-check.c: pcd_save_custom_data(PrintCheckDialog *pcd, const gchar *title) : if (gnc_key_file_save_to_file(pathname, key_file, &error)) : else { dialog = gtk_message_dialog_new(GTK_WINDOW(pcd->dialog), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("Cannot save check format file.")); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", error->message); in src/core-utils/gnc-keyfile-utils.c: gboolean gnc_key_file_save_to_file (const gchar *filename, GKeyFile *key_file, GError **error) are several occurences of "Cannot open file %s: %s\n", filename, strerror(errno) depending on the OS settings, strerror(errno) gets translated while "Cannot open ..." remains intentional untranslated - their main purpose are messages for developers. But as this example shows, some are returned to the user. Suggestion: mark them here N_(...) and depending on the context return them as %s or _(%s). I am not sure if we need a separate flag or if there are other ways to determinate the context. Tracefiles should get them untranslated, user dialogs translated.
Another approach might be, to verifying the path before by using gnc-filepath-utils.c, which returns translated strings.
*error = g_error_new(G_FILE_ERROR, g_file_error_from_errno(errno), N_("Cannot open file %s: %s"), filename, strerror(errno)); ... gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", _(error->message)); won't work because error->message will have the filename and error string filled in and so won't match "Cannot open file %s: %s". Instead, I removed "Cannot open file" from the GError and added it (with translation marking) to gcd_save_custom_data. Fixed for 3.3 if you update gnucash.pot, merge it to de.po, and provide a translation by Saturday.