Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Problem with showing the mod_cbactivity with the correct translated strings

  • MadPax
  • MadPax
  • OFFLINE
  • Posts: 17
  • Thanks: 1
  • Karma: 3
11 years 2 months ago - 11 years 2 months ago #231926 by MadPax
Hello guys,

I am having some difficulty with the mod_cbactivity module.

In spite of having the site in Portuguese instead of the defaultlanguage all of the module is displying in english and I can't find the place these strings get translated.

These are CBTxt implementations and I found out that the following code sits in lines 38 of components/com_comprofiler/plugin/user/plug_cbactivity/templates/default/jquery.php
Code:
$js .= "$.extend( jQuery.timeago.settings.strings, {" . ( $prefixAgo ? "prefixAgo: '" . addslashes( $prefixAgo ) . "'," : null ) . ( $prefixFromNow ? "prefixFromNow: '" . addslashes( $prefixFromNow ) . "'," : null ) . "suffixAgo: '" . addslashes( CBTxt::T( 'ago' ) ) . "'," . "suffixFromNow: '" . addslashes( CBTxt::T( 'from now' ) ) . "'," . "seconds: '" . addslashes( CBTxt::T( 'less than a minute' ) ) . "'," . "minute: '" . addslashes( CBTxt::T( 'about a minute' ) ) . "'," . "minutes: '" . addslashes( CBTxt::T( '%d minutes' ) ) . "'," . "hour: '" . addslashes( CBTxt::T( 'about an hour' ) ) . "'," . "hours: '" . addslashes( CBTxt::T( 'about %d hours' ) ) . "'," . "day: '" . addslashes( CBTxt::T( 'a day' ) ) . "'," . "days: '" . addslashes( CBTxt::T( '%d days' ) ) . "'," . "month: '" . addslashes( CBTxt::T( 'about a month' ) ) . "'," . "months: '" . addslashes( CBTxt::T( '%d months' ) ) . "'," . "year: '" . addslashes( CBTxt::T( 'about a year' ) ) . "'," . "years: '" . addslashes( CBTxt::T( '%d years' ) ) . "'" . "});" . "$( '.activityTimeago' ).timeago({ allowFuture: true });"; } $plugins[] = 'timeago'; }

I just don't know where these strings are defined for translation.

Also for the other strings that show in the module like '... has joined...' or '... has an updated profile...' I can't even find where they're defined let alone where they get translated.

I checked all the language files in /components/com_comprofiler/plugin/language but this is something that eludes me.

Any help please?
Last edit: 11 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #231935 by krileon
Please see the below topic regarding CB Activity translation.

www.joomlapolis.com/forum/153-professional-member-support/203511-cb-activity-translate?start=12#204075

The strings don't exist anywhere. You need to add them to your cbteamplugins language file of your CB language plugin.

You can also find another translation example below.

www.joomlapolis.com/forum/153-professional-member-support/220309-solved-cb-activity-plugin-version-221-german?start=6#223569


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MadPax
  • MadPax
  • OFFLINE
  • Posts: 17
  • Thanks: 1
  • Karma: 3
11 years 2 months ago #231981 by MadPax
which file should I update then?

On an upgrade of CB wouldn't this file be overwritten? How should I avoid this, by using a includable file?

Cheers and thanks for the rapid response.
Petetr

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #231989 by krileon

which file should I update then?

To your cbteamplugins language file of your CB language plugin. You can find CB language files below.

components/com_comprofiler/plugin/language/

On an upgrade of CB wouldn't this file be overwritten?

Yes.

How should I avoid this, by using a includable file?

Avoid editing the default_language files. If your site is in English then download the English language plugin below and change it as necessary or edit whatever non-English language plugin you maybe using.

forge.joomlapolis.com/projects/lan-cb-en/files

Please see the below for further language usage information.

www.joomlapolis.com/cb-solutions/languages


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MadPax
  • MadPax
  • OFFLINE
  • Posts: 17
  • Thanks: 1
  • Karma: 3
11 years 2 months ago #231999 by MadPax
Thanks I will do that and eventually create customized files which I will then include in the main language file. That way I will only have to update the new files on upgrade with the include clause.

On another note I have created a couple of custom fields for which I have given the title and description in the format _UE_FIELD_NAME_HERE.

Where should I pu these? In the same place?

Cheers,
Peter

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 2 months ago #232012 by krileon

Where should I pu these? In the same place?

Yes, but not in cbteamplugins language file. Define usage always goes in the main language file (e.g. language.php). You should see several other defines in the file to help get you started on formatting its usage.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum