Skip to content

Commit

Permalink
nemo-file.c: Update default date-time formats to adapt to GDateTime
Browse files Browse the repository at this point in the history
change.

The %l, %e and %k tokens now have additional leading space when
rendering a single digit number.

Currently:
'%l:%M %p' -> ' 1:00 AM'

With this commit:
'%-l:%M %p' -> '1:00 AM'

ref:
https://gitlab.gnome.org/GNOME/glib/-/commit/7074122f308b7b3402fba250f2010778fdad6eff
https://gitlab.gnome.org/GNOME/glib/-/commit/7169f6e1e58a53e4b69e5d40f3fd192dd9cd8ed4
  • Loading branch information
mtwebster committed May 10, 2024
1 parent 0961f07 commit a362848
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libnemo-private/nemo-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -5172,7 +5172,7 @@ nemo_file_get_date_as_string (NemoFile *file,
format = _("%H:%M");
} else {
/* Translators: Time in 12h format */
format = _("%l:%M %p");
format = _("%-l:%M %p");
}
}
// Show the word "Yesterday" and time if date is on yesterday
Expand All @@ -5190,7 +5190,7 @@ nemo_file_get_date_as_string (NemoFile *file,
/* Translators: this is the word Yesterday followed by
* a time in 12h format. i.e. "Yesterday 9:04 PM" */
// xgettext:no-c-format
format = _("Yesterday %l:%M %p");
format = _("Yesterday %-l:%M %p");
}
}
}
Expand All @@ -5209,7 +5209,7 @@ nemo_file_get_date_as_string (NemoFile *file,
/* Translators: this is the week day name followed by
* a time in 12h format. i.e. "Monday 9:04 PM" */
// xgettext:no-c-format
format = _("%A %l:%M %p");
format = _("%A %-l:%M %p");
}
}
} else if (g_date_time_get_year (file_date) == g_date_time_get_year (now)) {
Expand All @@ -5230,7 +5230,7 @@ nemo_file_get_date_as_string (NemoFile *file,
* by the abbreviated month name followed by a time in
* 12h format i.e. "3 February 9:04" */
// xgettext:no-c-format
format = _("%-e %B %l:%M %p");
format = _("%-e %B %-l:%M %p");
}
}
} else {
Expand All @@ -5251,7 +5251,7 @@ nemo_file_get_date_as_string (NemoFile *file,
* by the abbreviated month name followed by the year followed
* by a time in 12h format i.e. "3 Feb 2015 9:04 PM" */
// xgettext:no-c-format
format = _("%-e %b %Y %l:%M %p");
format = _("%-e %b %Y %-l:%M %p");
}
}
}
Expand Down

0 comments on commit a362848

Please sign in to comment.