got rid of dash in file names
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
import { supportedLanguages, appName, repo } from "../config.js";
|
||||
import loadJson from "./load-json.js";
|
||||
import loadJson from "./loadJSON.js";
|
||||
|
||||
export default function(lang, cat, string, replacement) {
|
||||
if (!supportedLanguages.includes(lang)) {
|
||||
lang = 'en'
|
||||
}
|
||||
try {
|
||||
if (!supportedLanguages.includes(lang)) lang = 'en';
|
||||
let str = loadJson(`./src/i18n/${lang}/${cat}.json`);
|
||||
if (str && str[string]) {
|
||||
let s = str[string].replace(/\n/g, '<br/>').replace(/{appName}/g, appName).replace(/{repo}/g, repo)
|
||||
if (replacement) {
|
||||
s = s.replace(/{s}/g, replacement)
|
||||
}
|
||||
if (replacement) s = s.replace(/{s}/g, replacement);
|
||||
return s + ' '
|
||||
} else {
|
||||
return string
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createStream } from "../stream/manage.js";
|
||||
import { execSync } from "child_process";
|
||||
|
||||
export function apiJSON(type, obj) {
|
||||
try {
|
||||
Reference in New Issue
Block a user