By Andrew Heritage on Sunday, 19 October 2014
Posted in Technical Issues
Replies 9
Likes 0
Views 440
Votes 0
For testing I editied the badge "applicant" so that instead of it being set to 10 I changed it to 3
However the description of this badge still says "To unlock this badge, you need to install more than 10 apps for your profile" (although I can confirm you get the award in this instance for just 3)
Hello Andrew,

The description is just a plain text. It doesn't actually take the points into consideration. Edit the file /administrator/language/en-GB/en-GB.com_easysocial.ini and locate the text below,


COM_EASYSOCIAL_BADGES_APPLICANT_HOWTO="To unlock this badge, you need to install more than 10 apps for your profile."
·
Sunday, 19 October 2014 22:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah ok, I did try and use Joomla language overriding but that didn't seem to work. Will make the above change but I shall have to take a very deep breath and not curse that anyone would even think of coding something this way ;-) (oh and I'm guessing if I change the number in any other badge I will need to do the same each time?)
·
Monday, 20 October 2014 01:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Andrew,

I totally understand your frustrations here but this is something which we need to do for users who are not using English language. Unfortunately there's no other work around for this
·
Monday, 20 October 2014 10:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Is it not possible to pass variables into language strings?

"To unlock this badge, you need to install more than %d apps for your profile."

(http://docs.joomla.org/Making_templates_translatable)


Or failing that construct it in two parts ie define string1 and string2:
string 1 "To unlock this badge, you need to install more than "
string 2 " apps for your profile."

Then the output is string1 + var1 + string2
·
Monday, 20 October 2014 17:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Andrew,

Yes, that makes perfect sense but in different languages it works differently. The grammar is different when it comes to plurality and it's extremely tedious to actually handle these strings. Which was why we resulted into allowing you to change this in the language string directly.
·
Monday, 20 October 2014 23:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Okay I'm going to concede defeat here, even though I am 99% sure now you can use variables in languge strings and so going with that option means each language file can take into consideration the different ways it would be written.

" Um dieses Abzeichen zu entsperren, müssen Sie mehr als %d Apps für Ihr Profil zu installieren. "
"Pour déverrouiller ce badge , vous devez installer plus de %d applications pour votre profil ."
"Bereizgarria desblokeatzeko, %d baino gehiago apps instalatu zure profila behar duzu."
·
Tuesday, 21 October 2014 01:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Andrew,

I totally understand what you are referring to and I completely agree that it should be done this way but mind you that in some other language, the plurality for the values 1 and 2 might be different and this will then introduce a problem for them
·
Wednesday, 22 October 2014 14:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Well as mentioned above I'm getting that you aren't going to change it, but as I imagine it would be quite rare for an acheivment award to be given for doing something only once, the inconvienence of having website owners manually adjust language settings to match a simple variable change seems (IMHO) to outweigh the rare chance of the singular / plural issue
·
Wednesday, 22 October 2014 21:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Andrew,

That is what I thought too but we are dealing with so many different language and localization and just like you, they have their feedback too
·
Wednesday, 22 October 2014 22:47
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post