Closed stormi closed 8 years ago
What is expected behavior in this case?
Also this happens only with MySQL which does silent truncation in this case, I think other databases would complain when creating entry with field which doesn't fit into the database...
Weblate is supposed to skip already existing slugs. The reason for this is to allow running import_project several times without creating duplicate components.
It's too bad that the slug is a unique key but is at the same time limited in size. If weblate ignores already existing slugs, it will ignore some components although they never got imported, because their truncated slug is identical.
As it's used in the URL, it's size has be limited. If not something else, there is limit on URL length and we need to pass other things in URL (eg. search parameters).
Also as the slug is calculated from name on import and the too long names won't fit in the UI anyway, so the best approach IMHO is to have shorter names...
Ok, thanks for the answer.
Anyway I think this could be configurable in the end by command line parameter.
When creating subprojects with import_project, if the subprojects have a long name, it can happen that the URL slug computed by weblate from the name is not unique and already exists in the database. This causes the operation to fail.
I got this issue because I'm trying to use weblate with web projects that have lots of i18n files all over the place and I chose to put the path in the subproject name.
Server configuration