propertiesView: Unify localized DateTime format
Closes #43 Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/141>
This commit is contained in:
parent
b8d5f833f3
commit
e93020d9ab
3 changed files with 20 additions and 8 deletions
|
|
@ -10,6 +10,7 @@ pub use gps::GPSLocation;
|
|||
pub use obj::LpImageMetadata;
|
||||
|
||||
use crate::i18n::*;
|
||||
use crate::util;
|
||||
|
||||
use gtk::glib;
|
||||
|
||||
|
|
@ -95,10 +96,7 @@ impl ImageMetadata {
|
|||
dt.minute.into(),
|
||||
dt.second.into(),
|
||||
) {
|
||||
// Translators: Date (%x) and time (%X) combined
|
||||
if let Ok(formatted) = datetime.format(&i18n("%x %X")) {
|
||||
return Some(formatted.to_string());
|
||||
}
|
||||
return util::datetime_fmt(&datetime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue