I have noticed that email types in Administration → E-Mails are not translated:
This one is a bit trickier, but here’s what I found out.
- The displayed email type comes from this line in the template (for the Sent page):
- The list shows
EmailLogrecords, which have anemail_typefield defined here: EmailLogrecords are created in the jobsNotifyMailingListSubscribersandUserEmail.UserEmailjobs (andCriticalUserEmailjobs, which are a subtype) are queued at different locations with mostly hardcoded email types (found viagrep -R "user_email" .):
- app/controllers/finish_installation_controller.rb:
signupandsignup - app/controllers/admin/users_controller.rb:
account_created - app/controllers/session_controller.rb:
forgot_password - app/controllers/users_controller.rb:
admin_loginandsignup - app/jobs/scheduled/enqueue_digest_emails.rb:
digest - app/jobs/scheduled/enqueue_mailing_list_emails:
mailing_list - app/models/user.rb:
signup_after_approval - app/services/user_activator.rb:
signup - app/services/notification_emailer.rb:
user_email - lib/tasks/admin.rake:
account_created - lib/email_updater.rb:
notify_old_email - lib/email_updater.rb:
confirm_new_email,confirm_old_emailandconfirm_new_emailonce more via this helper method - any email type passed to
Email::Sender.new(...)(which creates anEmailLoghere), namely (as indicated bygrep -R "Email::Sender.new" .):- app/controllers/admin/email_controller.rb:
digest - app/jobs/regular/invite_email.rb:
invite - app/jobs/regular/invite_password_instructions_email.rb:
invite_password_instructions - app/jobs/regular/notify_mailing_list_subscribers.rb:
mailing_list - app/jobs/regular/test_email.rb:
test_message - app/jobs/regular/user_email.rb: any email type passed
- app/jobs/scheduled/version_check.rb:
new_version - app/jobs/scheduled/pending_queued_posts_reminder.rb:
pending_queued_posts_reminder - lib/email/processor.rb:
email_reject_* - lib/email/receiver.rb:
subscription
- app/controllers/admin/email_controller.rb:
(This should be it.)
In general, it would be a good idea to collect the complete list of valid email types (not to be confused with the email template types) at a central place and make these translatable (even though plugins may send emails as well, I suppose, therefore we probably cannot reject email keys that are not in this list, which would assert that this list is to be kept complete).
3 إعجابات
أنا أيضًا فضولي بشأن جميع قيم email_type الممكنة، لأنني أبحث في تعطيل أنواع معينة من رسائل البريد الإلكتروني.
حتى الآن، رأيت:
signup
forgot_password
mailing_list
test_message
لكن الكود يُظهر أيضًا أنواعًا غير مألوفة مثل blah.
قائمة الأنواع:
- email_reject_reply_user_not_matching: رفض الرد عبر البريد الإلكتروني لعدم تطابق المستخدم
- email_reject_old_destination: رفض البريد الإلكتروني بسبب عنوان الوجهة القديم
- email_reject_inactive_user: رفض البريد الإلكتروني بسبب عدم نشاط المستخدم
- email_login: تسجيل الدخول عبر البريد الإلكتروني
- user_quoted: اقتباس المستخدم
- user_mentioned: ذكر المستخدم
- email_reject_screened_email: رفض البريد الإلكتروني المدقق مسبقًا
- user_invited_to_private_message: دعوة المستخدم إلى رسالة خاصة
- confirm_old_email: تأكيد البريد الإلكتروني القديم
- email_reject_invalid_post_specified: رفض البريد الإلكتروني بسبب منشور غير صالح محدد
- mailing_list: القائمة البريدية
- admin_confirmation_message: رسالة تأكيد من المسؤول
- download_backup_message: رسالة تنزيل النسخة الاحتياطية
- user_private_message: رسالة خاصة من المستخدم
- forgot_password: نسيت كلمة المرور
- admin_login: تسجيل دخول المسؤول
- email_reject_topic_not_found: رفض البريد الإلكتروني بسبب عدم العثور على الموضوع
- notify_old_email: إشعار البريد الإلكتروني القديم
- invite: دعوة
- user_replied: رد المستخدم
- suspicious_login: تسجيل دخول مشبوه
- email_reject_empty: رفض البريد الإلكتروني بسبب الفراغ
- confirm_new_email: تأكيد البريد الإلكتروني الجديد
- user_invited_to_topic: دعوة المستخدم إلى موضوع
- activation_reminder: تذكير التفعيل
- account_suspended: تعليق الحساب
- email_reject_post_too_short: رفض البريد الإلكتروني بسبب قصر المنشور
- group_mentioned: ذكر المجموعة
- account_second_factor_disabled: تعطيل العامل الثاني للحساب
- test_message: رسالة اختبار
- signup: التسجيل
- user_watching_first_post: مستخدم يشاهد أول منشور
- email_reject_topic_closed: رفض البريد الإلكتروني بسبب إغلاق الموضوع
- email_reject_bad_destination_address: رفض البريد الإلكتروني بسبب عنوان وجهة غير صالح
- user_posted: نشر المستخدم
- digest: الملخص
- user_linked: ربط المستخدم
3 إعجابات
