migrate to "export default"
also, set no-use-before-define in linter
This commit is contained in:
+7
-6
@@ -1,5 +1,5 @@
|
||||
import assert from 'node:assert';
|
||||
import * as cloudron from './cloudron.js';
|
||||
import cloudron from './cloudron.js';
|
||||
import debugModule from 'debug';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
@@ -8,11 +8,6 @@ import safe from 'safetydance';
|
||||
|
||||
const debug = debugModule('box:translation');
|
||||
|
||||
export {
|
||||
translate,
|
||||
getTranslations,
|
||||
listLanguages
|
||||
};
|
||||
|
||||
// to be used together with getTranslations() => { translations, fallback }
|
||||
function translate(input, assets) {
|
||||
@@ -73,3 +68,9 @@ async function listLanguages() {
|
||||
const languages = jsonFiles.map(function (file) { return path.basename(file, '.json'); });
|
||||
return languages;
|
||||
}
|
||||
|
||||
export default {
|
||||
translate,
|
||||
getTranslations,
|
||||
listLanguages
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user