Partial i18n share message.

This commit is contained in:
Paulo Gustavo Veiga 2022-03-27 14:50:35 -03:00
parent 791b99e753
commit 86a5b39124
8 changed files with 65 additions and 62 deletions

View File

@ -51,6 +51,7 @@ final public class NotificationService {
private String baseUrl;
public void newCollaboration(@NotNull Collaboration collaboration, @NotNull Mindmap mindmap, @NotNull User user, @Nullable String message) {
final Locale locale = LocaleContextHolder.getLocale();
try {
// Sent collaboration email ...
@ -60,12 +61,11 @@ final public class NotificationService {
final String collabEmail = collaboration.getCollaborator().getEmail();
// Build the subject ...
final String subject = "[WiseMapping] " + user.getFullName() + " has shared a mindmap with you";
final String subject = messageSource.getMessage("SHARE_MAP.EMAIL_SUBJECT", new Object[]{user.getFullName()}, locale);
// Fill template properties ...
final Map<String, Object> model = new HashMap<>();
model.put("mindmap", mindmap);
model.put("message", "message");
model.put("ownerName", user.getFirstname());
model.put("mapEditUrl", getBaseUrl() + "/c/maps/" + mindmap.getId() + "/edit");
model.put("baseUrl", getBaseUrl());

View File

@ -10,13 +10,12 @@
<a href="${baseUrl}">
<img style="border: 0;margin-top: 10px;"
src="${baseUrl}/images/logo-icon.png"
alt="WiseMapping Log"/>
alt="WiseMapping Logo"/>
</a>
</td>
<td valign="bottom" height="32px" style="padding: 0;font-size: 16px;">I've shared <a
href='${mapEditUrl}'>
${mindmap.title}</a> mindmap with you.
<td valign="bottom" height="32px" style="padding: 0;font-size: 16px;">
I've shared <a href='${mapEditUrl}'>${mindmap.title}</a> mindmap with you.
</td>
</tr>
</tbody>

View File

@ -65,3 +65,4 @@ CAPTCHA_INVALID_INPUT_RESPONSE=Ungültige Eingabeantwort, aktualisieren Sie die
MINDMAP_EMPTY_ERROR=Mindmap darf nicht leer sein.
INVALID_MINDMAP_FORMAT=Ungültiges Mindmap-Format.
TOO_BIG_MINDMAP=Sie haben das Limit von 5000 Themen in einer Mindmap erreicht.
SHARE_MAP.EMAIL_SUBJECT={0} hat eine Mindmap mit Ihnen geteilt

View File

@ -66,4 +66,4 @@ CHANGE_PASSWORD.EMAIL_BODY=<p>Someone, most likely you, requested a new password
PASSWORD_CHANGED.EMAIL_SUBJECT=Your password has been changed
PASSWORD_CHANGED.EMAIL_TITLE=Your password has been changed successfully
PASSWORD_CHANGED.EMAIL_BODY=<p>This is only an notification that your password has been changed. No further action is required.</p>
SHARE_MAP.EMAIL_SUBJECT={0} has shared a mind map with you

View File

@ -65,3 +65,4 @@ CHANGE_PASSWORD.EMAIL_BODY=<p>Alguien, muy probablemente usted, solicitó una nu
PASSWORD_CHANGED.EMAIL_SUBJECT=Su contraseña ha sido cambiada
PASSWORD_CHANGED.EMAIL_TITLE=Su contraseña ha sido cambiada con éxito
PASSWORD_CHANGED.EMAIL_BODY=<p>Esto es solo una notificación de que su contraseña ha sido cambiada. No se requiere ninguna otra acción.</p>
SHARE_MAP.EMAIL_SUBJECT={0} te ha compartido un mapa mental

View File

@ -65,3 +65,4 @@ CAPTCHA_INVALID_INPUT_RESPONSE=Réponse d'entrée non valide, actualisez la page
MINDMAP_EMPTY_ERROR=La carte mentale ne peut pas être vide.
INVALID_MINDMAP_FORMAT=Format de carte mentale non valide.
TOO_BIG_MINDMAP=Vous avez atteint la limite de 5000 sujets dans une carte mentale.
SHARE_MAP.EMAIL_SUBJECT={0} a partagé une carte mentale avec vous

View File

@ -56,8 +56,8 @@ CAPTCHA_INVALID_INPUT_RESPONSE="Неверная CAPTCHA, обновите ст
MINDMAP_EMPTY_ERROR=Карта не может быть пустой.
INVALID_MINDMAP_FORMAT=Недопустимый формат карты.
TOO_BIG_MINDMAP=Слишком большая карта - вы достигли лимита в 500 тем.
REGISTRATION.EMAIL_SUBJECT=Добро пожаловать в WiseMapping!
REGISTRATION.EMAIL_TITLE=Ваша учетная запись успешно создана
REGISTRATION.EMAIL_BODY=<p> Благодарим вас за интерес к WiseMapping. Нажмите <a href='https://app.wisemapping.com/c/login'>здесь</a>, чтобы начать создавать и публиковать новые интеллект-карты. Если у вас есть какие-либо отзывы или идеи, отправьте нам электронное письмо по адресу <a href=\"mailto:feedback@wisemapping.com\">feedback@wisemapping.com</a>. Мы будем рады услышать от вас.</p >
SHARE_MAP.EMAIL_SUBJECT={0} has shared a mindmap with you

View File

@ -65,4 +65,5 @@ CHANGE_PASSWORD.EMAIL_BODY=<p>有人(很可能是您)为您的 WiseMapping
PASSWORD_CHANGED.EMAIL_SUBJECT=您的密码已被更改
PASSWORD_CHANGED.EMAIL_TITLE=你已经成功更改密码
PASSWORD_CHANGED.EMAIL_BODY=<p>这只是您的密码已更改的通知。无需进一步操作。</p>
SHARE_MAP.EMAIL_SUBJECT={0} 与您分享了一张思维导图