Merge branch 'Javascript-continious-upload-translate' into 'master'
Javascript continious upload translate See merge request bde/photo21!34
This commit is contained in:
commit
614289a564
7 changed files with 100 additions and 6 deletions
|
|
@ -222,9 +222,9 @@ MESSAGE_TAGS = {
|
|||
messages.ERROR: "alert-danger",
|
||||
}
|
||||
|
||||
# Allauth configuration
|
||||
# Allauth configuration ## For the django =< 5.0
|
||||
ACCOUNT_EMAIL_REQUIRED = True
|
||||
# ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*']
|
||||
# ACCOUNT_SIGNUP_FIELDS = ['email*', 'username*', 'password1*', 'password2*'] ## For the django =< 5.0
|
||||
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
|
||||
# ACCOUNT_LOGIN_METHODS = {'username', 'email'}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
||||
<script src="{% static "lang-select.js" %}"></script>
|
||||
<script src="{% static "bootstrap5/js/bootstrap.bundle.min.js" %}"></script>
|
||||
<script src="{% url 'javascript-catalog' %}"></script>
|
||||
{% block extrajs %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ from django.conf import settings
|
|||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path, re_path
|
||||
from django.views.i18n import JavaScriptCatalog
|
||||
|
||||
if settings.DEBUG :
|
||||
from debug_toolbar.toolbar import debug_toolbar_urls
|
||||
|
|
@ -23,6 +24,7 @@ urlpatterns = [
|
|||
path("", include("photologue.urls", namespace="photologue")),
|
||||
path("accounts/", include("allauth.urls")),
|
||||
path("i18n/", include("django.conf.urls.i18n")),
|
||||
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),
|
||||
path("admin/doc/", include("django.contrib.admindocs.urls")),
|
||||
path("admin/", admin.site.urls),
|
||||
]
|
||||
|
|
|
|||
30
photologue/locale/de/LC_MESSAGES/djangojs.po
Normal file
30
photologue/locale/de/LC_MESSAGES/djangojs.po
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# 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 <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-11-22 22:53+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
#: .\photologue\static\upload.js:52
|
||||
msgid "Continious Upload"
|
||||
msgstr "Kontinuierlicher Upload"
|
||||
|
||||
#: .\photologue\static\upload.js:62 .\photologue\static\upload.js:113
|
||||
msgid "Please be patient"
|
||||
msgstr "Please be patient"
|
||||
|
||||
#: .\photologue\static\upload.js:139
|
||||
msgid "Upload Complete Please reload the page"
|
||||
msgstr "Upload abgeschlossen. Bitte laden Sie die Seite neu."
|
||||
31
photologue/locale/es/LC_MESSAGES/djangojs.po
Normal file
31
photologue/locale/es/LC_MESSAGES/djangojs.po
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# 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 <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-11-22 22:53+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
|
||||
"1 : 2;\n"
|
||||
#: .\photologue\static\upload.js:52
|
||||
msgid "Continious Upload"
|
||||
msgstr "Carga continua"
|
||||
|
||||
#: .\photologue\static\upload.js:62 .\photologue\static\upload.js:113
|
||||
msgid "Please be patient"
|
||||
msgstr "espera por favor"
|
||||
|
||||
#: .\photologue\static\upload.js:139
|
||||
msgid "Upload Complete Please reload the page"
|
||||
msgstr "Carga completa Por favor recarga la página"
|
||||
30
photologue/locale/fr/LC_MESSAGES/djangojs.po
Normal file
30
photologue/locale/fr/LC_MESSAGES/djangojs.po
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# 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 <loulous27@crans.org>, 2025.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-11-22 22:53+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
#: .\photologue\static\upload.js:52
|
||||
msgid "Continious Upload"
|
||||
msgstr "Téléversement Continu"
|
||||
|
||||
#: .\photologue\static\upload.js:62 .\photologue\static\upload.js:113
|
||||
msgid "Please be patient"
|
||||
msgstr "Merci d'être patient"
|
||||
|
||||
#: .\photologue\static\upload.js:139
|
||||
msgid "Upload Complete Please reload the page"
|
||||
msgstr "Téléversement terminé Merci de recharger la page"
|
||||
|
|
@ -49,7 +49,7 @@ submitbtn = document.getElementById('submit-id-submit');
|
|||
|
||||
var ctnbtn = document.createElement("input");
|
||||
ctnbtn.classList = submitbtn.classList;
|
||||
ctnbtn.value="Continious Upload";
|
||||
ctnbtn.value=gettext("Continious Upload");
|
||||
ctnbtn.type = "button";
|
||||
|
||||
async function uplaodfnc() {
|
||||
|
|
@ -59,7 +59,7 @@ async function uplaodfnc() {
|
|||
submitbtn.disabled = true;
|
||||
ctnbtn.disabled = true;
|
||||
actual = 0;
|
||||
ctnbtn.value = "Please be patient 0% (" + actual + "/" + files.length + ")";
|
||||
ctnbtn.value = gettext("Please be patient")+" 0% (" + actual + "/" + files.length + ")";
|
||||
|
||||
csrfvalue = document.getElementsByName("csrfmiddlewaretoken")[0].value;
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ async function uplaodfnc() {
|
|||
if (!okpass) {
|
||||
window.alert("Error with " + file.name + "code" + await response.code);
|
||||
}
|
||||
ctnbtn.value = "Please be patient " + Math.round(100 * actual / total) + "% (" + actual + "/" + files.length + ")";
|
||||
ctnbtn.value = gettext("Please be patient")+" " + Math.round(100 * actual / total) + "% (" + actual + "/" + files.length + ")";
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
@ -136,7 +136,7 @@ async function uplaodfnc() {
|
|||
});
|
||||
returned = await response.json();
|
||||
|
||||
ctnbtn.value = "Upload Complete Please reload the page";
|
||||
ctnbtn.value = gettext("Upload Complete Please reload the page");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue