No translation Bug

I think there is a bug in phplist-3.6.10:

I have a problem with certain translations: they do not work. I have investigated an example: The submit button in the subscribe-site (see image).
subscribe-site

I have tried to translate the text on the button:

“Subcribe to the selected newsletters”

After many failed attempts, I eventually substituted the excerpt with a Danish translation “Tilmeld til nyhedsbreve” in ALL phplist-files, even english.inc. Then, this command did not return anything:

grep -RI “Subscribe to the selected newsletters” .
Whereas
grep -RI “strSubmit” .
returns the following relevant lines:
./texts/english.inc:$strSubmit = ‘Tilmeld til nyhedsbreve’;
./texts/english-usa.inc:$strSubmit = ‘Tilmeld til nyhedsbreve’;
./texts/usa.inc:$strSubmit = ‘Tilmeld til nyhedsbreve’;
./texts/danish.inc:$strSubmit = ‘Tilmeld til nyhedsbrev(e)’;
./admin/defaultFrontendTexts.php:$strSubmit = ‘Tilmeld til nyhedsbreve’;
./admin/spageedit.php:$data[‘button’] = $strSubmit;
./index.php: $GLOBALS[‘pagedata’][‘button’] = $GLOBALS[‘strSubmit’];
./index.php: $GLOBALS[‘pagedata’][‘button’] = $GLOBALS[‘strSubmit’];

Still the button had the English text.

I have even tried to hardcoded a Danish translation into admin/spageedit.php:

#$data[‘button’] = $strSubmit;
$data[‘button’] = ‘Tilmeld til nyhedsbreve’;

Still the button had the English text.

I found out where the English excerpt came from as I

mysqldump phplist | grep -i “Subscribe to the selected”

In mariadb I could then solve the problem like this:

update phplist_subscribepage_data set data = ‘Tilmeld’ where name = ‘button’;

and the Danish translation was displayed on the subscribe button.

It seems that the translations and defaulttext files and even the hardcoded translation are overruled by the database content in subscribepage. This is of course correct, but there is no entry in admin-GUI config > configure where one may change the text on the subscribe button.

But, this is not the only problem. There is, indeed, an admin-GUI entry where you may change “Text to display when subscription with an AJAX request was successful”. I have translated the text. But, still the English text was shown on the subscription confirmation page. And in the database table subscribepage, I found:

ajax_subscribeconfirmation |

Thanks, you have been added to our newsletter

You will receive an email to confirm your subscription. Please click the link in the email to confirm

Hence I updated the database table subscribepage for name: ajax_subscribeconfirmation, but it did not change the subscription confirmation message. But, when I updated the table for the name: thankyoupage, I got a translated subscription confirmation page. So, here is something wrong as well.

But, most of the other translations via the admin-GUI config seems to work. I don’t know for sure, since I have not yet tested them all.

Here is another possible bug: You may change the text of the final confirmation mail in adminGUI config. In the database table config you will then see the translated confirmationmessage as well as the former confirmationmessage:1. So, the translated message IS in the database. However, the English mail text is send to the subscriber.

Now, I tried to change confirmationmessage:1 directly in that database to the Danish translation. It worked. I had tried to change confirmationmessage:1 by changing the message in admin-GUI config, but that did not change confirmationmessage:1 (perhaps because I just added a space?). In any case, it is the confirmationmassage:1 that is used as final confirmation mail which to me was unexpected because I thought the :1 denoted the former text which was saved.

By the way, the confirmationmessage could be grepped from admin/defaultconfig.php where it is hardcoded:

// message that is sent to confirm subscription
‘confirmationmessage’ => array(
‘value’ =>
'Welcome to our Newsletter

Please keep this message for later reference.

Your email address has been added to the following newsletter(s):
[LISTS]

To update your details and preferences please go to [PREFERENCESURL].
If you do not want to receive any more messages, please go to [UNSUBSCRIBEURL].

Thank you’

However, translating this message within the defaultconfig.php did not change the final mail message sent.

@Rab-bits The text for the Subscribe button is entered on the “Edit a subscribe page” page

image

Each subscribe page takes default values from the Settings page, but any further changes to Settings do not get applied to already created subscribe pages.

Thank you. I see. But, there is no default value for the button on the settings page. Never mind, I see my mistake.