Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

How to put word ago before date in date lapsed Activity stream format style

11 years 6 months ago
Licenses:
JomSocial Expired

ISSUE SUMMARY:

Hello guys! In Croatian language word ago comes before date.
Example:
American: 5 days ago
Croatian: it should be, ago 5 days.

How to do that? How to move word ago before date (or time)?

Thx in advance,
Marijo

11 years 6 months ago
Licenses:

Hi,

basically you must create the language overrides from joomla language manager:

  856: COM_COMMUNITY_ACTIVITIES_DAYS_AGO="%1$s Days Ago"
  857: COM_COMMUNITY_ACTIVITIES_WEEK_AGO="1 Week Ago"
  858: COM_COMMUNITY_ACTIVITIES_WEEK_AGO_MANY="%1$s Weeks Ago"
  859: COM_COMMUNITY_ACTIVITIES_MONTH_AGO="1 Month Ago"
  860: COM_COMMUNITY_ACTIVITIES_MONTH_AGO_MANY="%1$s Months Ago"
  861: COM_COMMUNITY_ACTIVITIES_MOMENT_AGO="A Moment Ago"
  865: COM_COMMUNITY_LAPSED_DAYS="%1$s days ago"
  866: COM_COMMUNITY_LAPSED_HOURS="%1$s hours ago"
  867: COM_COMMUNITY_LAPSED_HOURS_AGO="%1$s hours ago"
  868: COM_COMMUNITY_LAPSED_MINUTES="%1$s minutes ago"
  869: COM_COMMUNITY_LAPSED_LESS_THAN_A_MINUTE="less than a minute ago"
  870: COM_COMMUNITY_LAPSED_AGO="ago"
 1827: COM_COMMUNITY_LAPSED_YEAR="%1$s year ago"
 1828: COM_COMMUNITY_LAPSED_YEAR_MANY="%1$s years ago"
 1829: COM_COMMUNITY_LAPSED_WEEK="%1$s week ago"
 1830: COM_COMMUNITY_LAPSED_WEEK_MANY="%1$s weeks ago"
 1831: COM_COMMUNITY_LAPSED_MONTH="%1$s month ago"
 1832: COM_COMMUNITY_LAPSED_MONTH_MANY="%1$s months ago"
 1833: COM_COMMUNITY_LAPSED_DAY="%1$s day ago"
 1834: COM_COMMUNITY_LAPSED_DAY_MANY="%1$s days ago"
 1836: COM_COMMUNITY_LAPSED_HOUR_MANY="%1$s hours ago"
 1837: COM_COMMUNITY_LAPSED_MINUTE="%1$s minute ago"
 1838: COM_COMMUNITY_LAPSED_MINUTE_MANY="%1$s minutes ago"
 1839: COM_COMMUNITY_LAPSED_SECOND="%1$s second ago"
 1840: COM_COMMUNITY_LAPSED_SECOND_MANY="%1$s seconds ago"

e.g you can changing
COM_COMMUNITY_ACTIVITIES_DAYS_AGO="%1$s Days Ago"
to
COM_COMMUNITY_ACTIVITIES_DAYS_AGO="Ago %1$s Days"

Regards

11 years 6 months ago
Licenses:
JomSocial Expired

I tried that also...

in that situation the problem is time format when it shows hours and minutes.

It shows, example:

ago 5 hours ago 15 minutes

it should be:

ago 5 hours 15 minutes

Am I right?

11 years 6 months ago
Licenses:

Hi Marijo,

1st you need to translate that language strings to your default language. cloud you please tell me which URL for the related issue?
and what the correct language suppose to?

Regard

11 years 6 months ago
Licenses:
JomSocial Expired

I have translated that language strings to my default language. In Croatian language (hr-HR) "ago" = "prije"
URL = kpc-zagreb.hr/index.php/hr/zajednica
but you have to login...

11 years 6 months ago
Licenses:

Hi Marijo,

sorry, your issue is confusing. I saw at activities stream, the text already:
prije 4 mjeseci(a) = 4 months ago
prije mjesec dana = a month ago
prije 3 dana = 3 day ago

any mistake with that words?

Regards

11 years 6 months ago
Licenses:
JomSocial Expired

There is no problem with that words... there is no problem when activity is older than a day...

The problem is time format when it shows hours and minutes (less than a day)...

It shoud be, e.g.

prije 5 sati 10 minuta = 5 hours 15 minutes ago

At this moment is, e.g.

prije 5 sati prije 10 minuta = 5 hours ago 15 minutes ago...

how to rid of the second word ago (or in Croatian, word prije?)

Regards,

11 years 6 months ago
Licenses:

Hi Marijo,

ok. the issue is clear now. please provide make override for this language string:

COM_COMMUNITY_LAPSED_MINUTES="%1$s minutes"
COM_COMMUNITY_LAPSED_MINUTES_AGO="%1$s minutes ago"
translate it in you language

and edit this file:
/components/com_community/helpers/time.php at line 82 you can see this code
if (($showFull && !empty($diff['hours'])) || (empty($diff['hours']))) {
    if (!empty($diff['minutes']))                      {
        if ( $diff['minutes'] == 1 ) {
            $html .= JText::sprintf('COM_COMMUNITY_LAPSED_MINUTE', $diff['minutes']) . ' ';
        }else {
            $html .= JText::sprintf('COM_COMMUNITY_LAPSED_MINUTES', $diff['minutes']) . ' ';
        }
    }

}
changing it to
if (($showFull && !empty($diff['hours'])) || (empty($diff['hours']))) {
    if (empty($diff['hours']) && !empty($diff['minutes']))                      {
        if ( $diff['minutes'] == 1 ) {
            $html .= JText::sprintf('COM_COMMUNITY_LAPSED_MINUTE', $diff['minutes']) . ' ';
        }else {
            $html .= JText::sprintf('COM_COMMUNITY_LAPSED_MINUTES_AGO', $diff['minutes']) . ' ';
        }
    } elseif (!empty($diff['minutes'])) {
        $html .= JText::sprintf('COM_COMMUNITY_LAPSED_MINUTES', $diff['minutes']) . ' ';
    }

}

Regards

11 years 6 months ago
Licenses:
JomSocial Expired

Albertus, you are my hero!

Thank you very much for help in solving my problem!

Greetings from Croatia,
Marijo

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