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

10 years 6 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 to join the conversation.

10 years 6 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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.432 seconds

Facebook Twitter LinkedIn