UNPKG

@sync-in/server

Version:

The secure, open-source platform for file storage, sharing, collaboration, and sync

102 lines (101 loc) 1.94 kB
/* * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com> * This file is part of Sync-in | The open source file sync and share solution * See the LICENSE file for licensing details */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: Object.getOwnPropertyDescriptor(all, name).get }); } _export(exports, { get translateObject () { return translateObject; }, get translations () { return translations; } }); const _de = require("./de"); const _es = require("./es"); const _fr = require("./fr"); const _hi = require("./hi"); const _it = require("./it"); const _ja = require("./ja"); const _ko = require("./ko"); const _pl = require("./pl"); const _pt = require("./pt"); const _pt_br = require("./pt_br"); const _ru = require("./ru"); const _tr = require("./tr"); const _zh = require("./zh"); const translations = new Map([ [ 'de', _de.de ], [ 'es', _es.es ], [ 'fr', _fr.fr ], [ 'hi', _hi.hi ], [ 'it', _it.it ], [ 'ja', _ja.ja ], [ 'ko', _ko.ko ], [ 'pl', _pl.pl ], [ 'pt', _pt.pt ], [ 'pt-BR', _pt_br.pt_BR ], [ 'ru', _ru.ru ], [ 'tr', _tr.tr ], [ 'zh', _zh.zh ] ]); function translateObject(language, obj) { if (!language || !translations.has(language)) return obj; const tr = translations.get(language); if (!tr) return obj; for(const key in obj){ const v = obj[key]; const t = tr[v]; if (t) obj[key] = t; } return obj; } //# sourceMappingURL=index.js.map