forked from Shinonome/dots-hyprland
Add translation
This commit is contained in:
@@ -6,6 +6,7 @@ const { Box, EventBox, Icon, Overlay, Label, Button, Revealer } = Widget;
|
||||
import { MaterialIcon } from './materialicon.js';
|
||||
import { setupCursorHover } from "../.widgetutils/cursorhover.js";
|
||||
import { AnimatedCircProg } from "./cairo_circularprogress.js";
|
||||
import { getString } from '../../i18n/i18n.js';
|
||||
|
||||
function guessMessageType(summary) {
|
||||
const str = summary.toLowerCase();
|
||||
@@ -29,11 +30,11 @@ const getFriendlyNotifTimeString = (timeObject) => {
|
||||
const messageTime = GLib.DateTime.new_from_unix_local(timeObject);
|
||||
const oneMinuteAgo = GLib.DateTime.new_now_local().add_seconds(-60);
|
||||
if (messageTime.compare(oneMinuteAgo) > 0)
|
||||
return 'Now';
|
||||
return getString('Now');
|
||||
else if (messageTime.get_day_of_year() == GLib.DateTime.new_now_local().get_day_of_year())
|
||||
return messageTime.format(userOptions.time.format);
|
||||
else if (messageTime.get_day_of_year() == GLib.DateTime.new_now_local().get_day_of_year() - 1)
|
||||
return 'Yesterday';
|
||||
return getString('Yesterday');
|
||||
else
|
||||
return messageTime.format(userOptions.time.dateFormat);
|
||||
}
|
||||
@@ -198,7 +199,7 @@ export default ({
|
||||
onClicked: () => destroyWithAnims(),
|
||||
setup: setupCursorHover,
|
||||
child: Label({
|
||||
label: 'Close',
|
||||
label: getString('Close'),
|
||||
}),
|
||||
}),
|
||||
...notifObject.actions.map(action => Widget.Button({
|
||||
|
||||
Reference in New Issue
Block a user