Open burner1024 opened 1 year ago
Variant length is currently limited to 576 chars:
PS: Similar limitation is there on PostgreSQL, see https://stackoverflow.com/q/41971217/225718
Well, 2712 is way more than 576. I don't see the point of setting the limitation explicitly in code, if the server throws an error anyway. To get around this, people seem to be using md5 or something.
Since I'm on Postgresql, may I raise this limit to 2712 safely? Or that can break future migrations?
I don't see the point of setting the limitation explicitly in code, if the server throws an error anyway.
Making it fail gracefully is definitely desired, it just does not happen here.
Since I'm on Postgresql, may I raise this limit to 2712 safely? Or that can break future migrations?
You can manually change the table schema, that should not break future migrations. The actual maximal value probably will be smaller as there are more fields in the index.
To get around this, people seem to be using md5 or something.
Yes, that's an option. Unfortunately, that is hard to make it compatible with all supported databases without introducing an additional field for storing that and updating it manually.
As Django now supports MD5 indexes, and we use them already, this might be the way to remove the limitation (and improve variants update performance, see https://github.com/WeblateOrg/weblate/issues/7661).
This issue has been added to the backlog. It is not scheduled on the Weblate roadmap, but it eventually might be implemented.
In case you need this feature soon, please consider helping or push it by funding the development.
Describe the issue
An exception when adding a variant to a specific string.
I already tried
Steps to reproduce the behavior
Expected behavior
No exception, variant added.
Screenshots
No response
Exception traceback
How do you run Weblate?
Docker container
Weblate versions
Weblate deploy checks
Additional context
No response