From 7e425fc54e3433df265956587b53715fba7a4302 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Fri, 30 Mar 2018 17:59:43 -0400 Subject: [PATCH] fixing language error --- frontend/app/language/language.component.css | 2 +- frontend/app/login/login.component.html | 2 + frontend/translate/messages.en.xlf | 1289 ++++++++++++++++++ frontend/translate/messages.hu.xlf | 4 +- gulpfile.js | 10 +- 5 files changed, 1301 insertions(+), 6 deletions(-) create mode 100644 frontend/translate/messages.en.xlf diff --git a/frontend/app/language/language.component.css b/frontend/app/language/language.component.css index 9d4ec5ec..71cc4087 100644 --- a/frontend/app/language/language.component.css +++ b/frontend/app/language/language.component.css @@ -4,7 +4,7 @@ .dark { background-color: #222; - color: #FFF; + color: #9d9d9d; border-color: transparent; } diff --git a/frontend/app/login/login.component.html b/frontend/app/login/login.component.html index 04f17df6..9cc6e749 100644 --- a/frontend/app/login/login.component.html +++ b/frontend/app/login/login.component.html @@ -20,6 +20,7 @@ class="form-control" i18n-placeholder placeholder="Username" + autocomplete="login-username" autofocus [(ngModel)]="loginCredential.username" name="username" required> @@ -32,6 +33,7 @@ type="password" [(ngModel)]="loginCredential.password" name="password" + autocomplete="login-password" i18n-placeholder placeholder="Password" required> diff --git a/frontend/translate/messages.en.xlf b/frontend/translate/messages.en.xlf new file mode 100644 index 00000000..5022158d --- /dev/null +++ b/frontend/translate/messages.en.xlf @@ -0,0 +1,1289 @@ + + + + + + Please log in + + app/login/login.component.ts + 11 + + Please log in + + + + Wrong username or password + + + app/login/login.component.ts + 13 + + + Wrong username or password + + + + Username + + app/login/login.component.ts + 22 + + + app/settings/usermanager/usermanager.settings.component.ts + 77 + + + app/settings/database/database.settings.component.ts + 22 + + Username + + + Password + + app/login/login.component.ts + 36 + + + app/sharelogin/share-login.component.ts + 25 + + + app/gallery/share/share.gallery.component.ts + 67 + + + app/gallery/share/share.gallery.component.ts + 78 + + + app/settings/usermanager/usermanager.settings.component.ts + 79 + + + app/settings/database/database.settings.component.ts + 24 + + Password + + + Remember me + + app/login/login.component.ts + 42 + + Remember me + + + Login + + + app/login/login.component.ts + 52 + + Login + + + + + Wrong password + + + app/sharelogin/share-login.component.ts + 13 + + + Wrong password + + + + Enter + + + app/sharelogin/share-login.component.ts + 36 + + Enter + + + + download + + app/gallery/lightbox/lightbox.gallery.component.ts + 23 + + download + + + info + + app/gallery/lightbox/lightbox.gallery.component.ts + 26 + + info + + + toggle fullscreen + + app/gallery/lightbox/lightbox.gallery.component.ts + 30 + + + app/gallery/lightbox/lightbox.gallery.component.ts + 34 + + toggle fullscreen + + + close + + app/gallery/lightbox/lightbox.gallery.component.ts + 36 + + close + + + key: left arrow + + app/gallery/lightbox/lightbox.gallery.component.ts + 40 + + key: left arrow + + + key: right arrow + + app/gallery/lightbox/lightbox.gallery.component.ts + 44 + + key: right arrow + + + Search + + app/gallery/search/search.gallery.component.ts + 6 + + Search + + + Link availability + + app/gallery/gallery.component.ts + 8 + + Link availability + + + days + + app/gallery/gallery.component.ts + 10 + + days + + + + Too many results to show. Refine your search. + + + app/gallery/gallery.component.ts + 39 + + + Too many results to show. Refine your search. + + + + Searching for: + + app/gallery/gallery.component.ts + 44 + + Searching for: + + + Logout + + app/frame/frame.component.ts + 45 + + Logout + + + Share + + app/gallery/share/share.gallery.component.ts + 4 + + + app/gallery/share/share.gallery.component.ts + 18 + + Share + + + Copy + + + app/gallery/share/share.gallery.component.ts + 34 + + Copy + + + + Sharing: + + app/gallery/share/share.gallery.component.ts + 41 + + Sharing: + + + Include subfolders: + + app/gallery/share/share.gallery.component.ts + 52 + + Include subfolders: + + + Valid: + + app/gallery/share/share.gallery.component.ts + 84 + + Valid: + + + Minutes + + app/gallery/share/share.gallery.component.ts + 94 + + Minutes + + + Hours + + app/gallery/share/share.gallery.component.ts + 95 + + Hours + + + Days + + app/gallery/share/share.gallery.component.ts + 96 + + Days + + + Months + + app/gallery/share/share.gallery.component.ts + 97 + + Months + + + Server notifications + + app/admin/admin.component.ts + 6 + + Server notifications + + + + To dismiss these notifications, restart the server. + + + app/admin/admin.component.ts + 19 + + + To dismiss these notifications, restart the server. + + + + Mode + + app/admin/admin.component.ts + 25 + + Mode + + + Info + + app/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.ts + 5 + + Info + + + Password protection + + app/settings/usermanager/usermanager.settings.component.ts + 3 + + Password protection + + + Name + + app/settings/usermanager/usermanager.settings.component.ts + 27 + + Name + + + Role + + app/settings/usermanager/usermanager.settings.component.ts + 28 + + Role + + + + Add user + + + app/settings/usermanager/usermanager.settings.component.ts + 55 + + + Add user + + + + + To protect the site with password / have login enable this. + + + app/settings/usermanager/usermanager.settings.component.ts + 58 + + + To protect the site with password / have login enable this. + + + + Add new User + + app/settings/usermanager/usermanager.settings.component.ts + 72 + + Add new User + + + Close + + app/settings/usermanager/usermanager.settings.component.ts + 87 + + Close + + + Add User + + + app/settings/usermanager/usermanager.settings.component.ts + 90 + + Add User + + + + Database settings + + app/settings/database/database.settings.component.ts + 3 + + Database settings + + + Type: + + app/settings/database/database.settings.component.ts + 8 + + Type: + + + Install manually mysql node module to use mysql (npm install mysql) + + app/settings/database/database.settings.component.ts + 14 + + Install manually mysql node module to use mysql (npm install mysql) + + + MySQL settings: + + app/settings/database/database.settings.component.ts + 17 + + MySQL settings: + + + Host + + app/settings/database/database.settings.component.ts + 18 + + Host + + + Database + + app/settings/database/database.settings.component.ts + 20 + + Database + + + SQLie settings: + + app/settings/database/database.settings.component.ts + 28 + + SQLie settings: + + + Save + + + app/settings/database/database.settings.component.ts + 36 + + Save + + + + Reset + + + app/settings/database/database.settings.component.ts + 39 + + Reset + + + + Map settings + + app/settings/map/map.settings.component.ts + 4 + + Map settings + + + Google maps api key + + app/settings/map/map.settings.component.ts + 25 + + Google maps api key + + + To show the images on a map, + + app/settings/map/map.settings.component.ts + 31 + + To show the images on a map, + + + google api key + + app/settings/map/map.settings.component.ts + 32 + + google api key + + + is need + + app/settings/map/map.settings.component.ts + 33 + + is need + + + Save + + + app/settings/map/map.settings.component.ts + 41 + + + app/settings/thumbnail/thumbanil.settings.component.ts + 98 + + + app/settings/search/search.settings.component.ts + 73 + + + app/settings/share/share.settings.component.ts + 52 + + + app/settings/basic/basic.settings.component.ts + 57 + + + app/settings/other/other.settings.component.ts + 91 + + Save + + + + Reset + + + app/settings/map/map.settings.component.ts + 44 + + + app/settings/thumbnail/thumbanil.settings.component.ts + 101 + + + app/settings/search/search.settings.component.ts + 76 + + + app/settings/share/share.settings.component.ts + 55 + + + app/settings/basic/basic.settings.component.ts + 60 + + + app/settings/other/other.settings.component.ts + 94 + + Reset + + + + Thumbnail settings + + app/settings/thumbnail/thumbanil.settings.component.ts + 4 + + Thumbnail settings + + + It is highly recommended to use hardware accelerated (sharp or gm) lib for thumbnail + generation + + + app/settings/thumbnail/thumbanil.settings.component.ts + 10 + + It is highly recommended to use hardware accelerated (sharp or gm) lib for thumbnail + generation + + + + Thumbnail generation library + + app/settings/thumbnail/thumbanil.settings.component.ts + 16 + + Thumbnail generation library + + + Make sure that sharp node module is installed (npm install sharp). + + app/settings/thumbnail/thumbanil.settings.component.ts + 24 + + Make sure that sharp node module is installed (npm install sharp). + + + Make sure that gm node module and + + app/settings/thumbnail/thumbanil.settings.component.ts + 26 + + Make sure that gm node module and + + + GraphicsMagick + + app/settings/thumbnail/thumbanil.settings.component.ts + 27 + + GraphicsMagick + + + are installed (npm install sharp). + + app/settings/thumbnail/thumbanil.settings.component.ts + 27 + + are installed (npm install sharp). + + + Thumbnail folder + + app/settings/thumbnail/thumbanil.settings.component.ts + 33 + + Thumbnail folder + + + Thumbnails will be saved in this folder. Write access is required + + app/settings/thumbnail/thumbanil.settings.component.ts + 39 + + Thumbnails will be saved in this folder. Write access is required + + + Thumbnail Quality + + app/settings/thumbnail/thumbanil.settings.component.ts + 44 + + Thumbnail Quality + + + High quality may be slow. Especially with Jimp. + + app/settings/thumbnail/thumbanil.settings.component.ts + 58 + + High quality may be slow. Especially with Jimp. + + + Icon size (used on maps) + + app/settings/thumbnail/thumbanil.settings.component.ts + 73 + + Icon size (used on maps) + + + Thumbnail sizes + + app/settings/thumbnail/thumbanil.settings.component.ts + 79 + + Thumbnail sizes + + + Size of the thumbnails. + + app/settings/thumbnail/thumbanil.settings.component.ts + 86 + + Size of the thumbnails. + + + The best matching size will be generated. (More size gives better quality, but use storage to store and CPU to render.) + + app/settings/thumbnail/thumbanil.settings.component.ts + 87 + + The best matching size will be generated. (More size gives better quality, but use storage to store and CPU to render.) + + + ';' separated integers. If size is 200, tha thumbnail will have 200^2 pixels. + + app/settings/thumbnail/thumbanil.settings.component.ts + 89 + + ';' separated integers. If size is 200, tha thumbnail will have 200^2 pixels. + + + Search settings + + app/settings/search/search.settings.component.ts + 5 + + Search settings + + + Autocomplete + + app/settings/search/search.settings.component.ts + 27 + + Autocomplete + + + Show hints while typing search query + + app/settings/search/search.settings.component.ts + 42 + + Show hints while typing search query + + + Instant search + + app/settings/search/search.settings.component.ts + 48 + + Instant search + + + Enables showing search results, while typing search query + + app/settings/search/search.settings.component.ts + 63 + + Enables showing search results, while typing search query + + + + Search is not supported with these settings + + + app/settings/search/search.settings.component.ts + 68 + + + Search is not supported with these settings + + + + Share settings + + app/settings/share/share.settings.component.ts + 5 + + Share settings + + + Password protected + + app/settings/share/share.settings.component.ts + 26 + + Password protected + + + Enables password protected sharing links + + app/settings/share/share.settings.component.ts + 41 + + Enables password protected sharing links + + + + Sharing is not supported with these settings + + + app/settings/share/share.settings.component.ts + 47 + + + Sharing is not supported with these settings + + + + Basic settings + + app/settings/basic/basic.settings.component.ts + 4 + + Basic settings + + + Page title + + app/settings/basic/basic.settings.component.ts + 11 + + Page title + + + Port number. Port 80 is usually what you need. + + app/settings/basic/basic.settings.component.ts + 29 + + Port number. Port 80 is usually what you need. + + + Images are loaded from this folder (read permission required) + + app/settings/basic/basic.settings.component.ts + 40 + + Images are loaded from this folder (read permission required) + + + Page public url + + app/settings/basic/basic.settings.component.ts + 45 + + Page public url + + + If you access the page form local network its good to know the public url for creating sharing link + + app/settings/basic/basic.settings.component.ts + 51 + + If you access the page form local network its good to know the public url for creating sharing link + + + Other settings + + app/settings/other/other.settings.component.ts + 4 + + Other settings + + + Error: + + app/settings/other/other.settings.component.ts + 7 + + Error: + + + Threading + + app/settings/other/other.settings.component.ts + 11 + + Threading + + + Runs directory scanning and thumbnail generation (only for Jimp) in a different thread + + app/settings/other/other.settings.component.ts + 25 + + Runs directory scanning and thumbnail generation (only for Jimp) in a different thread + + + Scroll based thumbnail + generation + + app/settings/other/other.settings.component.ts + 30 + + Scroll based thumbnail + generation + + + Those thumbnails get higher priority that are visible on the screen + + app/settings/other/other.settings.component.ts + 45 + + Those thumbnails get higher priority that are visible on the screen + + + Lazy image rendering + + app/settings/other/other.settings.component.ts + 50 + + Lazy image rendering + + + Shows only the required amount of photos at once. Renders more if page bottom is reached + + app/settings/other/other.settings.component.ts + 64 + + Shows only the required amount of photos at once. Renders more if page bottom is reached + + + Cache + + app/settings/other/other.settings.component.ts + 70 + + Cache + + + Caches directory contents and search results for better performance + + app/settings/other/other.settings.component.ts + 84 + + Caches directory contents and search results for better performance + + + Folder indexing + + app/settings/indexing/indexing.settings.component.ts + 4 + + Folder indexing + + + Index cache timeout [ms] + + app/settings/indexing/indexing.settings.component.ts + 11 + + Index cache timeout [ms] + + + If there was no indexing in this time, it reindexes. (skipped if indexen in DB and sensitivity is low) + + app/settings/indexing/indexing.settings.component.ts + 19 + + If there was no indexing in this time, it reindexes. (skipped if indexen in DB and sensitivity is low) + + + Sub folder preview size + + app/settings/indexing/indexing.settings.component.ts + 23 + + Sub folder preview size + + + Reads this many photos from sub folders + + app/settings/indexing/indexing.settings.component.ts + 31 + + Reads this many photos from sub folders + + + Folder reindexing sensitivity + + app/settings/indexing/indexing.settings.component.ts + 36 + + Folder reindexing sensitivity + + + Set the reindexing sensitivity. High value check the folders for change more often + + app/settings/indexing/indexing.settings.component.ts + 45 + + Set the reindexing sensitivity. High value check the folders for change more often + + + Save + + + app/settings/indexing/indexing.settings.component.ts + 52 + + Save + + + + Reset + + + app/settings/indexing/indexing.settings.component.ts + 55 + + Reset + + + + If you add a new folder to your gallery, the site indexes it automatically. + + app/settings/indexing/indexing.settings.component.ts + 61 + + If you add a new folder to your gallery, the site indexes it automatically. + + + If you would like to trigger indexing manually, click index button. + + app/settings/indexing/indexing.settings.component.ts + 62 + + If you would like to trigger indexing manually, click index button. + + + Note: search only works among the indexed directories + + app/settings/indexing/indexing.settings.component.ts + 65 + + Note: search only works among the indexed directories + + + Index + + + app/settings/indexing/indexing.settings.component.ts + 88 + + Index + + + + Cancel + + + app/settings/indexing/indexing.settings.component.ts + 93 + + Cancel + + + + Reset Indexes + + + app/settings/indexing/indexing.settings.component.ts + 97 + + Reset Indexes + + + + Advanced + + frontend/app/admin/admin.component.ts + 1 + + Advanced + + + Simplified + + frontend/app/admin/admin.component.ts + 1 + + Simplified + + + Images + + frontend/app/gallery/navigator/navigator.gallery.component.ts + 1 + + + frontend/app/gallery/navigator/navigator.gallery.component.ts + 1 + + Images + + + Url has been copied to clipboard + + frontend/app/gallery/share/share.gallery.component.ts + 1 + + Url has been copied to clipboard + + + Server error + + frontend/app/model/notification.service.ts + 1 + + + frontend/app/model/notification.service.ts + 1 + + Server error + + + Server info + + frontend/app/model/notification.service.ts + 1 + + Server info + + + Enabled + + frontend/app/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + Enabled + + + Disabled + + frontend/app/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + Disabled + + + Low + + frontend/app/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + Low + + + High + + frontend/app/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + High + + + settings saved + + frontend/app/settings/_abstract/abstract.settings.component.ts + 1 + + settings saved + + + Success + + frontend/app/settings/_abstract/abstract.settings.component.ts + 1 + + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + Success + + + Basic + + frontend/app/settings/basic/basic.settings.component.ts + 1 + + Basic + + + Indexing + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + Indexing + + + Folder indexed + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + Folder indexed + + + Database reset + + frontend/app/settings/indexing/indexing.settings.component.ts + 1 + + Database reset + + + Map + + frontend/app/settings/map/map.settings.component.ts + 1 + + Map + + + Other + + frontend/app/settings/other/other.settings.component.ts + 1 + + Other + + + Restart the server to apply the new settings + + frontend/app/settings/other/other.settings.component.ts + 1 + + Restart the server to apply the new settings + + + Thumbnail + + frontend/app/settings/thumbnail/thumbanil.settings.component.ts + 1 + + Thumbnail + + + (recommended) + + frontend/app/settings/thumbnail/thumbanil.settings.component.ts + 1 + + (recommended) + + + Password protection enabled + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + Password protection enabled + + + Password protection disabled + + frontend/app/settings/usermanager/usermanager.settings.component.ts + 1 + + Password protection disabled + + + + \ No newline at end of file diff --git a/frontend/translate/messages.hu.xlf b/frontend/translate/messages.hu.xlf index 19037335..1b2cda53 100644 --- a/frontend/translate/messages.hu.xlf +++ b/frontend/translate/messages.hu.xlf @@ -988,7 +988,7 @@ Ha kézzel szeretné indítani az indexelést, kattintson az index gombra. - + Note: search only works among the indexed directories app/settings/indexing/indexing.settings.component.ts @@ -1257,4 +1257,4 @@ - + \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index ed1be6ca..b222652e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -30,7 +30,8 @@ var createFrontendTask = function (type, script) { gulp.task('build-frontend', function (done) { var languages = getLanguages(); var tasks = []; - createFrontendTask('build-frontend-release default', "ng build --aot -prod --output-path=./release/dist --no-progress"); + createFrontendTask('build-frontend-release default', "ng build --aot -prod --output-path=./release/dist --no-progress --locale=en" + + " --i18n-format xlf --i18n-file frontend/" + translationFolder + "/messages.en.xlf" + " --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 --locale=" + languages[i] + @@ -89,6 +90,8 @@ var getLanguages = function () { }); return files.map(function (f) { return f.split(".")[1] + }).filter(function (l) { + return l !== "en"; }); }; @@ -96,11 +99,12 @@ var simpleBuild = function (isProd) { return function (done) { var languages = getLanguages(); var tasks = []; - var cmd = "ng build "; + var cmd = "ng build --aot "; if (isProd) { cmd += " -prod " } - createFrontendTask('build-frontend default', cmd + "--output-path=./dist --no-progress"); + createFrontendTask('build-frontend default', cmd + "--output-path=./dist --no-progress --no-progress --locale en" + + " --i18n-format=xlf --i18n-file=frontend/" + translationFolder + "/messages.en.xlf" + " --missing-translation warning"); tasks.push('build-frontend default'); for (var i = 0; i < languages.length; i++) { createFrontendTask('build-frontend ' + languages[i], cmd + "--output-path=./dist/" + languages[i] + " --no-progress --locale " + languages[i] +