Hi,
It seems that Discourse has some trouble dealing with Chinese characters. Our users cannot submit topics/posts if they use in chinese? In this case, I can see that it’s a long message but we still get the “Body seems unclear” message.
Any idea?
Hi,
It seems that Discourse has some trouble dealing with Chinese characters. Our users cannot submit topics/posts if they use in chinese? In this case, I can see that it’s a long message but we still get the “Body seems unclear” message.
Any idea?
I see what is happening here.
We automatically disable this on Chinese forums but your forum appears to be English with a Chinese category.
Just set body min entropy to 0 in site settings.
Hum. Correction. It seems setting the body min entropy to 0 did not fix the issue. I tried with another text in Chinese and I still get the same error even though the body min entropy is set to 0


Did i miss something?
Hi,
Following up on this issue. I’m running some test with the latest version of discourse.
Body min entropy is set to 0. Same for Title min entropy.
When trying to create a topic with the body below I get the “Body unclear” error:
【澳門日報5月29日消息】國際會議協會(ICCA)日前發佈《二○一七年國際協會會議市場年度報告》。當中澳門多項評比的排位連續兩年均有上升,其中全球城市排名由一六年的七十二名躍升至第六十五名;亞太區域城市排名升一位至第十六,排名超過瑞士的日內瓦、澳大利亞的布里斯班、阿拉伯聯合酋長國的迪拜、韓國的釜山和濟州等城市
Is there a quick work around on this? My Chinese users are getting nervous because of this issue.
Thx
Seb
I’ve clarified this issue. But newbie is only able to put single picture on a post. So just a evidence and conclusion.
Conclusion, for both title and body
Sorry for reviving this, but we have hit the same issue on our Forum which is primarily in English, but some sections in other scripts. Setting body min entropy to 0 did not fix this.
The issue seems to be that the use of some latin characters trips the all caps check. Here’s an example of a message that bumps into the Body seems unclear notice:
我看了一下,我8/15寄往俄罗斯的明信片10/13对方收到了,但是10/27寄的对方还没收到,现在已经36天了(不过同一批寄往不同国家的也没被收到)。
因为我是直接投的邮筒所以也不太清楚是不是寄不过去… 如果你在UCPC微信群里也许可以问下大家?
Is the allow uppercase posts the only solution here? On forums like ours where English is the main language, enabling that is not ideal, but I can also understand the frustration of users entering a valid message in their script bumping into that error. Could checking the ratio of CAPS versus the size of the body help here?
That is what it does and in you example the ratio is 100%.
When a forum default language is set to Chinese we tweak those settings automatically, but if you have mixed languages in a single instance you need to tweak that setting.
If the text has a single letter character that has no upper/lower case variant (like with Chinese), then the text is automatically not all uppercase. This could be checked by matching against /\p{Lo}/ in here.
This approach would not require a special setting tweak for forums primarily in zh//ko/ja and can also play well with forums where mixed languages are used, only enforcing the allow upper case where only uppercase-able characters are used.
Maybe a similar logic could also be used to optimize the existing check for all caps: if the text matches /\p{Ll}/ (lowercase letter that has an uppercase variant), then the text is not all caps.
Sounds like a good idea for a pull request!
My Ruby chops are nearly non existent, but I can try to put something together as it is somewhat contained.
With that said, I’m seeing a TODO at the top of that file which seems related with this precise line of code. Is it as simple as remove the require, or should someone that knows what they are doing go for this PR?
J’ai fait une tentative dans FIX: Allow all caps within CJK text by mentalstring · Pull Request #27900 · discourse/discourse · GitHub
Je suis encore loin d’être un développeur Ruby, alors soyez indulgent. ![]()
Merci @mentalstring, j’ai utilisé votre PR comme source d’inspiration pour
Qui inclut également des améliorations de performances et une meilleure gestion des locales non latines ![]()
(cc @lindsey)
Ravi de voir que cela est pris en compte !
Nous gérons un forum international et, bien que l’anglais soit la langue principale, nous avons des catégories dédiées à d’autres langues et cela nous a longtemps agacés.
Maintenant que skipped_locale est uniquement utilisé pour seems_unpretentious, je me demande si nous ne pourrions pas ignorer ‘ko’ puisque le coréen moderne utilise des espaces ? Gardez à l’esprit que je ne parle pas coréen, vous voudrez peut-être vérifier cela.
Pendant que j’ai votre attention, il y a une autre chose qui, je pense, pourrait être une amélioration facile sur TextSentinel mais que je n’ai pas osé toucher (encore une fois, je ne suis pas un développeur Ruby). Si vous avez un moment, je pense que c’est assez simple et que cela pourrait apporter un gain de performance gratuit.
Si je comprends bien, cela vérifie si un mot est plus long que la limite en divisant le texte en mots, calcule la longueur de chacun, analyse toutes les longueurs pour trouver la plus grande, et seulement ensuite la compare à la limite.
Pourrions-nous peut-être éviter tout cela en essayant simplement de faire correspondre le texte à quelque chose comme /\\p{Alnum}{#{max_word_length + 1},}/ (la syntaxe est probablement erronée, mais j’espère que vous comprenez l’idée) ?
Sans connaître le fonctionnement interne de Ruby, cela permettrait plus probablement d’arrêter la vérification dès qu’il y a une correspondance, et s’il n’y a pas de mot trop long (cas le plus fréquent), le texte n’est analysé qu’une seule fois, en évitant la division, la vérification de la longueur de chaque mot, etc.
Désolé si je détourne le sujet ici, mais comme le nouveau PR est déjà fusionné, je ne suis pas sûr du meilleur endroit pour poster cela car c’est peut-être trop petit pour mériter un nouveau sujet, mais cela semble être un gain facile. N’hésitez pas à vous en emparer.
Je n’en ai aucune idée non plus. J’aimerais cependant obtenir une confirmation de la part de locuteurs coréens.
C’est une excellente idée ![]()
Youpi !
Merci d’avoir pris le temps.
Peut-être que l’un des traducteurs coréens (/cc @9bow, @alexkoala, @changukshin
) peut confirmer que le coréen moderne utilise des espaces entre les mots, similaires aux écritures romaines/latines, afin que Discourse puisse utiliser cette hypothèse lors du traitement du texte coréen pour trouver les mots trop longs ? ![]()