Minor improvement in message about last modification time upon opening a file.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23200 57a11ea4-9604-0410-9ed3-97b8803252fd
pull/2/head
Christian Stimming 13 years ago
parent 1968b38cfa
commit b44cf4ac27

@ -1564,17 +1564,27 @@ static gchar *generate_statusbar_lastmodified_message()
// File mtime could be accessed ok
gint64 mtime = statbuf.st_mtime;
GDateTime *gdt = gnc_g_date_time_new_from_unix_local (mtime);
gchar *dummy_strftime_has_ampm = g_date_time_format (gdt, "%P");
/* Translators: This is the date and time that is shown in
the status bar after opening a file, the date and time of
last modification. */
gchar *time_string = g_date_time_format (gdt, _("%a %b %e %Y %H:%M:%S"));
the status bar after opening a file: The date and time of
last modification. The string is the format string for
glib's function g_date_time_format(), see there for an
explanation of the modifiers. First string is for a locale
that has the a.m. or p.m. string in its locale, second
string is for locales that do not have that string. */
gchar *time_string =
g_date_time_format (gdt, (strlen(dummy_strftime_has_ampm) > 0)
? _("Last modified on %a, %b %e, %Y at %I:%M%P")
: _("Last modified on %a, %b %e, %Y at %H:%M"));
g_date_time_unref (gdt);
//g_warning("got time %ld, str=%s\n", mtime, time_string);
/* Translators: This message appears in the status bar after opening the file. */
message = g_strdup_printf(_("File %s opened. Last modified: %s"),
message = g_strdup_printf(_("File %s opened. %s"),
filename, time_string);
g_free(time_string);
g_free(dummy_strftime_has_ampm);
}
else
{

Loading…
Cancel
Save