RESOLVED | Evolve-D login page (Lang string mismatch)

RESOLVED | Evolve-D login page (Lang string mismatch)

by Albert Leatherman -
Number of replies: 26

Hi Mary, Chris, and friends, I'd like to change "username," "password," "forgot," and "log in" on the login page of the Evolve-D theme to their counterparts in a different language, since my Moodle serves students in another country. Could you direct me to the right file please? Thanks a lot.

(Edited by Mary Evans - RESOLVED - original submission Monday, 15 January 2018, 10:52 PM)

Average of ratings: -
In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Try the AMOS translation site here...

https://lang.moodle.org/

This is where all the language files are updated.

Sign up then Login and navigate to Theme/EvolveD
Find the Languages you want to translate and enter them into the spaces provided.

When you have finished updating the Languages you have chosen to update,
just submit them all and then Logout.

You should, after a day or so, receive conformation by email when they have been approved.

It's ages since I have done this but I think that is more or less correct info.

Cheers

Mary

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Thanks a lot Mary. I did what you suggested and got confirmation that my translations for Brazilian Portuguese were accepted (see attached), but username, password, forgot, and log in still appear in English on my Evolve-D login page. Any idea why that's happening? Thanks.


In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi, 

If that is the case then the words in question have not been coded correctly in Evolve-D.

Before I report it I need to check what's happening in the code, however it sounds like these words have been 'hardcoded'.

I get back to you shortly.

Mary

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Albert,

The words are in evolved/lang/en/theme_evolved.php

//Custom Login Page
$string['lginuser'] = 'username';
$string['lginpass'] = 'password';
$string['lginforgot'] = 'forgot ?';
$string['lginlogin'] = 'Log In';

Had Chris used the Moodle strings for these then the translations would have been done.

As it is, I dare say, no one has bothered to do any translations other than you.

This is what happens when new developers try making themes with no real experience of how Mooodle strings work. Most common words, especially those in the Login page are all translated in to practically ever language,

Also the bad news is that Evolve-D is no longer being updated.

It appears that Fordson is the new Evolve-D theme which has it's own characteristics.

Did you not see those language strings when you updated Evolve-D in the AMOS database?

If not then you need to do this ASAP!!!

Cheers

Mary

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Albert,

I have just checked and the translations you did are all set in the database, so the only thing that may be the problem is that the version of Evolve-D only covers Moodle 2.8 & Moodle 2.9, so if you are using this theme in a newer version like Moodle 3.2 for example, those translations will not take effect because the theme is not available for that version of Moodle.

Looking at the actual string names these are not the same as what is listed in the AMOS database, so the problem looks now to be a coding error.

The only thing to do is to rewrite that code and make it Moodle friendly.

I need to look at the way moodle has done the login page.

I wish we had known about this earlier as it could have been fixed years ago!

Mary

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Hi Mary, thanks a lot for your sleuthing to find the error! As a temporary measure, I went ahead and hard-coded the translations in theme_evolved.php. However, it would be much nicer if users could switch back to English if necessary. Do I need to do some further coding in theme_evolved.php to make $string['lginuser'], $string['lginpass'], $string['lginforgot'], and $string['lginlogin'] use the AMOS strings instead of the hard-coded text in theme_evolved.php? I am using Moodle 3.1.1.

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Sorry I was meaning to get back to you earlier to explain how to get round this but has been a manic day for me today!

What you can do is put it back as it was, and just add your own pt-brazilian directory (or whatever lang code initials it is) with its own copy of theme_evolved.php with all the translations for your language.

This is how we used to do it before AMOS was invented!!!

So the LANG directory looks like this...

  • evolved/
    • lang/
      • en/theme_evolved.php

      • pt-brazilian/theme_evolved.php

Hope this helps?

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Clever! I will give it a shot. Thanks for all your help over the years with my site.

In reply to Albert Leatherman

Re: Evolve-D login page

by Albert Leatherman -

It worked smile

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I knew it would work...that's the beauty of Moodle

It was a pleasure to help!

Cheers

Mary

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Hi Mary, interested in helping with another language issue? During quiz attempts, the previous page/next page buttons are stuck in English even if I've selected Brazilian Portuguese. This might happen with other languages too (not sure). Any idea what file I need to access and change to fix this? Thanks.

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Albert,

I am assuming you are still using the Evolved-D theme? If so it could be wrong translation string names, same as before, so need to check the Evolve-D.

Ill take a look.

Mary

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Thanks a lot, Mary and Mary. If you could let me know where the mistake is in Evolve-D, I’ll go in and make the changes to the files on my server manually. I checked /htdocs/theme/evolved/lang/pt_br/theme_evolved.php, and unfortunately there are no strings in there which as far as I can tell dictate "previous page" and "next page".

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The Demo site uses Boost theme so we can rule that out.

What you need to test Albert, is the Clean theme as that uses Bootstrapbase like Evolve-D.

If you could change to Clean theme and test that to see that it works correctly, then, and only then can I try to find the problem in Evolve-D.

The only problem I face at tge moment is that I could do with a copy of of the quiz you are using, either that or tell me how to create one like it so that I can see it in action.

Thanks

Mary

In reply to Mary Evans

Re: Evolve-D login page

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
I don't know if this is helpful or not because I don't understand how themes and their language work, but the strings are in quiz.php and are mod_quiz navigateprevious and mod_quiz navigatenext  
In reply to Mary Cooch

Re: Evolve-D login page

by Albert Leatherman -

Mary, that fixed the issue! Thanks for helping me identify the strings. It turns out there was no translation for them (see attached). Not sure why. I made the translations and everything is working now. Many thanks to you and Mary!



In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Albert,

Please can you tell me what language your site has been set as DEFAULT in the Moodle Admin settings?

If it is Portuguese then why are all the customisations you are making in your Moodle site in the English language file?

This is too confusing for me!

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Hi Mary E., my site's default language is English but it's really a bilingual site, so that all content is in both English and Portuguese. I have modified many standard strings in both languages for various reasons related to user experience. In any case, I was able to get the next/previous page buttons fixed in Portuguese after Mary C. pointed me to the string identifiers. Thank you both for all your help!

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I gathered it must be something like that, because had you updated your Portuguese language file then you would have got all the updates to it. This is why I urged you to update your language packs. However, I am not a Language pack expert, so I do not know if your customisations to those packs on your site , if they will be deleted if you updated. Perhaps Mary Cooch can shed some light on this?

Thanks 

Mary Evans

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Hi Mary, I've done a lot of customization of Evolve-D, which you've helped with a lot smile If I switch to the Clean theme for troubleshooting purposes, is there a risk I might lose the customizations I've made to Evolve-D when I switch back to it?

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

It's not important, all I want to know is which questions use this Last/Next page notation?

The quiz I made a little while ago, uses the word Next which when in Portuguese it is translated to Próximo.

So that works OK in the Evolve-D theme.

Have you updated the Language Pack since using this theme?

Site Administration > Languages > Language Packs

Then click the button at the bottom of the first column where all the language packs are listed that you have installed in your site.

When you have done this refresh your Screen using Ctrl + F5 (the Ctrl key and the F5 key on your keyboard)

After this test the Quiz again and it may just start to work correctly.

Hope this helps?

Mary

In reply to Mary Evans

Re: Evolve-D login page

by Albert Leatherman -

Thanks for the advice, Mary. Will updating the language packs overwrite any strings I have customized?

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well it depends on where you are making these customisations?

In reply to Albert Leatherman

Re: Evolve-D login page

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Albert - if I have understood you right the words are translated on our demo site as in this picture so perhaps it is indeed a theme issue?


Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Evolve-D login page

by Albert Leatherman -

Hi Mary, thanks a lot for checking that. I went to the sample school site and verified that the buttons also translate correctly with multiple-choice questions, which is what I am using. But it is odd that I can't see anything in /htdocs/theme/evolved/lang/pt_br/theme_evolved.php that seems to hard-code "next page" and "previous page".