By Emanuel Rosenzweig on Monday, 23 May 2016
Posted in Technical Issues
Likes 0
Views 640
Votes 0
Following your two tutorials I copied the email files from the component wireframe theme folder to my_template/html/com_easyblog/emails/html folder.
But that doesn't work (currently I check it in the back-end Mail Activities page). If I directly hack the files in the wireframe folder I do see the modifications.

There is another issue - picking the right language ini file. Currently it only takes the text from the en-GB file. Since I'm checking it from the administrator site (which is set to English), I'm not sure what triggers the correct email language. I believe it should be depended on the content language... but it doesn't.
Hi Emanuel Rosenzweig,

I am sorry for the inconvenience caused and delay of this reply. I've tried to replicate this issue and it seems there is a bug. I've extends this issue to our developers and they will take an action on this.
However, do you mind to update your EasyBlog to latest version?
·
Tuesday, 24 May 2016 11:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Muhammad.
I updated the EB version.
Of course the update has nothing to do, yet, with this bug, so I'm waiting
·
Tuesday, 24 May 2016 19:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Emanuel,

Actually these fix will not included in 5.0.36 version yet, by the way, I have applied some fix in your site, can you give it a try and see how it goes?
·
Wednesday, 25 May 2016 00:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex, thank you for digging in...

It seams that the email template override works after your fix!
Can you detail what did you do, since I was just on my way to upload an updated site from my local dev pc when I read your post. I have to replicate your fix here...

There is still an issue with the language. It doesn't pick the one I need but stick to the en-GB files (at least in the email preview at the Email Activities page).
·
Wednesday, 25 May 2016 17:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Emanuel,

Can you download the attachments (see attachment) and replace the file into the folder:

[Attachment 1st easyblog.php] into:
administrator/components/com_easyblog/includes/easyblog.php

[Attachment 2nd themes-1.php] into:
administrator/components/com_easyblog/includes/themes/themes.php

[Attachment 3rd themes-2.php] into:
administrator/components/com_easyblog/models/themes.php

I believe that the languange that you are using do not fully translated yet (refer these screenshots: http://screencast.com/t/5LwBUIei and http://screencast.com/t/HxeuClmN ).
However you can translate it in this folder:
\language\he-IL\he-IL.com_easyblog.ini

Hope this helps
·
Thursday, 26 May 2016 10:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Don't forget to rename the attachments file themes-1 and themes to themes as you replace the file
·
Thursday, 26 May 2016 10:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,
Thanks for the files. I managed to plant them in my local site and it works well!

As for the language: I do use translated ini files (actually I translated thousands of lines in my local site... the Hebrew translation you offer is (very) partial sloppy and old... I asked to join the translators team in Transifex and got denied:( ...).

The screen shot you attached shows exactly the problem - the system doesn't call the language files but uses the en-GB files, although it is generated from a Hebrew page.
·
Thursday, 26 May 2016 18:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Emanuel,

May I know where do you create the blog post either front end or back end? Can I have a permission to create a test post?
·
Thursday, 26 May 2016 18:51
·
0 Likes
·
0 Votes
·
0 Comments
·
You can play freely.
Create a post in the default category (it is "Kitchef"), make sure you write something in the custom fields and define the language of the post as Hebrew.
You'll find the post in the frontend right under "Kitchef" main menu item.

I suggest that you'll use the backend to create the post since posts which are written from the frontend generate some php errors (I keep it for a separate thread since it is not urgent for me).

Thanks!!
·
Thursday, 26 May 2016 19:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Emanuel,

I am sorry for the delay of this reply,

I have a little bit lost here, can you take a look of my following analysis step and see is it what you referring?

For example :
-----------------------
1. Create a new post > select the language e.g 'Hebrew' > enter all the value in the post custom field > publish it
2. View this post on frontend, then these custom field value always show what you enter it even the site language already switched to another language?
·
Saturday, 28 May 2016 11:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,
You jumped into this subject (thanks!) that's why you are lost here...
This issue is email sent by the system (for new posts, comments etc.) by using the en-GB ini file, not by the correct language file.

Muhammad asked to add a post in the site in order to dive in and check why, so I gave him explanations of which category/menu-item to add a post in and mentioned filling the custom fields since they are required. They are not the issue at all.

I expect that an email sent due to an activity in a post item or category defined in a different language, to pick the syntax from the relevant language file. Currently it isn't working as expected.
·
Saturday, 28 May 2016 15:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Emanuel,

Thanks for understand.

So overall you are referring the email content didn't respected from what language you post right?

If yes, can you check my following step is it can reproduce this issue in your site?

1. Login from your site backend and select `Hebrew`language before I login.
2. Create a new post > select 'Hebrew' language > publish this post
3. Check mail activity from Easyblog backend, that email content is not referring on `Hebrew` language?
·
Saturday, 28 May 2016 17:41
·
0 Likes
·
0 Votes
·
0 Comments
·
I tried changing the back-end language to Hebrew, add new post (in Hebrew), preview the email.
No change (see attached).
Of course, at the end it should be triggered according to the post/category language regardless of the backend/frontend language.

By the way, in the email template.php file which comes in the Wireframe theme folder, lang="en" is hard coded into the HTML tag.
It has nothing to do with picking the correct language ini file, but somehow I think it is wrong.
·
Saturday, 28 May 2016 18:11
·
0 Likes
·
0 Votes
·
0 Comments
·
hey there,

I am sorry for the delay of this reply,

I've tested on your test site, this is what I test :

1. login from your backend and select `Hebrew` language
2. Create a new post then I can replicate the issue when I view from Easyblog backend email activity.
3. Then I check again why this language string didn't populate the correct language translation, for example :

COM_EASYBLOG_NOTIFICATION_NEW_BLOG_POST

4. Then I check from your Hebrew language file JoomlaFolder\language\he-IL\he-IL.com_easyblog.ini , it seems like inside this language file do not have this kind of language string, so it will fall back to use English translation.
5. After that I added this following language string in your Hebrew language file, it will work fine now.

COM_EASYBLOG_NOTIFICATION_NEW_BLOG_POST="בלוג חדש"


You can take a look of my screenshot below, perhaps you can take a look of this cases and see is it missing out some of the email language constant from your Hebrew language file?
·
Monday, 30 May 2016 16:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,

You are right. Actually, hundreds of strings are missing from the Hebrew version (not just not translated, but completely missing.
So I took care of it but as I mentioned before, as much as I want to contribute to the translation efforts - my request to join the team at transifex was denied, though nobody is taking care of the translation for some years already, not mentioning the poor translation quality which already exists... currently all of the translation is in my local file only:(

Now, I left with a direction problem in the email template (it is LTR, no matter what language the email is rendered by).
I tried to understand which object set the content in the template so I can pull the language from it, but just couldn't understand what file/class is taking care of it and if there is a language/direction definition in the object at all...

Can you help me here so I can add the language/direction parameter in the email template?

Thanks!
·
Saturday, 04 June 2016 04:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Emanuel,

I am sorry for the delay of this reply. Kindly please find my response to your inquiries below:
1. my request to join the team at transifex was denied, though nobody is taking care of the translation for some years already,

-> I've extends this to our marketing team, and can you please send in the request to be our translator once more?


2. Now, I left with a direction problem in the email template (it is LTR, no matter what language the email is rendered by).

->I'm not really sure where are you referring this to? is it the email template that display the content of the blog? (refer screenshot 1) and you want it to be right to left text?If yes, you can download the file and do the template override by placing in DIR:/templates/jsn_dona_pro/html/com_easyblog/emails/html/.. and looks how it goes?


3. Can you help me here so I can add the language/direction parameter in the email template?

->In the email template folders DIR: ../components/com_easyblog/themes/wireframe/emails/html/.. you can find the email template language string. For example post.new.php file which is for new blog post email template.
You can find the Jtext follow by COM_EASYBLOG_.. (refer screenshot 2)
Translate the string in he-IL.com_easyblog.ini file

Hope this helps
·
Monday, 06 June 2016 11:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Muhammad,
please send in the request to be our translator once more?

I resubmitted a request at Transifex.

is it the email template that display the content of the blog? (refer screenshot 1) and you want it to be right to left text?If yes, you can download the file and do the template override

The site is multilingual, so hard codding the elements direction is not a good choice, Though I do use the override system to plant a logo and more personal message.

I prefer to get the relevant post's language in the template and set the direction (and maybe other stuff) accordingly.

If we look at the template.php file, we see some variables:


$contents
$unsubscribe
$unsubscribe as $type => $link



These variables are coming from an object which I want to refer to since I guess it also contains the post's language.

I'm not talking about the strings themselves. I already fixed this issue by completing the he-IL ini file with the missing strings.

I need the actual data regarding the language of the relevant post/category/author/team as a php variable, within the template.php.

Thanks,
Emanuel.
·
Monday, 06 June 2016 19:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am sorry for the delay of this reply,

The site is multilingual, so hard codding the elements direction is not a good choice, Though I do use the override system to plant a logo and more personal message.

I prefer to get the relevant post's language in the template and set the direction (and maybe other stuff) accordingly.

Hm, unfortunately we do not have support this yet in the email section, currently it only hardcoded the direction all content display align to center.

I will log this issue in our tracker, we will see if we can find out a better solution in the future version.



f we look at the template.php file, we see some variables:

$contents
$unsubscribe
$unsubscribe as $type => $link

These variables are coming from an object which I want to refer to since I guess it also contains the post's language.

I will explain what is these valuable content as you requested.


// this valuable will show the email template content
// For example : that is new post notification, the system will call this email html file
// JoomlaFolder/components/com_easyblog/themes/wireframe/emails/html/post.new.php
<?php echo $contents; ?>

// This will show you true or false
// If subscriber already subscribe on your site e.g. sidewide/category/blogpost/author/teamblog
// It will show this unsubscribe link into your email content footer.
<?php if ($unsubscribe) { ?>

// This will load which subscription type he subscribe , e.g. sidewide/category/blogpost/author/teamblog
<?php foreach ($unsubscribe as $type => $link) { ?>

// So you will notice this following language string php code
<?php echo JText::_('COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_' . strtoupper($type)); ?>

// Language translation file
COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_BLOGGERSUBSCRIPTION="To unsubscribe from blogger subscription, please click"
COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_CATEGORYSUBSCRIPTION="To unsubscribe from category subscription, please click"
COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_TEAMSUBSCRIPTION="To unsubscribe from teamblog subscription, please click"
COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_SITESUBSCRIPTION="To unsubscribe from site subscription, please click"
COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_SUBSCRIPTION="To unsubscribe, please click"
COM_EASYBLOG_NOTIFICATION_UNSUBSCRIBE_ALL="To unsubscribe from all the above subscriptions, please click"



By the way, if you have any other new question perhaps you can create a new thread on our forum so that we can easy to manage your post since this post going to very long thread, that was very hard to follow up.

Thanks for understand.
·
Tuesday, 07 June 2016 18:27
·
0 Likes
·
0 Votes
·
0 Comments
·
My question was, how the $link or $type variables are generated and where. If I'll understand that, I believe that there will be many other options I can use.

Anyway, for now, I solved the problem by adding a language string to the template's body tag:
<body style="background: #222E20;" dir="<?php echo JText::_('ltr'); ?>" >

and in the he-IL ini file I added LTR="rtl".
This works fine

No need for new thread;)

Thanks for diving into it
·
Wednesday, 08 June 2016 01:28
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome. Glad to hear that your issue has been resolved now.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Wednesday, 08 June 2016 14:47
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post