Browse Source

Merge branch 'main' into lang_de

lang_de
Stephan Richter 9 months ago
parent
commit
8a175c7f13
  1. 18
      src/main/java/de/srsoftware/widerhall/data/MailingList.java
  2. 9
      src/main/resources/Application.de.translation
  3. 20
      static/templates/js.st

18
src/main/java/de/srsoftware/widerhall/data/MailingList.java

@ -604,15 +604,15 @@ public class MailingList implements MessageHandler, ProblemListener { @@ -604,15 +604,15 @@ public class MailingList implements MessageHandler, ProblemListener {
public Map<String,Integer> stateMap(){
var map = new HashMap<String,Integer>();
if (hasState(STATE_ENABLED)) map.put("enabled",VISIBLE);
if (hasState(STATE_PUBLIC)) map.put("public",VISIBLE);
if (hasState(STATE_FORWARD_FROM)) map.put("original_from",HIDDEN);
if (hasState(STATE_FORWARD_ATTACHED)) map.put("forward_attached",HIDDEN);
if (hasState(STATE_HIDE_RECEIVERS)) map.put("hide_receivers",HIDDEN);
if (hasState(STATE_REPLY_TO_LIST)) map.put("reply_to_list",HIDDEN);
if (hasState(STATE_OPEN_FOR_GUESTS)) map.put("open_for_guests",HIDDEN);
if (hasState(STATE_OPEN_FOR_SUBSCRIBERS)) map.put("open_for_subscribers",HIDDEN);
if (hasState(STATE_PUBLIC_ARCHIVE)) map.put("archive",VISIBLE);
if (hasState(STATE_ENABLED)) map.put(t("enabled"),VISIBLE);
if (hasState(STATE_PUBLIC)) map.put(t("public"),VISIBLE);
if (hasState(STATE_FORWARD_FROM)) map.put(t("original_from"),HIDDEN);
if (hasState(STATE_FORWARD_ATTACHED)) map.put(t("forward_attached"),HIDDEN);
if (hasState(STATE_HIDE_RECEIVERS)) map.put(t("hide_receivers"),HIDDEN);
if (hasState(STATE_REPLY_TO_LIST)) map.put(t("reply_to_list"),HIDDEN);
if (hasState(STATE_OPEN_FOR_GUESTS)) map.put(t("open_for_guests"),HIDDEN);
if (hasState(STATE_OPEN_FOR_SUBSCRIBERS)) map.put(t("open_for_subscribers"),HIDDEN);
if (hasState(STATE_PUBLIC_ARCHIVE)) map.put(t("archive"),VISIBLE);
return map;
}

9
src/main/resources/Application.de.translation

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
archive : Archiv
enabled : aktiviert
forward_attached : als Anhang weiterleiten
hide_receivers : Empfänger verbergen
open_for_guests : Gästbeiträge erlaubt
open_for_subscribers : Selbstregistrierung
original_from : ursprünglicher Absender
public : öffentlich
reply_to_list : Antwort an Liste

20
static/templates/js.st

@ -132,13 +132,25 @@ function showListOfModeratedLists(data){ @@ -132,13 +132,25 @@ function showListOfModeratedLists(data){
$('<td/>').html('<span class="error">'+list.last_error+'</span>').appendTo(row);
} else $('<td/>').text('-').appendTo(row);
let select = $('<select/>',{name:addr}).change(function () {
let action = $(this).children("option:selected").val();
let selected = $(this).children("option:selected");
let action = selected.val();
let verb = selected.text();
let list = $(this).attr('name');
if (confirm("This will "+action+" '"+list+"'. Are you sure?")) self[action+'List'](list);
if (confirm("Dies wird '"+list+"' "+verb+". Sind Sie sicher?")) self[action+'List'](list);
});
$('<option/>').text('Aktionen').appendTo(select);
['enable','disable','drop','hide','show','test'].forEach(val => $('<option/>',{value:val}).text(val).appendTo(select));
Object.entries({
'enable':'aktivieren',
'disable':'deaktivieren',
'drop':'löschen',
'hide':'verstecken',
'show':'veröffentlichen',
'test':'testen'
}).forEach(([k,v],i) => {
$('<option/>',{value:k}).text(v).appendTo(select)
});
select.appendTo($('<td/>')).appendTo(row);
$('<td/>').text(list.imap_host).appendTo(row);
@ -258,4 +270,4 @@ function unsubscribeFrom(listEmail){ @@ -258,4 +270,4 @@ function unsubscribeFrom(listEmail){
}
$(start); // document.on ready
$(start); // document.on ready

Loading…
Cancel
Save