JS Translation

This commit is contained in:
loulous27 2025-11-22 23:04:59 +01:00
parent 76b9f58f68
commit ccbf1b7d36
6 changed files with 98 additions and 4 deletions

View file

@ -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>

View file

@ -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
from .views import IndexView, MediaAccess
@ -20,6 +21,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),
]

View 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."

View 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 "por favor tenga paciencia"
#: .\photologue\static\upload.js:139
msgid "Upload Complete Please reload the page"
msgstr "Carga completa Por favor recarga la página"

View 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"

View file

@ -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");
}