From c0f10e2288b19e98457f8359d853398955ddb1bf Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 15 Jul 2020 01:26:54 +0200 Subject: [PATCH] Use gettext for backend translations too Signed-off-by: Michael Mayer --- Dockerfile | 2 +- assets/locales/de/default.mo | Bin 0 -> 4614 bytes assets/locales/de/default.po | 266 +++++++++++++++++ assets/locales/en/default.mo | Bin 0 -> 4274 bytes assets/locales/en/default.po | 270 ++++++++++++++++++ assets/locales/messages.pot | 269 +++++++++++++++++ assets/locales/pl/default.mo | Bin 0 -> 4615 bytes assets/locales/pl/default.po | 270 ++++++++++++++++++ docker/development/Dockerfile | 1 + docker/photoprism/Dockerfile | 2 +- frontend/package.json | 4 +- frontend/src/common/config.js | 4 +- frontend/src/component/photo/toolbar.vue | 2 +- frontend/src/dialog/account/edit.vue | 2 +- frontend/src/dialog/photo/details.vue | 4 +- frontend/src/dialog/photo/info.vue | 2 +- frontend/src/{resources => locales}/de.mo | Bin frontend/src/{resources => locales}/de.po | 0 frontend/src/{resources => locales}/en.mo | Bin frontend/src/{resources => locales}/en.po | 0 frontend/src/{resources => locales}/es.mo | Bin frontend/src/{resources => locales}/es.po | 0 frontend/src/{resources => locales}/fr.mo | Bin frontend/src/{resources => locales}/fr.po | 0 frontend/src/{resources => locales}/nl.mo | Bin frontend/src/{resources => locales}/nl.po | 0 frontend/src/{resources => locales}/pl.mo | Bin frontend/src/{resources => locales}/pl.po | 0 frontend/src/{resources => locales}/ru.mo | Bin frontend/src/{resources => locales}/ru.po | 0 .../{resources => locales}/translations.json | 0 .../{resources => locales}/translations.pot | 0 frontend/src/model/photo.js | 2 +- .../src/{resources => options}/countries.json | 0 .../src/{resources => options}/options.js | 0 .../src/{resources => options}/themes.json | 0 frontend/src/pages/settings/general.vue | 2 +- go.mod | 1 + go.sum | 2 + internal/config/filenames.go | 5 + internal/config/settings.go | 4 +- internal/i18n/i18n.go | 50 +--- internal/i18n/i18n_test.go | 97 ++----- internal/i18n/lang-de.go | 67 ----- internal/i18n/lang-en.go | 131 --------- internal/i18n/lang-es.go | 67 ----- internal/i18n/lang-fr.go | 67 ----- internal/i18n/lang-nl.go | 67 ----- internal/i18n/lang-pl.go | 67 ----- internal/i18n/lang-pt.go | 67 ----- internal/i18n/lang-ru.go | 67 ----- internal/i18n/lang-zh.go | 67 ----- internal/i18n/lang.go | 43 --- internal/i18n/lang_test.go | 18 -- internal/i18n/locales.go | 40 +++ internal/i18n/locales_test.go | 20 ++ internal/i18n/messages.go | 131 +++++++++ 57 files changed, 1321 insertions(+), 859 deletions(-) create mode 100644 assets/locales/de/default.mo create mode 100644 assets/locales/de/default.po create mode 100644 assets/locales/en/default.mo create mode 100644 assets/locales/en/default.po create mode 100644 assets/locales/messages.pot create mode 100644 assets/locales/pl/default.mo create mode 100644 assets/locales/pl/default.po rename frontend/src/{resources => locales}/de.mo (100%) rename frontend/src/{resources => locales}/de.po (100%) rename frontend/src/{resources => locales}/en.mo (100%) rename frontend/src/{resources => locales}/en.po (100%) rename frontend/src/{resources => locales}/es.mo (100%) rename frontend/src/{resources => locales}/es.po (100%) rename frontend/src/{resources => locales}/fr.mo (100%) rename frontend/src/{resources => locales}/fr.po (100%) rename frontend/src/{resources => locales}/nl.mo (100%) rename frontend/src/{resources => locales}/nl.po (100%) rename frontend/src/{resources => locales}/pl.mo (100%) rename frontend/src/{resources => locales}/pl.po (100%) rename frontend/src/{resources => locales}/ru.mo (100%) rename frontend/src/{resources => locales}/ru.po (100%) rename frontend/src/{resources => locales}/translations.json (100%) rename frontend/src/{resources => locales}/translations.pot (100%) rename frontend/src/{resources => options}/countries.json (100%) rename frontend/src/{resources => options}/options.js (100%) rename frontend/src/{resources => options}/themes.json (100%) delete mode 100644 internal/i18n/lang-de.go delete mode 100644 internal/i18n/lang-en.go delete mode 100644 internal/i18n/lang-es.go delete mode 100644 internal/i18n/lang-fr.go delete mode 100644 internal/i18n/lang-nl.go delete mode 100644 internal/i18n/lang-pl.go delete mode 100644 internal/i18n/lang-pt.go delete mode 100644 internal/i18n/lang-ru.go delete mode 100644 internal/i18n/lang-zh.go delete mode 100644 internal/i18n/lang.go delete mode 100644 internal/i18n/lang_test.go create mode 100644 internal/i18n/locales.go create mode 100644 internal/i18n/locales_test.go create mode 100644 internal/i18n/messages.go diff --git a/Dockerfile b/Dockerfile index 4479248a5..93f0fd80f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM photoprism/development:20200625 +FROM photoprism/development:20200714 # Set up project directory WORKDIR "/go/src/github.com/photoprism/photoprism" diff --git a/assets/locales/de/default.mo b/assets/locales/de/default.mo new file mode 100644 index 0000000000000000000000000000000000000000..eb74709f088f6f8ed5a371d71f11c82897e486c5 GIT binary patch literal 4614 zcmai$Ux*!78NkQd`e%){Mx(8NPg;{EHnZK`)F$0zNwaBILbBz@kLNl(BF4v?#$en)Pb|V zJ?DJqJKy>KoOA!O^X`{CzN56y(B65E=dHu*@8u8QzI#0H6L3HL6nqjs0KW!53QKq| ze7@$(_4rTVhZ+A3ybrz!cfmi^<9~;;?j86cxZ{1E_YrtMlzkqqxeR69*Wt%u4j+Oq zz*+cnI0yd>#jYLiulCyuMc*O#Nw@-Kzi+_%p@Cxm^HBDC1&aRHq3rh-d=UN>%DTHg zP;n;|dmn_Ne-_HRCAbrwgP(^QivH*7@t2|a_owi)@J%TDybZw}*6X}A}D z4lYBH3!v!Vs^?#XAEWDM>YNslzo?>g3mx_7Zg9g2*r+9;coa#D1NvG#gA`8+5ewV;<$?> zk^FiB%06pQ>^4x&@dDfje+Ku$KSHtVW<7r&n~D5ED0ZwuImb7l*z+AIcDz*ge+6az z?`!@I%DR6;$%`ErDgNFAW&IH-`q%6J5Q?48L0R`>DEnQ755sG454;J*kGlz~#Pdlg z^3Os!Zw5vFdrFdigcukOzp|N z&alL9wL^u;7Ea_@K;W~C`q$Y`OXrXT54 zcl#zQR3FJ!A`jTpJD&DR*;F+P+(4L_0;_WsrkQEPnoXQcN2Tj`6t?P43<48#6s$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MdoM?qG%Q4rtmF6vI-dKFE4 zjk@s_sVJ(~40Y=AU+RjQuwtX!XcJda(DHh&$m6NDN-3K*!H$>tRxn6!XUJqKaPMh# zbJWuO7OG!TB~R?{HA}AGwM}-8|r#wOfHL_(5k?b+sH& zJP}+2+{n5tB$)ge`@*_A`82VCf9%VHbF gw;0;icvIGOrFczUbGzNR{DbCEzH#}LJEg*Z0l`E97ytkO literal 0 HcmV?d00001 diff --git a/assets/locales/de/default.po b/assets/locales/de/default.po new file mode 100644 index 000000000..2d8a49ef9 --- /dev/null +++ b/assets/locales/de/default.po @@ -0,0 +1,266 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-07-14 19:44+0000\n" +"PO-Revision-Date: 2020-07-14 22:16+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3.1\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: messages.go:69 +msgid "Unexpected error, please try again" +msgstr "Unerwarteter Fehler, bitte erneut versuchen" + +#: messages.go:70 +msgid "Invalid request" +msgstr "Ungültige Anfrage" + +#: messages.go:71 +msgid "Changes could not be saved" +msgstr "Fehler beim Speichern der Daten" + +#: messages.go:72 +msgid "Could not be deleted" +msgstr "Konnte nicht gelöscht werden" + +#: messages.go:73 +#, c-format +msgid "%s already exists" +msgstr "%s existiert bereits" + +#: messages.go:74 messages.go:77 +msgid "Not found on server, deleted?" +msgstr "Nicht auf Server gefunden, gelöscht?" + +#: messages.go:75 +msgid "File not found" +msgstr "Datei konnte nicht gefunden werden" + +#: messages.go:76 +msgid "Selection not found" +msgstr "Auswahl nicht gefunden" + +#: messages.go:78 +msgid "Account not found" +msgstr "Unbekannter Account" + +#: messages.go:79 +msgid "User not found" +msgstr "Nutzer nicht gefunden" + +#: messages.go:80 +msgid "Label not found" +msgstr "Kategorie nicht gefunden" + +#: messages.go:81 +msgid "Album not found" +msgstr "Album nicht gefunden - gelöscht?" + +#: messages.go:82 +msgid "Not available in public mode" +msgstr "Im öffentlichen Modus nicht verfügbar" + +#: messages.go:83 +msgid "not available in read-only mode" +msgstr "Funktion im ‘read-only’ Modus nicht verfügbar" + +#: messages.go:84 +msgid "Please log in and try again" +msgstr "Anmeldung erforderlich" + +#: messages.go:85 +msgid "Upload might be offensive" +msgstr "Inhalt könnte anstößig sein und wurde abgelehnt" + +#: messages.go:86 +msgid "No items selected" +msgstr "Nichts ausgewählt" + +#: messages.go:87 +msgid "Failed creating file, please check permissions" +msgstr "Datei konnte nicht angelegt werden" + +#: messages.go:88 +msgid "Failed creating folder, please check permissions" +msgstr "Verzeichnis konnte nicht angelegt werden" + +#: messages.go:89 +msgid "Could not connect, please try again" +msgstr "Verbindung fehlgeschlagen" + +#: messages.go:90 +msgid "Invalid password, please try again" +msgstr "Ungültiges Passwort" + +#: messages.go:91 +msgid "Feature disabled" +msgstr "Funktion deaktiviert" + +#: messages.go:92 +msgid "No labels selected" +msgstr "Keine Kategorien ausgewählt" + +#: messages.go:93 +msgid "No albums selected" +msgstr "Keine Alben ausgewählt" + +#: messages.go:94 +msgid "No files available for download" +msgstr "Nicht zum Download verfügbar" + +#: messages.go:95 +msgid "Failed to create zip file" +msgstr "Zip-Datei konnte nicht erstellt werden" + +#: messages.go:98 +msgid "Changes successfully saved" +msgstr "Änderungen erfolgreich gespeichert" + +#: messages.go:99 +msgid "Album created" +msgstr "Album erstellt" + +#: messages.go:100 +msgid "Album saved" +msgstr "Album gespeichert" + +#: messages.go:101 +#, c-format +msgid "Album %s deleted" +msgstr "Album %s gelöscht" + +#: messages.go:102 +msgid "Album contents cloned" +msgstr "Album-Einträge kopiert" + +#: messages.go:103 +msgid "File removed from stack" +msgstr "Datei aus Stapel entfernt" + +#: messages.go:104 +#, c-format +msgid "Selection added to %s" +msgstr "Auswahl zu %s hinzugefügt" + +#: messages.go:105 +#, c-format +msgid "One entry added to %s" +msgstr "Ein Eintrag zu %s hinzugefügt" + +#: messages.go:106 +#, c-format +msgid "%d entries added to %s" +msgstr "%d Einträge zu %s hinzugefügt" + +#: messages.go:107 +#, c-format +msgid "One entry removed from %s" +msgstr "Ein Eintrag aus %s entfernt" + +#: messages.go:108 +#, c-format +msgid "%d entries removed from %s" +msgstr "%d Einträge aus %s entfernt" + +#: messages.go:109 +msgid "Account created" +msgstr "Server-Konfiguration angelegt" + +#: messages.go:110 +msgid "Account saved" +msgstr "Server-Konfiguration gespeichert" + +#: messages.go:111 +msgid "Account deleted" +msgstr "Server-Konfiguration gelöscht" + +#: messages.go:112 +msgid "Settings saved" +msgstr "Einstellungen gespeichert" + +#: messages.go:113 +msgid "Password changed" +msgstr "Passwort geändert" + +#: messages.go:114 +#, c-format +msgid "Import completed in %d s" +msgstr "Import in %d s abgeschlossen" + +#: messages.go:115 +msgid "Import canceled" +msgstr "Import abgebrochen" + +#: messages.go:116 +#, c-format +msgid "Indexing completed in %d s" +msgstr "Indizierung in %d s abgeschlossen" + +#: messages.go:117 +msgid "Indexing originals..." +msgstr "Indiziere Dateien…" + +#: messages.go:118 +#, c-format +msgid "Indexing files in %s" +msgstr "Indiziere Dateien in %s" + +#: messages.go:119 +msgid "Indexing canceled" +msgstr "Indizierung abgebrochen" + +#: messages.go:120 +#, c-format +msgid "Removed %d files and %d photos" +msgstr "%d Dateien und %d Fotos wurden entfernt" + +#: messages.go:121 +#, c-format +msgid "Moving files from %s" +msgstr "Verschiebe Dateien von %s" + +#: messages.go:122 +#, c-format +msgid "Copying files from %s" +msgstr "Kopiere Dateien von %s" + +#: messages.go:123 +msgid "Labels deleted" +msgstr "Kategorien gelöscht”" + +#: messages.go:124 +msgid "Label saved" +msgstr "Kategorie gespeichert" + +#: messages.go:125 +#, c-format +msgid "%d files uploaded in %d s" +msgstr "%d Dateien hochgeladen in %d s" + +#: messages.go:126 +msgid "Selection archived" +msgstr "Auswahl archiviert" + +#: messages.go:127 +msgid "Selection restored" +msgstr "Auswahl wiederhergestellt" + +#: messages.go:128 +msgid "Selection marked as private" +msgstr "Auswahl als privat markiert" + +#: messages.go:129 +msgid "Albums deleted" +msgstr "Alben gelöscht" + +#: messages.go:130 +#, c-format +msgid "Zip created in %d s" +msgstr "Zip-Datei erstellt in %d s" diff --git a/assets/locales/en/default.mo b/assets/locales/en/default.mo new file mode 100644 index 0000000000000000000000000000000000000000..bcee7d15472f8de86c2dc523b5748c9bad0f8df8 GIT binary patch literal 4274 zcmeH}&yN&E6vs=%Un2^lD5yvQE-XS1vjYguvQd7m*@TsK*)_ypNl$mpY`Z;OZB@^* zYfvv5jENVGf{AA}#*2}}s8R=RxlCD@ecp02!w>cL?zixCML!JP1Hm))&wnN7 zwOsxu$o#Hck@>wIq@Pug^1~q4O@dGrO_2UYAoqDa=UI^Jz6Ke`3n24*6|92GV2t@4 z0_j&1WSmZcwD%s!{C)y*zjGk-`vXY-uYla|caZigSj7D{fQ-`~kn2w5oB`?YJcxhd zE&OoZ2O#7BImq~Z57PdnTz(B?erb&PT@P}fVUT`53)1gdkoi3YGQVd*>U{&!{>6O$ z7m)eAp37HZF}4t!LHb<>X?Hr8YmoYHfb{Qu5a|_2zu1Vr9leImSWr)*v*G%sZ5w`< zq4U~rMW<~xo~4dXn`}GKan(}aIUYh^j=r0Nylnv)n|f8a=?l{u~8j8hl!TaoqVblgwXHCp?0|> zh$Qr}2sT2aTz^5T`M@St9Pm8djS}fWnkc^*`zloZ<47m61X|Lnycy-q%2=6B zU~Qly`%iTp`pW$G0wgwzkbEtOQ{TlXveGq5`hj(u@Ij2ilQaxjGScCq{M*F!X2n=1 z)&^O1BM*u6i?QzDaL8*>5o3{$NcX_{HhVsPiw!nPZ~! z+ImtPi&T1fQAmAPx0Ei*9AY_` zUT0{xtk)a0UE49PRgU5v>bh;^Oewd6b>m~>M@s8M)mr6H_U1WL3o)!DYChQ+hj>1Q znN4F=GBQ0i>g+4^j2qdOGR~36(>}u2ko%fJQaRx~ts-Sygtj3kwDN;Q)~ma!L-4^S z&J>r0*=%JZ>>4+8Mz!hKhK%BLXh-V9c*Hm}G8oB?BXVflaB+YJDzei5`RFfAluz$t jb7O55Ww!KHNk6VjUzMe=%FBCg literal 0 HcmV?d00001 diff --git a/assets/locales/en/default.po b/assets/locales/en/default.po new file mode 100644 index 000000000..9f8a734ef --- /dev/null +++ b/assets/locales/en/default.po @@ -0,0 +1,270 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-07-14 19:44+0000\n" +"PO-Revision-Date: 2020-07-14 22:03+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3.1\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: en\n" + +#: messages.go:69 +msgid "Unexpected error, please try again" +msgstr "Unexpected error, please try again" + +#: messages.go:70 +msgid "Invalid request" +msgstr "Invalid request" + +#: messages.go:71 +msgid "Changes could not be saved" +msgstr "Changes could not be saved" + +#: messages.go:72 +msgid "Could not be deleted" +msgstr "Could not be deleted" + +#: messages.go:73 +#, c-format +msgid "%s already exists" +msgstr "%s already exists" + +#: messages.go:74 messages.go:77 +msgid "Not found on server, deleted?" +msgstr "Not found on server, deleted?" + +#: messages.go:75 +msgid "File not found" +msgstr "File not found" + +#: messages.go:76 +msgid "Selection not found" +msgstr "Selection not found" + +#: messages.go:78 +msgid "Account not found" +msgstr "Account not found" + +#: messages.go:79 +msgid "User not found" +msgstr "User not found" + +#: messages.go:80 +msgid "Label not found" +msgstr "Label not found" + +#: messages.go:81 +msgid "Album not found" +msgstr "Album not found" + +#: messages.go:82 +msgid "Not available in public mode" +msgstr "Not available in public mode" + +#: messages.go:83 +msgid "not available in read-only mode" +msgstr "not available in read-only mode" + +#: messages.go:84 +msgid "Please log in and try again" +msgstr "Please log in and try again" + +#: messages.go:85 +msgid "Upload might be offensive" +msgstr "Upload might be offensive" + +#: messages.go:86 +msgid "No items selected" +msgstr "No items selected" + +#: messages.go:87 +msgid "Failed creating file, please check permissions" +msgstr "Failed creating file, please check permissions" + +#: messages.go:88 +msgid "Failed creating folder, please check permissions" +msgstr "Failed creating folder, please check permissions" + +#: messages.go:89 +msgid "Could not connect, please try again" +msgstr "Could not connect, please try again" + +#: messages.go:90 +msgid "Invalid password, please try again" +msgstr "Invalid password, please try again" + +#: messages.go:91 +msgid "Feature disabled" +msgstr "Feature disabled" + +#: messages.go:92 +msgid "No labels selected" +msgstr "No labels selected" + +#: messages.go:93 +msgid "No albums selected" +msgstr "No albums selected" + +#: messages.go:94 +msgid "No files available for download" +msgstr "No files available for download" + +#: messages.go:95 +msgid "Failed to create zip file" +msgstr "Failed to create zip file" + +#: messages.go:98 +msgid "Changes successfully saved" +msgstr "Changes successfully saved" + +#: messages.go:99 +msgid "Album created" +msgstr "Album created" + +#: messages.go:100 +msgid "Album saved" +msgstr "Album saved" + +#: messages.go:101 +#, c-format +msgid "Album %s deleted" +msgstr "Album %s deleted" + +#: messages.go:102 +msgid "Album contents cloned" +msgstr "Album contents cloned" + +#: messages.go:103 +msgid "File removed from stack" +msgstr "File removed from stack" + +#: messages.go:104 +#, c-format +msgid "Selection added to %s" +msgstr "Selection added to %s" + +#: messages.go:105 +#, c-format +msgid "One entry added to %s" +msgstr "One entry added to %s" + +#: messages.go:106 +#, c-format +msgid "%d entries added to %s" +msgstr "%d entries added to %s" + +#: messages.go:107 +#, c-format +msgid "One entry removed from %s" +msgstr "One entry removed from %s" + +#: messages.go:108 +#, c-format +msgid "%d entries removed from %s" +msgstr "%d entries removed from %s" + +#: messages.go:109 +msgid "Account created" +msgstr "Account created" + +#: messages.go:110 +msgid "Account saved" +msgstr "Account saved" + +#: messages.go:111 +msgid "Account deleted" +msgstr "Account deleted" + +#: messages.go:112 +msgid "Settings saved" +msgstr "Settings saved" + +#: messages.go:113 +msgid "Password changed" +msgstr "Password changed" + +#: messages.go:114 +#, c-format +msgid "Import completed in %d s" +msgstr "Import completed in %d s" + +#: messages.go:115 +msgid "Import canceled" +msgstr "Import canceled" + +#: messages.go:116 +#, c-format +msgid "Indexing completed in %d s" +msgstr "Indexing completed in %d s" + +#: messages.go:117 +msgid "Indexing originals..." +msgstr "Indexing originals..." + +#: messages.go:118 +#, c-format +msgid "Indexing files in %s" +msgstr "Indexing files in %s" + +#: messages.go:119 +msgid "Indexing canceled" +msgstr "Indexing canceled" + +#: messages.go:120 +#, c-format +msgid "Removed %d files and %d photos" +msgstr "Removed %d files and %d photos" + +#: messages.go:121 +#, c-format +msgid "Moving files from %s" +msgstr "Moving files from %s" + +#: messages.go:122 +#, c-format +msgid "Copying files from %s" +msgstr "Copying files from %s" + +#: messages.go:123 +msgid "Labels deleted" +msgstr "Labels deleted" + +#: messages.go:124 +msgid "Label saved" +msgstr "Label saved" + +#: messages.go:125 +#, c-format +msgid "%d files uploaded in %d s" +msgstr "%d files uploaded in %d s" + +#: messages.go:126 +msgid "Selection archived" +msgstr "Selection archived" + +#: messages.go:127 +msgid "Selection restored" +msgstr "Selection restored" + +#: messages.go:128 +msgid "Selection marked as private" +msgstr "Selection marked as private" + +#: messages.go:129 +msgid "Albums deleted" +msgstr "Albums deleted" + +#: messages.go:130 +#, c-format +msgid "Zip created in %d s" +msgstr "Zip created in %d s" diff --git a/assets/locales/messages.pot b/assets/locales/messages.pot new file mode 100644 index 000000000..544b289e9 --- /dev/null +++ b/assets/locales/messages.pot @@ -0,0 +1,269 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-07-14 23:13+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: messages.go:69 +msgid "Unexpected error, please try again" +msgstr "" + +#: messages.go:70 +msgid "Invalid request" +msgstr "" + +#: messages.go:71 +msgid "Changes could not be saved" +msgstr "" + +#: messages.go:72 +msgid "Could not be deleted" +msgstr "" + +#: messages.go:73 +#, c-format +msgid "%s already exists" +msgstr "" + +#: messages.go:74 messages.go:77 +msgid "Not found on server, deleted?" +msgstr "" + +#: messages.go:75 +msgid "File not found" +msgstr "" + +#: messages.go:76 +msgid "Selection not found" +msgstr "" + +#: messages.go:78 +msgid "Account not found" +msgstr "" + +#: messages.go:79 +msgid "User not found" +msgstr "" + +#: messages.go:80 +msgid "Label not found" +msgstr "" + +#: messages.go:81 +msgid "Album not found" +msgstr "" + +#: messages.go:82 +msgid "Not available in public mode" +msgstr "" + +#: messages.go:83 +msgid "not available in read-only mode" +msgstr "" + +#: messages.go:84 +msgid "Please log in and try again" +msgstr "" + +#: messages.go:85 +msgid "Upload might be offensive" +msgstr "" + +#: messages.go:86 +msgid "No items selected" +msgstr "" + +#: messages.go:87 +msgid "Failed creating file, please check permissions" +msgstr "" + +#: messages.go:88 +msgid "Failed creating folder, please check permissions" +msgstr "" + +#: messages.go:89 +msgid "Could not connect, please try again" +msgstr "" + +#: messages.go:90 +msgid "Invalid password, please try again" +msgstr "" + +#: messages.go:91 +msgid "Feature disabled" +msgstr "" + +#: messages.go:92 +msgid "No labels selected" +msgstr "" + +#: messages.go:93 +msgid "No albums selected" +msgstr "" + +#: messages.go:94 +msgid "No files available for download" +msgstr "" + +#: messages.go:95 +msgid "Failed to create zip file" +msgstr "" + +#: messages.go:98 +msgid "Changes successfully saved" +msgstr "" + +#: messages.go:99 +msgid "Album created" +msgstr "" + +#: messages.go:100 +msgid "Album saved" +msgstr "" + +#: messages.go:101 +#, c-format +msgid "Album %s deleted" +msgstr "" + +#: messages.go:102 +msgid "Album contents cloned" +msgstr "" + +#: messages.go:103 +msgid "File removed from stack" +msgstr "" + +#: messages.go:104 +#, c-format +msgid "Selection added to %s" +msgstr "" + +#: messages.go:105 +#, c-format +msgid "One entry added to %s" +msgstr "" + +#: messages.go:106 +#, c-format +msgid "%d entries added to %s" +msgstr "" + +#: messages.go:107 +#, c-format +msgid "One entry removed from %s" +msgstr "" + +#: messages.go:108 +#, c-format +msgid "%d entries removed from %s" +msgstr "" + +#: messages.go:109 +msgid "Account created" +msgstr "" + +#: messages.go:110 +msgid "Account saved" +msgstr "" + +#: messages.go:111 +msgid "Account deleted" +msgstr "" + +#: messages.go:112 +msgid "Settings saved" +msgstr "" + +#: messages.go:113 +msgid "Password changed" +msgstr "" + +#: messages.go:114 +#, c-format +msgid "Import completed in %d s" +msgstr "" + +#: messages.go:115 +msgid "Import canceled" +msgstr "" + +#: messages.go:116 +#, c-format +msgid "Indexing completed in %d s" +msgstr "" + +#: messages.go:117 +msgid "Indexing originals..." +msgstr "" + +#: messages.go:118 +#, c-format +msgid "Indexing files in %s" +msgstr "" + +#: messages.go:119 +msgid "Indexing canceled" +msgstr "" + +#: messages.go:120 +#, c-format +msgid "Removed %d files and %d photos" +msgstr "" + +#: messages.go:121 +#, c-format +msgid "Moving files from %s" +msgstr "" + +#: messages.go:122 +#, c-format +msgid "Copying files from %s" +msgstr "" + +#: messages.go:123 +msgid "Labels deleted" +msgstr "" + +#: messages.go:124 +msgid "Label saved" +msgstr "" + +#: messages.go:125 +#, c-format +msgid "%d files uploaded in %d s" +msgstr "" + +#: messages.go:126 +msgid "Selection archived" +msgstr "" + +#: messages.go:127 +msgid "Selection restored" +msgstr "" + +#: messages.go:128 +msgid "Selection marked as private" +msgstr "" + +#: messages.go:129 +msgid "Albums deleted" +msgstr "" + +#: messages.go:130 +#, c-format +msgid "Zip created in %d s" +msgstr "" diff --git a/assets/locales/pl/default.mo b/assets/locales/pl/default.mo new file mode 100644 index 0000000000000000000000000000000000000000..db4e19e811a1bf6a076cc6aefcae529e9010674f GIT binary patch literal 4615 zcmb7`O^h5z6~~JZ0xaeuhLD7>R6^{mW6x%0ZDX_Ejgxh}!AhJg_HIB9AFAoDo$Z~T zs-~)Y$KA>SSuBf?asm`tk#dTHKpc>q12}uaGl~#`0|$ge6i_5MAjE}ZB8C5}uI`?V z9U@w)`At{7diCmkRQ2n7Z~h6xGmrK;w71^J*m>}^_u~i8^amLGGF2e&<+^Zh>sKZ^cegP#Cj1#biY?EC)>(!968kAQn_VeDhz9U!f9pXVY-^S%jw z3bf!C!5@G#;4i>7_!p4u+VjD3z5O8RI|kkkE`hY(x4=6<1(N;SAgy;9B>gXgwBB#Q zd%(YfH1DPlmD~%Gz4w5me+Hy^3*cVx9C#NfLDIkF`=0~Jzdr{*555Z0I)4Yr?l(d5 z(`_GS?6cs0@C)D~NOA%s{X;+gL-3P$f64b>1<9V@gJkz>AnASE_un~H%1?u2-#qv< zV*L$}^#2N*B0v2Bq<HVYUzd(xPEl3iQzaOOiEP^xOQ{Yi>3p@tC0+RfHK$5#1i<2D(LDKsWNO8U3-z`Y% zJ`2)*U-bPWknDOLoCefrruPK?$=H?qB)yC7^|NFB-z{@(W=1qfySy&uG8 z`HmTolkqMkDR1Uu(@EBiqks=|D51gE1=kAenoSC{&#jZ}NhMwJB9SIax9Qy#Irwtf zdy5Ay?L)R)redsn6fvPt{dHEJ^JS09_M5~oUXpd4YRk?$Cmxak@Q z(?@Oy%M%lA;yjobYpS)8Hwc?HPDPp`AaI&H6jqhIn79aVX^d`CzcGH*9Zh@?_10ZU z>$NqhEbL*c@Zv-kTtF%KbE8gLvSn99=tyg6h5C0vSv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*na^fpc_*F literal 0 HcmV?d00001 diff --git a/assets/locales/pl/default.po b/assets/locales/pl/default.po new file mode 100644 index 000000000..ffd718630 --- /dev/null +++ b/assets/locales/pl/default.po @@ -0,0 +1,270 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-07-14 19:44+0000\n" +"PO-Revision-Date: 2020-07-15 00:22+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3.1\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" +"Language: pl\n" + +#: messages.go:69 +msgid "Unexpected error, please try again" +msgstr "Nieoczekiwany błąd, spróbuj ponownie" + +#: messages.go:70 +msgid "Invalid request" +msgstr "Nieprawidłowe żądanie" + +#: messages.go:71 +msgid "Changes could not be saved" +msgstr "Nie można zapisać zmian" + +#: messages.go:72 +msgid "Could not be deleted" +msgstr "Nie można usunąć" + +#: messages.go:73 +#, c-format +msgid "%s already exists" +msgstr "%s już istnieje" + +#: messages.go:74 messages.go:77 +msgid "Not found on server, deleted?" +msgstr "Nie znaleziono na serwerze, usunięte?" + +#: messages.go:75 +msgid "File not found" +msgstr "Nie znaleziono pliku" + +#: messages.go:76 +msgid "Selection not found" +msgstr "Nie znaleziono wyboru" + +#: messages.go:78 +msgid "Account not found" +msgstr "Konto nie znalezione" + +#: messages.go:79 +msgid "User not found" +msgstr "Użytkownik nie znaleziony" + +#: messages.go:80 +msgid "Label not found" +msgstr "Nie znaleziono etykiety" + +#: messages.go:81 +msgid "Album not found" +msgstr "Album nie został znaleziony" + +#: messages.go:82 +msgid "Not available in public mode" +msgstr "Niedostępne w trybie publicznym" + +#: messages.go:83 +msgid "not available in read-only mode" +msgstr "niedostępne w trybie tylko do odczytu" + +#: messages.go:84 +msgid "Please log in and try again" +msgstr "Zaloguj się i spróbuj ponownie" + +#: messages.go:85 +msgid "Upload might be offensive" +msgstr "Przesyłanie może być obraźliwe" + +#: messages.go:86 +msgid "No items selected" +msgstr "Nie wybrano żadnych elementów" + +#: messages.go:87 +msgid "Failed creating file, please check permissions" +msgstr "Nie udało się utworzyć pliku, sprawdź uprawnienia" + +#: messages.go:88 +msgid "Failed creating folder, please check permissions" +msgstr "Nie udało się utworzyć folderu, sprawdź uprawnienia" + +#: messages.go:89 +msgid "Could not connect, please try again" +msgstr "Nie można się połączyć, spróbuj ponownie" + +#: messages.go:90 +msgid "Invalid password, please try again" +msgstr "Hasło nieprawidłowe, spróbuj ponownie" + +#: messages.go:91 +msgid "Feature disabled" +msgstr "Funkcja wyłączona" + +#: messages.go:92 +msgid "No labels selected" +msgstr "Nie wybrano żadnych etykiet" + +#: messages.go:93 +msgid "No albums selected" +msgstr "Nie wybrano albumów" + +#: messages.go:94 +msgid "No files available for download" +msgstr "Brak plików do pobrania" + +#: messages.go:95 +msgid "Failed to create zip file" +msgstr "Nie udało się utworzyć pliku zip" + +#: messages.go:98 +msgid "Changes successfully saved" +msgstr "Zmiany zostały pomyślnie zapisane" + +#: messages.go:99 +msgid "Album created" +msgstr "Album został utworzony" + +#: messages.go:100 +msgid "Album saved" +msgstr "Album został zapisany" + +#: messages.go:101 +#, c-format +msgid "Album %s deleted" +msgstr "Album %s usunięto" + +#: messages.go:102 +msgid "Album contents cloned" +msgstr "Sklonowano zawartość albumu" + +#: messages.go:103 +msgid "File removed from stack" +msgstr "Plik został rozgrupowany" + +#: messages.go:104 +#, c-format +msgid "Selection added to %s" +msgstr "Wybór dodany do %s" + +#: messages.go:105 +#, c-format +msgid "One entry added to %s" +msgstr "Dodano jeden wpis do %s" + +#: messages.go:106 +#, c-format +msgid "%d entries added to %s" +msgstr "%d wpisy dodane do %s" + +#: messages.go:107 +#, c-format +msgid "One entry removed from %s" +msgstr "Usunięto jeden wpis z %s" + +#: messages.go:108 +#, c-format +msgid "%d entries removed from %s" +msgstr "%d wpisy usunięte z %s" + +#: messages.go:109 +msgid "Account created" +msgstr "Konto utworzone" + +#: messages.go:110 +msgid "Account saved" +msgstr "Konto zapisane" + +#: messages.go:111 +msgid "Account deleted" +msgstr "Konto usunięte" + +#: messages.go:112 +msgid "Settings saved" +msgstr "Ustawienia zapisane" + +#: messages.go:113 +msgid "Password changed" +msgstr "Hasło zostało zmienione" + +#: messages.go:114 +#, c-format +msgid "Import completed in %d s" +msgstr "Import zakończony w %d s" + +#: messages.go:115 +msgid "Import canceled" +msgstr "Import został anulowany" + +#: messages.go:116 +#, c-format +msgid "Indexing completed in %d s" +msgstr "Indeksowanie zakończone w %d s" + +#: messages.go:117 +msgid "Indexing originals..." +msgstr "Indeksowanie oryginałów…" + +#: messages.go:118 +#, c-format +msgid "Indexing files in %s" +msgstr "Indeksowanie plików w %s" + +#: messages.go:119 +msgid "Indexing canceled" +msgstr "Indeksowanie anulowane" + +#: messages.go:120 +#, c-format +msgid "Removed %d files and %d photos" +msgstr "Usunięto %d plików i %d zdjęć" + +#: messages.go:121 +#, c-format +msgid "Moving files from %s" +msgstr "Przenoszenie plików z %s" + +#: messages.go:122 +#, c-format +msgid "Copying files from %s" +msgstr "Kopiowanie plików z %s" + +#: messages.go:123 +msgid "Labels deleted" +msgstr "Usunięto etykiety" + +#: messages.go:124 +msgid "Label saved" +msgstr "Etykieta zapisana" + +#: messages.go:125 +#, c-format +msgid "%d files uploaded in %d s" +msgstr "%d files uploaded in %d s" + +#: messages.go:126 +msgid "Selection archived" +msgstr "Wybór zarchiwizowany" + +#: messages.go:127 +msgid "Selection restored" +msgstr "Wybór został przywrócony" + +#: messages.go:128 +msgid "Selection marked as private" +msgstr "Wybór oznaczony jako prywatny" + +#: messages.go:129 +msgid "Albums deleted" +msgstr "Albumy zostały usunięte" + +#: messages.go:130 +#, c-format +msgid "Zip created in %d s" +msgstr "Zip utworzony w %d s" diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile index 9cb6cf243..6484041c0 100644 --- a/docker/development/Dockerfile +++ b/docker/development/Dockerfile @@ -42,6 +42,7 @@ RUN apt-get update && apt-get upgrade && \ nano \ wget \ git \ + gettext \ mysql-client \ tzdata \ gconf-service \ diff --git a/docker/photoprism/Dockerfile b/docker/photoprism/Dockerfile index 6402c902b..449dea515 100644 --- a/docker/photoprism/Dockerfile +++ b/docker/photoprism/Dockerfile @@ -1,4 +1,4 @@ -FROM photoprism/development:20200625 as build +FROM photoprism/development:20200714 as build # Set up project directory WORKDIR "/go/src/github.com/photoprism/photoprism" diff --git a/frontend/package.json b/frontend/package.json index 3ce2a4e59..34709c146 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,8 +15,8 @@ "acceptance": "testcafe \"chromium:headless --disable-dev-shm-usage\" --skip-js-errors --selector-timeout 5000 -S -s tests/screenshots tests/acceptance", "acceptance-firefox": "testcafe firefox:headless --skip-js-errors --selector-timeout 5000 -S -s tests/screenshots tests/acceptance", "acceptance-local": "testcafe chrome --selector-timeout 5000 -S -s tests/screenshots tests/acceptance", - "gettext-extract": "gettext-extract --output src/resources/translations.pot $(find src -type f \\( -iname \\*.vue -o -iname \\*.js \\))", - "gettext-compile": "gettext-compile --output src/resources/translations.json src/resources/*.po" + "gettext-extract": "gettext-extract --output src/locales/translations.pot $(find src -type f \\( -iname \\*.vue -o -iname \\*.js \\))", + "gettext-compile": "gettext-compile --output src/locales/translations.json src/locales/*.po" }, "dependencies": { "@babel/cli": "^7.10.4", diff --git a/frontend/src/common/config.js b/frontend/src/common/config.js index 5866ba8b9..d7782ef74 100644 --- a/frontend/src/common/config.js +++ b/frontend/src/common/config.js @@ -29,8 +29,8 @@ https://docs.photoprism.org/developer-guide/ */ import Event from "pubsub-js"; -import themes from "../resources/themes.json"; -import translations from "../resources/translations.json"; +import themes from "options/themes.json"; +import translations from "locales/translations.json"; import Api from "./api"; export default class Config { diff --git a/frontend/src/component/photo/toolbar.vue b/frontend/src/component/photo/toolbar.vue index 983bba152..8ea66295a 100644 --- a/frontend/src/component/photo/toolbar.vue +++ b/frontend/src/component/photo/toolbar.vue @@ -152,7 +152,7 @@