mirror of
https://github.com/imputnet/cobalt.git
synced 2025-12-13 06:02:53 +00:00
25 lines
781 B
JavaScript
25 lines
781 B
JavaScript
import { replaceBase } from "../../localization/manager.js";
|
|
import loadJSON from "../sub/loadJSON.js";
|
|
|
|
let changelog = loadJSON('./src/modules/changelog/changelog.json')
|
|
|
|
export default function(string) {
|
|
try {
|
|
switch (string) {
|
|
case "title":
|
|
return replaceBase(changelog["current"]["title"]);
|
|
case "content":
|
|
return replaceBase(changelog["current"]["content"]);
|
|
case "history":
|
|
return changelog["history"].map((i) => {
|
|
return {
|
|
title: replaceBase(i["title"]),
|
|
content: replaceBase(i["content"])
|
|
}
|
|
});
|
|
}
|
|
} catch (e) {
|
|
return `!!CHANGELOG_${string}!!`
|
|
}
|
|
}
|