I got an invalid title alert when i create a topic. DIg into the code i found it raised by TextSentinel class. And I have already read this https://meta.discourse.org/t/are-very-long-words-not-allowed-in-topic-titles/29683/16. There is a related method in the class.
def seems_unpretentious? # Don't allow super long words if there is a word length maximum @opts[:max_word_length].blank? || @text.split(/\s|\/|-|\./).map(&:size).max <= @opts[:max_word_length] end
I understand what it means. But for other language such as Chinese or Japanese whose word is not splited by blank or something about the patern.
Besides SiteSetting.title_max_word_length’s value is 0 when i leave it blank in the setting panel, so the expression @opts[:max_word_length].blank? is always true. it is meaningless.
My users use Chinese more, So I have to set SiteSetting.title_max_word_length as same value as SiteSetting.title_max_topic_title_length to make it work.
Is there some other way to solve it?