Browse Source

an Übersetzung gearbeitet

lang_de
Stephan Richter 3 years ago
parent
commit
0f83ce7e82
  1. 8
      src/main/java/de/srsoftware/widerhall/data/ListMember.java
  2. 12
      src/main/java/de/srsoftware/widerhall/data/MailingList.java

8
src/main/java/de/srsoftware/widerhall/data/ListMember.java

@ -147,7 +147,7 @@ public class ListMember {
var rs = request.compile().exec(); var rs = request.compile().exec();
while (rs.next()) list.add(rs.getString(LIST_EMAIL)); while (rs.next()) list.add(rs.getString(LIST_EMAIL));
} catch (SQLException e) { } catch (SQLException e) {
LOG.warn("Collecting lists of {} failed: ",user.email(),e); LOG.warn("Sammeln der Listen von {} fehlgeschlagen: ",user.email(),e);
} }
return list; return list;
} }
@ -222,9 +222,9 @@ public class ListMember {
*/ */
public static String stateText(int state) { public static String stateText(int state) {
var words = new ArrayList<String>(); var words = new ArrayList<String>();
if ((state & STATE_OWNER) > 0) words.add("owner"); if ((state & STATE_OWNER) > 0) words.add("Besitzer");
if ((state & STATE_SUBSCRIBER) > 0) words.add("subscriber"); if ((state & STATE_SUBSCRIBER) > 0) words.add("Abonniert");
if ((state & STATE_AWAITING_CONFIRMATION) > 0) words.add("awaiting confirmation"); if ((state & STATE_AWAITING_CONFIRMATION) > 0) words.add("erwartet Bestätigung");
return String.join(", ",words); return String.join(", ",words);
} }

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

@ -135,7 +135,7 @@ public class MailingList {
var member = ListMember.load(this,user); var member = ListMember.load(this,user);
return member.hasState(ListMember.STATE_OWNER|ListMember.STATE_SUBSCRIBER); // owners may subscribe their own mailing lists return member.hasState(ListMember.STATE_OWNER|ListMember.STATE_SUBSCRIBER); // owners may subscribe their own mailing lists
} catch (SQLException e) { } catch (SQLException e) {
LOG.warn("Was not able to load ListMember: ",e); LOG.warn("Konnte ListeMember nicht laden: ",e);
return false; return false;
} }
} }
@ -192,7 +192,7 @@ public class MailingList {
.compile().exec(); .compile().exec();
if (rs.next()) ml = MailingList.from(rs); if (rs.next()) ml = MailingList.from(rs);
} catch (SQLException e) { } catch (SQLException e) {
LOG.debug("Failed to load MailingList: ",e); LOG.debug("Konnte MailingList nicht laden: ",e);
} }
return ml; return ml;
} }
@ -229,7 +229,7 @@ public class MailingList {
while (rs.next()) list.add(MailingList.from(rs)); while (rs.next()) list.add(MailingList.from(rs));
rs.close(); rs.close();
} catch (SQLException e) { } catch (SQLException e) {
LOG.warn("Listing mailing lists failed: ", e); LOG.warn("Auflisten der Mailinglisten fehlgeschlagen: ", e);
} }
return list; return list;
} }
@ -283,10 +283,10 @@ public class MailingList {
* @throws UnsupportedEncodingException * @throws UnsupportedEncodingException
*/ */
private void sendConfirmationRequest(User user, String token) throws MessagingException, UnsupportedEncodingException { private void sendConfirmationRequest(User user, String token) throws MessagingException, UnsupportedEncodingException {
var subject = t("Please confirm your list subscription"); var subject = t("Bitte bestätigen Sie ihr Listen-Abonnement");
var config = Configuration.instance(); var config = Configuration.instance();
var url = new StringBuilder(config.baseUrl()).append("/confirm?token=").append(token); var url = new StringBuilder(config.baseUrl()).append("/confirm?token=").append(token);
var text = t("Please go to {} in order to complete your list subscription!",url); var text = t("Botte gehen Sie zu {} um das Abonnieren der Liste abzuschließen!",url);
smtp.login().send(email(),name(),user.email(),subject,text); smtp.login().send(email(),name(),user.email(),subject,text);
} }
@ -335,7 +335,7 @@ public class MailingList {
rs.close(); rs.close();
return result; return result;
} catch (SQLException e) { } catch (SQLException e) {
LOG.warn("Failed to read subscribable mailinglists for {}",user,e); LOG.warn("Lesen der für {} abbonnierbaren Mailinglisten fehlgeschlagen.",user,e);
return Set.of(); return Set.of();
} }
} }

Loading…
Cancel
Save