Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated

Error filling string COM_COMMUNITY_STREAM_LIKES_SINGULAR

6 years 3 months ago
  • Rini's Avatar
    Topic Author
  • Rini
  • Offline
  • Junior Boarder
  • Posts: 104
  • Thank you received: 0
Licenses:
JomSocial Active

The string COM_COMMUNITY_STREAM_LIKES_SINGULAR in com_community.ini (frontend) has parameters

%1$s: URL to stream item
%2$s: text of stream item
%3$s: a singular, like "a"

Instead of a singualar for %2$s, a plural is sent to the string, see attachment: "Groups" instead of "Group".
Can this be fixed? Thank you!

Attachments:
6 years 3 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

Hi
Thanks for your report, I will check and update it on the language file :)

Regards

6 years 3 months ago
  • Rini's Avatar
    Topic Author
  • Rini
  • Offline
  • Junior Boarder
  • Posts: 104
  • Thank you received: 0
Licenses:
JomSocial Active

I dont think the error is in the string, but the code, passing a plural to the string-variabele.

6 years 3 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

Hi
You can add the group directly
Like

has liked %3$s <a href="_QQQ_%1$s_QQQ_">group</a>

6 years 3 months ago
  • Rini's Avatar
    Topic Author
  • Rini
  • Offline
  • Junior Boarder
  • Posts: 104
  • Thank you received: 0
Licenses:
JomSocial Active

I understand, but I assume the string COM_COMMUNITY_STREAM_LIKES_SINGULAR is used for other things like group (since "group" is not in the string-code, it is generic), for example ...

... has liked a group
... has liked a photo
... has likes a ...<whatever>

If i hardcode "group"in the translation, I expect translation problems on the site.

6 years 3 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

Hi
there is no other strings as well in the code. its same for other codes as well and call the group.
You can take a try and let me know if you have any issue.

Regards

6 years 3 months ago
  • Rini's Avatar
    Topic Author
  • Rini
  • Offline
  • Junior Boarder
  • Posts: 104
  • Thank you received: 0
Licenses:
JomSocial Active

Hi,
I'm not quite sure I understand your last answer, sorry, can you elaborate?

My assumtion is that, because the string "COM_COMMUNITY_STREAM_LIKES_SINGULAR" is generic, it may be used for "Has liked a group", but maybe also for "Has liked a <whatever-you-can-think-of>" on another place in JomSocial. When I leave code %2$s out and hardcode it with "group", it may mess up other translations on other places.

Regards, Rini

6 years 3 months ago
Licenses:
JomSocial Active GURU Active Publisher Active AdAgency Active iSEO Active Socialize Active

HI
I got your point, it was working for all except event, I raised the issue to the development team and it will be fixed in next update of Jomsocial.


UPDATE :
Open components/com_community/helpers/likes.php
find

$dataObj->element	= 'COM_COMMUNITY_STREAM_LIKES_ELEMENT_GROUP';
replace it with
$dataObj->element	= 'COM_COMMUNITY_SINGULAR_GROUP';


save and check.

Regards

The following user(s) said Thank You: Rini
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW