Verified Commit 1d6b1a9e authored by Luc Didry's avatar Luc Didry
Browse files

🔀 Merge branch 'master' of framagit.org:fiat-tux/hat-softwares/lufi into fix-209-cannot-send-mail

parents 5fc11345 7e94a3c3
Pipeline #382051 passed with stages
in 3 minutes and 35 seconds
......@@ -2,6 +2,14 @@ Revision history for Lufi
?.??.? ????-??-??
0.05.12 2021-01-13
- 🌐 Update translations
- 🐛 Fix `Notification not defined`
0.05.11 2020-12-07
- 🌐 Update translations
- 🐛 Try to avoid clients constantly hitting /download/XXX
0.05.10 2020-11-28
- 🌐 Update translations
......
EXTRACTDIR=-D lib -D themes/default/templates
POT=themes/default/lib/Lufi/I18N/lufi.pot
ENPO=themes/default/lib/Lufi/I18N/en.po
XGETTEXT=carton exec local/bin/xgettext.pl -u
CARTON=carton exec
REAL_LUFI=script/application
LUFI=script/lufi
EXTRACTDIR ?= -D lib -D themes/default/templates
POT ?= themes/default/lib/Lufi/I18N/lufi.pot
ENPO ?= themes/default/lib/Lufi/I18N/en.po
XGETTEXT ?= carton exec local/bin/xgettext.pl -u
CARTON ?= carton exec
REAL_LUFI ?= script/application
LUFI ?= script/lufi
LDAP_CONTAINER_IMAGE ?= rroemhild/test-openldap:latest
LOCAL_LDAP_PORT ?= 10389
LOCAL_SWIFT_PORT ?= 8080
SWIFT_CONTAINER_IMAGE ?= swiftstack/picoswiftstack:latest
MORBO_HOST ?= 0.0.0.0
MORBO_PORT ?= 3030
locales:
$(XGETTEXT) $(EXTRACTDIR) -o $(POT) 2>/dev/null
......@@ -23,15 +30,15 @@ clean:
rm -rf lufi.db files/
dev: clean
$(CARTON) morbo $(LUFI) --listen http://0.0.0.0:3000 --watch lib/ --watch script/ --watch themes/ --watch lufi.conf
$(CARTON) morbo $(LUFI) --listen http://$(MORBO_HOST):$(MORBO_PORT) --watch lib/ --watch script/ --watch themes/ --watch lufi.conf
ldap:
sudo docker run --privileged -d -p 389:389 rroemhild/test-openldap; exit 0
sudo docker run -d -p $(LOCAL_LDAP_PORT):10389 $(LDAP_CONTAINER_IMAGE); exit 0
ldapdev: ldap dev
swift:
sudo docker run -d --rm -p 8080:8080 --hostname="picoswiftstack" --name="picoswiftstack" swiftstack/picoswiftstack; exit 0
sudo docker run -d --rm -p $(LOCAL_SWIFT_PORT):8080 --hostname="picoswiftstack" --name="picoswiftstack" $(SWIFT_CONTAINER_IMAGE); exit 0
@echo "Sleeping 20 seconds to let picoswiftstack start"
@sleep 20
sudo docker exec picoswiftstack get_auth
......
......@@ -51,7 +51,12 @@ sub log_out {
$c->logout;
}
}
$c->render(template => 'logout');
if ($c->config('logout_custom')) {
return $c->redirect_to($c->config('logout_custom'));
} else {
$c->render(template => 'logout');
}
}
1;
......@@ -101,6 +101,10 @@
# optional, no domains allowed by default
#allowed_domains => ['http://1.example.com', 'http://2.example.com'],
# String of the URL to be redirected to when accessing /logout
# optional, default is no redirection after logging out
#logout_custom => 'https://sso.example.com/logout?redirect_uri=https%3A%2F%2Fexample.com',
# Define a path to the upload directory, where the uploaded files will be stored
# You can define it relative to lufi directory or set an absolute path
# Remember that it has to be in a directory writable by Lufi user
......
......@@ -221,7 +221,7 @@
# Set `ldap` if you want that only authenticated users can upload files
# Please note that everybody can still download files
# optional, no default
#ldap => { uri => 'ldap://rroemhild-test-openldap', user_tree => 'ou=people,dc=planetexpress,dc=com', bind_dn => 'cn=admin,dc=planetexpress,dc=com', bind_pwd => 'GoodNewsEveryone', user_attr => 'uid', user_filter => '' },
#ldap => { uri => 'ldap://rroemhild-test-openldap:10389', user_tree => 'ou=people,dc=planetexpress,dc=com', bind_dn => 'cn=admin,dc=planetexpress,dc=com', bind_pwd => 'GoodNewsEveryone', user_attr => 'uid', user_filter => '' },
# If you've set ldap above, the session will last `session_duration` seconds before
# the user needs to reauthenticate
......
......@@ -206,7 +206,7 @@
# Set `ldap` if you want that only authenticated users can upload files
# Please note that everybody can still download files
# optional, no default
#ldap => { uri => 'ldap://rroemhild-test-openldap', user_tree => 'ou=people,dc=planetexpress,dc=com', bind_dn => 'cn=admin,dc=planetexpress,dc=com', bind_pwd => 'GoodNewsEveryone', user_attr => 'uid', user_filter => '' },
#ldap => { uri => 'ldap://rroemhild-test-openldap:10389', user_tree => 'ou=people,dc=planetexpress,dc=com', bind_dn => 'cn=admin,dc=planetexpress,dc=com', bind_pwd => 'GoodNewsEveryone', user_attr => 'uid', user_filter => '' },
# If you've set ldap above, the session will last `session_duration` seconds before
# the user needs to reauthenticate
......
......@@ -210,7 +210,7 @@
# Set `ldap` if you want that only authenticated users can upload files
# Please note that everybody can still download files
# optional, no default
#ldap => { uri => 'ldap://rroemhild-test-openldap', user_tree => 'ou=people,dc=planetexpress,dc=com', bind_dn => 'cn=admin,dc=planetexpress,dc=com', bind_pwd => 'GoodNewsEveryone', user_attr => 'uid', user_filter => '' },
#ldap => { uri => 'ldap://rroemhild-test-openldap:10389', user_tree => 'ou=people,dc=planetexpress,dc=com', bind_dn => 'cn=admin,dc=planetexpress,dc=com', bind_pwd => 'GoodNewsEveryone', user_attr => 'uid', user_filter => '' },
# If you've set ldap above, the session will last `session_duration` seconds before
# the user needs to reauthenticate
......
......@@ -586,7 +586,7 @@ msgid "The email subject can't be empty."
msgstr "The email subject can't be empty."
#. ($expire_at, $max_expire_at)
#: lib/Lufi/Controller/Invitation.pm:51
#: lib/Lufi/Controller/Invitation.pm:52
msgid "The expiration delay (%1) is not between 1 and %2 days."
msgstr "The expiration delay (%1) is not between 1 and %2 days."
......@@ -604,7 +604,7 @@ msgid "The following email addresses are not valid: %1"
msgstr "The following email addresses are not valid: %1"
#. ($guest_mail)
#: lib/Lufi/Controller/Invitation.pm:48
#: lib/Lufi/Controller/Invitation.pm:49
msgid "The guest email address (%1) is unvalid."
msgstr "The guest email address (%1) is unvalid."
......@@ -678,6 +678,10 @@ msgstr "URL"
msgid "Unable to copy the link(s) to your clipboard"
msgstr "Unable to copy the link(s) to your clipboard"
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
#. ($short)
#: lib/Lufi/Controller/Files.pm:433
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
......@@ -778,7 +782,7 @@ msgstr "Your file is too big: %1 (maximum size allowed: %2)"
msgid "Your password is not valid. Please refresh the page to retry."
msgstr "Your password is not valid. Please refresh the page to retry."
#: themes/default/templates/partial/render.js.ep:13
#: themes/default/templates/partial/render.js.ep:14
msgid "Zip content:"
msgstr "Zip content:"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-11-15 06:52+0000\n"
"PO-Revision-Date: 2020-12-05 01:52+0000\n"
"Last-Translator: Berto Te <ateira@3fpj.com>\n"
"Language-Team: Spanish <https://weblate.framasoft.org/projects/lufi/"
"default-theme/es/>\n"
......@@ -931,3 +931,9 @@ msgstr "Última etiqueta de esta instancia: %1"
#: themes/default/templates/about.html.ep:22
msgid "Latest commit of this instance: %1"
msgstr "Última confirmación de esta instancia: %1"
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr ""
"No se puede descargar el archivo: demasiados intentos fallidos de abrir un "
"\"websocket\". Comuníquese con el administrador."
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-03-22 11:51+0000\n"
"Last-Translator: Luc Didry <luc@framasoft.org>\n"
"PO-Revision-Date: 2020-12-07 15:32+0000\n"
"Last-Translator: Framasoft <tech-sys@framalistes.org>\n"
"Language-Team: French <https://weblate.framasoft.org/projects/lufi/"
"default-theme/fr/>\n"
"Language: fr\n"
......@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.11.2\n"
"X-Generator: Weblate 4.1\n"
#. ($delay)
#. (max_delay)
......@@ -1014,3 +1014,9 @@ msgstr ""
"pouvez l’installer sur votre propre serveur. Veuillez consulter le <a href=\""
"https://framagit.org/fiat-tux/hat-softwares/lufi/wikis/home\" class=\""
"classic\">Wiki</a> pour voir la procédure."
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr ""
"Impossible de télécharger le fichier : trop de tentatives infructueuses d’"
"ouverture d’une websocket. Veuillez contacter l’administrateur."
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-10-17 20:51+0000\n"
"Last-Translator: Numahell <numahell@numajules.net>\n"
"PO-Revision-Date: 2020-12-07 15:33+0000\n"
"Last-Translator: Framasoft <tech-sys@framalistes.org>\n"
"Language-Team: French (France) <https://weblate.framasoft.org/projects/lufi/"
"default-theme/fr_FR/>\n"
"Language: fr_FR\n"
......@@ -1014,3 +1014,9 @@ msgstr "Dernier tag de cette instance : %1"
#: themes/default/templates/about.html.ep:22
msgid "Latest commit of this instance: %1"
msgstr "Dernier commit de cette instance : %1"
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr ""
"Impossible de télécharger le fichier : trop de tentatives infructueuses d’"
"ouverture d’une websocket. Veuillez contacter l’administrateur."
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-11-03 18:51+0000\n"
"Last-Translator: roberto marcolin <nilogadda@gmail.com>\n"
"PO-Revision-Date: 2020-12-25 19:52+0000\n"
"Last-Translator: x <hardwired1.0@protonmail.com>\n"
"Language-Team: Italian <https://weblate.framasoft.org/projects/lufi/"
"default-theme/it/>\n"
"Language: it\n"
......@@ -661,7 +661,7 @@ msgstr "Il soggetto dell'email non può essere vuoto."
#. ($expire_at, $max_expire_at)
#: lib/Lufi/Controller/Invitation.pm:51
msgid "The expiration delay (%1) is not between 1 and %2 days."
msgstr "Il termine di scadenza (%1) non è compreso tra 1 e %2 giorni."
msgstr "Il termine di scadenza (%1) non è compreso tra 1 e %2 giorni."
#: lib/Lufi/Controller/Files.pm:468
msgid "The file has already been deleted"
......@@ -992,3 +992,9 @@ msgstr "File caricato"
#: themes/default/templates/partial/render.js.ep:9
msgid "File downloaded"
msgstr "File scaricato"
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr ""
"Impossibile scaricare il file: troppi tentativi falliti di aprire un "
"websocket. Per favore, contatta l'amministratore."
......@@ -586,7 +586,7 @@ msgid "The email subject can't be empty."
msgstr ""
#. ($expire_at, $max_expire_at)
#: lib/Lufi/Controller/Invitation.pm:51
#: lib/Lufi/Controller/Invitation.pm:52
msgid "The expiration delay (%1) is not between 1 and %2 days."
msgstr ""
......@@ -604,7 +604,7 @@ msgid "The following email addresses are not valid: %1"
msgstr ""
#. ($guest_mail)
#: lib/Lufi/Controller/Invitation.pm:48
#: lib/Lufi/Controller/Invitation.pm:49
msgid "The guest email address (%1) is unvalid."
msgstr ""
......@@ -678,6 +678,10 @@ msgstr ""
msgid "Unable to copy the link(s) to your clipboard"
msgstr ""
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr ""
#. ($short)
#: lib/Lufi/Controller/Files.pm:433
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
......@@ -778,7 +782,7 @@ msgstr ""
msgid "Your password is not valid. Please refresh the page to retry."
msgstr ""
#: themes/default/templates/partial/render.js.ep:13
#: themes/default/templates/partial/render.js.ep:14
msgid "Zip content:"
msgstr ""
......
......@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-05-22 08:24+0000\n"
"PO-Revision-Date: 2020-12-05 01:52+0000\n"
"Last-Translator: Quentin PAGÈS <quentinantonin@free.fr>\n"
"Language-Team: Occitan <https://weblate.framasoft.org/projects/lufi/"
"default-theme/oc/>\n"
......@@ -20,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.11.2\n"
"X-Generator: Weblate 4.1\n"
#. ($delay)
#. (max_delay)
......@@ -1011,3 +1011,10 @@ msgstr "Darrièra etiqueta d’aquesta instància : %1"
#: themes/default/templates/about.html.ep:22
msgid "Latest commit of this instance: %1"
msgstr "Darrièr commit d’aquesta instància : %1"
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr ""
"Telecargament del fichièr impossible : tròp d’ensages infructuóses de "
"dobertura de connector de tipe websocket. Mercés de contactar "
"l’administrator."
This diff is collapsed.
This diff is collapsed.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-11-18 14:52+0000\n"
"Last-Translator: Zijian Liu <zilliu@disroot.org>\n"
"PO-Revision-Date: 2020-12-06 15:52+0000\n"
"Last-Translator: zilliu <zilliu@disroot.org>\n"
"Language-Team: Chinese (Traditional) <https://weblate.framasoft.org/projects/"
"lufi/default-theme/zh_Hant/>\n"
"Language: zh_Hant\n"
......@@ -106,11 +106,11 @@ msgstr "回到主頁"
#: lib/Lufi/Controller/Mail.pm:25
msgid "Bad CSRF token!"
msgstr ""
msgstr "損毀的 CSRF 權杖!"
#: lib/Lufi/Controller/Auth.pm:27 lib/Lufi/Controller/Auth.pm:49
msgid "Bad CSRF token."
msgstr ""
msgstr "損毀的 CSRF 權杖。"
#: themes/default/templates/partial/render.js.ep:5
msgid "Click here to refresh the page and restart the download."
......@@ -122,7 +122,7 @@ msgstr "點一下下列網址上傳檔案到 Lufi:"
#: themes/default/templates/index.html.ep:126
msgid "Click to open the file browser"
msgstr "點一下開檔案瀏覽器"
msgstr "點一下開檔案瀏覽器"
#: themes/default/templates/delays.html.ep:38 themes/default/templates/invitations/my_invitations.html.ep:80
msgid "Close"
......@@ -150,7 +150,7 @@ msgstr "無法刪除檔案。您尚未認證。"
#: lib/Lufi/Controller/Files.pm:483
msgid "Could not find the file. Are you sure of the URL and the token?"
msgstr ""
msgstr "找不到檔案。您確定網址及權杖無誤嗎?"
#: lib/Lufi/Controller/Files.pm:394
msgid "Could not find the file. Are you sure of the URL?"
......@@ -174,7 +174,7 @@ msgstr "刪除"
#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:90
msgid "Delete at first download?"
msgstr "第一次下載後刪除?"
msgstr "第一次下載後刪除?"
#: themes/default/templates/files.html.ep:19
msgid "Delete selected files"
......@@ -203,6 +203,8 @@ msgstr "下載連結"
#: themes/default/templates/about.html.ep:10
msgid "Drag and drop files in the appropriate area or use the traditional way to send files and the files will be chunked, encrypted and sent to the server. You will get two links per file: a download link, that you give to the people you want to share the file with and a deletion link, allowing you to delete the file whenever you want."
msgstr ""
"透過拖曳或傳統方式送出檔案,檔案會被分塊、加密然後傳送到伺服器。每一個成功送出的檔案都會產生一條下載連結和一條刪除連結。您可以將下載連結分享給其他人。在瀏"
"覽器開啓下載連結可以下載該檔案,而開啓刪除連結則會刪除該檔案。"
#: themes/default/templates/index.html.ep:122
msgid "Drop files here"
......@@ -210,7 +212,7 @@ msgstr "拖曳檔案到這裏"
#: themes/default/templates/invitations/invite.html.ep:40
msgid "Email address of your guest"
msgstr ""
msgstr "邀請對象的電子郵件地址"
#: themes/default/templates/mail.html.ep:39
msgid "Email body"
......@@ -282,11 +284,11 @@ msgstr "檔案已在第一次下載後刪除"
#: themes/default/templates/invitations/my_invitations.html.ep:28
msgid "Files sent at"
msgstr ""
msgstr "檔案傳送自"
#: themes/default/templates/partial/invitations.js.ep:8
msgid "Files sent in invitation XX1 by XX2"
msgstr ""
msgstr "檔案由 XX2 透過 XX1 邀請傳送"
#: themes/default/templates/partial/render.js.ep:8
msgid "Get the file"
......@@ -301,7 +303,7 @@ msgstr ""
#: themes/default/templates/invitations/my_invitations.html.ep:24
msgid "Guest mail"
msgstr ""
msgstr "邀請對象郵件"
#. (ucfirst(stash('invitation')
#: themes/default/templates/invitations/notification_files_sent.mail.ep:6
......@@ -325,7 +327,7 @@ msgstr "有檔案與您分享"
#: themes/default/templates/partial/invitations.js.ep:7
msgid "Hide hidden invitations"
msgstr ""
msgstr "不顯示隱藏的邀請"
#: themes/default/templates/partial/index.js.ep:26
msgid "Hit Enter, then Ctrl+C to copy all the download links"
......@@ -353,7 +355,7 @@ msgstr "怎樣回報非法檔案?"
#: themes/default/templates/delays.html.ep:7
msgid "If you choose a delay, the file will be deleted after that delay."
msgstr "如果您選了一個有效期,則檔案會在有效期過後刪除。"
msgstr "如果您選了一個有效期,則檔案會在有效期過後刪除。"
#: themes/default/templates/mail.html.ep:15
msgid "If you send the mail from this server, the links will be sent to the server, which may lower your privacy protection."
......@@ -387,11 +389,11 @@ msgstr "寄給 %1 的邀請。<br>網址:%2"
#: themes/default/templates/invitations/invite.html.ep:27 themes/default/templates/layouts/default.html.ep:36 themes/default/templates/layouts/default.html.ep:69
msgid "Invite a guest"
msgstr ""
msgstr "邀請對象"
#: themes/default/templates/partial/render.js.ep:6
msgid "It seems that the key in your URL is incorrect. Please, verify your URL."
msgstr ""
msgstr "您網址包含的密鑰似乎不正確。請核驗您的網址。"
#: themes/default/templates/index.html.ep:12
msgid "Javascript is disabled. You won't be able to use Lufi."
......@@ -404,12 +406,12 @@ msgstr "語言"
#. (sprintf('<a href="https://framagit.org/fiat-tux/hat-softwares/lufi/-/commit/%s" class="classic">%s</a>', stash('version')
#: themes/default/templates/about.html.ep:22
msgid "Latest commit of this instance: %1"
msgstr "這個實例的最新 commit:%1"
msgstr "這個實例最近一次提交:%1"
#. (sprintf('<a href="https://framagit.org/fiat-tux/hat-softwares/lufi/-/releases/%s" class="classic">%s</a>', stash('version')
#: themes/default/templates/about.html.ep:21
msgid "Latest tag of this instance: %1"
msgstr "這個實例的最新 tag:%1"
msgstr "這個實例最近一個標籤:%1"
#: themes/default/templates/login.html.ep:15
msgid "Login"
......@@ -426,6 +428,12 @@ msgstr "Lufi 是一歀自由的檔案託管軟件。"
#: themes/default/templates/partial/files.js.ep:12
msgid "Lufi recently changed its way to store files information.\\n\\nNo files have been found in the new localStorage location but we found files in the old one.\\nDo you want to import those informations?\\n\\nPlease note that this is the only time that we will ask you this."
msgstr ""
"Lufi 近來變更了儲存檔案資訊的方式。\\n"
"\\n"
"在新的本機存儲數據中找不到檔案,但在舊的數據中有發現檔案。\\n"
"您是否想匯入這些資訊?\\n"
"\\n"
"請註意這個問題只會問這一次。"
#: themes/default/templates/files.html.ep:34
msgid "Mail"
......@@ -441,7 +449,7 @@ msgstr "我的邀請"
#: themes/default/templates/invitations/notification_files_sent.mail.ep:17
msgid "NB: this list includes the list of files that have already been sent to you."
msgstr ""
msgstr "注意:這份列表包含了您送出過的檔案。"
#: themes/default/templates/index.html.ep:115
msgid "Name of the zip file"
......@@ -475,7 +483,7 @@ msgstr "請耐心等候,在您收到檔案之前我們先要下載並解密檔
#: lib/Lufi/Controller/Auth.pm:38
msgid "Please, check your credentials or your right to access this service: unable to authenticate."
msgstr ""
msgstr "請檢查您的驗證資訊或對於此服務的存取權限:無法驗證。"
#: themes/default/templates/about.html.ep:5
msgid "Privacy"
......@@ -536,7 +544,7 @@ msgstr "在 %1 私密地分享您的檔案"
#: themes/default/templates/invitations/my_invitations.html.ep:13 themes/default/templates/partial/invitations.js.ep:9
msgid "Show hidden invitations"
msgstr ""
msgstr "顯示隱藏的邀請"
#: themes/default/templates/partial/render.js.ep:12
msgid "Show zip content"
......@@ -613,7 +621,7 @@ msgstr "下列的電子郵件地址無效:%1"
#. ($guest_mail)
#: lib/Lufi/Controller/Invitation.pm:48
msgid "The guest email address (%1) is unvalid."
msgstr ""
msgstr "邀請對象的電子郵件地址(%1)無效。"
#. ($i->token, $i->guest_mail)
#: lib/Lufi/Controller/Invitation.pm:150
......@@ -656,7 +664,7 @@ msgstr ""
#: lib/Lufi/Controller/Files.pm:230
msgid "The server was unable to find the file record to add your file part to. Please, contact the administrator."
msgstr ""
msgstr "伺服器找不到相應的檔案紀錄來加入您的檔案塊。請聯絡管理員。"
#: lib/Lufi/Controller/Files.pm:289
msgid "This file has been deactivated by the admins. Contact them to know why."
......@@ -664,7 +672,7 @@ msgstr "這份檔案已經被管理員封禁。請聯絡他們瞭解詳細資訊
#: themes/default/templates/invitations/my_invitations.html.ep:46 themes/default/templates/partial/invitations.js.ep:6
msgid "This invitation is normally hidden"
msgstr ""
msgstr "這個邀請在平時會被隱藏"
#. (stash('expires')
#: themes/default/templates/invitations/invite.mail.ep:13
......@@ -677,7 +685,7 @@ msgstr "這臺伺服器根據檔案大小設定了不同上限。檔案的有效
#: themes/default/templates/invitations/my_invitations.html.ep:16
msgid "Toggle visibility"
msgstr ""
msgstr "開關隱藏邀請"
#: themes/default/templates/invitations/my_invitations.html.ep:25
msgid "URL"
......@@ -690,17 +698,17 @@ msgstr "無法複製連結到您的剪貼簿"
#. ($short)
#: lib/Lufi/Controller/Files.pm:433
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
msgstr ""
msgstr "無法取得 %1 的下載次數。該檔案不存在。其將會從您的本機存儲數據中移除。"
#. ($short)
#: lib/Lufi/Controller/Files.pm:423
msgid "Unable to get counter for %1. The token is invalid."
msgstr ""
msgstr "無法取得 %1 的下載次數。權杖無效。"
#. ($short)
#: lib/Lufi/Controller/Files.pm:443
msgid "Unable to get counter for %1. You are not authenticated."
msgstr ""
msgstr "無法取得 %1 的下載次數。您未驗證身份。"
#: themes/default/templates/layouts/default.html.ep:33 themes/default/templates/layouts/default.html.ep:66
msgid "Upload files"
......@@ -744,7 +752,7 @@ msgstr "您可以邀請其他人透過這個 Lufi 實例傳送檔案給您,他
#: themes/default/templates/about.html.ep:11
msgid "You can see the list of your files by clicking on the \"My files\" link at the top right of this page."
msgstr ""
msgstr "您可以點一下「我的檔案」選項來檢視您的檔案列表。"
#: lib/Lufi/Controller/Mail.pm:42
msgid "You can't add URLs that are not related to this instance."
......@@ -752,11 +760,11 @@ msgstr "您無法加入與此實例無關的網址。"
#: themes/default/templates/about.html.ep:8
msgid "You don't need to register yourself to upload files but be aware that, for legal reasons, your IP address will be stored when you send a file. Don't panic, this is normally the case for all sites on which you send files."
msgstr "您毋須註冊便可上傳檔案,但需要註意,鑑於法律原因,在您傳送檔案時您的 IP 地址會被記錄。毋需驚慌,通常所有您傳送檔案的網站都會這樣做。"
msgstr "您毋須註冊可上傳檔案,但需要註意,鑑於法律原因,在您傳送檔案時您的 IP 地址會被記錄。毋需擔憂,通常所有容許您傳送檔案的網站都會這樣做。"
#: themes/default/templates/partial/render.js.ep:11
msgid "You don't seem to have a key in your URL. You won't be able to decrypt the file. Download canceled."
msgstr ""
msgstr "您的網址似乎没有包含密鑰。您無法解密此檔案。下載取消。"
#: themes/default/templates/partial/render.js.ep:7
msgid "You have attempted to leave this page. The download will be canceled. Are you sure?"
......@@ -776,7 +784,7 @@ msgstr "您必須填寫電子郵件地址。"
#: themes/default/templates/index.html.ep:38
msgid "Your browser does not have enough entropy to generate a strong encryption key. Please wait (it's better if you do things on your computer while waiting)."
msgstr ""
msgstr "您的瀏覽器没有足夠的資訊熵來生成高強度密鑰。請耐心等候(最好在等待時用電腦做點其它事情)。"
#. (format_bytes($json->{size})
#: lib/Lufi/Controller/Files.pm:95
......@@ -831,3 +839,7 @@ msgstr "或"
#: themes/default/templates/invitations/notification_files_sent.mail.ep:12
msgid "— %1 (%2), that will expire on %3"
msgstr "— %1 (%2), 會在 %3 到期"
#: themes/default/templates/partial/render.js.ep:13
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
msgstr "無法下載檔案:太多不必要的開啓 websocket 嘗試。請聯絡管理員。"
......@@ -47,6 +47,7 @@ function addAlert(msg) {
// Spawn WebSocket
function spawnWebsocket(pa) {
console.log('Spawning websocket…');
var ws = new WebSocket(ws_url);
ws.onopen = function() {
console.log('Connection is established!');
......@@ -62,8 +63,13 @@ function spawnWebsocket(pa) {
ws.onclose = function() {
console.log('Connection is closed');
if (!window.completed) {
console.log('Connection closed. Retrying to get slice '+pa);
window.ws = spawnWebsocket(pa);
window.attempts++;
if (window.attempts < 10) {
console.log('Connection closed. Retrying to get slice '+pa);
window.ws = spawnWebsocket(pa);
} else {
alert(i18n.tooMuchAttempts);
}
}
}
ws.onmessage = function(e) {
......@@ -71,6 +77,9 @@ function spawnWebsocket(pa) {
var json = res.shift();
var data = JSON.parse(json);
// Reset counter since we succeded to open a websocket and got a message
window.attempts = 0;
if (data.msg !== undefined) {
addAlert(data.msg);
console.log(data.msg);
......@@ -78,6 +87,7 @@ function spawnWebsocket(pa) {
$('.file-abort').addClass('hide');
}
window.onbeforeunload = null;
window.attempts = 10;
} else {
console.log('Getting slice '+(data.part + 1)+' of '+data.total);
var slice = JSON.parse(res.shift());
......@@ -203,8 +213,13 @@ function spawnWebsocket(pa) {
}
}
ws.onerror = function() {
console.log('Error. Retrying to get slice '+pa);
window.ws = spawnWebsocket(pa);
window.attempts++;
if (window.attempts < 10) {
console.log('Error. Retrying to get slice '+pa);
window.ws = spawnWebsocket(pa);