BoltTranslate / Translate

Provides translation for contenttypes.
Other
43 stars 38 forks source link

Selectively disable automatic routing override on a route basis #174

Closed padawan closed 6 years ago

padawan commented 6 years ago

Option to disable the global automatic routing override on a route while still enabling it for the other routes.

Use case: while translating an existing site, one might want to serve both /page and /{_locale}/page while using the global automatic locale override, without the hassle of having to switch it off and redefine the whole routing for all translatable content types.

SvanteRichter commented 6 years ago

Sorry if I'm sound adversarial, but to me it sorta seems like this would be another use case that a future rewrite would need to support that can already be solved by a feature we have. Considering the time we have to spend on this extension I'm going to decline this, even though it is just one line of actual code change.

I hope you understand.

padawan commented 6 years ago

So you specifically asked me in #162 to rework this in order to include it in the new version, then you refuse it once I've done what you asked. It doesn't just sound adversarial, it is. (No problem though, that's your prerogative. How it's done though, is far from encouraging further contributions.)

SvanteRichter commented 6 years ago

I'm very sorry about that. When I looked originally I thought it would make a good addition, and now, much later (which is completely my fault that it took so long) I do not. I have hopes to rewrite this extension for bolt 4 and with that I am trying to reduce the complexity, especially with regards to routing and db. Adding more edge cases that can be solved (albeit with more config) already is probably not making that easier.

I don't want to discourage contributions, but this started out with me and another guy, and these days neither of use have much time. So if you want to take point on translate that'd be appreciated, but until someone does I'll try to keep complexity down.

padawan commented 6 years ago

Complexity is relative, your edge case is my use case. In the case of my own site, this single line change avoids me tons of configuration, because of a planet routing choice you find simple but is an edge case for me. I'll see how your rewrite turns out and if the precise use I have is, really, solvable without this change.

SvanteRichter commented 6 years ago

Based on your reply I don't think you actually read what I wrote.

I'll merge this cause it's useful to you, but I think there might be some value in rereading what I wrote.

padawan commented 6 years ago

In other words, to (re)make the case for this change: your choice of simplicity is an "all-or-nothing" automatic route that has no flexibility by definition. My change may introduce a (albeit small since it's just one optional config line on a route) "complexity" in that it's an "all but these routes" setting, which actually avoids configuration complexity in the case of an existing site that would benefit from this automatic routing but with routes you want to exclude.

Simplicity for the sake of pure simplicity without regard for the user experience or use case isn't always a good thing. Your simplicity is my config file complexity ;-)

SvanteRichter commented 6 years ago

Simplicity for the sake of pure simplicity without regard for the user experience or use case isn't always a good thing

Agreed, very much.

Your simplicity is my config file complexity

Right, but as I said one of the reasons that I want to avoid complexity in the code is that currently both maintainers of translate basically have no time to work on it. Any time to work on it in the future would probably be limited, so therefore I want to keep the problem-space small. That is also why I said " So if you want to take point on translate that'd be appreciated", since if someone that has more time to work on it there could also be more resources to allow for more niche solutions.

padawan commented 6 years ago

Sorry if you felt I didn't read you, but think about the fact that I felt the same from my PoV :-) (this form of written communication is harsh/hard, especially when dealing with a foreign language). Thanks for accepting this change.