Fork me on GitHub
Subscribe 4

Ticket #1054 (fixed bug)

The bbcode2email() function has no localization

  • Created: 2015-11-04 02:59:44
  • Reported by: Visman
  • Assigned to: Franz
  • Milestone: 1.5.11
  • Component: localization
  • Priority: normal

Code

				$matches[2]." said:\n".$matches[3]);

History

adaur 2015-11-04 13:17:30

  • Milestone set to 1.5.9.
  • Owner set to adaur.

Franz 2015-11-05 09:06:07

  • Status changed from open to fixed.

Visman 2015-11-05 10:09:33

Such decision will establish language of the current user, but not language of the recipient.

Or I am wrong?

Franz 2015-11-05 10:16:27

  • Status changed from fixed to open.

Hmm, true. That sucks.

Visman 2015-11-06 16:49:38

I do not have forum for testing sad

Franz 2015-11-07 19:53:01

  • Milestone changed from 1.5.9 to 1.5.10.

quy 2015-11-15 06:32:39

For the sake for a simple solution, how about removing the localized string and just use a colon?

Username:

Visman 2015-11-22 02:13:49

All calls of the bbcode2email() function need to be transferred in cycles to a place of loading of templates of letters.

					// Loop through subscribed users and send emails
					while ($cur_subscriber = $db->fetch_assoc($result))
					{
						if (!in_array($cur_subscriber['language'], $languages))
							$cur_subscriber['language'] = $pun_config['o_default_lang'];

						// Is the subscription email for $cur_subscriber['language'] cached or not?
						if (!isset($notification_emails[$cur_subscriber['language']]))
						{
							if (file_exists(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl'))
							{
								if ($pun_config['o_censoring'] == '1')
									$cleaned_message = bbcode2email($censored_message, -1, $cur_subscriber['language']);
								else
									$cleaned_message = bbcode2email($message, -1, $cur_subscriber['language']);

								// Load the "new reply" template
								$mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl'));

								// Load the "new reply full" template (with post included)
								$mail_tpl_full = trim(file_get_contents(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl'));

Franz 2016-06-16 06:22:58

  • Milestone changed from 1.5.10 to 1.5.11.

Franz 2018-01-14 16:01:06

  • Owner changed from adaur to Franz.
  • Status changed from open to fixed.

Commit 5c4c531 to fluxbb master

Remove hardcoded English text in bbcode2email()

I decided against actually translating this in the recipient
user's language to avoid both the extra complexity and the
need to do the formatting in the loop, one time per user (as
they could have different languages configured).

Fixes #1054.