V6 Template: Fehlende Übersetzung, Englisch

  • Seite 2 von 2
10.09.2021 20:00 (zuletzt bearbeitet: 10.09.2021 20:07)
avatar  Mike48
#16 RE: V6 Template: Fehlende Übersetzung, Englisch
avatar
Mitglied

Die Fehlermedlungen kannst du hier einsetzen.
Die Felder zwischen % . . % nicht ändern das Platzhalter die benötigt werden.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 

/* Uebersetzung Error Fenster beim Login */
xobor.mbt.constants.validationstrings = {
'length' : "Der eingegebene Wert im Feld %input% muss %length% Zeichen betragen",
'minlength' : "Der eingegebene Wert im Feld %input% ist zu kurz (min: %length%)",
'maxlength' : "Der eingegebene Wert im Feld %input% ist zu lang (max: %length%)",
'notempty' : "Dises Pflichtfeld %input% sollte immer ausgefüllt werden",
'email' : "Die eingegebene Email-Adresse ist ungültig",
'norecs' : "Es muss mindestens ein Empfänger angegeben werden",
};
 
/* Vorbelegung der Input Felder beim Login */
$('#username').attr('placeholder','Name');
$('#password').attr('placeholder','PIN');
 

 



Es reicht wenn man nur einen script-Tag verwendet. Den obigen Code habe ich schon im folgenden Script unten angefügt. Musst du nur noch übersetzen.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
 
<script>
$('#activity_feed .card-title').text("Activity Feed");
$('#activity_feed .activitylinkdiv a:first-child').text("New Posts");
$('#activity_feed .activitylinkdiv a:last-child').text("New Photos");
$('#forumselect1.btn.btn-secondary.dropdown-toggle.d-none.d-sm-inline').text("Change Forum");
$('#xquotes .card-title').text("Saved Quotes");
$('#message_form .cancelbutton a:first-child').text("Cancel");
$('#settingslink .btn.btn-primary').attr('value', "Go to settings");
$('#searchbox .card-header .card-title').text("Search in Forum");
$('#searchhelp .card-header .card-title').text("Information for the search");
$('.threadoptions .dropdown .btn').text(function () {
if ($(this).text() == ' Sortieren nach ') {
$(this).text('Sort by');
}
});
$( ".message_action small" ).text(function () {
if ($(this).text() == 'Beitrag melden') {
$(this).text('Report a post');
}
});
$( "#doattach").text(function () {
if ($.trim($(this).text()) == 'Dateien anhängen') {
$(this).text('Attach files');
}
});
$( "#wikicreate a").text(function () {
if ($(this).text() == 'ändern') {
$(this).text('Change');
}
});
$( "input[name=pwforget]").val('Send password');
$( "#gologin div h5.card-title").text(function () {
if ($.trim($(this).text()) == 'Anmeldung mit bestehendem Benutzerkonto') {
$(this).text('Login with existing user account');
}
});
$( "#gologin div small").text(function () {
if ($.trim($(this).text()) == 'für bereits registrierte Mitglieder') {
$(this).text('for already registered members');
}
});
$( "#searchopts div h5.card-title").text(function () {
if ($.trim($(this).text()) == 'Suchoptionen') {
$(this).text('Search options');
}
});
$( "#search_when span a").text(function () {
if ($.trim($(this).text()) == 'Keine Einschränkung') {
$(this).text('No filter');
}
});
$( "#search_sort div h3").text(function () {
if ($.trim($(this).text()) == 'Sortierung') {
$(this).text('Sorting');
}
});
$( "#activity_feed div div a").text(function () {
if ($.trim($(this).text()) == 'Mehr anzeigen') {
$(this).text('Show more');
}
});
$("#cookies div.card-body").contents().get(0).nodeValue = "We use cookies to personalize content and ads, provide social media features, and analyze traffic to our website. Press the button opposite to view and customize cookie storage details.";
$("#cookies div.card-body button").text("Cookie Settings");
$("#usergb_comments.card.mb-3.fadeIn .card-title").text("Guest Book");
$("#profileactions div h5.card-title").text("Actions");
$("#loginpanel div small").text("for registered users");
$("#gotosignup div h5.card-title").text("No user account yet");
$("#gotosignup div small").text("register now");
$("#navbarSupportedContent div a.nav-link.float-right strong").text("Login");
$("#gotosignup div div div div button").text("To registration");
$( document ).ready(function() {
$("#klaro div div.cookie-notice div p span").text("Hello! Could we please enable some additional services for Required, Visitor Statistics, Security & Styling? You can change or withdraw your consent at any time later.");
$("#klaro div div.cookie-notice div div.cn-ok a").text("Let me choose");
$("#klaro div div.cookie-notice div div.cn-ok div button").text("That is OK");
});
$('#signuppanel .card-expl').text("Join Now");
$( "nav.sticky-top ol li.breadcrumb-item.active").text(function () {
if ($.trim($(this).text()) == 'Startseite') {
$(this).text('Home page');
}
});
$( "#forum_wiki_page div.card-header.clearfix h5.card-title").text(function () {
if ($.trim($(this).text()) == 'Startseite') {
$(this).text('Home page');
}
});
$( "#forum_wiki_page div.card-body h2").text(function () {
if ($.trim($(this).text()) == 'Inhalt') {
$(this).text('Content');
}
});
$( document ).ready(function() {
if ($.trim($("#loginpanel div p.bg-success").text()) == 'You will receive an E-Mail with the password needed to log in.\nback to Login') {
$("#loginpanel").removeClass('bg-success');
$("#loginpanel div p.bg-success").removeClass('bg-success');
}
});
 
/* Uebersetzung Error Fenster beim Login */
xobor.mbt.constants.validationstrings = {
'length' : "Der eingegebene Wert im Feld %input% muss %length% Zeichen betragen",
'minlength' : "Der eingegebene Wert im Feld %input% ist zu kurz (min: %length%)",
'maxlength' : "Der eingegebene Wert im Feld %input% ist zu lang (max: %length%)",
'notempty' : "Dieses Pflichtfeld %input% sollte immer ausgefüllt werden",
'email' : "Die eingegebene Email-Adresse ist ungültig",
'norecs' : "Es muss mindestens ein Empfänger angegeben werden",
};
 
/* Beispielangabe fuer Input Felder */
$('#username').attr('placeholder','Name');
$('#password').attr('placeholder','PIN');
</script>
 


www.friends-of-xobor.de (621181 - V4 Template)
www.seniorenclub-sel-koeln.de (578865 - V6 Template)

 Antworten

 Beitrag melden
10.09.2021 21:28 (zuletzt bearbeitet: 10.09.2021 21:36)
avatar  creator
#17 RE: V6 Template: Fehlende Übersetzung, Englisch
cr
Mitglied

Falls du auch den Titel "Fehler" übersetzen möchtest, kannst du folgenden Code verwenden:

1
2
3
4
5
6
7
8
9
 
try {
if(typeof xobor.mbt.initnotifications === "function" && typeof PNotify.alert === "function" ) {
xobor.mbt.shownotice = function(params,noclose) {
xobor.mbt.initnotifications();
if(params.title == "Fehler") params.title = "Error";
PNotify.alert(params);
}
}
} catch(e) {console.log(e)}
 


Damit überschreibst du die Funktion von Xobor, welche die Benachrichtigungen erzeugt. Da das Template noch in der Beta-Phase ist, kann sich die Funktionsweise der Benachrichtigungen jederzeit ändern. Sollten die Benachrichtigungen im Forum nach einem Update nicht mehr funktionieren, solltest du als erstes diesen Code entfernen.


 Antworten

 Beitrag melden
13.09.2021 16:22
#18 RE: V6 Template: Fehlende Übersetzung, Englisch
El
Mitglied

Ich habe 4 fehlende übersetsungen im Englishe Template entdeckt, habe printscreen zugefügt:

auf jeder Seite:
Datenschutz (Privacy Policy (5 miljard Google results; Data Protection 2,5 miljard Google results)

auf search.php:
Erstelldatum (Creation date)
Keine Einschränkung (Any time)
Erstellt vor: not established (Created before: not established)
Erstellt nach: nicht festgelegt (Created after: not established)
Sortierung (Sorting)

Danke sehr!
Ellen dH


 Antworten

 Beitrag melden
14.09.2021 11:59
#19 RE: V6 Template: Fehlende Übersetzung, Englisch
El
Mitglied

Ich habe ein Workaround gefunden mit CSS,

Code hinzugefügt in Admin/Layout/Farben & Einstellingen/CSS SCSS

#search_when div h3 {visibility: hidden; position: relative;}
#search_when div h3:after {visibility: visible; position: absolute; top: -5px; left: 0px;
content: "Creation date";}

#search_sort div h3 {visibility: hidden; position: relative;}
#search_sort div h3:after {visibility: visible; position: absolute; top: -5px; left: 0px;
content: "Sorting";}

#search_when span a {visibility: hidden; position: relative;}
#search_when span a:after {visibility: visible; position: absolute; top: -5px; left: 0px;
content: "Any time";}

#search_date_container div div div:nth-child(1) label {visibility: hidden; position: relative;}
#search_date_container div div div:nth-child(1) label:after {visibility: visible; position: absolute; top: -5px; left: 0px;
content: "Before:";}

#search_date_container div div div:nth-child(2) label {visibility: hidden; position: relative;}
#search_date_container div div div:nth-child(2) label:after {visibility: visible; position: absolute; top: -5px; left: 0px;
content: "After:";}

body > div > a:nth-last-of-type(1) {visibility: hidden; position: relative;}
body > div > a:nth-last-of-type(1):after {visibility: visible; position: absolute; top: 0px; left: 0px;
content: "PrivacyPolicy";}


 Antworten

 Beitrag melden
Bereits Mitglied?
Jetzt anmelden!
Mitglied werden?
Jetzt registrieren!