From a11ef47737dde5fa0f9d4688f3804e31f7ee7636 Mon Sep 17 00:00:00 2001 From: Alex B Date: Sun, 22 Sep 2019 13:45:38 +0300 Subject: [PATCH 1/7] Generated dummy ro xlf file --- benchmark/Benchmarks.js | 304 ++++ benchmark/Benchmarks.js.map | 1 + benchmark/index.js | 145 ++ benchmark/index.js.map | 1 + frontend/translate/messages.ro.xlf | 2076 ++++++++++++++++++++++++++++ gulpfile.js | 165 +++ gulpfile.js.map | 1 + package-lock.json | 2 +- 8 files changed, 2694 insertions(+), 1 deletion(-) create mode 100644 benchmark/Benchmarks.js create mode 100644 benchmark/Benchmarks.js.map create mode 100644 benchmark/index.js create mode 100644 benchmark/index.js.map create mode 100644 frontend/translate/messages.ro.xlf create mode 100644 gulpfile.js create mode 100644 gulpfile.js.map diff --git a/benchmark/Benchmarks.js b/benchmark/Benchmarks.js new file mode 100644 index 00000000..7d924c53 --- /dev/null +++ b/benchmark/Benchmarks.js @@ -0,0 +1,304 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var SQLConnection_1 = require("../backend/model/sql/SQLConnection"); +var Config_1 = require("../common/config/private/Config"); +var IPrivateConfig_1 = require("../common/config/private/IPrivateConfig"); +var ObjectManagers_1 = require("../backend/model/ObjectManagers"); +var DiskMangerWorker_1 = require("../backend/model/threading/DiskMangerWorker"); +var IndexingManager_1 = require("../backend/model/sql/IndexingManager"); +var SearchManager_1 = require("../backend/model/sql/SearchManager"); +var fs = require("fs"); +var AutoCompleteItem_1 = require("../common/entities/AutoCompleteItem"); +var Utils_1 = require("../common/Utils"); +var GalleryManager_1 = require("../backend/model/sql/GalleryManager"); +var BMIndexingManager = /** @class */ (function (_super) { + __extends(BMIndexingManager, _super); + function BMIndexingManager() { + return _super !== null && _super.apply(this, arguments) || this; + } + BMIndexingManager.prototype.saveToDB = function (scannedDirectory) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, _super.prototype.saveToDB.call(this, scannedDirectory)]; + }); + }); + }; + return BMIndexingManager; +}(IndexingManager_1.IndexingManager)); +exports.BMIndexingManager = BMIndexingManager; +var Benchmarks = /** @class */ (function () { + function Benchmarks(RUNS, dbPath) { + var _this = this; + this.RUNS = RUNS; + this.dbPath = dbPath; + this.resetDB = function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, SQLConnection_1.SQLConnection.close()]; + case 1: + _a.sent(); + if (fs.existsSync(this.dbPath)) { + fs.unlinkSync(this.dbPath); + } + Config_1.Config.Server.database.type = IPrivateConfig_1.DatabaseType.sqlite; + Config_1.Config.Server.database.sqlite.storage = this.dbPath; + return [4 /*yield*/, ObjectManagers_1.ObjectManagers.InitSQLManagers()]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); }; + } + Benchmarks.prototype.bmSaveDirectory = function () { + return __awaiter(this, void 0, void 0, function () { + var dir, im; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.resetDB()]; + case 1: + _a.sent(); + return [4 /*yield*/, DiskMangerWorker_1.DiskMangerWorker.scanDirectory('./')]; + case 2: + dir = _a.sent(); + im = new BMIndexingManager(); + return [4 /*yield*/, this.benchmark(function () { return im.saveToDB(dir); }, function () { return _this.resetDB(); })]; + case 3: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Benchmarks.prototype.bmScanDirectory = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.benchmark(function () { return DiskMangerWorker_1.DiskMangerWorker.scanDirectory('./'); })]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Benchmarks.prototype.bmListDirectory = function () { + return __awaiter(this, void 0, void 0, function () { + var gm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + gm = new GalleryManager_1.GalleryManager(); + return [4 /*yield*/, this.setupDB()]; + case 1: + _a.sent(); + Config_1.Config.Server.indexing.reIndexingSensitivity = IPrivateConfig_1.ReIndexingSensitivity.low; + return [4 /*yield*/, this.benchmark(function () { return gm.listDirectory('./'); })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Benchmarks.prototype.bmAllSearch = function (text) { + return __awaiter(this, void 0, void 0, function () { + var types, results, sm, _loop_1, this_1, i; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.setupDB()]; + case 1: + _a.sent(); + types = Utils_1.Utils.enumToArray(AutoCompleteItem_1.SearchTypes).map(function (a) { return a.key; }).concat([null]); + results = []; + sm = new SearchManager_1.SearchManager(); + _loop_1 = function (i) { + var _a, _b, _c; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = results).push; + _c = {}; + return [4 /*yield*/, this_1.benchmark(function () { return sm.search(text, types[i]); })]; + case 1: + _b.apply(_a, [(_c.result = _d.sent(), _c.searchType = types[i], _c)]); + return [2 /*return*/]; + } + }); + }; + this_1 = this; + i = 0; + _a.label = 2; + case 2: + if (!(i < types.length)) return [3 /*break*/, 5]; + return [5 /*yield**/, _loop_1(i)]; + case 3: + _a.sent(); + _a.label = 4; + case 4: + i++; + return [3 /*break*/, 2]; + case 5: return [2 /*return*/, results]; + } + }); + }); + }; + Benchmarks.prototype.bmInstantSearch = function (text) { + return __awaiter(this, void 0, void 0, function () { + var sm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.setupDB()]; + case 1: + _a.sent(); + sm = new SearchManager_1.SearchManager(); + return [4 /*yield*/, this.benchmark(function () { return sm.instantSearch(text); })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Benchmarks.prototype.bmAutocomplete = function (text) { + return __awaiter(this, void 0, void 0, function () { + var sm; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.setupDB()]; + case 1: + _a.sent(); + sm = new SearchManager_1.SearchManager(); + return [4 /*yield*/, this.benchmark(function () { return sm.autocomplete(text); })]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + Benchmarks.prototype.benchmark = function (fn, beforeEach, afterEach) { + if (beforeEach === void 0) { beforeEach = null; } + if (afterEach === void 0) { afterEach = null; } + return __awaiter(this, void 0, void 0, function () { + var scanned, start, skip, i, startSkip, endSkip, startSkip, endSkip, end, duration; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fn()]; + case 1: + scanned = _a.sent(); + start = process.hrtime(); + skip = 0; + i = 0; + _a.label = 2; + case 2: + if (!(i < this.RUNS)) return [3 /*break*/, 8]; + if (!beforeEach) return [3 /*break*/, 4]; + startSkip = process.hrtime(); + return [4 /*yield*/, beforeEach()]; + case 3: + _a.sent(); + endSkip = process.hrtime(startSkip); + skip += (endSkip[0] * 1000 + endSkip[1] / 1000000); + _a.label = 4; + case 4: return [4 /*yield*/, fn()]; + case 5: + _a.sent(); + if (!afterEach) return [3 /*break*/, 7]; + startSkip = process.hrtime(); + return [4 /*yield*/, afterEach()]; + case 6: + _a.sent(); + endSkip = process.hrtime(startSkip); + skip += (endSkip[0] * 1000 + endSkip[1] / 1000000); + _a.label = 7; + case 7: + i++; + return [3 /*break*/, 2]; + case 8: + end = process.hrtime(start); + duration = (end[0] * 1000 + end[1] / 1000000) / this.RUNS; + if (!scanned) { + return [2 /*return*/, { + duration: duration + }]; + } + if (Array.isArray(scanned)) { + return [2 /*return*/, { + duration: duration, + items: scanned.length + }]; + } + return [2 /*return*/, { + duration: duration, + media: scanned.media.length, + directories: scanned.directories.length + }]; + } + }); + }); + }; + Benchmarks.prototype.setupDB = function () { + return __awaiter(this, void 0, void 0, function () { + var im, dir; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + im = new BMIndexingManager(); + return [4 /*yield*/, this.resetDB()]; + case 1: + _a.sent(); + return [4 /*yield*/, DiskMangerWorker_1.DiskMangerWorker.scanDirectory('./')]; + case 2: + dir = _a.sent(); + return [4 /*yield*/, im.saveToDB(dir)]; + case 3: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + return Benchmarks; +}()); +exports.Benchmarks = Benchmarks; +//# sourceMappingURL=Benchmarks.js.map \ No newline at end of file diff --git a/benchmark/Benchmarks.js.map b/benchmark/Benchmarks.js.map new file mode 100644 index 00000000..039550d0 --- /dev/null +++ b/benchmark/Benchmarks.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Benchmarks.js","sourceRoot":"","sources":["Benchmarks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAiE;AACjE,0DAAuD;AACvD,0EAA4F;AAC5F,kEAA+D;AAC/D,gFAA6E;AAC7E,wEAAqE;AACrE,oEAAiE;AACjE,uBAAyB;AACzB,wEAAgE;AAChE,yCAAsC;AACtC,sEAAmE;AAUnE;IAAuC,qCAAe;IAAtD;;IAKA,CAAC;IAHc,oCAAQ,GAArB,UAAsB,gBAA8B;;;gBAClD,sBAAO,iBAAM,QAAQ,YAAC,gBAAgB,CAAC,EAAC;;;KACzC;IACH,wBAAC;AAAD,CAAC,AALD,CAAuC,iCAAe,GAKrD;AALY,8CAAiB;AAO9B;IAEE,oBAAmB,IAAY,EAAS,MAAc;QAAtD,iBAEC;QAFkB,SAAI,GAAJ,IAAI,CAAQ;QAAS,WAAM,GAAN,MAAM,CAAQ;QA0F9C,YAAO,GAAG;;;4BAChB,qBAAM,6BAAa,CAAC,KAAK,EAAE,EAAA;;wBAA3B,SAA2B,CAAC;wBAC5B,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;4BAC9B,EAAE,CAAC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AAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;;;wBAZxB,CAAC,EAAE,CAAA;;;wBAe5B,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;wBAC5B,QAAQ,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;wBAEhE,IAAI,CAAC,OAAO,EAAE;4BACZ,sBAAO;oCACL,QAAQ,EAAE,QAAQ;iCACnB,EAAC;yBACH;wBAED,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;4BAC1B,sBAAO;oCACL,QAAQ,EAAE,QAAQ;oCAClB,KAAK,EAAE,OAAO,CAAC,MAAM;iCACtB,EAAC;yBACH;wBAED,sBAAO;gCACL,QAAQ,EAAE,QAAQ;gCAClB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM;gCAC3B,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,MAAM;6BACxC,EAAC;;;;KACH;IAYa,4BAAO,GAArB;;;;;;wBACQ,EAAE,GAAG,IAAI,iBAAiB,EAAE,CAAC;wBACnC,qBAAM,IAAI,CAAC,OAAO,EAAE,EAAA;;wBAApB,SAAoB,CAAC;wBACT,qBAAM,mCAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,EAAA;;wBAAhD,GAAG,GAAG,SAA0C;wBACtD,qBAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAA;;wBAAtB,SAAsB,CAAC;;;;;KACxB;IAEH,iBAAC;AAAD,CAAC,AA7GD,IA6GC;AA7GY,gCAAU"} \ No newline at end of file diff --git a/benchmark/index.js b/benchmark/index.js new file mode 100644 index 00000000..13ca4c02 --- /dev/null +++ b/benchmark/index.js @@ -0,0 +1,145 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var _this = this; +Object.defineProperty(exports, "__esModule", { value: true }); +var Config_1 = require("../common/config/private/Config"); +var path = require("path"); +var ProjectPath_1 = require("../backend/ProjectPath"); +var Benchmarks_1 = require("./Benchmarks"); +var AutoCompleteItem_1 = require("../common/entities/AutoCompleteItem"); +var Utils_1 = require("../common/Utils"); +var DiskMangerWorker_1 = require("../backend/model/threading/DiskMangerWorker"); +var config = require(path.join(__dirname, 'config.json')); +Config_1.Config.Server.imagesFolder = config.path; +var dbPath = path.join(__dirname, 'test.db'); +ProjectPath_1.ProjectPath.reset(); +var RUNS = 50; +var resultsText = ''; +var printLine = function (text) { + resultsText += text + '\n'; +}; +var printHeader = function () { return __awaiter(_this, void 0, void 0, function () { + var dt, dir; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + dt = new Date(); + printLine('## PiGallery2 v' + require('./../package.json').version + + ', ' + Utils_1.Utils.zeroPrefix(dt.getDate(), 2) + + '.' + Utils_1.Utils.zeroPrefix(dt.getMonth() + 1, 2) + + '.' + dt.getFullYear()); + printLine('**System**: ' + config.system); + return [4 /*yield*/, DiskMangerWorker_1.DiskMangerWorker.scanDirectory('./')]; + case 1: + dir = _a.sent(); + printLine('**Gallery**: directories: ' + + dir.directories.length + + ' media: ' + dir.media.length + + // @ts-ignore + ', faces: ' + dir.media.reduce(function (p, c) { return p + (c.metadata.faces || []).length; }, 0)); + return [2 /*return*/]; + } + }); +}); }; +var printTableHeader = function () { + printLine('| action | action details | average time | details |'); + printLine('|:------:|:--------------:|:------------:|:-------:|'); +}; +var printResult = function (result, action, actionDetails) { + if (actionDetails === void 0) { actionDetails = ''; } + console.log('benchmarked: ' + action); + var details = '-'; + if (result.items) { + details = 'items: ' + result.items; + } + if (result.media) { + details = 'media: ' + result.media + ', directories:' + result.directories; + } + printLine('| ' + action + ' | ' + actionDetails + + ' | ' + (result.duration).toFixed(1) + 'ms | ' + details + ' |'); +}; +var run = function () { return __awaiter(_this, void 0, void 0, function () { + var start, bm, _a, _b, _c, _d, _e; + return __generator(this, function (_f) { + switch (_f.label) { + case 0: + start = Date.now(); + bm = new Benchmarks_1.Benchmarks(RUNS, dbPath); + // header + return [4 /*yield*/, printHeader()]; + case 1: + // header + _f.sent(); + printTableHeader(); + _a = printResult; + return [4 /*yield*/, bm.bmScanDirectory()]; + case 2: + _a.apply(void 0, [_f.sent(), 'Scanning directory']); + _b = printResult; + return [4 /*yield*/, bm.bmSaveDirectory()]; + case 3: + _b.apply(void 0, [_f.sent(), 'Saving directory']); + _c = printResult; + return [4 /*yield*/, bm.bmListDirectory()]; + case 4: + _c.apply(void 0, [_f.sent(), 'Listing Directory']); + return [4 /*yield*/, bm.bmAllSearch('a')]; + case 5: + (_f.sent()).forEach(function (res) { + if (res.searchType !== null) { + printResult(res.result, 'searching', '`a` as `' + AutoCompleteItem_1.SearchTypes[res.searchType] + '`'); + } + else { + printResult(res.result, 'searching', '`a` as `any`'); + } + }); + _d = printResult; + return [4 /*yield*/, bm.bmInstantSearch('a')]; + case 6: + _d.apply(void 0, [_f.sent(), 'instant search', '`a`']); + _e = printResult; + return [4 /*yield*/, bm.bmAutocomplete('a')]; + case 7: + _e.apply(void 0, [_f.sent(), 'auto complete', '`a`']); + console.log(resultsText); + console.log('run for : ' + ((Date.now() - start)).toFixed(1) + 'ms'); + return [2 /*return*/]; + } + }); +}); }; +run(); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/benchmark/index.js.map b/benchmark/index.js.map new file mode 100644 index 00000000..bd5bb96e --- /dev/null +++ b/benchmark/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBA6EA;;AA7EA,0DAAuD;AACvD,2BAA6B;AAC7B,sDAAmD;AACnD,2CAAyD;AACzD,wEAAgE;AAChE,yCAAsC;AACtC,gFAA6E;AAE7E,IAAM,MAAM,GAAqC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAC9F,eAAM,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC;AACzC,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CAAC,eAAe,EAAE,EAAA;;gBAAtC,kBAAY,SAA0B,EAAE,mBAAmB,EAAC,CAAC;gBAC5D,qBAAM,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,EAAA;;gBAA1B,CAAC,SAAyB,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG;oBACrC,IAAI,GAAG,CAAC,UAAU,KAAK,IAAI,EAAE;wBAC3B,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,GAAG,8BAAW,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC;qBACtF;yBAAM;wBACL,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;qBACtD;gBACH,CAAC,CAAC,CAAC;gBACH,KAAA,WAAW,CAAA;gBAAC,qBAAM,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,EAAA;;gBAAzC,kBAAY,SAA6B,EAAE,gBAAgB,EAAE,KAAK,EAAC,CAAC;gBACpE,KAAA,WAAW,CAAA;gBAAC,qBAAM,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,EAAA;;gBAAxC,kBAAY,SAA4B,EAAE,eAAe,EAAE,KAAK,EAAC,CAAC;gBAClE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBACzB,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;;;;KACtE,CAAC;AAEF,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/frontend/translate/messages.ro.xlf b/frontend/translate/messages.ro.xlf new file mode 100644 index 00000000..91dc8406 --- /dev/null +++ b/frontend/translate/messages.ro.xlf @@ -0,0 +1,2076 @@ + + + + + + Please log in + + app/ui/login/login.component.html + 10 + + Va rugam sa va logati + + + + Wrong username or password + + + app/ui/login/login.component.html + 12 + + Nume utilizator sau parolă greșită + + + Username + + app/ui/login/login.component.html + 29 + + + app/ui/settings/usermanager/usermanager.settings.component.html + 77 + + + app/ui/settings/database/database.settings.component.html + 23 + + Nume de utilizator + + + Password + + app/ui/login/login.component.html + 45 + + + app/ui/sharelogin/share-login.component.html + 27 + + + app/ui/gallery/share/share.gallery.component.html + 68 + + + app/ui/gallery/share/share.gallery.component.html + 79 + + + app/ui/settings/usermanager/usermanager.settings.component.html + 79 + + + app/ui/settings/database/database.settings.component.html + 25 + + Parola + + + Remember me + + app/ui/login/login.component.html + 56 + + Amintește-ți de mine + + + Login + + + app/ui/login/login.component.html + 66 + + Autentificare + + + + Wrong password + + + app/ui/sharelogin/share-login.component.html + 11 + + Parola gresita + + + Enter + + + app/ui/sharelogin/share-login.component.html + 41 + + introduce + + + download + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 11 + + Descarca + + + info key: i + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 15 + + cheie info: i + + + toggle fullscreen, key: f + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 22 + + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 31 + + + app/ui/gallery/map/lightbox/lightbox.map.gallery.component.html + 86 + + + app/ui/gallery/map/lightbox/lightbox.map.gallery.component.html + 91 + + comutați pe ecranul complet, tasta: f + + + close, key: Escape + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 38 + + + app/ui/gallery/map/lightbox/lightbox.map.gallery.component.html + 94 + + aproape, cheie: Evadare + + + key: left arrow + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 76 + + tasta: săgeata stângă + + + key: right arrow + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 80 + + tasta: săgeata dreapta + + + Zoom out, key: '-' + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 86 + + Zoom out, tasta: '-' + + + Zoom in, key: '+' + + app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html + 93 + + Măriți, tastați: '+' + + + Link availability + + app/ui/gallery/gallery.component.html + 7 + + Disponibilitatea link-ului + + + days + + app/ui/gallery/gallery.component.html + 9 + + zi + + + + Too many results to show. Refine your search. + + + app/ui/gallery/gallery.component.html + 44 + + Prea multe rezultate de arătat. Rafinați-vă căutarea. + + + No faces to show. + + app/ui/faces/faces.component.html + 15 + + Fără fețe de arătat. + + + Gallery + + app/ui/frame/frame.component.html + 18 + + Galerie + + + Faces + + app/ui/frame/frame.component.html + 21 + + feţele + + + duplicates + + app/ui/frame/frame.component.html + 51 + + duplicate + + + Settings + + app/ui/frame/frame.component.html + 59 + + Setări + + + Logout + + app/ui/frame/frame.component.html + 65 + + Deconectare + + + Search + + app/ui/gallery/search/search.gallery.component.html + 6 + + Căutare + + + Share + + app/ui/gallery/share/share.gallery.component.html + 4 + + + app/ui/gallery/share/share.gallery.component.html + 10 + + Acțiune + + + Copy + + + app/ui/gallery/share/share.gallery.component.html + 29 + + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 28 + + Copie + + + Sharing: + + app/ui/gallery/share/share.gallery.component.html + 36 + + Partajarea: + + + Include subfolders: + + app/ui/gallery/share/share.gallery.component.html + 47 + + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 46 + + Includeți subfoldere: + + + Valid: + + app/ui/gallery/share/share.gallery.component.html + 85 + + Valabil: + + + Minutes + + app/ui/gallery/share/share.gallery.component.html + 95 + + Minute + + + Hours + + app/ui/gallery/share/share.gallery.component.html + 96 + + ore + + + Days + + app/ui/gallery/share/share.gallery.component.html + 97 + + zi + + + Months + + app/ui/gallery/share/share.gallery.component.html + 98 + + Luni + + + Searching for: + + app/ui/gallery/navigator/navigator.gallery.component.html + 12 + + Căutare de: + + + items + + app/ui/gallery/navigator/navigator.gallery.component.html + 27 + + articole + + + + Server notifications + + + app/ui/admin/admin.component.html + 5 + + Notificări pe server + + + + To dismiss these notifications, restart the server. + + + app/ui/admin/admin.component.html + 19 + + Pentru a respinge aceste notificări, reporniți serverul. + + + App version: + + app/ui/admin/admin.component.html + 26 + + Versiunea aplicației: + + + Mode + + app/ui/admin/admin.component.html + 30 + + mod + + + Info + + app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html + 3 + + Info + + + duration + + app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html + 51 + + durată + + + bit rate + + app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html + 54 + + rata de biți + + + Random link + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 3 + + Link aleatoriu + + + Random Link generator + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 9 + + Generator de legătură aleatorie + + + In Folder: + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 35 + + În dosar: + + + Orientation: + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 66 + + Orientare: + + + Any + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 71 + + Orice + + + Landscape + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 72 + + Peisaj + + + Portrait + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 73 + + Portret + + + Date: + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 81 + + Data: + + + Resolution: + + app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html + 105 + + Rezoluţie: + + + Password protection + + app/ui/settings/usermanager/usermanager.settings.component.html + 3 + + Protecție cu parolă + + + Name + + app/ui/settings/usermanager/usermanager.settings.component.html + 27 + + + app/ui/settings/map/map.settings.component.html + 62 + + Nume + + + Role + + app/ui/settings/usermanager/usermanager.settings.component.html + 28 + + Rol + + + + Add user + + + app/ui/settings/usermanager/usermanager.settings.component.html + 55 + + + Adăugare utilizator + + + + To protect the site with password / have login enable this. + + + app/ui/settings/usermanager/usermanager.settings.component.html + 58 + + Pentru a proteja site-ul cu parolă / aveți conectare activați acest lucru. + + + Add new User + + app/ui/settings/usermanager/usermanager.settings.component.html + 70 + + Adăugați un utilizator nou + + + Close + + app/ui/settings/usermanager/usermanager.settings.component.html + 87 + + Închide + + + Add User + + + app/ui/settings/usermanager/usermanager.settings.component.html + 90 + + Adăugați utilizator + + + + Database settings + + + app/ui/settings/database/database.settings.component.html + 2 + + Setările bazei de date + + + Type: + + app/ui/settings/database/database.settings.component.html + 8 + + Tip: + + + Install manually mysql node module to use mysql (npm install mysql) + + + app/ui/settings/database/database.settings.component.html + 14 + + Instalați manual modulul mysql pentru a utiliza mysql (npm instala mysql) + + + MySQL settings: + + app/ui/settings/database/database.settings.component.html + 18 + + Setări MySQL: + + + Host + + app/ui/settings/database/database.settings.component.html + 19 + + + app/ui/settings/basic/basic.settings.component.html + 21 + + Gazdă + + + Database + + app/ui/settings/database/database.settings.component.html + 21 + + Bază de date + + + SQLite settings: + + app/ui/settings/database/database.settings.component.html + 29 + + Setări SQLite: + + + Save + + + app/ui/settings/database/database.settings.component.html + 37 + + Salvați + + + Reset + + + app/ui/settings/database/database.settings.component.html + 40 + + restabili + + + Map settings + + app/ui/settings/map/map.settings.component.html + 4 + + Setări de hartă + + + Use image markers + + app/ui/settings/map/map.settings.component.html + 25 + + Folosiți markere de imagine + + + + Map will use thumbnail images as markers instead of the default pin. + + + app/ui/settings/map/map.settings.component.html + 39 + + Harta va folosi imagini în miniatură ca markeri în loc de pinul implicit. + + + Map provider + + app/ui/settings/map/map.settings.component.html + 47 + + Furnizor de hartă + + + Tile Url* + + app/ui/settings/map/map.settings.component.html + 63 + + Urlă de gresie * + + + *The map module will use these urls to fetch the map tiles. + + app/ui/settings/map/map.settings.component.html + 88 + + * Modulul de hartă va utiliza aceste URL-uri pentru a prelua plăcile de hartă. + + + + Add Layer + + + app/ui/settings/map/map.settings.component.html + 93 + + + Adaugă strat + + + Mapbox access token + + app/ui/settings/map/map.settings.component.html + 99 + + Token de acces al căsuței de hartă + + + MapBox needs an access token to work, create one at + + app/ui/settings/map/map.settings.component.html + 105 + + MapBox are nevoie de un token de acces pentru a funcționa, crea unul la + + + Save + + + app/ui/settings/map/map.settings.component.html + 114 + + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 104 + + + app/ui/settings/video/video.settings.component.html + 28 + + + app/ui/settings/metafiles/metafile.settings.component.html + 28 + + + app/ui/settings/search/search.settings.component.html + 73 + + + app/ui/settings/share/share.settings.component.html + 52 + + + app/ui/settings/random-photo/random-photo.settings.component.html + 37 + + + app/ui/settings/basic/basic.settings.component.html + 91 + + + app/ui/settings/faces/faces.settings.component.html + 64 + + + app/ui/settings/other/other.settings.component.html + 168 + + Salvați + + + Reset + + + app/ui/settings/map/map.settings.component.html + 117 + + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 107 + + + app/ui/settings/video/video.settings.component.html + 31 + + + app/ui/settings/metafiles/metafile.settings.component.html + 31 + + + app/ui/settings/search/search.settings.component.html + 76 + + + app/ui/settings/share/share.settings.component.html + 55 + + + app/ui/settings/random-photo/random-photo.settings.component.html + 40 + + + app/ui/settings/basic/basic.settings.component.html + 94 + + + app/ui/settings/faces/faces.settings.component.html + 67 + + + app/ui/settings/other/other.settings.component.html + 171 + + restabili + + + + Thumbnail settings + + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 3 + + Setări de miniatură + + + It is highly recommended to use hardware accelerated (sharp or gm) lib for thumbnail + generation + + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 10 + + Este recomandat să utilizați lib hardware accelerat (ascuțit sau gm) pentru miniatură +        generaţie + + + Thumbnail generation library + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 16 + + Biblioteca de generare a miniaturilor + + + Make sure that sharp node module is installed (npm install sharp). + + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 24 + + Asigurați-vă că modulul de nod ascuțit este instalat (npm instalați ascuțit). + + + Make sure that gm node module and + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 28 + + Asigurați-vă că modulul gm și + + + GraphicsMagick + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 30 + + GraphicsMagick + + + are installed (npm install sharp). + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 31 + + sunt instalate (npm instalați ascuțit). + + + Thumbnail folder + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 38 + + Dosarul de miniaturi + + + Thumbnails will be saved in this folder. Write access is required + + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 44 + + Miniaturile vor fi salvate în acest folder. Accesul la scriere este necesar + + + Thumbnail Quality + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 50 + + Calitatea miniaturii + + + High quality may be slow. Especially with Jimp. + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 64 + + Calitatea înaltă poate fi lentă. Mai ales cu Jimp. + + + Icon size (used on maps) + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 79 + + Mărimea pictogramei (folosită pe hărți) + + + Thumbnail sizes + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 85 + + Dimensiuni de miniatură + + + Size of the thumbnails. + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 92 + + Dimensiunea miniaturilor. + + + The best matching size will be generated. (More size gives better quality, but use storage to store and CPU to render.) + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 93 + + Se va genera cea mai bună dimensiune potrivită. (Mai multe dimensiuni oferă o calitate mai bună, dar folosiți spațiu de stocare și procesor pentru a reda.) + + + ';' separated integers. If size is 200, that thumbnail will have 200^2 pixels. + + app/ui/settings/thumbnail/thumbanil.settings.component.html + 95 + + ';' numere întregi separate. Dacă dimensiunea este 200, acea miniatură va avea 200 ^ 2 pixeli. + + + Video settings + + app/ui/settings/video/video.settings.component.html + 4 + + Setari video + + + Video support uses ffmpeg. ffmpeg and ffprobe binaries need to be available in the PATH or the @ffmpeg-installer/ffmpeg and @ffprobe-installer/ffprobe optional node packages need to be installed. + + app/ui/settings/video/video.settings.component.html + 23 + + Suportul video folosește ffmpeg. Binarele ffmpeg și ffprobe trebuie să fie disponibile în PATH sau în pachetele opționale de noduri @ ffmpeg-installer / ffmpeg și @ ffprobe-installer / ffprobe. + + + Meta file settings + + app/ui/settings/metafiles/metafile.settings.component.html + 4 + + Setările fișierului Meta + + + Reads and show *.gpx files on the map + + app/ui/settings/metafiles/metafile.settings.component.html + 23 + + Citește și arată fișiere * .gpx pe hartă + + + Search settings + + app/ui/settings/search/search.settings.component.html + 5 + + Setări de căutare + + + Autocomplete + + app/ui/settings/search/search.settings.component.html + 27 + + Completare automată + + + Show hints while typing search query + + app/ui/settings/search/search.settings.component.html + 42 + + Afișați indicii în timp ce tastați interogarea de căutare + + + Instant search + + app/ui/settings/search/search.settings.component.html + 48 + + Căutare instantanee + + + Enables showing search results, while typing search query + + app/ui/settings/search/search.settings.component.html + 63 + + Permite afișarea rezultatelor căutării, în timp ce introduceți interogarea de căutare + + + + Search is not supported with these settings + + + app/ui/settings/search/search.settings.component.html + 68 + + Căutarea nu este acceptată cu aceste setări + + + Share settings + + app/ui/settings/share/share.settings.component.html + 5 + + Opțiuni de distribuire + + + Password protected + + app/ui/settings/share/share.settings.component.html + 26 + + Protectie cu parola + + + Enables password protected sharing links + + app/ui/settings/share/share.settings.component.html + 41 + + Activează legăturile de partajare protejate prin parolă + + + + Sharing is not supported with these settings + + + app/ui/settings/share/share.settings.component.html + 47 + + Partajarea nu este acceptată cu aceste setări + + + Random Photo settings + + app/ui/settings/random-photo/random-photo.settings.component.html + 5 + + Setări aleatorii ale fotografiei + + + + This feature enables you to generate 'random photo' urls. + That URL returns a photo random selected from your gallery. + You can use the url with 3rd party like random changing desktop background. + + + app/ui/settings/random-photo/random-photo.settings.component.html + 25 + + Această caracteristică vă permite să generați URL-uri „aleatoare pentru fotografii”. +          Respectiva adresă URL returnează o fotografie selectată la întâmplare din galeria dvs. +          Puteți utiliza adresa URL cu o terță parte ca fundalul desktop schimbător aleatoriu. + + + + Random Photo is not supported with these settings + + + app/ui/settings/random-photo/random-photo.settings.component.html + 32 + + Fotografia aleatorie nu este acceptată cu aceste setări + + + + Basic settings + + + app/ui/settings/basic/basic.settings.component.html + 3 + + Setări de bază + + + Page title + + app/ui/settings/basic/basic.settings.component.html + 11 + + Titlul paginii + + + Server will accept connections from this IPv6 or IPv4 address. + + app/ui/settings/basic/basic.settings.component.html + 27 + + Serverul va accepta conexiuni de la această adresă IPv6 sau IPv4. + + + Port + + app/ui/settings/basic/basic.settings.component.html + 32 + + Port + + + Port number. Port 80 is usually what you need. + + app/ui/settings/basic/basic.settings.component.html + 41 + + Numarul portului. Portul 80 este de obicei ceea ce ai nevoie. + + + Images folder + + app/ui/settings/basic/basic.settings.component.html + 46 + + Folderul Imagini + + + Images are loaded from this folder (read permission required) + + app/ui/settings/basic/basic.settings.component.html + 52 + + Imaginile sunt încărcate din acest folder (este necesară permisiunea de citire) + + + Page public url + + app/ui/settings/basic/basic.settings.component.html + 57 + + Pagina adresă publică + + + If you access the page form local network its good to know the public + url for creating sharing link + + + app/ui/settings/basic/basic.settings.component.html + 64 + + Dacă accesați pagina din rețeaua locală este bine să cunoașteți publicul +            url pentru crearea linkului de partajare + + + Url Base + + app/ui/settings/basic/basic.settings.component.html + 71 + + Url Base + + + If you access the gallery under a sub url (like: + http://mydomain.com/myGallery), set it here. If not working you might miss the '/' from the beginning of the + url. + + + app/ui/settings/basic/basic.settings.component.html + 78 + + Dacă accesați galeria sub un suburl (cum ar fi: +            http://mydomain.com/myGallery), setați-l aici. Dacă nu funcționează, este posibil să pierdeți „/” de la începutul +            URL-ul. + + + + The public url and the url base are not matching. Some of the functionality might not work. + + + app/ui/settings/basic/basic.settings.component.html + 85 + + URL-ul public și baza URL nu se potrivesc. Este posibil ca unele funcționalități să nu funcționeze. + + + Faces settings + + app/ui/settings/faces/faces.settings.component.html + 5 + + Setări fețe + + + Override keywords + + app/ui/settings/faces/faces.settings.component.html + 27 + + Anulați cuvintele cheie + + + If a photo has the same face (person) name and keyword, the app removes the duplicate, keeping the face only. + + app/ui/settings/faces/faces.settings.component.html + 42 + + Dacă o fotografie are același nume (persoană) și cuvânt cheie, aplicația elimină duplicatul, păstrând doar fața. + + + Face starring right + + app/ui/settings/faces/faces.settings.component.html + 48 + + Fața înfipt în dreapta + + + Required minimum right to start (favourite) a face. + + app/ui/settings/faces/faces.settings.component.html + 54 + + Drept minim necesar pentru a începe (preferat) o față. + + + + Faces are not supported with these settings. + + + app/ui/settings/faces/faces.settings.component.html + 59 + + Fețele nu sunt acceptate cu aceste setări. + + + + Other settings + + + app/ui/settings/other/other.settings.component.html + 3 + + Alte setari + + + Error: + + app/ui/settings/other/other.settings.component.html + 7 + + Eroare: + + + Threads: + + app/ui/settings/other/other.settings.component.html + 10 + + Subiecte: + + + Threading + + app/ui/settings/other/other.settings.component.html + 12 + + Filetat + + + Runs directory scanning and thumbnail generation (only for Jimp) in a + different thread + + + app/ui/settings/other/other.settings.component.html + 26 + + Se execută scanarea și generarea de miniaturi (numai pentru Jimp) în directorul +            fir diferit + + + Thumbnail threads + + app/ui/settings/other/other.settings.component.html + 33 + + Fire de miniatură + + + Number of threads that are used to generate thumbnails. If auto, number of CPU cores -1 threads will be used. + + app/ui/settings/other/other.settings.component.html + 40 + + Numărul de fire care sunt utilizate pentru a genera miniaturi. Dacă este automat, se vor utiliza un număr de nuclee CPU -1 fire. + + + Misc: + + app/ui/settings/other/other.settings.component.html + 45 + + Diverse: + + + Scroll based thumbnail + generation + + app/ui/settings/other/other.settings.component.html + 47 + + Derulați miniatura bazată pe +          generaţie + + + Those thumbnails get higher priority that are visible on the screen + + + app/ui/settings/other/other.settings.component.html + 62 + + Aceste miniaturi au prioritate mai mare care sunt vizibile pe ecran + + + Lazy image rendering + + app/ui/settings/other/other.settings.component.html + 68 + + Redarea imaginilor leneșe + + + Shows only the required amount of photos at once. Renders more if + page bottom is reached + + + app/ui/settings/other/other.settings.component.html + 82 + + Afișează doar cantitatea necesară de fotografii simultan. Renderi mai mult dacă +            pagina de jos este atinsă + + + Cache + + app/ui/settings/other/other.settings.component.html + 90 + + ascunzătoare + + + Caches directory contents and search results for better performance + + + app/ui/settings/other/other.settings.component.html + 104 + + Cache conținutul directorului și rezultatele căutării pentru o performanță mai bună + + + Caption first naming + + app/ui/settings/other/other.settings.component.html + 111 + + Subtitrare pentru prima dată + + + Show the caption (IPTC 120) tags from the EXIF data instead of the filenames. + + + app/ui/settings/other/other.settings.component.html + 125 + + Afișați etichetele din legendă (IPTC 120) din datele EXIF ​​în loc de numele fișierelor. + + + Navigation bar: + + app/ui/settings/other/other.settings.component.html + 131 + + Bară de navigare: + + + Show item count + + app/ui/settings/other/other.settings.component.html + 133 + + Afișează numărul articolului + + + Show the number of items (photos) in the folder + + + app/ui/settings/other/other.settings.component.html + 147 + + Afișează numărul de articole (fotografii) din folder + + + Default photo sorting method + + app/ui/settings/other/other.settings.component.html + 155 + + Metoda implicită de sortare a fotografiilor + + + + Folder indexing + + + app/ui/settings/indexing/indexing.settings.component.html + 3 + + Indexarea dosarului + + + Index cache timeout [ms] + + app/ui/settings/indexing/indexing.settings.component.html + 11 + + Indexarea expirării cache [ms] + + + If there was no indexing in this time, it reindexes. (skipped if + indexes are in DB and sensitivity is low) + + + app/ui/settings/indexing/indexing.settings.component.html + 19 + + Dacă nu a existat nicio indexare în acest timp, aceasta reindexează. (a sărit dacă +              indicii sunt în DB și sensibilitatea este scăzută) + + + Sub folder preview size + + app/ui/settings/indexing/indexing.settings.component.html + 25 + + Mărimea previzualizării folderului + + + Reads this many photos from sub folders + + app/ui/settings/indexing/indexing.settings.component.html + 33 + + Citește multe fotografii din sub foldere + + + Folder reindexing sensitivity + + app/ui/settings/indexing/indexing.settings.component.html + 38 + + Folder reindexing sensibilitate + + + Set the reindexing sensitivity. High value check the folders for change more often + + + app/ui/settings/indexing/indexing.settings.component.html + 47 + + Setați sensibilitatea reindexing. Valoare ridicată verifică modificarea folderelor mai des + + + Save + + + app/ui/settings/indexing/indexing.settings.component.html + 55 + + Salvați + + + Reset + + + app/ui/settings/indexing/indexing.settings.component.html + 58 + + restabili + + + If you add a new folder to your gallery, the site indexes it automatically. + + app/ui/settings/indexing/indexing.settings.component.html + 64 + + Dacă adăugați un nou folder la galeria dvs., site-ul îl indexează automat. + + + If you would like to trigger indexing manually, click index button. + + app/ui/settings/indexing/indexing.settings.component.html + 65 + + Dacă doriți să declanșați indexarea manual, faceți clic pe butonul index. + + + Note: search only works among the indexed directories + + app/ui/settings/indexing/indexing.settings.component.html + 68 + + Notă: căutarea funcționează numai printre directoarele indexate + + + indexing + + app/ui/settings/indexing/indexing.settings.component.html + 73 + + indexare + + + elapsed + + app/ui/settings/indexing/indexing.settings.component.html + 74 + + scurs + + + left + + app/ui/settings/indexing/indexing.settings.component.html + 75 + + stânga + + + Index + + + app/ui/settings/indexing/indexing.settings.component.html + 96 + + Index + + + Indexes the folders + + app/ui/settings/indexing/indexing.settings.component.html + 94 + + Indexează folderele + + + Index with Thumbnails + + + app/ui/settings/indexing/indexing.settings.component.html + 103 + + Index cu miniaturi + + + Indexes the folders and also creates the thumbnails + + app/ui/settings/indexing/indexing.settings.component.html + 99 + + Indexează folderele și creează, de asemenea, miniaturile + + + Cancel + + + app/ui/settings/indexing/indexing.settings.component.html + 108 + + Anulare + + + Reset Indexes + + + app/ui/settings/indexing/indexing.settings.component.html + 112 + + Resetați indexurile + + + + Statistic: + + + app/ui/settings/indexing/indexing.settings.component.html + 117 + + Statistic: + + + Folders + + app/ui/settings/indexing/indexing.settings.component.html + 121 + + Dosare + + + Photos + + app/ui/settings/indexing/indexing.settings.component.html + 125 + + Fotografii + + + Videos + + app/ui/settings/indexing/indexing.settings.component.html + 129 + + Videoclipuri + + + Size + + app/ui/settings/indexing/indexing.settings.component.html + 134 + + mărimea + + + + No duplicates found + + + app/ui/duplicates/duplicates.component.html + 8 + + Nu s-au găsit duplicate + + + Server error + + frontend/app/model/notification.service.ts + 1 + + + frontend/app/model/notification.service.ts + 1 + + Eroare de server + + + Server info + + frontend/app/model/notification.service.ts + 1 + + Informații despre server + + + h + + frontend/app/pipes/DurationPipe.ts + 1 + + hour + h + + + m + + frontend/app/pipes/DurationPipe.ts + 1 + + minute + m + + + s + + frontend/app/pipes/DurationPipe.ts + 1 + + second + s + + + ascending name + + frontend/app/pipes/StringifySortingMethod.ts + 1 + + nume ascendent + + + descending name + + frontend/app/pipes/StringifySortingMethod.ts + 1 + + nume descendent + + + ascending date + + frontend/app/pipes/StringifySortingMethod.ts + 1 + + data ascendenta + + + descending date + + frontend/app/pipes/StringifySortingMethod.ts + 1 + + data descendentă + + + random + + frontend/app/pipes/StringifySortingMethod.ts + 1 + + Aleatoriu + + + Advanced + + frontend/app/ui/admin/admin.component.ts + 1 + + Avansat + + + Simplified + + frontend/app/ui/admin/admin.component.ts + 1 + + simplificată + + + Images + + frontend/app/ui/gallery/navigator/navigator.gallery.component.ts + 1 + + Imagini + + + Yes + + frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.ts + 1 + + + frontend/app/ui/gallery/share/share.gallery.component.ts + 1 + + da + + + No + + frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.ts + 1 + + + frontend/app/ui/gallery/share/share.gallery.component.ts + 1 + + Nu + + + Url has been copied to clipboard + + frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.ts + 1 + + + frontend/app/ui/gallery/share/share.gallery.component.ts + 1 + + Url a fost copiat în clipboard + + + loading.. + + frontend/app/ui/gallery/share/share.gallery.component.ts + 1 + + + frontend/app/ui/gallery/share/share.gallery.component.ts + 1 + + se incarca.. + + + Enabled + + frontend/app/ui/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Activat + + + Disabled + + frontend/app/ui/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + invalid + + + Low + + frontend/app/ui/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Scăzut + + + High + + frontend/app/ui/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Înalt + + + settings saved + + frontend/app/ui/settings/_abstract/abstract.settings.component.ts + 1 + + Setari Salvate + + + Success + + frontend/app/ui/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Succes + + + Basic + + frontend/app/ui/settings/basic/basic.settings.component.ts + 1 + + De bază + + + Restart the server to apply the new settings + + frontend/app/ui/settings/basic/basic.settings.component.ts + 1 + + + frontend/app/ui/settings/other/other.settings.component.ts + 1 + + Reporniți serverul pentru a aplica noile setări + + + Indexing + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + Indexarea + + + Folder indexed + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + Folder indexat + + + low + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + scăzut + + + medium + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + mediu + + + high + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + înalt + + + Folder indexing started + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + A început indexarea folderului + + + Folder indexing interrupted + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + Indexarea dosarului a fost întreruptă + + + Database reset + + frontend/app/ui/settings/indexing/indexing.settings.component.ts + 1 + + Resetarea bazei de date + + + Map + + frontend/app/ui/settings/map/map.settings.component.ts + 1 + + Hartă + + + Meta file + + frontend/app/ui/settings/metafiles/metafile.settings.component.ts + 1 + + Fișier meta + + + Other + + frontend/app/ui/settings/other/other.settings.component.ts + 1 + + Alte + + + Random Media + + frontend/app/ui/settings/random-photo/random-photo.settings.component.ts + 1 + + Media aleatorie + + + Thumbnail + + frontend/app/ui/settings/thumbnail/thumbanil.settings.component.ts + 1 + + miniatură + + + (recommended) + + frontend/app/ui/settings/thumbnail/thumbanil.settings.component.ts + 1 + + (recomandat) + + + (deprecated) + + frontend/app/ui/settings/thumbnail/thumbanil.settings.component.ts + 1 + + (Învechită) + + + Password protection enabled + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Protecție prin parolă activată + + + Server restart is recommended. + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Se recomandă repornirea serverului. + + + Password protection disabled + + frontend/app/ui/settings/usermanager/usermanager.settings.component.ts + 1 + + Protecția prin parolă este dezactivată + + + Video + + frontend/app/ui/settings/video/video.settings.component.ts + 1 + + Video + + + + \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 00000000..9ccd0be1 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,165 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var gulp = require("gulp"); +var fs = require("fs"); +var zip = require("gulp-zip"); +var ts = require("gulp-typescript"); +// @ts-ignore +var jsonModify = require("gulp-json-modify"); +var exec = require('child_process').exec; +var translationFolder = 'translate'; +var tsBackendProject = ts.createProject('tsconfig.json'); +gulp.task('build-backend', function () { + return gulp.src([ + 'common/**/*.ts', + 'backend/**/*.ts' + ], { base: '.' }) + .pipe(tsBackendProject()) + .js + .pipe(gulp.dest('./release')); +}); +var handleError = function (cb) { + return function (err, stdout, stderr) { + console.log(stdout); + console.log(stderr); + cb(err); + }; +}; +var createFrontendTask = function (type, script) { + gulp.task(type, function (cb) { + exec(script, handleError(cb)); + }); +}; +var getLanguages = function () { + if (!fs.existsSync('./frontend/' + translationFolder)) { + return []; + } + var dirCont = fs.readdirSync('./frontend/' + translationFolder); + var files = dirCont.filter(function (elm) { + return elm.match(/.*\.[a-zA-Z]+\.(xlf)/ig); + }); + return files.map(function (f) { + return f.split('.')[1]; + }); +}; +gulp.task('build-frontend', (function () { + var languages = getLanguages().filter(function (l) { + return l !== 'en'; + }); + var tasks = []; + createFrontendTask('build-frontend-release default', 'ng build --aot --prod --output-path=./release/dist --no-progress --i18n-locale=en' + + ' --i18n-format xlf --i18n-file frontend/' + translationFolder + '/messages.en.xlf' + + ' --i18n-missing-translation warning'); + tasks.push('build-frontend-release default'); + for (var i = 0; i < languages.length; i++) { + createFrontendTask('build-frontend-release ' + languages[i], 'ng build --aot --prod --output-path=./release/dist/' + languages[i] + + ' --no-progress --i18n-locale=' + languages[i] + + ' --i18n-format xlf --i18n-file frontend/' + translationFolder + '/messages.' + languages[i] + '.xlf' + + ' --i18n-missing-translation warning'); + tasks.push('build-frontend-release ' + languages[i]); + } + return gulp.series.apply(gulp, tasks); +})()); +gulp.task('copy-static', function () { + return gulp.src([ + 'backend/model/diagnostics/blank.jpg', + 'README.md', + 'LICENSE' + ], { base: '.' }) + .pipe(gulp.dest('./release')); +}); +gulp.task('copy-package', function () { + return gulp.src([ + 'package.json' + ], { base: '.' }) + .pipe(jsonModify({ + key: 'devDependencies', + value: {} + })) + .pipe(jsonModify({ + key: 'scripts', + value: { 'start': 'node ./backend/index.js' } + })) + .pipe(gulp.dest('./release')); +}); +gulp.task('zip-release', function () { + return gulp.src(['release/**/*'], { base: './release' }) + .pipe(zip('pigallery2.zip')) + .pipe(gulp.dest('.')); +}); +gulp.task('build-release', gulp.series('build-frontend', 'build-backend', 'copy-static', 'copy-package', 'zip-release')); +var simpleBuild = function (isProd) { + var languages = getLanguages().filter(function (l) { + return l !== 'en'; + }); + var tasks = []; + var cmd = 'ng build --aot '; + if (isProd) { + cmd += ' --prod --no-extract-licenses '; + } + createFrontendTask('build-frontend default', cmd + '--output-path=./dist --no-progress --no-progress --i18n-locale en' + + ' --i18n-format=xlf --i18n-file=frontend/' + translationFolder + '/messages.en.xlf' + ' --i18n-missing-translation warning'); + tasks.push('build-frontend default'); + if (!process.env.CI) { // don't build languages if running in CI + for (var i = 0; i < languages.length; i++) { + createFrontendTask('build-frontend ' + languages[i], cmd + + '--output-path=./dist/' + languages[i] + + ' --no-progress --i18n-locale ' + languages[i] + + ' --i18n-format=xlf --i18n-file=frontend/' + translationFolder + + '/messages.' + languages[i] + '.xlf' + ' --i18n-missing-translation warning'); + tasks.push('build-frontend ' + languages[i]); + } + } + return gulp.series.apply(gulp, tasks); +}; +gulp.task('extract-locale', function (cb) { + console.log('creating source translation file: locale.source.xlf'); + exec('ng xi18n --out-file=./../locale.source.xlf --i18n-format=xlf --i18n-locale=en', { maxBuffer: 1024 * 1024 }, function (error, stdOut, stdErr) { + console.log(stdOut); + console.log(stdErr); + if (error) { + return cb(error); + } + exec('ngx-extractor -i frontend/**/*.ts -f xlf --out-file locale.source.xlf', handleError(cb)); + }); +}); +var translate = function (list, cb) { + var localsStr = '"[\\"' + list.join('\\",\\"') + '\\"]"'; + exec('xlf-google-translate --source-lang="en" --source-file="./locale.source.xlf" --destination-folder="./frontend/"' + + translationFolder + ' --destination-languages=' + localsStr, handleError(cb)); +}; +var merge = function (list, cb) { + var localsStr = '"[\\"' + list.join('\\",\\"') + '\\"]"'; + exec('xlf-google-translate --method="extend-only" --source-lang="en" --source-file="./locale.source.xlf" --destination-folder="./frontend/"' + + translationFolder + ' --destination-languages=' + localsStr, handleError(cb)); +}; +gulp.task('update-translation-only', function (cb) { + translate(getLanguages(), cb); +}); +gulp.task('merge-translation-only', function (cb) { + merge(getLanguages(), cb); +}); +gulp.task('update-translation', gulp.series('extract-locale', 'update-translation-only')); +gulp.task('merge-new-translation', gulp.series('extract-locale', 'merge-translation-only')); +gulp.task('add-translation-only', function (cb) { + var languages = getLanguages(); + var lng = null; + for (var i = 0; i < process.argv.length - 1; i++) { + if (process.argv[i] === 'add-translation') { + lng = process.argv[i + 1].replace('--', ''); + } + } + if (lng == null) { + console.error('Error: set language with \'--\' e.g: npm run add-translation -- --en'); + return cb(); + } + if (languages.indexOf(lng) !== -1) { + console.error('Error: language already exists, can\'t add. These language(s) already exist(s): ' + languages); + return cb(); + } + translate([lng], cb); +}); +gulp.task('add-translation', gulp.series('extract-locale', 'add-translation-only')); +gulp.task('build-dev', simpleBuild(false)); +gulp.task('build-prod', simpleBuild(true)); +//# sourceMappingURL=gulpfile.js.map \ No newline at end of file diff --git a/gulpfile.js.map b/gulpfile.js.map new file mode 100644 index 00000000..eae180ee --- /dev/null +++ b/gulpfile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"gulpfile.js","sourceRoot":"","sources":["gulpfile.ts"],"names":[],"mappings":";;AAAA,2BAA6B;AAC7B,uBAAyB;AACzB,8BAAgC;AAChC,oCAAsC;AACtC,aAAa;AACb,6CAA+C;AAG/C,IAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC;AAE3C,IAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,IAAM,gBAAgB,GAAG,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;AAE3D,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;IACzB,OAAO,IAAI,CAAC,GAAG,CAAC;QACd,gBAAgB;QAChB,iBAAiB;KAAC,EAAE,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC;SAC/B,IAAI,CAAC,gBAAgB,EAAE,CAAC;SACxB,EAAE;SACF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AAElC,CAAC,CAAC,CAAC;AAEH,IAAM,WAAW,GAAG,UAAC,EAAsB;IACzC,OAAO,UAAC,GAAQ,EAAE,MAAc,EAAE,MAAc;QAC9C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,EAAE,CAAC,GAAG,CAAC,CAAC;IACV,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,IAAM,kBAAkB,GAAG,UAAC,IAAY,EAAE,MAAc;IACtD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAC,EAAE;QACjB,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC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AI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3C,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 91820f7e..96487d24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pigallery2", - "version": "1.6.5", + "version": "1.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { From 637aa4a055f544a650666cb9d7de09d8925b43c4 Mon Sep 17 00:00:00 2001 From: Alexandru Badea Date: Sun, 22 Sep 2019 15:36:23 +0300 Subject: [PATCH 2/7] Finished ro translation --- frontend/translate/messages.ro.xlf | 269 ++++++++++++++--------------- 1 file changed, 134 insertions(+), 135 deletions(-) diff --git a/frontend/translate/messages.ro.xlf b/frontend/translate/messages.ro.xlf index 91dc8406..71d45c45 100644 --- a/frontend/translate/messages.ro.xlf +++ b/frontend/translate/messages.ro.xlf @@ -8,7 +8,7 @@ app/ui/login/login.component.html 10 - Va rugam sa va logati + Vă rugăm să vă autentificați @@ -18,7 +18,7 @@ app/ui/login/login.component.html 12 - Nume utilizator sau parolă greșită + Nume utilizator sau parolă incorectă Username @@ -34,7 +34,7 @@ app/ui/settings/database/database.settings.component.html 23 - Nume de utilizator + Nume utilizator Password @@ -62,7 +62,7 @@ app/ui/settings/database/database.settings.component.html 25 - Parola + Parolă Remember me @@ -70,7 +70,7 @@ app/ui/login/login.component.html 56 - Amintește-ți de mine + Reține-mă Login @@ -89,7 +89,7 @@ app/ui/sharelogin/share-login.component.html 11 - Parola gresita + Parolă incorectă Enter @@ -98,7 +98,7 @@ app/ui/sharelogin/share-login.component.html 41 - introduce + Intră download @@ -106,7 +106,7 @@ app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html 11 - Descarca + descarcă info key: i @@ -114,7 +114,7 @@ app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html 15 - cheie info: i + informații, tasta: i toggle fullscreen, key: f @@ -146,7 +146,7 @@ app/ui/gallery/map/lightbox/lightbox.map.gallery.component.html 94 - aproape, cheie: Evadare + închide, tasta: Esc key: left arrow @@ -154,7 +154,7 @@ app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html 76 - tasta: săgeata stângă + tasta: săgeată stânga key: right arrow @@ -162,7 +162,7 @@ app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html 80 - tasta: săgeata dreapta + tasta: săgeată dreapta Zoom out, key: '-' @@ -170,7 +170,7 @@ app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html 86 - Zoom out, tasta: '-' + Micșorează, tasta: '-' Zoom in, key: '+' @@ -178,7 +178,7 @@ app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.html 93 - Măriți, tastați: '+' + Mărește, tasta: '+' Link availability @@ -186,7 +186,7 @@ app/ui/gallery/gallery.component.html 7 - Disponibilitatea link-ului + Disponibilitatea legăturii days @@ -194,7 +194,7 @@ app/ui/gallery/gallery.component.html 9 - zi + zile @@ -204,7 +204,7 @@ app/ui/gallery/gallery.component.html 44 - Prea multe rezultate de arătat. Rafinați-vă căutarea. + Prea multe rezultate de afișat. Adjustați-vă interogarea. No faces to show. @@ -212,7 +212,7 @@ app/ui/faces/faces.component.html 15 - Fără fețe de arătat. + Nicio față de afișat. Gallery @@ -228,7 +228,7 @@ app/ui/frame/frame.component.html 21 - feţele + Fețe duplicates @@ -236,7 +236,7 @@ app/ui/frame/frame.component.html 51 - duplicate + dubluri Settings @@ -272,7 +272,7 @@ app/ui/gallery/share/share.gallery.component.html 10 - Acțiune + Partajare Copy @@ -285,7 +285,7 @@ app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html 28 - Copie + Copiere Sharing: @@ -293,7 +293,7 @@ app/ui/gallery/share/share.gallery.component.html 36 - Partajarea: + Partajare: Include subfolders: @@ -305,7 +305,7 @@ app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html 46 - Includeți subfoldere: + Include subdosare: Valid: @@ -313,7 +313,7 @@ app/ui/gallery/share/share.gallery.component.html 85 - Valabil: + Disponibil: Minutes @@ -329,7 +329,7 @@ app/ui/gallery/share/share.gallery.component.html 96 - ore + Ore Days @@ -337,7 +337,7 @@ app/ui/gallery/share/share.gallery.component.html 97 - zi + Zile Months @@ -371,7 +371,7 @@ app/ui/admin/admin.component.html 5 - Notificări pe server + Notificări de server @@ -397,7 +397,7 @@ app/ui/admin/admin.component.html 30 - mod + Mod Info @@ -405,7 +405,7 @@ app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.html 3 - Info + Informații duration @@ -429,7 +429,7 @@ app/ui/gallery/random-query-builder/random-query-builder.gallery.component.html 3 - Link aleatoriu + Legătură aleatorie Random Link generator @@ -540,7 +540,7 @@ app/ui/settings/usermanager/usermanager.settings.component.html 58 - Pentru a proteja site-ul cu parolă / aveți conectare activați acest lucru. + Pentru a proteja site-ul cu parolă / cereți utilizatorului să activeze funcția. Add new User @@ -592,7 +592,7 @@ app/ui/settings/database/database.settings.component.html 14 - Instalați manual modulul mysql pentru a utiliza mysql (npm instala mysql) + Instalați manual modulul node MuSQL pentru a utiliza MySQL (npm install mysql) MySQL settings: @@ -637,7 +637,7 @@ app/ui/settings/database/database.settings.component.html 37 - Salvați + Salvare Reset @@ -646,7 +646,7 @@ app/ui/settings/database/database.settings.component.html 40 - restabili + Restabilire Map settings @@ -662,7 +662,7 @@ app/ui/settings/map/map.settings.component.html 25 - Folosiți markere de imagine + Utilizare marcatori de imagine @@ -672,7 +672,7 @@ app/ui/settings/map/map.settings.component.html 39 - Harta va folosi imagini în miniatură ca markeri în loc de pinul implicit. + Harta va folosi miniaturi ca marcatori în loc de pinul implicit. Map provider @@ -688,7 +688,7 @@ app/ui/settings/map/map.settings.component.html 63 - Urlă de gresie * + URL plăci* *The map module will use these urls to fetch the map tiles. @@ -696,7 +696,7 @@ app/ui/settings/map/map.settings.component.html 88 - * Modulul de hartă va utiliza aceste URL-uri pentru a prelua plăcile de hartă. + *Modulul de hartă va utiliza aceste URL-uri pentru a prelua plăcile hărții. + Add Layer @@ -713,7 +713,7 @@ app/ui/settings/map/map.settings.component.html 99 - Token de acces al căsuței de hartă + Token de acces Mapbox MapBox needs an access token to work, create one at @@ -721,7 +721,7 @@ app/ui/settings/map/map.settings.component.html 105 - MapBox are nevoie de un token de acces pentru a funcționa, crea unul la + Mapbox are nevoie de un token de acces pentru a funcționa, creați unul la Save @@ -766,7 +766,7 @@ app/ui/settings/other/other.settings.component.html 168 - Salvați + Salvare Reset @@ -811,7 +811,7 @@ app/ui/settings/other/other.settings.component.html 171 - restabili + Restabilire @@ -831,8 +831,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 10 - Este recomandat să utilizați lib hardware accelerat (ascuțit sau gm) pentru miniatură -        generaţie + Este recomandat să utilizați o bibliotecă accelerată hardware (Sharp sau GraphicsMagick) pentru generarea de miniaturi Thumbnail generation library @@ -849,7 +848,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 24 - Asigurați-vă că modulul de nod ascuțit este instalat (npm instalați ascuțit). + Asigurați-vă că modulul node sharp este instalat (npm install sharp). Make sure that gm node module and @@ -857,7 +856,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 28 - Asigurați-vă că modulul gm și + Asigurați-vă că modulul node gm și GraphicsMagick @@ -873,7 +872,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 31 - sunt instalate (npm instalați ascuțit). + sunt instalate (npm install sharp). Thumbnail folder @@ -881,7 +880,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 38 - Dosarul de miniaturi + Dosar de miniaturi Thumbnails will be saved in this folder. Write access is required @@ -890,7 +889,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 44 - Miniaturile vor fi salvate în acest folder. Accesul la scriere este necesar + Miniaturile vor fi salvate în acest dosar. Accesul la scriere este necesar Thumbnail Quality @@ -906,7 +905,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 64 - Calitatea înaltă poate fi lentă. Mai ales cu Jimp. + Calitatea înaltă poate fi lentă. În special cu Jimp. Icon size (used on maps) @@ -922,7 +921,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 85 - Dimensiuni de miniatură + Dimensiunile miniaturii Size of the thumbnails. @@ -938,7 +937,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 93 - Se va genera cea mai bună dimensiune potrivită. (Mai multe dimensiuni oferă o calitate mai bună, dar folosiți spațiu de stocare și procesor pentru a reda.) + Se va genera cea mai bună dimensiune potrivită. (Dimensiunea mai mare oferă o calitate mai bună, dar utilizează spațiu pentru stocare și procesor pentru redare.) ';' separated integers. If size is 200, that thumbnail will have 200^2 pixels. @@ -946,7 +945,7 @@ app/ui/settings/thumbnail/thumbanil.settings.component.html 95 - ';' numere întregi separate. Dacă dimensiunea este 200, acea miniatură va avea 200 ^ 2 pixeli. + numere întregi separate prin „;”. Dacă dimensiunea este 200, acea miniatură va avea 200 ^ 2 pixeli. Video settings @@ -954,7 +953,7 @@ app/ui/settings/video/video.settings.component.html 4 - Setari video + Setări video Video support uses ffmpeg. ffmpeg and ffprobe binaries need to be available in the PATH or the @ffmpeg-installer/ffmpeg and @ffprobe-installer/ffprobe optional node packages need to be installed. @@ -962,7 +961,7 @@ app/ui/settings/video/video.settings.component.html 23 - Suportul video folosește ffmpeg. Binarele ffmpeg și ffprobe trebuie să fie disponibile în PATH sau în pachetele opționale de noduri @ ffmpeg-installer / ffmpeg și @ ffprobe-installer / ffprobe. + Suportul video folosește ffmpeg. Executabilele ffmpeg și ffprobe trebuie să fie disponibile în PATH sau pachetele opționale node @ffmpeg-installer/ffmpeg și @ffprobe-installer/ffprobe trebuie să fie instalate. Meta file settings @@ -970,7 +969,7 @@ app/ui/settings/metafiles/metafile.settings.component.html 4 - Setările fișierului Meta + Setările fișierului meta Reads and show *.gpx files on the map @@ -978,7 +977,7 @@ app/ui/settings/metafiles/metafile.settings.component.html 23 - Citește și arată fișiere * .gpx pe hartă + Citește și arată fișiere *.gpx pe hartă Search settings @@ -994,7 +993,7 @@ app/ui/settings/search/search.settings.component.html 27 - Completare automată + Autocompletare Show hints while typing search query @@ -1002,7 +1001,7 @@ app/ui/settings/search/search.settings.component.html 42 - Afișați indicii în timp ce tastați interogarea de căutare + Afișați indicii tastând interogarea Instant search @@ -1018,7 +1017,7 @@ app/ui/settings/search/search.settings.component.html 63 - Permite afișarea rezultatelor căutării, în timp ce introduceți interogarea de căutare + Permite afișarea rezultatelor căutării cât tastați interogarea @@ -1028,7 +1027,7 @@ app/ui/settings/search/search.settings.component.html 68 - Căutarea nu este acceptată cu aceste setări + Căutarea nu este suportată cu aceste setări Share settings @@ -1036,7 +1035,7 @@ app/ui/settings/share/share.settings.component.html 5 - Opțiuni de distribuire + Opțiuni de partajare Password protected @@ -1044,7 +1043,7 @@ app/ui/settings/share/share.settings.component.html 26 - Protectie cu parola + Protecție cu parolă Enables password protected sharing links @@ -1062,7 +1061,7 @@ app/ui/settings/share/share.settings.component.html 47 - Partajarea nu este acceptată cu aceste setări + Partajarea nu este suportată cu aceste setări Random Photo settings @@ -1082,9 +1081,9 @@ app/ui/settings/random-photo/random-photo.settings.component.html 25 - Această caracteristică vă permite să generați URL-uri „aleatoare pentru fotografii”. -          Respectiva adresă URL returnează o fotografie selectată la întâmplare din galeria dvs. -          Puteți utiliza adresa URL cu o terță parte ca fundalul desktop schimbător aleatoriu. + Această caracteristică vă permite să generați URL-uri pentru „fotografii aleatorii”. +          Respectiva adresă URL returnează o fotografie selectată aleatoriu din galeria dvs. +          Puteți utiliza adresa URL cu o terță parte precum un fundal de desktop ce se schimbă aleatoriu. @@ -1094,7 +1093,7 @@ app/ui/settings/random-photo/random-photo.settings.component.html 32 - Fotografia aleatorie nu este acceptată cu aceste setări + Fotografia aleatorie nu este suportată cu aceste setări @@ -1136,7 +1135,7 @@ app/ui/settings/basic/basic.settings.component.html 41 - Numarul portului. Portul 80 este de obicei ceea ce ai nevoie. + Numărul portului. Portul 80 este utilizat uzual. Images folder @@ -1144,7 +1143,7 @@ app/ui/settings/basic/basic.settings.component.html 46 - Folderul Imagini + Dosar cu imagini Images are loaded from this folder (read permission required) @@ -1160,7 +1159,7 @@ app/ui/settings/basic/basic.settings.component.html 57 - Pagina adresă publică + URL-ul public al paginii If you access the page form local network its good to know the public @@ -1170,8 +1169,8 @@ app/ui/settings/basic/basic.settings.component.html 64 - Dacă accesați pagina din rețeaua locală este bine să cunoașteți publicul -            url pentru crearea linkului de partajare + Dacă accesați pagina din rețeaua locală este bine să cunoașteți URL-ul +            public pentru crearea legăturii de partajare Url Base @@ -1179,7 +1178,7 @@ app/ui/settings/basic/basic.settings.component.html 71 - Url Base + Baza URL If you access the gallery under a sub url (like: @@ -1190,8 +1189,8 @@ app/ui/settings/basic/basic.settings.component.html 78 - Dacă accesați galeria sub un suburl (cum ar fi: -            http://mydomain.com/myGallery), setați-l aici. Dacă nu funcționează, este posibil să pierdeți „/” de la începutul + Dacă accesați galeria dintr-un sub-URL (cum ar fi: +            http://mydomain.com/myGallery), setați-l aici. Dacă nu funcționează, este posibil să fi omis „/” de la începutul             URL-ul. @@ -1202,7 +1201,7 @@ app/ui/settings/basic/basic.settings.component.html 85 - URL-ul public și baza URL nu se potrivesc. Este posibil ca unele funcționalități să nu funcționeze. + URL-ul public și baza URL nu se potrivesc. Este posibil ca unele funcționalități să nu meargă. Faces settings @@ -1218,7 +1217,7 @@ app/ui/settings/faces/faces.settings.component.html 27 - Anulați cuvintele cheie + Suprascrieți cuvintele cheie If a photo has the same face (person) name and keyword, the app removes the duplicate, keeping the face only. @@ -1226,7 +1225,7 @@ app/ui/settings/faces/faces.settings.component.html 42 - Dacă o fotografie are același nume (persoană) și cuvânt cheie, aplicația elimină duplicatul, păstrând doar fața. + Dacă o fotografie are aceeași față (persoană) și cuvânt cheie, aplicația elimină dublura, păstrând doar fața. Face starring right @@ -1234,7 +1233,7 @@ app/ui/settings/faces/faces.settings.component.html 48 - Fața înfipt în dreapta + Dreptul de a stela fețe Required minimum right to start (favourite) a face. @@ -1242,7 +1241,7 @@ app/ui/settings/faces/faces.settings.component.html 54 - Drept minim necesar pentru a începe (preferat) o față. + Drept minim necesar pentru a stela (adăuga la favorite) o față. @@ -1252,7 +1251,7 @@ app/ui/settings/faces/faces.settings.component.html 59 - Fețele nu sunt acceptate cu aceste setări. + Fețele nu sunt suportate cu aceste setări. @@ -1262,7 +1261,7 @@ app/ui/settings/other/other.settings.component.html 3 - Alte setari + Alte setări Error: @@ -1278,7 +1277,7 @@ app/ui/settings/other/other.settings.component.html 10 - Subiecte: + Fire (de execuție): Threading @@ -1286,7 +1285,7 @@ app/ui/settings/other/other.settings.component.html 12 - Filetat + Multithreading Runs directory scanning and thumbnail generation (only for Jimp) in a @@ -1296,8 +1295,8 @@ app/ui/settings/other/other.settings.component.html 26 - Se execută scanarea și generarea de miniaturi (numai pentru Jimp) în directorul -            fir diferit + Se execută scanarea directorului și generarea de miniaturi (numai pentru Jimp) într-un +            alt fir Thumbnail threads @@ -1305,7 +1304,7 @@ app/ui/settings/other/other.settings.component.html 33 - Fire de miniatură + Firele pentru miniatură Number of threads that are used to generate thumbnails. If auto, number of CPU cores -1 threads will be used. @@ -1313,7 +1312,7 @@ app/ui/settings/other/other.settings.component.html 40 - Numărul de fire care sunt utilizate pentru a genera miniaturi. Dacă este automat, se vor utiliza un număr de nuclee CPU -1 fire. + Numărul de fire pentru generarea miniaturilor. Dacă este automat, se vor utiliza unumărul de nuclee CPU -1 fire. Misc: @@ -1330,8 +1329,8 @@ app/ui/settings/other/other.settings.component.html 47 - Derulați miniatura bazată pe -          generaţie + Generarea miniaturii după +          derulare Those thumbnails get higher priority that are visible on the screen @@ -1348,7 +1347,7 @@ app/ui/settings/other/other.settings.component.html 68 - Redarea imaginilor leneșe + Redarea leneșă imaginilor Shows only the required amount of photos at once. Renders more if @@ -1358,8 +1357,8 @@ app/ui/settings/other/other.settings.component.html 82 - Afișează doar cantitatea necesară de fotografii simultan. Renderi mai mult dacă -            pagina de jos este atinsă + Afișează doar cantitatea necesară de fotografii simultan. Afișează mai multe +            dacă s-a ajuns la capătul paginii Cache @@ -1367,7 +1366,7 @@ app/ui/settings/other/other.settings.component.html 90 - ascunzătoare + Cache Caches directory contents and search results for better performance @@ -1376,7 +1375,7 @@ app/ui/settings/other/other.settings.component.html 104 - Cache conținutul directorului și rezultatele căutării pentru o performanță mai bună + Cache-ează conținutul directorului și rezultatele căutării pentru o performanță mai bună Caption first naming @@ -1384,7 +1383,7 @@ app/ui/settings/other/other.settings.component.html 111 - Subtitrare pentru prima dată + Primul nume al legendei Show the caption (IPTC 120) tags from the EXIF data instead of the filenames. @@ -1418,7 +1417,7 @@ app/ui/settings/other/other.settings.component.html 147 - Afișează numărul de articole (fotografii) din folder + Afișează numărul de articole (fotografii) din dosar Default photo sorting method @@ -1444,7 +1443,7 @@ app/ui/settings/indexing/indexing.settings.component.html 11 - Indexarea expirării cache [ms] + Expirarea indexării cache [ms] If there was no indexing in this time, it reindexes. (skipped if @@ -1454,7 +1453,7 @@ app/ui/settings/indexing/indexing.settings.component.html 19 - Dacă nu a existat nicio indexare în acest timp, aceasta reindexează. (a sărit dacă + Dacă nu a existat nicio indexare în acest timp, se reindexează. (se sare dacă               indicii sunt în DB și sensibilitatea este scăzută) @@ -1463,7 +1462,7 @@ app/ui/settings/indexing/indexing.settings.component.html 25 - Mărimea previzualizării folderului + Mărimea previzualizării subdosarului Reads this many photos from sub folders @@ -1471,7 +1470,7 @@ app/ui/settings/indexing/indexing.settings.component.html 33 - Citește multe fotografii din sub foldere + Citește atâtea fotografii din subdosare Folder reindexing sensitivity @@ -1479,7 +1478,7 @@ app/ui/settings/indexing/indexing.settings.component.html 38 - Folder reindexing sensibilitate + Sensibilitatea reindexării dosarelor Set the reindexing sensitivity. High value check the folders for change more often @@ -1488,7 +1487,7 @@ app/ui/settings/indexing/indexing.settings.component.html 47 - Setați sensibilitatea reindexing. Valoare ridicată verifică modificarea folderelor mai des + Setați sensibilitatea reindexării. O valoare ridicată verifică modificarea dosarelor mai des Save @@ -1497,7 +1496,7 @@ app/ui/settings/indexing/indexing.settings.component.html 55 - Salvați + Salvare Reset @@ -1506,7 +1505,7 @@ app/ui/settings/indexing/indexing.settings.component.html 58 - restabili + Restabilire If you add a new folder to your gallery, the site indexes it automatically. @@ -1514,7 +1513,7 @@ app/ui/settings/indexing/indexing.settings.component.html 64 - Dacă adăugați un nou folder la galeria dvs., site-ul îl indexează automat. + Dacă adăugați un nou dosar la galeria dvs., site-ul îl indexează automat. If you would like to trigger indexing manually, click index button. @@ -1522,7 +1521,7 @@ app/ui/settings/indexing/indexing.settings.component.html 65 - Dacă doriți să declanșați indexarea manual, faceți clic pe butonul index. + Dacă doriți să declanșați indexarea manual, apăsați butonul index. Note: search only works among the indexed directories @@ -1554,7 +1553,7 @@ app/ui/settings/indexing/indexing.settings.component.html 75 - stânga + rămas Index @@ -1571,7 +1570,7 @@ app/ui/settings/indexing/indexing.settings.component.html 94 - Indexează folderele + Indexează dosarele Index with Thumbnails @@ -1606,7 +1605,7 @@ app/ui/settings/indexing/indexing.settings.component.html 112 - Resetați indexurile + Resetare indecși @@ -1616,7 +1615,7 @@ app/ui/settings/indexing/indexing.settings.component.html 117 - Statistic: + Statistici: Folders @@ -1648,7 +1647,7 @@ app/ui/settings/indexing/indexing.settings.component.html 134 - mărimea + Dimensiuni @@ -1658,7 +1657,7 @@ app/ui/duplicates/duplicates.component.html 8 - Nu s-au găsit duplicate + Nicio dublură găsită Server error @@ -1713,7 +1712,7 @@ frontend/app/pipes/StringifySortingMethod.ts 1 - nume ascendent + nume crescător descending name @@ -1721,7 +1720,7 @@ frontend/app/pipes/StringifySortingMethod.ts 1 - nume descendent + nume descrescător ascending date @@ -1729,7 +1728,7 @@ frontend/app/pipes/StringifySortingMethod.ts 1 - data ascendenta + data crescătoare descending date @@ -1737,7 +1736,7 @@ frontend/app/pipes/StringifySortingMethod.ts 1 - data descendentă + data descrescătoare random @@ -1745,7 +1744,7 @@ frontend/app/pipes/StringifySortingMethod.ts 1 - Aleatoriu + aleatoriu Advanced @@ -1761,7 +1760,7 @@ frontend/app/ui/admin/admin.component.ts 1 - simplificată + Simplificat Images @@ -1781,7 +1780,7 @@ frontend/app/ui/gallery/share/share.gallery.component.ts 1 - da + Da No @@ -1805,7 +1804,7 @@ frontend/app/ui/gallery/share/share.gallery.component.ts 1 - Url a fost copiat în clipboard + URL-ul a fost copiat în planșetă loading.. @@ -1817,7 +1816,7 @@ frontend/app/ui/gallery/share/share.gallery.component.ts 1 - se incarca.. + încărcare... Enabled @@ -1841,7 +1840,7 @@ frontend/app/ui/settings/usermanager/usermanager.settings.component.ts 1 - invalid + Dezactivat Low @@ -1873,7 +1872,7 @@ frontend/app/ui/settings/_abstract/abstract.settings.component.ts 1 - Setari Salvate + setări salvate Success @@ -1925,7 +1924,7 @@ frontend/app/ui/settings/indexing/indexing.settings.component.ts 1 - Indexarea + Indexare Folder indexed @@ -1933,7 +1932,7 @@ frontend/app/ui/settings/indexing/indexing.settings.component.ts 1 - Folder indexat + Dosar indexat low @@ -1965,7 +1964,7 @@ frontend/app/ui/settings/indexing/indexing.settings.component.ts 1 - A început indexarea folderului + Indexarea dosarelor a început Folder indexing interrupted @@ -1973,7 +1972,7 @@ frontend/app/ui/settings/indexing/indexing.settings.component.ts 1 - Indexarea dosarului a fost întreruptă + Indexarea dosarelor s-a întrerupt Database reset @@ -1981,7 +1980,7 @@ frontend/app/ui/settings/indexing/indexing.settings.component.ts 1 - Resetarea bazei de date + Restabilirea bazei de date Map @@ -2005,7 +2004,7 @@ frontend/app/ui/settings/other/other.settings.component.ts 1 - Alte + Altele Random Media @@ -2021,7 +2020,7 @@ frontend/app/ui/settings/thumbnail/thumbanil.settings.component.ts 1 - miniatură + Miniatură (recommended) @@ -2037,7 +2036,7 @@ frontend/app/ui/settings/thumbnail/thumbanil.settings.component.ts 1 - (Învechită) + (depreciat) Password protection enabled @@ -2061,7 +2060,7 @@ frontend/app/ui/settings/usermanager/usermanager.settings.component.ts 1 - Protecția prin parolă este dezactivată + Protecție prin parolă dezactivată Video From 3956b2d944e459db791bd3ce58da71d6e5aec1d2 Mon Sep 17 00:00:00 2001 From: Suika <2320837+Suika@users.noreply.github.com> Date: Thu, 3 Oct 2019 02:09:56 +0200 Subject: [PATCH 3/7] Alpine docker container Build everything in the staged container and only copy the complete product to the final container. Also reduced the size of the container threefold. Created `data/{config,db,images,TEMP}` to make volumes possible for ease of use with docker and persistence of configurations. `config.json` symlinks to `data/config/config.json` since I don'T know how to call for the config in different path --- docker/alpine/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docker/alpine/Dockerfile diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile new file mode 100644 index 00000000..3456d6a5 --- /dev/null +++ b/docker/alpine/Dockerfile @@ -0,0 +1,22 @@ +FROM node:alpine +RUN apk add python build-base +COPY . /build +WORKDIR /build +RUN set -x && npm install --unsafe-perm && npm run build-release && \ + cd /build/release && npm install --unsafe-perm +RUN mkdir -p /build/release/data/config && \ + mkdir -p /build/release/data/db && \ + mkdir -p /build/release/data/image && \ + mkdir -p /build/release/data/TEMP && \ + cd /build/release && node backend/server.js && \ + sed -i 's/demo/data/g' config.json && sed -i 's@sqlite\.db@data/db/sqlite\.db@' config.json && \ + mv /build/release/config.json /build/release/data/config/config.json + +FROM node:alpine +WORKDIR /app +ENTRYPOINT ["npm", "start"] +EXPOSE 80 +ENV NODE_ENV=production +COPY --from=0 /build/release /app +RUN ln -s /app/data/config/config.json config.json +VOLUME ["/app/data/config", "/app/data/db", "/app/data/images", "/app/data/TEMP"] From 9c6a7c97e3f86afc4bd280b5c6d824fa0aa6b0ad Mon Sep 17 00:00:00 2001 From: Suika <2320837+Suika@users.noreply.github.com> Date: Thu, 3 Oct 2019 02:56:20 +0200 Subject: [PATCH 4/7] Add healthcheck --- docker/alpine/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index 3456d6a5..dc6bebe8 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -20,3 +20,6 @@ ENV NODE_ENV=production COPY --from=0 /build/release /app RUN ln -s /app/data/config/config.json config.json VOLUME ["/app/data/config", "/app/data/db", "/app/data/images", "/app/data/TEMP"] +HEALTHCHECK --interval=15s --timeout=5s --retries=4 --start-period=30s \ + CMD wget --quiet --tries=1 --no-check-certificate --spider \ + http://localhost:80 || exit 1 From b9277e5f635999b7cd810d54cf82f38def6d216b Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Tue, 5 Nov 2019 09:22:40 +0100 Subject: [PATCH 5/7] Update .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0c010b7a..a63184a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ language: node_js node_js: - '10' - '11' + - '12' + - '13' env: - MYSQL_HOST='localhost' MYSQL_PASSWORD='' MYSQL_USERNAME='root' MYSQL_DATABASE='pigallery2_test' services: From 719a2e01d8f7aba9895604fa9ca244c33990bf49 Mon Sep 17 00:00:00 2001 From: Tim Morley Date: Wed, 4 Dec 2019 21:40:57 +0000 Subject: [PATCH 6/7] Ability to exclude directories, and config to choose them. --- backend/model/threading/DiskMangerWorker.ts | 47 +++++++++++++++++++ common/config/private/IPrivateConfig.ts | 2 + common/config/private/PrivateConfigClass.ts | 4 +- .../indexing/indexing.settings.component.html | 30 ++++++++++++ .../indexing/indexing.settings.component.ts | 16 +++++++ frontend/app/ui/settings/settings.service.ts | 4 +- 6 files changed, 101 insertions(+), 2 deletions(-) diff --git a/backend/model/threading/DiskMangerWorker.ts b/backend/model/threading/DiskMangerWorker.ts index ba59c8b4..9ee661bb 100644 --- a/backend/model/threading/DiskMangerWorker.ts +++ b/backend/model/threading/DiskMangerWorker.ts @@ -57,6 +57,50 @@ export class DiskMangerWorker { return path.basename(name); } + public static excludeDir(name: string,relativeDirectoryName: string, absoluteDirectoryName: string) { + const absoluteName=path.normalize(path.join(absoluteDirectoryName,name)); + const relativeName=path.normalize(path.join(relativeDirectoryName,name)); + + + console.log("----- Starting exlude dir -----"); + console.log("name %s",name); + console.log("absoluteDirectoryName %s",absoluteDirectoryName); + console.log("absoluteName %s",absoluteName); + console.log("relativeDirectoryName %s",relativeDirectoryName); + console.log("relativeName %s",relativeName); + console.log("Config.Server.indexing.excludeFolderList %s",Config.Server.indexing.excludeFolderList); + + for (let j = 0; j < Config.Server.indexing.excludeFolderList.length; j++) { + const exclude=Config.Server.indexing.excludeFolderList[j]; + console.log("trying dir %s",exclude); + + if (exclude.startsWith('/')) { + if (exclude==absoluteName) { + return true; + } + } else if (exclude.includes('/')) { + if (path.normalize(exclude)==relativeName) { + return true; + } + } else { + if (exclude==name) { + return true; + } + } + } + + for (let j = 0; j < Config.Server.indexing.excludeFileList.length; j++) { + const exclude=Config.Server.indexing.excludeFileList[j]; + console.log("trying file %s",exclude); + + if (fs.existsSync(path.join(absoluteName,exclude))) { + return true; + } + } + + return false; + } + public static scanDirectory(relativeDirectoryName: string, maxPhotos: number = null, photosOnly: boolean = false): Promise { return new Promise((resolve, reject) => { relativeDirectoryName = this.normalizeDirPath(relativeDirectoryName); @@ -90,6 +134,9 @@ export class DiskMangerWorker { if (photosOnly === true) { continue; } + if (DiskMangerWorker.excludeDir(file,relativeDirectoryName,absoluteDirectoryName)) { + continue; + } const d = await DiskMangerWorker.scanDirectory(path.join(relativeDirectoryName, file), Config.Server.indexing.folderPreviewSize, true ); diff --git a/common/config/private/IPrivateConfig.ts b/common/config/private/IPrivateConfig.ts index f96a5446..6b8ff96d 100644 --- a/common/config/private/IPrivateConfig.ts +++ b/common/config/private/IPrivateConfig.ts @@ -54,6 +54,8 @@ export interface IndexingConfig { folderPreviewSize: number; cachedFolderTimeout: number; // Do not rescans the folder if seems ok reIndexingSensitivity: ReIndexingSensitivity; + excludeFolderList: string[] + excludeFileList: string[] } export interface ThreadingConfig { diff --git a/common/config/private/PrivateConfigClass.ts b/common/config/private/PrivateConfigClass.ts index c025d447..4e56005d 100644 --- a/common/config/private/PrivateConfigClass.ts +++ b/common/config/private/PrivateConfigClass.ts @@ -57,7 +57,9 @@ export class PrivateConfigClass extends PublicConfigClass implements IPrivateCon indexing: { folderPreviewSize: 2, cachedFolderTimeout: 1000 * 60 * 60, - reIndexingSensitivity: ReIndexingSensitivity.low + reIndexingSensitivity: ReIndexingSensitivity.low, + excludeFolderList: [], + excludeFileList: [] }, duplicates: { listingLimit: 1000 diff --git a/frontend/app/ui/settings/indexing/indexing.settings.component.html b/frontend/app/ui/settings/indexing/indexing.settings.component.html index 2adbb212..99181d2b 100644 --- a/frontend/app/ui/settings/indexing/indexing.settings.component.html +++ b/frontend/app/ui/settings/indexing/indexing.settings.component.html @@ -49,6 +49,36 @@ +
+ +
+ + + Folders to exclude from indexing
+ ';' separated strings. If an entry starts with '/' it is treated as an absolute path. If it doesn't start with '/' but contains a '/', the path is relative to the image directory. If it doesn't contain a '/', any folder with this name will be excluded. +
+
+
+ +
+ +
+ + + FFiles that mark a folder to be excluded from indexing
+ ';' separated strings. Any folder that contains a file with this name will be excluded from indexing. +
+
+
+