PDA

View Full Version : Sidebars show text in the original language



trevis
07-05-10, 15:24
User 1
Language the default user: English
Viewing the site in the language: Portuguese
He wrote messages in the forum and blog in the language: Portuguese

User 2
Another user (visitor) enters the site and the view in language: English (default web site).

User 2 view on the bars lateral CMS, Forum and Blog messages with the translated title, but the text in the original language.

If the User 2 change the language to any other non-English (default web site) such as, for example Spanish, both the title as the text of the message will be translated correctly.

It was clear explanation?

I tried to attach pictures, but couldn't. Any thing please contact us.

vBET
07-05-10, 15:51
We are aware of that and on this moment it is not considered as a bug, but feature (so in other words bug in nice jacket ;)).

Please let me explain. What you are writing about is that in some CMS blocks like 'Recent Forum Posts' part of text is not translated in original language. In fact it is not translated at all correctly, because text displayed in such block is without any BBCode. vB simply allows to get rid of BBCodes without executing it. And that is why you see this text as not translated.

On some languages (like Japanese) you can see that text is 'translated', because really it is always translated, but without bbcode it is translated like it was in your forum original language. So Google takes text i.e. in Portuguese, but vBET told that it is in other language (forum default) because vB removed info about real language. So Google gets confused and sometimes returns just the same text and sometimes try to translate it with very poor result.

We are not able to do anything with that without vB code modification and we do not want to do that. We officially asked vB team for new hook which would allow to evaluate chosen bbcodes before all bbcodes will be removed. See here for details: Not removable BBCODEs (http://www.vbulletin.com/forum/showthread.php?343784-Not-removable-BBCODEs)

We send this proposition over 2 months ago and still get no response at all...

So assuming - it is not up to us and that is why we consider it as feature not a bug. As long as vBulleitn will allow to just remove bbcodes without parsing it we cannot help. vBET mark message appropriately and gave logic to translate it, but vBulletin just chooses in some places to ignore it. You can help by writing your voice in our thread - maybe vB team will consider this proposition then.

Sorry I cannot help here :o Hope you understand our situation in this issue.

trevis
07-05-10, 18:23
I completely understand :-) Is it easy to implement this change? I'll try. Can you give any tips on what to exchange for what? [] S Rafael

vBET
07-05-10, 19:16
It will require to find vB function which removes bbcode, check does lang or langtitle bbcode exists in input text and in such case require vBET file with bbcodes and use appropriate function to parse it (those are ready now).

I didn't do it because we want to keep vBET installation/updates as easy as possible, but of course if you really want to do this then please let me know - I will test it and give you ready code. Please note that it will require to do this every time you will update vBulletin - because you will override your changes. So - proceed?

vBET
08-05-10, 00:55
Bellow is very quick solution for those who do want to change vBulletin files. Please note that this solution is not perfect, but will give you text in appropriate translation. The not perfect issue is because it will be translated twice - first time when bbcodes will be removed; 2nd time when whole page is translated.
Please note that normally vBET has a way to not allow for such things - and this is not translated area. Unfortunately here it appears that vBulletin ignores the content in 2 ways - not only strips bbcodes, but also somewhere later changes signs like '<' to "white html" signs (notation < ), so not translated area is broken. We didn't look for more sophisticated solution - the actual one gives translated texts, not so good like it could be, but most often 2nd translation returns same text and do not take performance when it is already cached. Hope that will be ok for now and that vBulletin team finally answer for our hook request :)

Quick solution:
1. Edit file /includes/functions.php
2. Find:


function strip_bbcode($message, $stripquotes = false, $fast_and_dirty = false, $showlinks = true, $stripimg = false)
{

3. Put AFTER:


if (false !== strpos($message, '[/lang]')) {
require_once(DIR. '/includes/vbenterprisetranslator_functions.php');
$message = vbet_parseOnlyLang($message, true);
}

trevis
12-05-10, 16:11
Thank you! I will test and share the results. [] S!

trevis
17-05-10, 19:56
Errr... it worked partially.

1st: The text is being displayed in the correct language (according to the user's option)
2nd: The bbcodes were strangers... for example, "forum "Off" or "Done! [Url ]..f=19 [/ url]".

See an example in mandela.org

You must get any better?

vBET
18-05-10, 17:07
OK - I see it. It seems that we have to remember what is the language, allow to remove all existing tags, and at the end translate it. This strange things are because bbcodes was translated and after that those where not removed. I will work on this.

Please tell do you can wait a little with this - to next week. It seems like perfect task for our new member. Bee cool - we will verify solution before we publish it. So - is it ok to give solution in next week? :)

trevis
18-05-10, 18:08
Ok! I can wait no problem. Good luck to the new member. [] S Rafael.

trevis
26-05-10, 01:41
Any news?

vBET
27-05-10, 06:25
Just assigned to Kamil :)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations supported by vBET 4.10.1