Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation for default email templates in the system settings #6092

Open
modxbot opened this issue Nov 22, 2011 · 10 comments

Comments

@modxbot
Copy link
Contributor

commented Nov 22, 2011

elastic created Redmine issue ID 6092

It would be nice if the translation will be added to the default message templates in the system settings.
Below is a list of system settings:
site_unavailable_message
emailsubject
forgot_login_email
signupemail_message
webpwdreminder_message
websignupemail_message

@pepebe

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2015

This is an old one and it is still nagging me.

Question to the more knowledgeable people here:

Would it be possible to add these messages to core/lexicon/de/mail.inc.php and core/lexicon/de/site.inc.php and use

forgot_login_email = [[%forgot_login_email]]
...

to get the right translation depending on the current cultureKey?

Cheers,

pepebe

@rtripault

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2015

Somehow related to #3969

@pepebe

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2015

@rtripault. You never sleep, don't you? Anyway, as far as I understand your PR this would be exactly what we need to pull multilingual forgot_login_email messages from the lexicon. Thanks.

2do list

I did a quick search for the required system settings (but I didn't look very hard at the code).

site_unavailable_message

core/model/modx/modrequest.class.php

emailsubject

manager/controllers/default/security/login.class.php

forgot_login_email

manager/controllers/default/security/login.class.php (done)

signupemail_message

core/model/modx/processors/security/user/create.class.php
core/model/modx/processors/security/user/update.class.php

webpwdreminder_message

Odd, I can only find this one to be used in system settings...

websignupemail_message

Dito...

In addition all of these setting would have to be added to the lexicon and referenced in _build/data/transport.core.system_settings.php

Did I miss something obvious?

@rtripault

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2015

@pepebe i do sleep, do not worry 😄

The PR indeed only takes care of the forgot_login_email, (at least for the manager "forgot password" function), but the idea/code could indeed be replicated for some other settings (thank you for your list/hints so far).

@pepebe

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2015

@rtripault I've noticed your heroic efforts to beat some sense into the long list of issues. I'm sure you don't sleep that much. ;)

There will be a hackton in Cologne next month. Every German developer is effected by this in some way. I guess that many of us want to get rid of that beast. I'll add it to the long list of things I want to solve during this event.

@Mark-H

This comment has been minimized.

Copy link
Collaborator

commented Aug 4, 2015

With #12266 merged, this request is a step closer, at least for the forgotten login ;)

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Jun 1, 2018

It would be nice if the other items from the todo list would be available for translations before MODX 3 is released.

@Ibochkarev

This comment has been minimized.

Copy link
Contributor

commented Feb 20, 2019

@JoshuaLuckers Tell me what you need to do on this task. A little did not understand.

The following settings are already in the lexicons.

We need to reschedule the lexicons in core/lexicon/en/mail.inc.php

  • emailsubject
  • forgot_login_email
  • signupemail_message
  • webpwdreminder_message
  • websignupemail_message

What else?

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator

commented Feb 20, 2019

The values for these settings are hardcoded HTML. For example the value of the system setting signupemail_message is:

<p>Hello [[+uid]],</p>

    <p>Here are your login details for [[+sname]]:</p>

    <p><strong>Username:</strong> [[+uid]]<br />
    <strong>Password:</strong> [[+pwd]]</p>

    <p>Once you log into [[+sname]] at [[+surl]], you can change your password.</p>

    <p>Regards,<br />
    Site Administrator</p>

It would be nice if the value itself was translatable.

@Jako

This comment has been minimized.

Copy link
Collaborator

commented Feb 20, 2019

That string could be replaced with an lexicon tag and the placeholder as properties:

[[%whatever? &uid=`[[+uid]]` ... &namespace=`whatever`]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.