Skip to content
Snippets Groups Projects
Verified Commit 3700581a authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '759-finalise-vuetify-app-as-spa' of...

Merge branch '759-finalise-vuetify-app-as-spa' of edugit.org:AlekSIS/official/AlekSIS-Core into 759-finalise-vuetify-app-as-spa
parents 6781a772 8b6bd8fe
No related branches found
No related tags found
2 merge requests!1123Resolve "Finalise Vuetify app as SPA",!1066Translations update from Weblate
Pipeline #106991 canceled
......@@ -13,7 +13,8 @@ const django_values = JSON.parse(fs.readFileSync("./django-vite-values.json"));
function generateAppImporter(appDetails) {
let code = "let appObjects = {};\n";
let code += "let appMessages = {};\n";
code += "let appMessages = {};\n";
for (const [appPackage, appMeta] of Object.entries(appDetails)) {
let indexPath = appMeta.assetDir + "/index.js";
let importAppName =
......@@ -22,6 +23,7 @@ function generateAppImporter(appDetails) {
code += `console.debug("Importing AlekSIS app entrypoint for ${appPackage}");\n`;
code += `import ${importAppName} from '${indexPath}';\n`;
code += `appObjects["${appMeta.name}"] = ${importAppName};\n`;
if appMeta.hasMessages {
let messagesPath = appMeta.assetDir + "/messages/";
code += `appMessages["${appMeta.name}"] = {}`;
......@@ -36,18 +38,7 @@ function generateAppImporter(appDetails) {
}
code += "export default appObjects;\n";
code += "export { appObjects, appMessages };\n";
return code;
}
function generateAppDetails(appDetails) {
let code = "let messages = {};\n";
for (const [appPackage, appMeta] of Object.entries(appDetails)) {
code += `messages["${appMeta.name}"] = JSON.parse('${JSON.stringify(
appMeta
)}');\n`;
}
code += "export default messages;\n";
return code;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment