feat: localize interface messages

This commit is contained in:
Erzbir
2026-08-07 14:45:14 +08:00
parent b556dd9a74
commit e83853ba34
22 changed files with 188 additions and 41 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import {terminal} from "../terminal.js";
import {getMessage} from "../utils/messages.js";
const RESOURCE_KEY = "moment";
const RESOURCE_GROUP = "moment.halo.run";
@@ -74,7 +75,7 @@ function handleUpvote(name) {
};
xhr.onerror = function () {
alert("Network Error");
alert(getMessage("networkError", "Network error. Please try again."));
};
xhr.send(JSON.stringify({group: RESOURCE_GROUP, plural: RESOURCE_PLURAL, name: name}));