Forum

This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Problem with Romanian bible books showing in English
20 January, 2013
10:03 pm
intercer
Member
Members
Forum Posts: 6
Member Since:
16 July, 2009
sp_UserOfflineSmall Offline

Hi Mark & fellow users,

 

My customer uses SB v.0.45.4, with Wordpress 3.5, WP language set to Romanian.

Everything works fine, it shows the Romanian Bible texts (using[cornilescutext]), it shows the labels in Romanian etc.

The only issue is that it shows the Bible Book titles in English. I checked the code but I could not find the issue.

 

Here is the page:

http://www.betania.ie/sermons

I saw that we have the translated Bible book names in the .po file, so it should read from there.
http://www.betania.ie/sermons?sermon_id=1
Note: it still says 2 Peter 3:18 for the bible book title

 

Mark - I sent you the current Romanian .po/.mo files by email a few times, not sure if you got them.

Any suggestion is appreciated it.

Thanks,

Lucian


_________________
Lucian Mihailescu
Romanian Free Christian Resources
http://intercer.net
Udemy Continuing Education & Affordable Courses
http://ContinuingEducation.Me

25 January, 2013
6:43 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Lucian,

I've been doing some experimenting, and I think I've got a fix for you.  It requires some changes to two files: frontend.php and dictionary.php.

I found several places where the Bible book names were not translating:

  • in the filter form (both one-click and drop-down styles): template tag {filters_form}
  • on the search results page, after the title of the sermon: template tag {first_passage}
  • on the sermon page, after the title of the sermon: template tag {passage}
  • before the Bible text: template tag {cornilescutext} (for example)
  • template tag {biblepassage}, which it appears that you are using at the end of your sermon page

The following fix should address each of these.

Before you begin, make sure that you backup your files.  This code is considered experimental.  Let me know if you have any trouble.

 

First, let's look at frontend.php.  There are four functions inside this file that need changes.  I've posted a link with the new function code for each.  Replace the existing function with the function code at the link.

sb_tidy_reference() (line 362 in original file): http://pastebin.com/FFGjgfdw

sb_add_other_bibles() (line 464 in original file): http://pastebin.com/G9k2MNMi

sb_print_filter_line() (line 790 in original file): http://pastebin.com/M22uv3CY

 

To avoid having too many links in one post, I'll need to continue in the next post.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

25 January, 2013
7:00 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

One more function you need to change in frontend.php:

sb_print_filters() (line 871 in original file): http://pastebin.com/4y1hgGcN

 

After you make these changes, test your page.  First, we want to see no PHP errors.  If you do see PHP errors, or your page doesn't load at all, then something went wrong.  Restore your old frontend.php, and let me know what's going on.

At this point, on your sermon page, you should see Romanian book titles before the Cornilescu text.

If everything looks good from here, next we'll change dictionary.php to fix the book titles in the rest of the places.

 

Again, back up your dictionary.php file before editing.  One note about editing dictionary.php: This file only runs when you hit the Save button on the Sermon Browser templates screen.  So after you make any changes to this file, you need to go to Sermons, Templates, and hit the Save button.

There are four lines in this file that we will be changing.  Two are in the sb_search_results_dictionary() function, and two are in the sb_sermon_page_dictionary() function.  In this file, each line defines a template tag.  For each template tag, replace the line with the code that you see at the posted link.

(Note: I'm using {curly braces} instead of square brackets around template tags here in the forum, because the forum sometimes has trouble with square brackets.)

 

sb_search_results_dictionary():

{filters_form}: http://pastebin.com/mP10wQXC

 

More links will be coming in the next post.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

25 January, 2013
8:16 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

sb_search_results_dictionary():

{first_passage}: http://pastebin.com/sBuDyXk3

 

sb_sermon_page_dictionary():

{passage}: http://pastebin.com/VBKKE0y3

{biblepassage}: http://pastebin.com/7RK7zNxB

 

After you make those four line changes in dictionary.php, you need to go back to the Sermon Browser templates screen (Sermons, Templates) and hit the "Save" button.

If everything worked right, you should be seeing "2 Petru" instead of "2 Peter" everywhere. 

 

Let me know how it turns out.  Please let me know if you have any questions.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

26 January, 2013
4:42 pm
Tsuua Kekale
Enthusiast
Members
Forum Posts: 27
Member Since:
26 January, 2013
sp_UserOfflineSmall Offline

Ben, Thank you so much for taking the time to help out with the problem. I have been having similar issues and your suggestion fixed it.

26 January, 2013
9:56 pm
intercer
Member
Members
Forum Posts: 6
Member Since:
16 July, 2009
sp_UserOfflineSmall Offline

Thank you very much, Ben, for taking time to send a solution for this. 

 

I will let the website owner know about the solution.

 

Will this solution be included in a future SB version?

 

Blessings!

_________________
Lucian Mihailescu
Romanian Free Christian Resources
http://intercer.net
Udemy Continuing Education & Affordable Courses
http://ContinuingEducation.Me

26 January, 2013
10:32 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Tsuua Kekale, I'm glad it's working for you.

 

Lucian, I don't have anything to do with the next version, but I will leave a note for Mark Barnes about this bug fix.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

1 February, 2013
8:04 am
Tsuua Kekale
Enthusiast
Members
Forum Posts: 27
Member Since:
26 January, 2013
sp_UserOfflineSmall Offline

I'm sorry to bother, but one more thing related to this.. I uploaded a sermon about Genesis 1:3-5 to our test page and I noticed that for whatever reason the word "1. Moos." which is Genesis in Finnish doesn't show up even though it is translated. Tha passage is just empty for the part of the bible book name. I tested other biblebooks and the same happened with Exodus, Leviticus, Numbers and Deuteronomy. Others seemed to work alright.

Here's the test page: http://tsuua.com/ls/katekismus/saarnat

Do you have any idea what could be wrong with that or what could be done to fix this?

Thanks!

1 February, 2013
3:32 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Tsuua Kekale,

That's strange.  I've got my test site running in the fi_FI language currently, using the PO and MO files I grabbed off of your site.  On mine, Genesis is translating correctly:

http://beta.badgerlandweb.com/.....ermon_id=1

I would like to see your sermon.php file.  Could you paste the entire file onto pastebin?  To do this, go to:

http://pastebin.com/

Copy the entire text of your /wp-content/plugins/sermon-browser/sermon.php file, and paste it into the box at pastebin.com.  Then hit the Submit button, and post the address of the resulting page here.  Let me know if you have any questions.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

1 February, 2013
6:37 pm
Tsuua Kekale
Enthusiast
Members
Forum Posts: 27
Member Since:
26 January, 2013
sp_UserOfflineSmall Offline

I'm so thankful for your helpfulness, Ben!

Here's the sermon.php code
http://pastebin.com/640hfNLL

1 February, 2013
8:32 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Tsuua Kekale, I found the problem.  It's in your sermon.php file.

On lines 363 and 365, you'll see the names of all of the books of the Bible.  They are supposed to be in English.  It looks like some of them got changed in an attempt to translate them.  If you change all of these names on both lines back to English, it should work.

After you make these changes, if you are still having trouble, post a fresh copy of your sermon.php file to Pastebin.

Let me know if you have any questions.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

2 February, 2013
10:37 am
Tsuua Kekale
Enthusiast
Members
Forum Posts: 27
Member Since:
26 January, 2013
sp_UserOfflineSmall Offline

Uh, of course. It works great now. Thank you Ben!

Forum Timezone: Europe/London

Most Users Ever Online: 381

Currently Online:
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Rich Brown: 358

Matt Schlueter: 93

Mindy: 72

Don Johnson: 65

anointed: 57

0be1: 55

Member Stats:

Guest Posters: 7

Members: 3188

Moderators: 1

Admins: 1

Forum Stats:

Groups: 1

Forums: 2

Topics: 1713

Posts: 7499

Newest Members:

marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb

Moderators: Ben Miller: 1628

Administrators: Mark Barnes: 435