diff --git a/README.md b/README.md deleted file mode 100644 index 6806108..0000000 --- a/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# legacy-script-engine-lua - -A plugin engine for running LLSE plugins on LeviLamina - -## Install - -```sh -lip install gitea.litebds.com/LiteLDev/legacy-script-engine-lua -``` - -## Usage - -1. Put LLSE plugins directly in `/path/to/bedrock_dedicated_server/plugins/`。 - -2. Run the server, then the plugins will be migrated to LeviLamina plugin manifest automatically. - -3. To load them, you need to restart the server. - -For more information, please refer to [the documentation](https://lse.liteldev.com). - -## Contributing - -If you have any questions, please open an issue to discuss it. - -PRs are welcome. - -## License - -GPL-3.0-only © LiteLDev diff --git a/legacy-script-engine-lua/baselib/BaseLib.js b/legacy-script-engine-lua/baselib/BaseLib.js new file mode 100644 index 0000000..a7dbc56 --- /dev/null +++ b/legacy-script-engine-lua/baselib/BaseLib.js @@ -0,0 +1,417 @@ +/* +cjs.js begin, see + +Copyright 2021 callstackexceed + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ +(function () { + if (typeof require != "undefined") { + log("require already exist"); + } + + let coreModules = new Map([]); + + let basePath = "plugins/"; + + let utilPath = { + normalize(path) { + let dirs = path.split("/"); + if (dirs[dirs.length - 1] === "") { + dirs.pop(); + } + let newDirs = dirs.reduce((newDirs, dir) => { + switch (dir) { + case ".": + /* no-op */ + break; + case "..": + if ( + newDirs.length === 0 || + newDirs[newDirs.length - 1] == ".." + ) { + newDirs.push(".."); + } else { + newDirs.pop(); + } + break; + default: + newDirs.push(dir); + break; + } + return newDirs; + }, []); + return newDirs.join("/"); + }, + join(...paths) { + let newPath = paths + .map((path) => { + return utilPath.normalize(path); + }) + .join("/"); + return utilPath.normalize(newPath); + }, + dirname(path) { + return path.replace(/\/[^\/]+$/, ""); + }, + split(path) { + return path.split("/"); + }, + }; + + let currentModule = createModule("", null); + + currentModule.path = basePath; + + /* + ** See https://nodejs.org/api/modules.html#modules_all_together + */ + + function resolveID(id) { + let currentPath = (currentModule && currentModule.path) || basePath; + let requestPaths = []; + let result; + if (coreModules.has(id)) { + return coreModules.get(id); + } + if (id.startsWith("/")) { + result = loadAsFile(id); + if (result != undefined) { + return result; + } + result = loadAsDirectory(id); + if (result != undefined) { + return result; + } + throw new Error(`${id} not found`); + } + if (id.startsWith("./") || id.startsWith("../")) { + result = loadAsFile(utilPath.join(currentPath, id)); + if (result != undefined) { + return result; + } + result = loadAsDirectory(utilPath.join(currentPath, id)); + if (result != undefined) { + return result; + } + throw new Error(`${utilPath.join(currentPath, id)} not found`); + } + if (id.startsWith("#")) { + result = loadPackageImports(id, currentPath); + if (result != undefined) { + return result; + } + } + result = loadPackageSelf(id, currentPath); + if (result != undefined) { + return result; + } + result = loadNodeModules(id, currentPath); + if (result != undefined) { + return result; + } + throw new Error( + `${id} not found, required by ${currentModule && currentModule.id}` + ); + + function tryFile(path) { + if (path.startsWith("../")) { + throw new Error("cannot require file out of root dir"); + } + path = path.replace(/^\//, ""); + let cjsSelf = "plugins/cjs.js"; + if (path === cjsSelf) { + throw new Error("cjs.js is trying to load itself"); + } + requestPaths.push(path); + let content = file.readFrom(path); + if (content == undefined) { + return undefined; + } + if (path.endsWith(".mjs")) { + throw new Error(`ERROR: cannot require a ESM file ${path}`); + } + if (path.endsWith(".json")) { + throw new Error(`ERROR: cannot require a JSON file ${path}`); + } + return { + path, + content, + requestPaths, + }; + } + + function loadAsFile(id) { + let result; + result = tryFile(id); + if (result != undefined) { + return result; + } + result = tryFile(`${id}.js`); + if (result != undefined) { + return result; + } + result = tryFile(`${id}.cjs`); + if (result != undefined) { + return result; + } + result = tryFile(`${id}.json`); + if (result != undefined) { + throw new Error(`cannot require a JSON file ${id}.mjs`); + } + result = tryFile(`${id}.mjs`); + if (result != undefined) { + throw new Error(`cannot require a ESM file ${id}.mjs`); + } + return undefined; + } + + function loadIndex(id) { + let result; + result = tryFile(utilPath.join(id, "index.js")); + if (result != undefined) { + return result; + } + result = tryFile(utilPath.join(id, "index.cjs")); + if (result != undefined) { + return result; + } + result = tryFile(utilPath.join(id, "index.json")); + if (result != undefined) { + throw new Error(`cannot require a JSON file ${id}.mjs`); + } + result = tryFile(utilPath.join(id, "index.mjs")); + if (result != undefined) { + throw new Error(`cannot require a ESM file ${id}.mjs`); + } + return undefined; + } + + function loadAsDirectory(id) { + let package = file.readFrom(utilPath.join(id, "package.json")); + if (package != undefined) { + let result; + package = JSON.parse(package); + if (!package || !package.main) { + return loadIndex(id); + } + let m = utilPath.join(id, package.main); + result = loadAsFile(m); + if (result != undefined) { + return result; + } + result = loadIndex(m); + if (result != undefined) { + return result; + } + throw new Error(`${m} not found`); + } + return loadIndex(id); + } + + function loadNodeModules(id, start) { + let dirs = node_modules_paths(start); + let result; + for (let dir of dirs) { + result = loadPackagExports(utilPath.join(dir, id)); + if (result != undefined) { + return result; + } + result = loadAsFile(utilPath.join(dir, id)); + if (result != undefined) { + return result; + } + result = loadAsDirectory(utilPath.join(dir, id)); + if (result != undefined) { + return result; + } + } + return undefined; + } + + function node_modules_paths(start) { + let parts = utilPath.split(start); + let dirs = [""]; + for (let i = parts.length; i >= 0; --i) { + if (parts[i - 1] === "node_modules") { + continue; + } + let dir = utilPath.join(...parts.slice(0, i), "node_modules"); + dirs.push(dir); + } + return dirs; + } + + function loadPackageImports(id) { + //TODO + let package = file.readFrom(utilPath.join(id, "package.json")); + if (package == undefined) { + return undefined; + } + package = JSON.parse(package); + if (package && package.imports) { + throw new Error(`cannot resolve imports field of ${id}`); + } + return undefined; + } + + function loadPackagExports(id) { + //TODO + let package = file.readFrom(utilPath.join(id, "package.json")); + if (package == undefined) { + return undefined; + } + package = JSON.parse(package); + if (package && package.exports) { + throw new Error(`cannot resolve exports field of ${id}`); + } + return undefined; + } + + function loadPackageSelf(id) { + return undefined; + } + } + + function createModule(id, parent) { + return { + children: [], + parent, + exports: {}, + filename: id, + id, + isPreloading: false, + loaded: false, + path: utilPath.dirname(id), + paths: undefined, + require: cjsRequire, + }; + } + + function cjsRequire(id) { + let parrentModule = currentModule; + let { path, content } = resolveID(id); + if (cjsRequire.cache[path] !== undefined) { + let thisModule = cjsRequire.cache[path]; + if (parrentModule && !parrentModule.children.includes(thisModule)) { + parrentModule.children.push(thisModule); + } + if (thisModule.loaded === false) { + //TODO + } + return thisModule.exports; + } + let moduleObject = createModule(path, parrentModule); + currentModule = moduleObject; + cjsRequire.cache[path] = moduleObject; + let code; + try { + code = new Function( + "exports", + "require", + "module", + "__filename", + "__dirname", + content + ); + } catch (e) { + e.stack = e.stack.replace( + "at new Function ()", + `at Object. (${moduleObject.id})` + ); + throw e; + } + Object.defineProperty(code, "name", { + value: `@file"${moduleObject.id}"`, + }); + try { + code.apply(moduleObject, [ + moduleObject.exports, + cjsRequire, + moduleObject, + path, + utilPath.dirname(path), + ]); + } catch (e) { + e.stack = e.stack + .replace( + /at Object\.@file"([^"]*)" \(eval at cjsRequire \(:\d+:\d+\), :(\d+):(\d+)\)/g, + (match, fileName, line, col) => { + return `at Object. (${fileName}:${line - 2 + }:${col})`; + } + ) + .replace( + /at (\w*) \(eval at cjsRequire \(:\d+:\d+\), :(\d+):(\d+)\)/g, + (match, functionName, line, col) => { + return `at ${functionName} (${line - 2}:${col})`; + } + ) + .replace(/ at cjsRequire \(:\d+:\d+\)\n/g, ""); + throw e; + } + currentModule.loaded = true; + currentModule = parrentModule; + return moduleObject.exports; + } + + cjsRequire.main = currentModule; + + cjsRequire.cache = { + "": currentModule, + }; + + cjsRequire.resolve = function resolve(request) { + let obj = resolveID(request); + return obj && obj.path; + }; + + cjsRequire.resolve.paths = function paths(request) { + let obj = resolveID(request); + return obj && obj.requestPaths; + }; + + globalThis.require = cjsRequire; +})(); + +/* +cjs.js end +*/ + +globalThis.exports = {}; +globalThis.module = { exports: {} }; + +/* +For Compatibility +*/ +globalThis.file = File; +globalThis.lxl = ll; +DirectionAngle.prototype.valueOf = DirectionAngle.prototype.toFacing; +globalThis.LXL_Block = LLSE_Block; +globalThis.LXL_BlockEntity = LLSE_BlockEntity; +globalThis.LXL_Container = LLSE_Container; +globalThis.LXL_Device = LLSE_Device; +globalThis.LXL_Entity = LLSE_Entity; +globalThis.LXL_SimpleForm = LLSE_SimpleForm; +globalThis.LXL_CustomForm = LLSE_CustomForm; +globalThis.LXL_Item = LLSE_Item; +globalThis.LXL_Player = LLSE_Player; +globalThis.LXL_Objective = LLSE_Objective; +ll.export = ll.exports; +ll.import = ll.imports; diff --git a/legacy-script-engine-lua/baselib/BaseLib.lua b/legacy-script-engine-lua/baselib/BaseLib.lua new file mode 100644 index 0000000..816c47e --- /dev/null +++ b/legacy-script-engine-lua/baselib/BaseLib.lua @@ -0,0 +1,24 @@ +-- --------------------- +-- For require +-- --------------------- +package.path = "plugins/lib/?.lua;" .. package.path + + +-- --------------------- +-- For Compatibility +-- --------------------- +file = File +lxl = ll; +-- DirectionAngle.valueOf = DirectionAngle.toFacing +LXL_Block = LLSE_Block +LXL_BlockEntity = LLSE_BlockEntity +LXL_Container = LLSE_Container +LXL_Device = LLSE_Device +LXL_Entity = LLSE_Entity +LXL_SimpleForm = LLSE_SimpleForm +LXL_CustomForm = LLSE_CustomForm +LXL_Item = LLSE_Item +LXL_Player = LLSE_Player +LXL_Objective = LLSE_Objective +ll.export = ll.exports +ll.import = ll.imports diff --git a/legacy-script-engine-lua/baselib/BaseLib.py b/legacy-script-engine-lua/baselib/BaseLib.py new file mode 100644 index 0000000..4421d1f --- /dev/null +++ b/legacy-script-engine-lua/baselib/BaseLib.py @@ -0,0 +1,20 @@ +def _llse_python_base_lib_handle(event): + def wrapper(func): + __builtins__.mc.listen(event, func) + return func + + return wrapper + + +def _llse_python_base_lib_command_handle(self, func=None): + def wrapper(func): + self.setCallback(func) + return func + + if func: + return wrapper(func) + return wrapper + + +setattr(__builtins__, "handle", _llse_python_base_lib_handle) +setattr(__builtins__.LLSE_Command, "handle", _llse_python_base_lib_command_handle) diff --git a/legacy-script-engine-lua/lang/de.json b/legacy-script-engine-lua/lang/de.json new file mode 100644 index 0000000..7b07881 --- /dev/null +++ b/legacy-script-engine-lua/lang/de.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Overworld", + "1": "Nederland", + "2": "Ende", + "unknown": "Sonstige Dimension" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll nicht gefunden, ScriptEngine Economy System funktioniert nicht" + } + }, + "api": { + "ll": { + "require": { + "success": " - Plugin muss geladen werden. geladen: ", + "fail": " - Plugin erfordert Laden fehlgeschlagen", + "download": { + "success": " - Erfolgreich heruntergeladen erforderlich! Pfad: ", + "fail": " - Download Plugin erforderlich fehlgeschlagen! Code: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSON-Parse-Fehler" + } + }, + "loader": { + "loadDepends": { + "success": "Abhängigkeit {} geladen.", + "fail": "Fehler beim Laden der Abhängigkeit {}" + }, + "loadMain": { + "start": "Lade {type} Plugins...", + "done": "{count} {type} Plugin(s) geladen.", + "nodejs": { + "installPack": { + "fail": "Installation des Plugin-Pakets {}, bitte überprüfe deine package.json-Datei!", + "start": "Node.js Plugin Pack \"{path}\" gefunden! Versuche es zu installieren..." + }, + "ignored": "Keine package.json-Datei im Verzeichnis {path}gefunden, ignoriert." + }, + "loadedPlugin": "{type} Plugin <{name}> geladen.", + "installPluginPack": { + "done": "{count} {type} Plugin-Paket(e) installiert." + }, + "python": { + "ignored": "Keine pyproject.toml Datei im Verzeichnis {path}gefunden, ignoriert.", + "installPack": { + "start": "Python Plugin Pack \"{path}\"gefunden! Versuche zu installieren...", + "fail": "Fehler beim Installieren des Plugin-Pakets {}, bitte überprüfen Sie die Quelldateien!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm erfolgreich abgeschlossen.", + "start": "Führe \"npm install\" für Plugin {name} aus ...", + "fail": "Fehler aufgetreten. Exit-Code: {code}" + }, + "register": { + "fail": "Fehler beim Helfen des Plugins {name} registriert werden!" + } + }, + "python": { + "executePipInstall": { + "start": "Führe \"pip install\" für Plugin {name} aus ...", + "success": "Pip erfolgreich abgeschlossen.", + "fail": "Fehler aufgetreten. Exit-Code: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin, das von {0} benötigt wird, wurde nicht gefunden.", + "success": "Plugin mit dem Namen {0} , das von {1} benötigt wird.", + "network": { + "fail": "Fehler beim Herunterladen des Plugins, das von {0}benötigt wird, http-Code: {1}" + }, + "download": { + "success": "Plugin herunterladen, das von {0} benötigt wird, Pfad {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/en.json b/legacy-script-engine-lua/lang/en.json new file mode 100644 index 0000000..aa586b5 --- /dev/null +++ b/legacy-script-engine-lua/lang/en.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Overworld", + "1": "Nether", + "2": "End", + "unknown": "Other dimension" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll not found, ScriptEngine Economy System won't work" + } + }, + "api": { + "ll": { + "require": { + "success": " - Plugin require loaded successfully. Loaded: ", + "fail": " - Plugin require load failed", + "download": { + "success": " - Successfully downloaded require! Path: ", + "fail": " - Download plugin require failed! Code: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSON parse error" + } + }, + "loader": { + "loadDepends": { + "success": "Dependence {} loaded.", + "fail": "Fail to load dependence {}" + }, + "loadMain": { + "start": "Loading {type} plugins...", + "done": "{count} {type} plugin(s) loaded.", + "nodejs": { + "installPack": { + "fail": "Failed to install plugin pack {}, please check your package.json file!", + "start": "Found Node.js plugin pack \"{path}\"! Try installing..." + }, + "ignored": "No package.json file found in directory {path}, ignored." + }, + "loadedPlugin": "{type} plugin <{name}> loaded.", + "installPluginPack": { + "done": "{count} {type} plugin pack(s) installed." + }, + "python": { + "ignored": "No pyproject.toml file found in directory {path}, ignored.", + "installPack": { + "start": "Found Python plugin pack \"{path}\"! Try installing...", + "fail": "Failed to install plugin pack {}, please check the source files!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm finished successfully.", + "start": "Executing \"npm install\" for plugin {name}...", + "fail": "Error occurred. Exit code: {code}" + }, + "register": { + "fail": "Fail to help plugin {name} get registered!" + } + }, + "python": { + "executePipInstall": { + "start": "Executing \"pip install\" for plugin {name}...", + "success": "Pip finished successfully.", + "fail": "Error occurred. Exit code: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin which is required by {0} not found.", + "success": "Plugin named {0} which is required by {1} loaded.", + "network": { + "fail": "Error occurred when download plugin which is required by {0}, http code: {1}" + }, + "download": { + "success": "Download plugin which is required by {0} successfully, path {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/fr.json b/legacy-script-engine-lua/lang/fr.json new file mode 100644 index 0000000..342ee51 --- /dev/null +++ b/legacy-script-engine-lua/lang/fr.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Surface", + "1": "Le Nether", + "2": "L'Ender", + "unknown": "Autre dimension" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll introuvable,le système d'économie ScriptEngine ne fonctionnera pas" + } + }, + "api": { + "ll": { + "require": { + "success": " - Plugin chargé avec succès par require. Chargé : ", + "fail": " - Échec du chargement du plugin par require", + "download": { + "success": "- Require téléchargé avec succès ! Chemin d'accès :", + "fail": "- Échec du téléchargement de plugin par require ! Code :" + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "Erreur JSON parse" + } + }, + "loader": { + "loadDepends": { + "success": "Dépendance {} chargée.", + "fail": "Échec de chargement de la dépendance {}" + }, + "loadMain": { + "start": "Chargement des plugins {type}...", + "done": "{count} plugin(s) {type} chargé(s).", + "nodejs": { + "installPack": { + "fail": "Impossible d'installer le plugin pack {}, veuillez vérifier votre fichier package.json !", + "start": "Pack de plugin Node.js «{path}» trouvé ! Essayez d'installer..." + }, + "ignored": "Aucun fichier package.json trouvé dans le répertoire {path}, ignoré." + }, + "loadedPlugin": "Plugin {type} <{name}> chargé.", + "installPluginPack": { + "done": "{count} pack(s) de plugins {type} chargé(s)." + }, + "python": { + "ignored": "Aucun fichier pyproject.toml trouvé dans le répertoire {path}, ignoré.", + "installPack": { + "start": "Trouvé le pack de plugin Python «{path}» ! Essayez d'installer...", + "fail": "Impossible d'installer le plugin pack {}, veuillez vérifier les fichiers sources !" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "NPM fini avec succès.", + "start": "Exécution de \"npm install\" pour le plugin {name}...", + "fail": "Une erreur est survenue. Code de sortie : {code}" + }, + "register": { + "fail": "Échec de l'enregistrement du plugin {name} !" + } + }, + "python": { + "executePipInstall": { + "start": "Exécution de \"pip install\" pour le plugin {name}...", + "success": "Pip terminé avec succès.", + "fail": "Une erreur est survenue. Code de sortie : {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin requis par {0} introuvable.", + "success": "Plugin nommé {0} qui est requis par {1} chargé.", + "network": { + "fail": "Une erreur s'est produite lors du téléchargement du plugin qui est requis par {0}, code http : {1}" + }, + "download": { + "success": "Télécharger le plugin qui est requis par {0} avec succès, chemin {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/id.json b/legacy-script-engine-lua/lang/id.json new file mode 100644 index 0000000..aa93ca6 --- /dev/null +++ b/legacy-script-engine-lua/lang/id.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Dunia Awal", + "1": "Dunia Neraka", + "2": "Dunia Akhir", + "unknown": "Dimensi Lain" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll tidak ditemukan, Sistem Ekonomi ScriptEngine tidak akan berfungsi" + } + }, + "api": { + "ll": { + "require": { + "success": " - Plugin membutuhkan berhasil dimuat. Sarat: ", + "fail": " - Plugin membutuhkan beban gagal", + "download": { + "success": " - Berhasil diunduh membutuhkan! Jalur: ", + "fail": " - Persyaratan unduhan plugin gagal! Kode: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "Kesalahan Parsing API" + } + }, + "loader": { + "loadDepends": { + "success": "Ketergantungan {} telah di muat.", + "fail": "Gagak memuat ketergantungan {}" + }, + "loadMain": { + "start": "Memuat {type} plugin...", + "done": "{count} {type} plugin telah (s) dimuat.", + "nodejs": { + "installPack": { + "fail": "Gagal memasang paket plugin {}, mohon periksa terlebihdahulu file package.json Anda!", + "start": "Ditemukan paket plugin Node.js \"{path}\"! Mencoba instal..." + }, + "ignored": "Tidak ada file package.json yang ditemukan di direktori {path}, diabaikan." + }, + "loadedPlugin": "{type} plugin <{name}> telah dimuat.", + "installPluginPack": { + "done": "{type} {count} paket plugin terpasang." + }, + "python": { + "ignored": "Tidak ada file pyproject.toml yang ditemukan di direktori {path}, diabaikan.", + "installPack": { + "start": "Menemukan paket plugin Python \"{path}\"! Sedang mencoba install...", + "fail": "Gagal menginstal paket plugin {}, silakan periksa sumber filenya!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm selesai dengan sukses.", + "start": "Menjalankan \"npm install\" untuk plugin {name}...", + "fail": "Terjadi kesalahan. Kode keluar: {code}" + }, + "register": { + "fail": "Gagal membantu plugin {name} terdaftar!" + } + }, + "python": { + "executePipInstall": { + "start": "Menjalankan perintah \"pip install\" untuk plugin {name}...", + "success": "Pip selesai secara sukses.", + "fail": "Sepertinya ada kesalahan. Kode Exit: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin yang diperlukan oleh {0} tidak ditemukan.", + "success": "Plugin bernama {0} yang diperlukan oleh {1} dimuat.", + "network": { + "fail": "Terjadi kesalahan saat mengunduh plugin yang diperlukan oleh {0}, kode http: {1}" + }, + "download": { + "success": "Unduh plugin yang diperlukan oleh {0} berhasil, jalur {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/it.json b/legacy-script-engine-lua/lang/it.json new file mode 100644 index 0000000..32239a0 --- /dev/null +++ b/legacy-script-engine-lua/lang/it.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Overworld", + "1": "Nether", + "2": "Fine", + "unknown": "Dimensione sconosciuta" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll non è stato trovato, il sistema di economia dello ScriptEngine non funzionerà" + } + }, + "api": { + "ll": { + "require": { + "success": " - Requisiti necessari del plugin caricati con successo. Caricato: ", + "fail": " - Caricamento dei requisiti necessari del plugin fallito", + "download": { + "success": " - Requisiti necessari scaricati con successo! Percorso: ", + "fail": " - Download dei requisiti necessari del plugin fallito! Codice: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "Errore di analisi JSON" + } + }, + "loader": { + "loadDepends": { + "success": "Libreria {} caricata.", + "fail": "Impossibile caricare la libreria {}" + }, + "loadMain": { + "start": "Caricamento dei plugin {type} in corso...", + "done": "{count} plugin {type} caricati.", + "nodejs": { + "installPack": { + "fail": "Impossibile installare il pacchetto plugin {}, si prega di controllare il file package.json!", + "start": "Trovato pacchetto plugin Node.js \"{path}\"! Installazione in corso..." + }, + "ignored": "Nessun file package.json trovato nella cartella {path}, ignorato." + }, + "loadedPlugin": "Plugin {type} <{name}> caricato.", + "installPluginPack": { + "done": "{count} pacchetti plugin {type} installati." + }, + "python": { + "ignored": "Nessun file pyproject.toml trovato nella directory {path}, ignorato.", + "installPack": { + "start": "Trovato pacchetto plugin Python\"{path}\"! Prova l'installazione...", + "fail": "Impossibile installare il pacchetto plugin {}, si prega di controllare i file sorgente!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Esecuzione di \"npm install\" completata con successo.", + "start": "Esecuzione di \"npm install\" per il plugin {name}...", + "fail": "Si è verificato un errore. Codice di uscita: {code}" + }, + "register": { + "fail": "Impossibile aiutare il plugin {name} a registrarsi!" + } + }, + "python": { + "executePipInstall": { + "start": "Esecuzione di \"pip install\" per il plugin {name}...", + "success": "Pip finito con successo.", + "fail": "Si è verificato un errore. Codice di uscita: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin richiesto da {0} non trovato.", + "success": "Plugin chiamato {0} che è richiesto da {1} caricato.", + "network": { + "fail": "Errore durante il download del plugin richiesto da {0}, codice http: {1}" + }, + "download": { + "success": "Plugin di download richiesto da {0} con successo, percorso {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/ja.json b/legacy-script-engine-lua/lang/ja.json new file mode 100644 index 0000000..ef5be1b --- /dev/null +++ b/legacy-script-engine-lua/lang/ja.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "オーバーワールド", + "1": "ネザー", + "2": "エンド", + "unknown": "その他のサイズ" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll が見つかりません。ScriptEngine Economy Systemは動作しません" + } + }, + "api": { + "ll": { + "require": { + "success": " - プラグインが正常にロードされました。ロード: ", + "fail": " - プラグインの読み込みに失敗しました", + "download": { + "success": " - 正常なダウンロードが必要です。パス: ", + "fail": " - プラグインのダウンロードに失敗しました。 コード: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSONの構文エラー" + } + }, + "loader": { + "loadDepends": { + "success": "依存関係 {} が読み込まれました。", + "fail": "依存関係の読み込みに失敗しました {}" + }, + "loadMain": { + "start": "{type} プラグインを読み込み中...", + "done": "{count} {type} プラグインが読み込まれました。", + "nodejs": { + "installPack": { + "fail": "プラグインパック {} のインストールに失敗しました。package.json ファイルを確認してください。", + "start": "Node.js プラグインパック \"{path}\" が見つかりました。インストールを試してください..." + }, + "ignored": "ディレクトリ {path}にpackage.json ファイルが見つかりませんでした。無視しました。" + }, + "loadedPlugin": "{type} プラグイン <{name}> を読み込みました。", + "installPluginPack": { + "done": "{count} {type} プラグインパックがインストールされました。" + }, + "python": { + "ignored": "ディレクトリ {path}にpyproject.tomlファイルが見つかりませんでした。", + "installPack": { + "start": "Python プラグインパック \"{path}\" が見つかりました! インストールしてみてください...", + "fail": "プラグインパック{}のインストールに失敗しました。ソースファイルを確認してください!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npmは正常に終了しました。", + "start": "プラグイン {name} の \"npm install\" を実行しています...", + "fail": "エラーが発生しました。終了コード: {code}" + }, + "register": { + "fail": "プラグイン {name} の登録に失敗しました。" + } + }, + "python": { + "executePipInstall": { + "start": "プラグイン {name} の \"pip install\" を実行中 ...", + "success": "ピップは正常に終了しました。", + "fail": "エラーが発生しました。終了コード: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "{0} が必要としているプラグインが見つかりません", + "success": "{1} が必要とするプラグイン{0} がロードされました", + "network": { + "fail": "{0}で必要なプラグインのダウンロード時にエラーが発生しました。httpコード: {1}" + }, + "download": { + "success": "{0} が必要とするプラグインが{1} に正常にダウンロードされました。" + } + } + } +} diff --git a/legacy-script-engine-lua/lang/ko.json b/legacy-script-engine-lua/lang/ko.json new file mode 100644 index 0000000..d04fd43 --- /dev/null +++ b/legacy-script-engine-lua/lang/ko.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "오버월드", + "1": "네더", + "2": "엔더", + "unknown": "다른 월드" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLmoney.dll 이 발견되지 않았습니다. ScriptEngine의 Economy System이 동작하지 않습니다." + } + }, + "api": { + "ll": { + "require": { + "success": " - 요구되는 플러그인 로드에 성공했습니다. 로드됨: ", + "fail": " - 요구되는 플러그인을 로드하지 못했습니다. ", + "download": { + "success": " - 필요한 것들을 다운로드 했습니다! 경로: ", + "fail": " - 필요한 플러그인을 다운로드 하지 못했습니다! 코드: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSON 파싱 오류" + } + }, + "loader": { + "loadDepends": { + "success": "Dependence {} 가 로드됐습니다.", + "fail": "Dependence '{}' 로드에 실패했습니다." + }, + "loadMain": { + "start": "{type} 플러그인을 로드합니다...", + "done": "{count} 개의 {type} 플러그인을 로드합니다...", + "nodejs": { + "installPack": { + "fail": "플러그인 팩 {} 로드에 실패했습니다. package.json 파일을 확인해주세요!", + "start": "Node.js 플러그인 팩 \"{path}\"을 발견했습니다. 설치를 시도합니다..." + }, + "ignored": "경로 {path} 에서 package.json 파일을 찾지 못하여 무시합니다." + }, + "loadedPlugin": "{type} 타입 플러그인 <{name}> 를 로드했습니다.", + "installPluginPack": { + "done": "{count} 개의 {type} 플러그인 팩이 로드됐습니다." + }, + "python": { + "ignored": "{path} 경로에서 pyproject.toml 파일을 찾지 못하여 무시합니다", + "installPack": { + "start": "\"{path}\"에 있는 파이썬 플러그인팩을 찾았습니다! 설치를 시도합니다...", + "fail": "플러그인 팩 {} 을(를) 설치하는데 실패했습니다. 소스 파일을 확인해주세요!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm이 성공적으로 설치됐습니다.", + "start": "플러그인 {name} 에 대하여 \"npm install\" 명령어를 실행합니다.", + "fail": "에러 발생. 코드 종료: {code}" + }, + "register": { + "fail": "플러그인 {name} 을 등록하지 못했습니다." + } + }, + "python": { + "executePipInstall": { + "start": "{name} 플러그인에 대하여 pip install 명령어를 실행중입니다", + "success": "pip가 성공적으로 실행됐습니다", + "fail": "에러가 발생했습니다. 종료 코드: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin which is required by {0} not found.", + "success": "{0} 에 필요한 {1} 플러그인이 로드되었습니다", + "network": { + "fail": "{0} 에서 필요한 플러그인 다운로드를 실패했습니다. http 코드: {1}" + }, + "download": { + "success": "{0} 에 필요한 플러그인 을 성공적으로 다운로드했습니다. 경로:{1}" + } + } + } +} diff --git a/legacy-script-engine-lua/lang/pt_BR.json b/legacy-script-engine-lua/lang/pt_BR.json new file mode 100644 index 0000000..196cbec --- /dev/null +++ b/legacy-script-engine-lua/lang/pt_BR.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Extrema", + "1": "Nether", + "2": "Término", + "unknown": "Outra dimensão" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll não encontrado, o Sistema de Economia de ScriptEngine não funcionará" + } + }, + "api": { + "ll": { + "require": { + "success": " - Plugin requer carregado com sucesso. Carregado: ", + "fail": " - O plugin requer carregamento falhou", + "download": { + "success": " - Baixado com sucesso! Caminho: ", + "fail": " - Falha no download do plugin! Código: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "Erro de análise JSON" + } + }, + "loader": { + "loadDepends": { + "success": "Dependência {} carregada.", + "fail": "Falha ao carregar dependência {}" + }, + "loadMain": { + "start": "Carregando plugins {type}...", + "done": "Plugin {count} {type} carregado.", + "nodejs": { + "installPack": { + "fail": "Falha ao instalar o pacote de plugins {}, por favor, verifique o seu arquivo package.json!", + "start": "Pacote de plugin Node.js encontrado \"{path}\"! Tente instalar..." + }, + "ignored": "Nenhum arquivo package.json encontrado no diretório {path}, ignorado." + }, + "loadedPlugin": "Plugin {type} <{name}> carregado.", + "installPluginPack": { + "done": "{count} Pacote {type} plugin instalado(s)." + }, + "python": { + "ignored": "Nenhum arquivo pyproject.toml encontrado no diretório {path}, foi ignorado.", + "installPack": { + "start": "Found Python plugin pack \"{path}\"! Try installing...", + "fail": "Falha ao instalar plugin pacote {}, verifique os arquivos de origem!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm concluído com sucesso.", + "start": "Executando \"npm install\" para o plugin {name}...", + "fail": "Ocorreu um erro. Sair do código: {code}" + }, + "register": { + "fail": "Falha ao ajudar o plugin {name} a ser registrado!" + } + }, + "python": { + "executePipInstall": { + "start": "Executando \"pip install\" para o plugin {name}...", + "success": "Pip concluído com sucesso.", + "fail": "Ocorreu um erro. Sair do código: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin que é necessário por {0} não encontrado.", + "success": "Plugin chamado {0} que é necessário para {1} carregado.", + "network": { + "fail": "Ocorreu um erro ao baixar o plugin que é necessário para {0}, código http: {1}" + }, + "download": { + "success": "Plugin de download necessário para {0} com sucesso, caminho {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/ru.json b/legacy-script-engine-lua/lang/ru.json new file mode 100644 index 0000000..575a1b1 --- /dev/null +++ b/legacy-script-engine-lua/lang/ru.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Верхний мир", + "1": "Нижний мир", + "2": "Край", + "unknown": "Другое измерение" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll не найден, поэтому система экономики не будет работать на скриптовых языках" + } + }, + "api": { + "ll": { + "require": { + "success": " - Успешная загрузка требуемого плагина. Загружен: ", + "fail": " - Не удалось загрузить зависимость для плагина", + "download": { + "success": " - Требуется успешная загрузка! Путь: ", + "fail": " - Не удалась загрузка требуемого плагина! Код ошибки: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "Ошибка при чтении JSON файла" + } + }, + "loader": { + "loadDepends": { + "success": "Зависимость {} загружена.", + "fail": "Не удалось загрузить зависимость {}" + }, + "loadMain": { + "start": "Загрузка {type} плагинов...", + "done": "{count} {type} плагин(-ов) загружен(-ы).", + "nodejs": { + "installPack": { + "fail": "Не удалось установить набор плагинов {}, пожалуйста, проверьте файл package.json!", + "start": "Найден набор Node.js плагинов \"{path}\"! Пробуем установить..." + }, + "ignored": "В директории {path} не найден файл package.json, проигнорируем." + }, + "loadedPlugin": "{type} плагин <{name}> loaded.", + "installPluginPack": { + "done": "{count} набор(-ов) {type} плагинов установлены." + }, + "python": { + "ignored": "Файл pyproject.toml не найден в {path}, игнорирую.", + "installPack": { + "start": "Найден Python плагин \"{path}\"! Пробуем установить...", + "fail": "Не удалось установить Python-плагин {}, пожалуйста, проверьте исходные файлы!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "NPM успешно завершил свою работу.", + "start": "Запускаю команду \"npm install\" для плагина {name}...", + "fail": "Произошла ошибка при выполнении \"npm install\". Код возврата: {code}" + }, + "register": { + "fail": "Не удалось помочь плагину {name} быть зарегистрированным!" + } + }, + "python": { + "executePipInstall": { + "start": "Выполняю \"pip install\" для плагина {name}...", + "success": "Pip успешно выполнено.", + "fail": "Произошла ошибка. Код завершения: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Плагин, необходимый для {0}, не найден.", + "success": "Плагин {0} необходимый для {1} загружен.", + "network": { + "fail": "Произошла ошибка при скачивании плагина для {0}, http-код: {1}" + }, + "download": { + "success": "Завершено скачивание плагина для {0}, в директорию {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/th.json b/legacy-script-engine-lua/lang/th.json new file mode 100644 index 0000000..afb04b2 --- /dev/null +++ b/legacy-script-engine-lua/lang/th.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "โลกปกติ", + "1": "เนเธอร์", + "2": "ดิเอนด์", + "unknown": "มิติอื่นๆ" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "ไม่พบ LLMoney.dll ของระบบ ScriptEngine Economy จะไม่ทำงาน" + } + }, + "api": { + "ll": { + "require": { + "success": " - ปลั๊กอินที่ต้องการโหลดสำเร็จแล้ว โหลด: ", + "fail": " - ปลั๊กอินที่ต้องการโหลดไม่สำเร็จ", + "download": { + "success": " - ไฟล์ที่ต้องการดาวน์โหลดสำเร็จ ตำแหน่ง: ", + "fail": " - ดาวน์โหลดปลั๊กอินที่ต้องการไม่สำเร็จ! รหัส: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "ข้อผิดพลาดในการแยกวิเคราะห์ Json" + } + }, + "loader": { + "loadDepends": { + "success": "ส่วนเสริม {} โหลดแล้ว.", + "fail": "ไม่สามารถโหลดส่วนเสริม {}" + }, + "loadMain": { + "start": "กำลังโหลดปลั๊กอิน {type}...", + "done": "{count} {type} ปลั๊กอินโหลดแล้ว", + "nodejs": { + "installPack": { + "fail": "ไม่สามารถติดตั้งปลั๊กอินแพ็ค {}, โปรดเช็คไฟล์ package.json ของคุณ!", + "start": "พบแพ็คปลั๊กอิน Node.js \"{path}\"! กำลังติดตั้ง..." + }, + "ignored": "ไม่พบไฟล์ package.json ในตำแหน่ง {path}" + }, + "loadedPlugin": "ปลั๊กอิน {type} <{name}> โหลดแล้ว", + "installPluginPack": { + "done": "{count} {type} ปลั๊กอินแพ็คติดตั้งแล้ว" + }, + "python": { + "ignored": "No pyproject.toml file found in directory {path}, ignored.", + "installPack": { + "start": "Found Python plugin pack \"{path}\"! Try installing...", + "fail": "Failed to install plugin pack {}, please check the source files!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm เสร็จเรียบร้อยแล้ว", + "start": "ดำเนินการ \"npm install\" สำหรับปลั๊กอิน {name}...", + "fail": "เกิดข้อผิดพลาด โค้ด: {code}" + }, + "register": { + "fail": "ไม่สามารถลงทะเบียนปลั๊กอิน {name} ได้!" + } + }, + "python": { + "executePipInstall": { + "start": "Executing \"pip install\" for plugin {name}...", + "success": "Pip finished successfully.", + "fail": "Error occurred. Exit code: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Plugin which is required by {0} not found.", + "success": "Plugin named {0} which is required by {1} loaded.", + "network": { + "fail": "Error occurred when download plugin which is required by {0}, http code: {1}" + }, + "download": { + "success": "Download plugin which is required by {0} successfully, path {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/tr.json b/legacy-script-engine-lua/lang/tr.json new file mode 100644 index 0000000..d7272c0 --- /dev/null +++ b/legacy-script-engine-lua/lang/tr.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Overworld", + "1": "Nether", + "2": "End", + "unknown": "Diğer boyut" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll bulunamadı, ScriptEngine Ekonomi Sistemi çalışamayacak" + } + }, + "api": { + "ll": { + "require": { + "success": " - Eklenti gereksinimi başarıyla yüklendi. Yüklendi: ", + "fail": " - Eklenti gereksinim yüklemesi başarısız oldu", + "download": { + "success": " - Gereksinim başarıyla indirildi! Yol: ", + "fail": " - Eklenti gereksinimini indirme başarısız oldu! Kod: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSON ayrıştırma hatası" + } + }, + "loader": { + "loadDepends": { + "success": "Bağımlılık {} yüklendi.", + "fail": "Bağımlılık yüklenemedi: {}" + }, + "loadMain": { + "start": "{type} eklentileri yükleniyor...", + "done": "{count} tane {type} eklenti(ler) yüklendi.", + "nodejs": { + "installPack": { + "fail": "Eklenti paketi {} yüklenemedi, lütfen package.json dosyanızı kontrol edin!", + "start": "Node.js eklenti paketi \"{path}\" bulundu! Yüklemeyi deneyin..." + }, + "ignored": "{path} dizininde package.json dosyası bulunamadı, yok sayıldı." + }, + "loadedPlugin": "{type} eklenti <{name}> yüklendi.", + "installPluginPack": { + "done": "{count} tane {type} eklenti paket(ler) indirildi." + }, + "python": { + "ignored": "pyproject.toml dosyası {path} dizininde bulunamadı, yoksayıldı.", + "installPack": { + "start": "Python eklenti paketi \"{path}\" bulundu! Yüklemeyi deneyin...", + "fail": "Eklenti paketi {} yüklenemedi, lütfen kaynak dosyaları kontrol edin!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm başarıyla tamamlandı.", + "start": "Eklenti {name} için \"npm install\" çalıştırılıyor...", + "fail": "Hata oluştu. Çıkış kodu: {code}" + }, + "register": { + "fail": "Eklenti {name} kaydedilmesine yardımcı olunamıyor!" + } + }, + "python": { + "executePipInstall": { + "start": "Eklenti, {name} için \"pip install\" çalıştırılıyor...", + "success": "Pip başarıyla tamamlandı.", + "fail": "Hata oluştu. Çıkış kodu: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "{0} için gerekli olan eklenti bulunamadı.", + "success": "{1} için gerekli olan {0} adlı eklenti yüklendi.", + "network": { + "fail": "{0} tarafından gerekli olan eklenti indirilirken hata oluştu, http kodu: {1}" + }, + "download": { + "success": "{0} tarafından gerekli olan eklenti başarıyla indirildi, yol {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/vi.json b/legacy-script-engine-lua/lang/vi.json new file mode 100644 index 0000000..c5f6698 --- /dev/null +++ b/legacy-script-engine-lua/lang/vi.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "Thế giới chính", + "1": "Địa ngục", + "2": "The End", + "unknown": "Không gian khác" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "Không tìm thấy LLMoney.dll, ScriptEngine Economy System sẽ không hoạt động" + } + }, + "api": { + "ll": { + "require": { + "success": " - Plugin được yêu cầu tải thành công. Tải thành công: ", + "fail": " - Plugin được yêu cầu tải không thành công", + "download": { + "success": " - Đã tải thành công yêu cầu! Đường dẫn: ", + "fail": " - Yêu cầu tải xuống plugin không thành công! Mã số: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "Lỗi phân tích cú pháp JSON" + } + }, + "loader": { + "loadDepends": { + "success": "Phụ thuộc {} đã được tải.", + "fail": "Không thể tải phụ thuộc {}" + }, + "loadMain": { + "start": "Đang tải {type} plugin...", + "done": "{count} {type} plugin đã được tải.", + "nodejs": { + "installPack": { + "fail": "Không thể cài đặt gói plugin {}, vui lòng kiểm tra tệp package.json của bạn!", + "start": "Đã tìm thấy gói plugin Node.js \"{path}\"! Hãy thử cài đặt..." + }, + "ignored": "Không tìm thấy tệp package.json trong thư mục {path}, đã bỏ qua." + }, + "loadedPlugin": "Đã tải {type} plugin <{name}>.", + "installPluginPack": { + "done": "Đã cài đặt gói plugin {count} {type}." + }, + "python": { + "ignored": "Không tìm thấy tệp pyproject.toml trong thư mục {path}, đã bỏ qua.", + "installPack": { + "start": "Đã tìm thấy gói plugin Python \"{path}\"! Đang thử cài đặt...", + "fail": "Không thể cài đặt gói plugin {}, vui lòng kiểm tra các tệp nguồn!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm kết thúc thành công.", + "start": "Đang thực thi \"npm install\" cho plugin {name}...", + "fail": "Xảy ra lỗi. Mã thoát: {code}" + }, + "register": { + "fail": "Không thể giúp plugin {name} được đăng ký!" + } + }, + "python": { + "executePipInstall": { + "start": "Đang thực thi \"pip install\" cho plugin {name}...", + "success": "Pip kết thúc thành công.", + "fail": "Xảy ra lỗi. Mã thoát: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "Không tìm thấy plugin cần thiết cho {0}.", + "success": "Plugin có tên {0} cần thiết cho {1} đã được tải.", + "network": { + "fail": "Đã xảy ra lỗi khi tải plugin cần thiết cho {0}, mã http: {1}" + }, + "download": { + "success": "Tải plugin cần thiết cho {0} thành công, đường dẫn {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/lang/zh_CN.json b/legacy-script-engine-lua/lang/zh_CN.json new file mode 100644 index 0000000..d440aef --- /dev/null +++ b/legacy-script-engine-lua/lang/zh_CN.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "主世界", + "1": "下界", + "2": "末地", + "unknown": "其他维度" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "未找到LLMoney.dll,脚本引擎经济系统将无法工作" + } + }, + "api": { + "ll": { + "require": { + "success": " - 插件依赖库加载成功。已加载:", + "fail": " - 插件依赖库加载失败", + "download": { + "success": " - 下载依赖库成功!路径:", + "fail": " - 插件依赖库下载失败!错误代码:" + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSON 解析错误" + } + }, + "loader": { + "loadDepends": { + "success": "依赖项 {} 已加载。", + "fail": "加载依赖项 {} 失败" + }, + "loadMain": { + "start": "加载 {type} 插件...", + "done": "{count} 个 {type} 插件已加载。", + "nodejs": { + "installPack": { + "fail": "安装插件包 {} 失败,请检查您的 package.json 文件!", + "start": "找到 Node.js 插件包 \"{path}\"!尝试安装..." + }, + "ignored": "在目录 {path} 中没有找到 package.json 文件,已忽略。" + }, + "loadedPlugin": "{type} 插件 <{name}> 已加载。", + "installPluginPack": { + "done": "{count} 个 {type} 插件包已安装。" + }, + "python": { + "ignored": "在目录 {path} 中没有找到 pyproject.toml 文件,已忽略。", + "installPack": { + "start": "找到 Python 插件包 \"{path}\"!尝试安装...", + "fail": "安装插件包 {} 失败,请检查插件源文件!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm 命令成功完成", + "start": "为插件 {name} 执行 \"npm install\"...", + "fail": "发生错误。退出代码: {code}" + }, + "register": { + "fail": "插件 {name} 注册失败!" + } + }, + "python": { + "executePipInstall": { + "start": "为插件 {name} 执行 \"pip install\"...", + "success": "Pip 命令成功完成", + "fail": "发生错误。退出代码: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "未找到被 {0} 依赖的插件", + "success": "被 {1} 依赖的插件 {0} 已加载", + "network": { + "fail": "下载插件 {0} 时发生错误,状态码: {1}" + }, + "download": { + "success": "{0} 依赖的插件下载成功,位于 {1}" + } + } + } +} diff --git a/legacy-script-engine-lua/lang/zh_TW.json b/legacy-script-engine-lua/lang/zh_TW.json new file mode 100644 index 0000000..54ad6e1 --- /dev/null +++ b/legacy-script-engine-lua/lang/zh_TW.json @@ -0,0 +1,91 @@ +{ + "base": { + "getDimName": { + "0": "主世界", + "1": "地獄", + "2": "終界", + "unknown": "其他維度" + } + }, + "llse": { + "init": { + "llMoney": { + "notFound": "LLMoney.dll 不存在,ScriptEngine 經濟系統將不起作用" + } + }, + "api": { + "ll": { + "require": { + "success": " - 插件依賴庫加載成功。已加載:", + "fail": " - 插件前置加載失敗", + "download": { + "success": " - 成功下載前置檔案! 檔案位置: ", + "fail": " - 插件前置下載失敗!錯誤代碼: " + } + } + } + }, + "apiHelp": { + "parseJson": { + "fail": "JSON解析錯誤" + } + }, + "loader": { + "loadDepends": { + "success": "依賴 {} 已載入", + "fail": "無法載入依賴 {}" + }, + "loadMain": { + "start": "載入 {type} 插件中...", + "done": "{count} 個 {type} 已成功載入。", + "nodejs": { + "installPack": { + "fail": "安裝插件 {} 失敗,請檢查您的 package.json 文件!", + "start": "發現 Node.js 插件包 \"{path}\"! 嘗試安裝中..." + }, + "ignored": "在目錄 {path} 中找不到 package.json 文件, 已忽略" + }, + "loadedPlugin": "{type} 插件 <{name}> 已加載。", + "installPluginPack": { + "done": "已安裝 {count} 個 {type} 插件包" + }, + "python": { + "ignored": "在目錄 {path} 中找不到 pyproject.toml 文件, 已忽略", + "installPack": { + "start": "找到 Python 插件包 \"{path}\"!嘗試安裝...", + "fail": "安裝插件 {} 失敗,請檢查插件源文件!" + } + } + }, + "nodejs": { + "executeNpmInstall": { + "success": "Npm 命令已成功完成", + "start": "正在為 {name} 插件執行 “npm install”...", + "fail": "發生錯誤. 退出代碼: {code}" + }, + "register": { + "fail": "無法讓插件 {name} 被註冊!" + } + }, + "python": { + "executePipInstall": { + "start": "正在為 {name} 插件執行 “pip install”...", + "success": "Pip 命令已成功完成", + "fail": "發生錯誤. 退出代碼: {code}" + } + } + } + }, + "llseapi": { + "require": { + "fail": "沒有找到插件依賴 {0}。", + "success": "Plugin named {0} which is required by {1} loaded.", + "network": { + "fail": "Error occurred when download plugin which is required by {0}, http code: {1}" + }, + "download": { + "success": "Download plugin which is required by {0} successfully, path {1}." + } + } + } +} diff --git a/legacy-script-engine-lua/legacy-script-engine-lua.dll b/legacy-script-engine-lua/legacy-script-engine-lua.dll new file mode 100644 index 0000000..bf1a56d Binary files /dev/null and b/legacy-script-engine-lua/legacy-script-engine-lua.dll differ diff --git a/legacy-script-engine-lua/manifest.json b/legacy-script-engine-lua/manifest.json new file mode 100644 index 0000000..f9836be --- /dev/null +++ b/legacy-script-engine-lua/manifest.json @@ -0,0 +1,19 @@ +{ + "name": "legacy-script-engine-lua", + "entry": "legacy-script-engine-lua.dll", + "type": "native", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "version": "0.7.12", + "dependencies": [ + { + "name": "LegacyMoney" + }, + { + "name": "LegacyParticleAPI" + }, + { + "name": "LegacyRemoteCall" + } + ] +} diff --git a/tooth.json b/tooth.json new file mode 100644 index 0000000..89f0c40 --- /dev/null +++ b/tooth.json @@ -0,0 +1,30 @@ +{ + "format_version": 2, + "tooth": "gitea.litebds.com/LiteLDev/legacy-script-engine-lua", + "version": "0.7.12", + "info": { + "name": "LegacyScriptEngine with Lua backend", + "description": "A plugin engine for running LLSE plugins on LeviLamina", + "author": "LiteLDev", + "tags": [ + "levilamina", + "plugin-engine" + ] + }, + "dependencies": { + "github.com/LiteLDev/LegacyRemoteCall": "0.7.x", + "github.com/LiteLDev/LegacyParticleAPI": "0.7.x", + "github.com/LiteLDev/LegacyMoney": "0.7.x" + }, + "prerequisites": { + "github.com/LiteLDev/LeviLamina": "0.12.x" + }, + "files": { + "place": [ + { + "src": "legacy-script-engine-lua/*", + "dest": "plugins/legacy-script-engine-lua/" + } + ] + } +}