Don’t split sentences, don’t hardcode date formats.
The code in the following places is problematic on several levels:
- https://gitlab.gnome.org/Incubator/snapshot/-/blob/main/src/utils.rs#L16
- https://gitlab.gnome.org/Incubator/snapshot/-/blob/main/src/utils.rs#L32
- https://gitlab.gnome.org/Incubator/snapshot/-/blob/main/src/utils.rs#L41
Maybe other places which I missed too.
It splits sentences and hardcodes date formats.
https://gitlab.gnome.org/GNOME/fractal/-/blob/main/src/i18n.rs#L38 has an exemple of how to achieve the same result without splitting sentences.