Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Weblate to the latest version #626

Closed
qiaeru opened this issue Jul 5, 2021 · 10 comments
Closed

Update Weblate to the latest version #626

qiaeru opened this issue Jul 5, 2021 · 10 comments
Assignees

Comments

@qiaeru
Copy link
Contributor

qiaeru commented Jul 5, 2021

Currently, the version used on https://weblate.rob006.net/ is Weblate 3.9.1, released on October 28, 2019. As I write this issue, the latest version of the software is Weblate 4.7.1, released on June 30, 2021.

Is there any particular reason to use such an old version and not take advantage of the latest version in terms of security and features? 😉

Thanks!

@rob006 rob006 self-assigned this Jul 5, 2021
@rob006
Copy link
Member

rob006 commented Jul 5, 2021

This is related to dependencies - I have other stuff on this server and I need to upgrade all at once, which is not that easy (or even possible). Although I have plans to upgrade Weblate to latest version this summer, and since then it should be easier to keep it up to date.

@qiaeru
Copy link
Contributor Author

qiaeru commented Jul 6, 2021

Okay, nice. Dependencies are indeed annoying, that's why I use Docker. 😄

But thanks for taking care of the update this summer!

@rob006
Copy link
Member

rob006 commented Sep 26, 2021

I updated Weblate to the latest version.

@rob006 rob006 closed this as completed Sep 26, 2021
@littlegolden
Copy link
Contributor

I updated Weblate to the latest version.

Got a new issue: impossible to search CJK keywords.... 🤧

@rob006
Copy link
Member

rob006 commented Sep 27, 2021

@littlegolden Damn. :/ New Weblate switched to FULLTEXT search from MySQL, so it may work differently than before. Any hints how to improve this? I'm not even sure what is the problem.

@rob006 rob006 reopened this Sep 27, 2021
@littlegolden
Copy link
Contributor

@littlegolden Damn. :/ New Weblate switched to FULLTEXT search from MySQL, so it may work differently than before. Any hints how to improve this? I'm not even sure what is the problem.

hope this is helpful: ngram Full-Text Parser

@rob006
Copy link
Member

rob006 commented Sep 28, 2021

This needs to be done in index definition in Weblate migrations. I'll take a look at this closer this weekend, but I would prefer to not mess up with Weblate source code. Unfortunately Weblate seems to be focused on PostgreSQL and ignores some issues with MySQL. :/

@rob006
Copy link
Member

rob006 commented Oct 2, 2021

@littlegolden I don't have good news for you. While using ngram improved search for Chinese, it also make it completely useless for other languages (or at least for Polish), since it returned a lot of unrelated results. With ngram_token_size=2 searching for "post" returned anything with "po" or "os" or "st", so you get a lot of results not even close to "post". I reverted this change as it brings more harm than good.

I would assume that migration to PostgreSQL would improve this, but I'm reluctant to installing another DBMS on this server (I need MySQL for other things). I need to think more about this, maybe this is a good reason to finally move Weblate to Flarum infrastructure.

For now you can use a workaround: regular expressions search. While regular expression is now what we need, syntax works reasonably well with raw strings and it does not use fulltext, so we can avoid its limitations. For simple search you can use it as r"语言" - searched phrase needs to be in the same form as in searched string. For more advanced searches you can combine multiple queries, for example target:r"如果" target:r"概括整" - in this way you can search for multiple words without worrying about order or phrases between them. It may not be convenient, but it should do the job until I decide about PostgreSQL migration.

1cb0b110

@littlegolden
Copy link
Contributor

littlegolden commented Oct 3, 2021

gotcha, regex is fine~

@rob006
Copy link
Member

rob006 commented Nov 21, 2021

I created separate issue for search problems: #765

Closing this one, since original issue was solved and Weblate is up to date.

@rob006 rob006 closed this as completed Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants