Non-core contributed modules

Localized help files for MRBS

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Component/s: Block: Mrbs
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

Hi Anthony,

it's great that you included the language packs.

Since your last contact about the help files I got an idea to repair the wrong language setting for the help files. When I start the help in mrbs I always get the english version. I found a workaround to get the correct languag for the mrbs help. Please try this in the file help.php

if (file_exists('../lang/'.$USER->lang.'/help/site_faq.html')) { <<<<<<<<<<<<<<<<<< I changed this line
include '../lang/'.$USER->lang.'/help/site_faq.html';
} else {
include '../lang/en_utf8/help/site_faq.html';
}

Please tell me what I should do for the help files and for the language files and I will do it. Which name should the help files get inside the language pack.

I hope you will get it.

Ralf

Activity

Hide
Anthony Borrow added a comment -

Ralf - OK, I'm afraid I don't get it. I went in and tried to figure out what you were referring to. I installed MRBS block, changed my language to Spanish and went to help and I got the help file in Spanish. What seems to be the problem. Again, as best as you can spell out for me how to recreate the problem. The only difference between your line and what I have in HEAD is I avoid relative referencing of the file name and am specific about it being:

if (file_exists($CFG->wwwroot.'blocks/mrbs/lang/'.$USER->lang.'/help/site_faq.html')) {

Peace - Anthony

Show
Anthony Borrow added a comment - Ralf - OK, I'm afraid I don't get it. I went in and tried to figure out what you were referring to. I installed MRBS block, changed my language to Spanish and went to help and I got the help file in Spanish. What seems to be the problem. Again, as best as you can spell out for me how to recreate the problem. The only difference between your line and what I have in HEAD is I avoid relative referencing of the file name and am specific about it being: if (file_exists($CFG->wwwroot.'blocks/mrbs/lang/'.$USER->lang.'/help/site_faq.html')) { Peace - Anthony
Hide
Anthony Borrow added a comment -

Ralf - Are you referring to a parent language issue? I can see that if the de_du language is chosen and there is no /blocks/mrbs/lang/de_du/ path then it would default to English. Are you wanting it to default to blocks/mrbs/lang/de/ instead?

Show
Anthony Borrow added a comment - Ralf - Are you referring to a parent language issue? I can see that if the de_du language is chosen and there is no /blocks/mrbs/lang/de_du/ path then it would default to English. Are you wanting it to default to blocks/mrbs/lang/de/ instead?
Hide
Ralf Krause added a comment -

Hi Anthony,

I think that the string $CFG->wwwroot.'blocks/mrbs/lang/'.$USER->lang.'/help/site_faq.html' would not be the same as '../lang/'.$USER->lang.'/help/site_faq.html'. You forgot the slash in front of 'blocks' because $CFG->wwwroot does not end with a slash.

I used the relative link because you used it yourself in the both others.

I do not have a reference to the parent language. I would be the best if this come in future but at the moment I use the child language de_du_utf8 as a link to the parent folder de_utf8. I made the link in Mac OS X. I have to use this until Moodle repairs the bugs with the handling of the parent language. If there is not any sting in a child language then it would be the best choice to use a link.

Best regards, Ralf

Mini-Server:lang krause$ ln -s de_utf8/ de_du_utf8
Mini-Server:lang krause$ ls -al
total 8
drwxr-xr-x 6 krause admin 204 Mar 9 08:43 .
drwxr-xr-x 8 krause admin 272 Jan 3 17:10 ..
lrwxr-xr-x 1 krause admin 8 Mar 9 08:43 de_du_utf8 -> de_utf8/
drwxr-xr-x 4 krause admin 136 Jan 3 17:10 de_utf8
drwxr-xr-x 4 krause admin 136 Jan 3 17:10 en_utf8
drwxr-xr-x 4 krause admin 136 Jan 3 17:10 es_utf8
Mini-Server:lang krause$

Show
Ralf Krause added a comment - Hi Anthony, I think that the string $CFG->wwwroot.'blocks/mrbs/lang/'.$USER->lang.'/help/site_faq.html' would not be the same as '../lang/'.$USER->lang.'/help/site_faq.html'. You forgot the slash in front of 'blocks' because $CFG->wwwroot does not end with a slash. I used the relative link because you used it yourself in the both others. I do not have a reference to the parent language. I would be the best if this come in future but at the moment I use the child language de_du_utf8 as a link to the parent folder de_utf8. I made the link in Mac OS X. I have to use this until Moodle repairs the bugs with the handling of the parent language. If there is not any sting in a child language then it would be the best choice to use a link. Best regards, Ralf Mini-Server:lang krause$ ln -s de_utf8/ de_du_utf8 Mini-Server:lang krause$ ls -al total 8 drwxr-xr-x 6 krause admin 204 Mar 9 08:43 . drwxr-xr-x 8 krause admin 272 Jan 3 17:10 .. lrwxr-xr-x 1 krause admin 8 Mar 9 08:43 de_du_utf8 -> de_utf8/ drwxr-xr-x 4 krause admin 136 Jan 3 17:10 de_utf8 drwxr-xr-x 4 krause admin 136 Jan 3 17:10 en_utf8 drwxr-xr-x 4 krause admin 136 Jan 3 17:10 es_utf8 Mini-Server:lang krause$
Hide
Anthony Borrow added a comment -

Yep, I agree that is is a typo and it is more consistent to use the relative path. I've changed it in CVS for HEAD and 1.9. Peace - Anthony

Show
Anthony Borrow added a comment - Yep, I agree that is is a typo and it is more consistent to use the relative path. I've changed it in CVS for HEAD and 1.9. Peace - Anthony
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: