you are logged in as: $a

you are logged in as: $a

by seaghan moriarty -
Number of replies: 7


Does anyone know if the error below might be caused by an incomplete language pack?

Behaviour

When logged in (English) it says You are logged in as Admin User
When logged in (Polish) it says Jesteś zalogowany(a) jako Admin User
When logged in (German/French/etc.) it also says ................. Admin User

However, when logged in (Gaeilge - Irish/GA) it says: Tá tú logáilte isteach mar: $a
In other words, most languages show Firstname Lastname, but while using Gaeilge/Irish it only shows $a

Can anyone suggest what might be wrong?  thanks!! 


Average of ratings: -
In reply to seaghan moriarty

Re: you are logged in as: $a

by Juho Jaakkola -

Yes, there's probably something wrong with the Gaeilge language file. Open the language file and look for this:

$string['loggedinas']

For example in the English language file it has the following value:

$string['loggedinas'] = 'You are logged in as {$a}';

Note that $a has curly braces around it. One reason may be that those are missing from the Gaeilge language file.

Average of ratings: Useful (1)
In reply to Juho Jaakkola

Re: you are logged in as: $a

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Juho is correct - the problem is indeed caused by missing curly braces.

I found the string and contributed a fix for it on the Moodle translation site. Hopefully one of the Irish language pack maintainers will accept it soon. In the meantime Seaghan you can use the Language customisation feature in Moodle (Administration > Site administration > Language> Language customisation) to quickly fix it on your site.

Average of ratings: Useful (2)
In reply to Helen Foster

Re: you are logged in as: $a

by seaghan moriarty -
Thanks for your help.


I have updated the local customisation text to "Tá tú logáilte isteach mar: {$a}"  for the Irish language pack (Administration -> Site administration -> Language customisation), however now in the top bar I am getting the text "Tá tú logáilte isteach mar: $a->firstname $a->lastname".

It doesn't seem to be recognising $a as an object?


In reply to seaghan moriarty

Re: you are logged in as: $a

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I think the problem is that the string has been translated as

"Tá tú logáilte isteach mar: $a->firstname $a->lastname"

and it needs to be

"Tá tú logáilte isteach mar: {$a->firstname} {$a->lastname}".

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: you are logged in as: $a

by seaghan moriarty -

thanks so much Tim!

I'll try that shortly, but looks good smile

In reply to seaghan moriarty

Re: you are logged in as: $a

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Tim from me too. smile

I just checked and found the ga string fullnamedisplay | core needed changing from

$a->firstname $a->lastname

to

{$a->firstname} {$a->lastname}

I again contributed a fix for it on the Moodle translation site. Hopefully one of the Irish language pack maintainers will accept it soon.

Average of ratings: Useful (1)