Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[2151]'hardcoded' message in imgToolbox.class.php?

14 years 2 weeks ago #148442 by erichburkhard
With my website I'm using CB 1.3.1. The site is prepared for the languages German an English. CB changes its language-strings propperly when I switch between these two site languages...so far so good - but there is one type of strings that are always displayed in English:
If I upload a profile image that is bigger than the maximum allowed the following message appears ALWAYS in English: "The file exceeds the maximum size of %s kilobytes"...I nearly became crazy, because in the 'admin_language.php' file ( path = /html/joomla/idp_production/components/com_comprofiler/plugin/language/english and /html/joomla/idp_production/components/com_comprofiler/plugin/language/german) of both language plugins there is a translation of this string in Englisch and German....even if I modified this string in the 'admin_language.php' file there was no effect...then I found out that there is the same string in the file /html/joomla/idp_production/administrator/components/com_comprofiler/imgToolbox.class.php ....look at the following code fragment:

if(!$this->checkFilesize( $image, $this->_maxsize * 1024, $copyMethod ) ) {
$this->raiseError(sprintf(CBTxt::T("The file exceeds the maximum size of %s kilobytes"), $this->_maxsize));
return false;
}

...I found out that this!!! is the string (obviously in English) that will be displayed....(like hardcoded)

question: why is there no translation of this string although the translation for each language is available in the both admin_language.php files ???

Hope anybody can help me - Regards

Post edited by: nant, at: 2010/12/11 23:45

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
14 years 1 week ago #148447 by nant
The CBTxt::T function is the one used by CB to handle translations - there is nothing hardcoded about it.

However you did find a bug as this frontend message should not be translated in the backend file.

We need to fix this in next release.

[#2151]

Post edited by: nant, at: 2010/12/11 23:45

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

Moderators: beatnantkrileon
Powered by Kunena Forum