(minor) noticed a spelling issue in e-mail notification #480

Open
opened 2026-10-05 00:00:35 +02:00 by adam · 0 comments
Owner

I noticed in the e-mail notification that there is an issue with the translation at least to Norwegian. The trouble is that the phrase "New photos were added on the " is split into a translation of "New photos were added" and "on". "on" can be translated differently depending on context, so it needs to be split for the phrase to sound right (e.g. on/off switch is different word in Norwegian than "on date").

You can see the following diff which hopefully shows what I am trying to explain. I do not know how you correctly add information text to the translation strings.

diff --git a/language/nb_NO/admin.lang.php b/language/nb_NO/admin.lang.php
index 4acf3b3..781c4ef 100644
--- a/language/nb_NO/admin.lang.php
+++ b/language/nb_NO/admin.lang.php
@@ -229,6 +229,7 @@ $lang['Go to'] = 'G<C3><A5> til';
 $lang['Hello'] = 'Hallo';
 $lang['New photos were added'] = 'Nye elementer har blitt lagt til';
 $lang['on'] = 'p<C3><A5>';
+$lang['on <date>'] = 'den';
 $lang['between'] = 'mellom';
 $lang['and'] = 'og';
 $lang['The webmaster has subscribed you to receiving notifications by mail.'] = 'Webmaster har satt deg opp for beskjeder via e-mail.';
diff --git a/themes/default/template/mail/text/html/notification_by_mail.tpl b/themes/default/template/mail/text/html/notification_by_mail.tpl
index df3e431..ea2eb3a 100644
--- a/themes/default/template/mail/text/html/notification_by_mail.tpl
+++ b/themes/default/template/mail/text/html/notification_by_mail.tpl
@@ -15,7 +15,7 @@
 <p>{'You have unsubscribed from receiving notifications by mail.'|@translate}</p>
 {/if}
 {if isset($content_new_elements_single)}
-<p>{'New photos were added'|@translate} {'on'|@translate} {$content_new_elements_single.DATE_SINGLE}.</p>
+<p>{'New photos were added'|@translate} {'on <date>'|@translate} {$content_new_elements_single.DATE_SINGLE}.</p>
 {/if}
 {if isset($content_new_elements_between)}
 <p>{'New photos were added'|@translate} {'between'|@translate} {$content_new_elements_between.DATE_BETWEEN_1} {'and'|@translate} {$content_new_elements_between.DATE_BETWEEN_2}.</p>
I noticed in the e-mail notification that there is an issue with the translation at least to Norwegian. The trouble is that the phrase "New photos were added on the <date>" is split into a translation of "New photos were added" and "on". "on" can be translated differently depending on context, so it needs to be split for the phrase to sound right (e.g. on/off switch is different word in Norwegian than "on date"). You can see the following diff which hopefully shows what I am trying to explain. I do not know how you correctly add information text to the translation strings. ``` diff diff --git a/language/nb_NO/admin.lang.php b/language/nb_NO/admin.lang.php index 4acf3b3..781c4ef 100644 --- a/language/nb_NO/admin.lang.php +++ b/language/nb_NO/admin.lang.php @@ -229,6 +229,7 @@ $lang['Go to'] = 'G<C3><A5> til'; $lang['Hello'] = 'Hallo'; $lang['New photos were added'] = 'Nye elementer har blitt lagt til'; $lang['on'] = 'p<C3><A5>'; +$lang['on <date>'] = 'den'; $lang['between'] = 'mellom'; $lang['and'] = 'og'; $lang['The webmaster has subscribed you to receiving notifications by mail.'] = 'Webmaster har satt deg opp for beskjeder via e-mail.'; diff --git a/themes/default/template/mail/text/html/notification_by_mail.tpl b/themes/default/template/mail/text/html/notification_by_mail.tpl index df3e431..ea2eb3a 100644 --- a/themes/default/template/mail/text/html/notification_by_mail.tpl +++ b/themes/default/template/mail/text/html/notification_by_mail.tpl @@ -15,7 +15,7 @@ <p>{'You have unsubscribed from receiving notifications by mail.'|@translate}</p> {/if} {if isset($content_new_elements_single)} -<p>{'New photos were added'|@translate} {'on'|@translate} {$content_new_elements_single.DATE_SINGLE}.</p> +<p>{'New photos were added'|@translate} {'on <date>'|@translate} {$content_new_elements_single.DATE_SINGLE}.</p> {/if} {if isset($content_new_elements_between)} <p>{'New photos were added'|@translate} {'between'|@translate} {$content_new_elements_between.DATE_BETWEEN_1} {'and'|@translate} {$content_new_elements_between.DATE_BETWEEN_2}.</p> ``` <!-- github-sync-id:169912235 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#480