Change language to welcome message in mailman3
Hi everyone,
My Version installed on Debian buster: mailman3: 3.2.1 postorius: 1.2.4 hyperkitty: 1.2.2
All interfaces work well in Italian language, but "Welcome message" is in English.
I'm trying to change the language to the "Welcome message" with mailman shell, but it doesn't work
sudo mailman shell -l test@pratico.work
m.preferred_language='it' commit() CTRL-D
This is my file /etc/mailman3/mailman-web.py LANGUAGE_CODE = 'it-IT' TIME_ZONE = 'Europe/Rome' USE_I18N = False USE_L10N = True USE_TZ = True
Would anyone know how to do it? Thank you
Max
On 7/24/20 2:10 PM, Massimo Zappalà wrote:
Hi everyone,
My Version installed on Debian buster: mailman3: 3.2.1 postorius: 1.2.4 hyperkitty: 1.2.2
All interfaces work well in Italian language, but "Welcome message" is in English.
First question:
Is the Subject: in English or Italian? If the Subject: is in English you need to compile the Italian message catalog as I described in my reply at <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...>.
Then, as far as the message body is concerned, it is built from a template. At present, in the Mailman source distribution, the only templates that are translated are French and German
You will find the complete set of English templates at /usr/lib/python3/dist-packages/mailman/templates/en/.
You have choices.
You can create /usr/lib/python3/dist-packages/mailman/templates/it/ and make Italian translations of all the English templates in the it/ directory in files of the same names, and submit a merge request at <https://gitlab.com/mailman/mailman/-/merge_requests> to merge them into the source distribution. If you are not familiar with software development in general and Mailman development in particular, this is probably beyond what you can do.
Find Mailman's var/ directory. This is the directory containing archives/, data/, etc/, lists/, locks/, logs/ and perhaps other sub-directories. You then need to create the full path to var/templates/site/it/ and place Italian translations of some or all the templates there. When doing so, you can add site customizations.
You can use Postorius to create templates for individual lists.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark, i've created the it templates from en. I have make a merge request from the link that you posted before, but i was rejected because I am non a member of the project. How can I make a merge request? Anyway, I copied the files in the path indicated by you but the translated emails arrive only if I am an list administrator.
Thank you for your replying.
Max
On 7/29/20 2:00 PM, Massimo Zappalà wrote:
Hi Mark, i've created the it templates from en. I have make a merge request from the link that you posted before, but i was rejected because I am non a member of the project. How can I make a merge request?
You need to fork Mailman Core <https://gitlab.com/mailman/mailman> into your own GitLab project space, make and commit your changes there and then submit a merge request to merge your branch back into the master.
If that's what you did, I don't know what the issue is, but you can send the templates to me directly.
Anyway, I copied the files in the path indicated by you but the translated emails arrive only if I am an list administrator.
Is this perhaps a permissions issue. The Mailmanuser needs to be able to read them. See <https://gitlab.com/mailman/mailman/-/issues/745>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark, I sent the IT templates as your requested to your email address.
Is this perhaps a permissions issue. The Mailmanuser needs to be able to read them. See https://gitlab.com/mailman/mailman/-/issues/745
you could clarify this point better?
Thanks
Max
On 7/29/20 3:48 PM, Massimo Zappalà wrote:
Hi Mark, I sent the IT templates as your requested to your email address.
Thank you very much for your contribution. It is much appreciated. See <https://gitlab.com/mailman/mailman/-/merge_requests/677>
Is this perhaps a permissions issue. The Mailmanuser needs to be able to read them. See https://gitlab.com/mailman/mailman/-/issues/745
you could clarify this point better?
Where did you put your templates? What does
ls -la /path/to/templates/it
show?
I may need more information about messages that are and aren't delivered. I.e. what's different between them and the way they are submitted, or is this one message only delivered to some users?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
/usr/lib/python3/dist-packages/mailman/templates/it$ ls -la
-rw-r--r-- 1 root root 484 Jul 25 17:21 domain:admin:notice:new-list.txt -rw-r--r-- 1 root root 825 Jul 25 17:06 help.txt -rw-r--r-- 1 root root 0 Jan 4 2019 __init__.py -rw-r--r-- 1 root root 701 Jul 25 17:19 invite.txt -rw-r--r-- 1 root root 337 Jul 26 16:36 list:admin:action:post.txt -rw-r--r-- 1 root root 145 Jul 26 16:36 list:admin:action:subscribe.txt -rw-r--r-- 1 root root 157 Jul 26 16:36 list:admin:action:unsubscribe.txt -rw-r--r-- 1 root root 56 Jul 26 16:23 list:admin:notice:subscribe.txt -rw-r--r-- 1 root root 334 Jul 26 16:49 list:admin:notice:unrecognized.txt -rw-r--r-- 1 root root 43 Jul 26 16:49 list:admin:notice:unsubscribe.txt -rw-r--r-- 1 root root 0 Jan 4 2019 list:member:digest:header.txt -rw-r--r-- 1 root root 423 Jul 26 17:07 list:member:digest:masthead.txt -rw-r--r-- 1 root root 160 Jul 26 17:08 list:member:generic:footer.txt -rw-r--r-- 1 root root 0 Jan 4 2019 list:member:regular:header.txt -rw-r--r-- 1 root root 658 Jul 26 17:18 list:user:action:subscribe.txt -rw-r--r-- 1 root root 675 Jul 26 17:18 list:user:action:unsubscribe.txt -rw-r--r-- 1 root root 0 Jan 4 2019 list:user:notice:goodbye.txt -rw-r--r-- 1 root root 328 Jul 26 17:23 list:user:notice:hold.txt -rw-r--r-- 1 root root 464 Jul 26 17:31 list:user:notice:no-more-today.txt -rw-r--r-- 1 root root 108 Jul 26 17:32 list:user:notice:post.txt -rw-r--r-- 1 root root 634 Jul 26 17:38 list:user:notice:probe.txt -rw-r--r-- 1 root root 318 Jul 26 17:40 list:user:notice:refuse.txt -rw-r--r-- 1 root root 155 Jul 26 17:42 list:user:notice:rejected.txt -rw-r--r-- 1 root root 554 Jul 26 17:47 list:user:notice:welcome.txt drwxr-xr-x 2 root root 4096 Jul 29 22:14 __pycache__
I may need more information about messages that are and aren't delivered. I.e. what's different between them and the way they are submitted, or is this one message only delivered to some users?
After copying the template files in the path indicated by you, the translated emails arrive only to the administrator user while the members of the list arrive in English.
Thanks
Max
On 7/29/20 4:15 PM, Massimo Zappalà wrote:
Hi Mark,
/usr/lib/python3/dist-packages/mailman/templates/it$ ls -la
-rw-r--r-- 1 root root 484 Jul 25 17:21 domain:admin:notice:new-list.txt -rw-r--r-- 1 root root 825 Jul 25 17:06 help.txt -rw-r--r-- 1 root root 0 Jan 4 2019 __init__.py -rw-r--r-- 1 root root 701 Jul 25 17:19 invite.txt -rw-r--r-- 1 root root 337 Jul 26 16:36 list:admin:action:post.txt -rw-r--r-- 1 root root 145 Jul 26 16:36 list:admin:action:subscribe.txt -rw-r--r-- 1 root root 157 Jul 26 16:36 list:admin:action:unsubscribe.txt -rw-r--r-- 1 root root 56 Jul 26 16:23 list:admin:notice:subscribe.txt -rw-r--r-- 1 root root 334 Jul 26 16:49 list:admin:notice:unrecognized.txt -rw-r--r-- 1 root root 43 Jul 26 16:49 list:admin:notice:unsubscribe.txt -rw-r--r-- 1 root root 0 Jan 4 2019 list:member:digest:header.txt -rw-r--r-- 1 root root 423 Jul 26 17:07 list:member:digest:masthead.txt -rw-r--r-- 1 root root 160 Jul 26 17:08 list:member:generic:footer.txt -rw-r--r-- 1 root root 0 Jan 4 2019 list:member:regular:header.txt -rw-r--r-- 1 root root 658 Jul 26 17:18 list:user:action:subscribe.txt -rw-r--r-- 1 root root 675 Jul 26 17:18 list:user:action:unsubscribe.txt -rw-r--r-- 1 root root 0 Jan 4 2019 list:user:notice:goodbye.txt -rw-r--r-- 1 root root 328 Jul 26 17:23 list:user:notice:hold.txt -rw-r--r-- 1 root root 464 Jul 26 17:31 list:user:notice:no-more-today.txt -rw-r--r-- 1 root root 108 Jul 26 17:32 list:user:notice:post.txt -rw-r--r-- 1 root root 634 Jul 26 17:38 list:user:notice:probe.txt -rw-r--r-- 1 root root 318 Jul 26 17:40 list:user:notice:refuse.txt -rw-r--r-- 1 root root 155 Jul 26 17:42 list:user:notice:rejected.txt -rw-r--r-- 1 root root 554 Jul 26 17:47 list:user:notice:welcome.txt drwxr-xr-x 2 root root 4096 Jul 29 22:14 __pycache__
What is the ownership of the other directories in /usr/lib/python3/dist-packages/mailman/? They are probably also owned by root and that should be OK as long as they are world readable.
I may need more information about messages that are and aren't delivered. I.e. what's different between them and the way they are submitted, or is this one message only delivered to some users?
After copying the template files in the path indicated by you, the translated emails arrive only to the administrator user while the members of the list arrive in English.
Please tell me what messages. Do you mean if I subscribe to the list, I get a welcome message in English, but the list owner gets the notification of a new member in Italian?
I think you need to set the system default_language. In mailman.cfg, set
[mailman] default_language: it
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
What is the ownership of the other directories in /usr/lib/python3/dist-packages/mailman/? They are probably also owned by root and that should be OK as long as they are world readable.
I have checked the permissions and properties of the it directory. They are the same as the en directory.
Please tell me what messages. Do you mean if I subscribe to the list, I get a welcome message in English, but the list owner gets the notification of a new member in Italian?
Not exactly. If you subscribe a user to a list, the Welcome email arrives in English. On the other hand, if an admin is registered for a list, he receives the email in Italian. But I solved it by changing the value "en" with "it" in the mailman3 database, the mailinglist table, the preferred_language column. Now those who subscribe to the list receive a Welcome email in Italian.
I think you need to set the system default_language. In mailman.cfg, set [mailman] default_language: it
I had changed this value from the beginning.
Thank you very much for your valuable advice and patience
Max
On 7/30/20 4:29 AM, Massimo Zappalà wrote:
But I solved it by changing the value "en" with "it" in the mailman3 database, the mailinglist table, the preferred_language column. Now those who subscribe to the list receive a Welcome email in Italian.
But in your post at <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...> you said you did that via mailman shell. Was that change not effective or was that for a different list?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark, You are right but I have delete the test list and re-create a new list, so i didn't think about that other method (with the mailman shell).
Max
participants (2)
-
Mark Sapiro
-
Massimo Zappalà