Skip to Content Skip to Menu

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

13 years 11 months 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
13 years 11 months 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