gnucash maint: I18N: Fix several issuse with 'Help not found' strings
Frank H.Ellenberger
fell at code.gnucash.org
Sat May 9 18:08:14 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/e84e6806 (commit)
from https://github.com/Gnucash/gnucash/commit/79286d92 (commit)
commit e84e680603b225cb52be6981840b80291ef8352b
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date: Sat May 9 01:51:05 2020 +0200
I18N: Fix several issuse with 'Help not found' strings
Unify and modularize the strings
Add an unmarked string
diff --git a/gnucash/gnome-utils/gnc-gnome-utils.c b/gnucash/gnome-utils/gnc-gnome-utils.c
index b9066ab35..188da7d45 100644
--- a/gnucash/gnome-utils/gnc-gnome-utils.c
+++ b/gnucash/gnome-utils/gnc-gnome-utils.c
@@ -64,6 +64,13 @@ static int gnome_is_initialized = FALSE;
#define ACCEL_MAP_NAME "accelerator-map"
+const gchar *msg_no_help_found =
+ N_("GnuCash could not find the files of the help documentation.");
+const gchar *msg_no_help_reason =
+ N_("This is likely because the \"gnucash-docs\" package is not properly installed.");
+ /* Translators: URI of missing help files */
+const gchar *msg_no_help_location = N_("Expected location");
+
static void gnc_book_options_help_cb (GNCOptionWin *win, gpointer dat);
static void
@@ -280,10 +287,9 @@ gnc_gnome_help (const char *dir, const char *detail)
componentsJoinedByString: @"-"];
if (![[NSFileManager defaultManager] fileExistsAtPath: docs_dir])
{
- const gchar *message =
- _("GnuCash could not find the files for the help documentation. "
- "This is likely because the 'gnucash-docs' package is not installed");
- gnc_error_dialog(NULL, "%s at %s", message, [docs_dir UTF8String]);
+ gnc_error_dialog(NULL, "%s\n%s\n%s: %s", _(msg_no_help_found),
+ _(msg_no_help_reason),
+ _(msg_no_help_location), [docs_dir UTF8String]);
[pool release];
return;
}
@@ -373,10 +379,7 @@ gnc_gnome_help (const char *dir, const char *detail)
[[NSWorkspace sharedWorkspace] openURL: url];
else
{
- const gchar *message =
- _("GnuCash could not find the files for the help documentation. "
- "This is likely because the 'gnucash-docs' package is not installed.");
- gnc_error_dialog(NULL, "%s", message);
+ gnc_error_dialog(NULL, "%s\n%s", _(msg_no_help_found), _(msg_no_help_reason));
}
[pool release];
}
@@ -404,9 +407,7 @@ gnc_gnome_help (const char *file_name, const char *anchor)
if (!found)
{
- const gchar *message =
- _("GnuCash could not find the files for the help documentation.");
- gnc_error_dialog (NULL, message);
+ gnc_error_dialog (NULL, "%s\n%s", _(msg_no_help_found), _(msg_no_help_reason));
}
else
{
@@ -439,10 +440,7 @@ gnc_gnome_help (const char *file_name, const char *anchor)
g_assert(error != NULL);
{
- const gchar *message =
- _("GnuCash could not find the files for the help documentation. "
- "This is likely because the 'gnucash-docs' package is not installed.");
- gnc_error_dialog(NULL, "%s", message);
+ gnc_error_dialog(NULL, "%s\n%s", _(msg_no_help_found), _(msg_no_help_reason));
}
PERR ("%s", error->message);
g_error_free(error);
@@ -505,7 +503,7 @@ gnc_launch_assoc (GtkWindow *parent, const char *uri)
NULL, NULL, SW_SHOWNORMAL) <= 32)
{
const gchar *message =
- _("GnuCash could not find the associated file");
+ _("GnuCash could not find the associated file.");
gnc_error_dialog(parent, "%s:\n%s", message, filename);
}
g_free (wincmd);
Summary of changes:
gnucash/gnome-utils/gnc-gnome-utils.c | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
More information about the gnucash-changes
mailing list