Page MenuHomePhabricator

Cognate should show links to redirects
Closed, ResolvedPublic

Description

Cognate should show links to redirects

See this diff for example. The link to [[en:エッチする]] is not shown in the sidebar.

[[en:エッチする]] (verb) redirects to [[en:エッチ]] (noun).
Wiktionaries have different ways to organize words, so redirects should be shown in the sidebar.

Event Timeline

Thanks for creating the ticket!
I'd like to have an input from other language communities to see if they deal the same way with the redirects.

This is a convention in the English Wiktionary (and the Japanese one I think) that is different from e.g. fr.

The problem is that we can't reasonably display redirects, because we would have two redirects for all the words with apostrophes, and ellipses.

What we could do, maybe, would be to consider redirected pages as equivalent to another page, and therefore link to the other page instead of the redirect. That is not currently how Cognate is designed to work though. The other solution, less desirable, would be to keep good old interwiki links to the target page of the redirects instead of the redirect pages, but that would be a step back.

@Darkdadaah I don't quite understand what you are saying. Let's consider the following scenario:

  • In X wiktionary, there is a page called Foo.
  • In Y wiktionary, there is a page called FOO, and two redirects pointing to it, Foo and F00.

Then:

  • The current situation is: On X:Foo, no link is shown to any page on Y (because Y:Foo is a redirect, so it is ignored by Cognate).
  • The proposed situation is: On X:Foo, a link to Y:Foo should be shown (no matter if Y:Foo is a redirect or not).

If I understand correctly, you are saying:

  • On X:Foo, we cannot show links to Y:Foo as well as Y:F00. But why would we ant to do that?
  • Or: On X:Foo, we could show a link to Y:FOO, resolving the redirect. That's a bit tricky with respect to purging, and potentially confusing, but doable.

But in any case: do you see a problem with simply linking from X:Foo to Y:Foo, no matter whether Y:Foo is a redirect or not?

@Addshore Do you remember why wee decided to filter out redirects? Is this documented somewhere? I vaguely recall us discussing it...

After some thinking, unless the pages are equivalent for Cognate ( e.g. [[fr:y’a]] and [[y'a]]), we should indeed expect X:Foo to link to Y:Foo, no matter if it is a redirect or not.

Better not try to link to a different page, that would be complicated and potentially confusing.

@Addshore Do you remember why wee decided to filter out redirects? Is this documented somewhere? I vaguely recall us discussing it...

So the patch and ticket for ignoring redirects is T149892 and https://gerrit.wikimedia.org/r/#/c/319562/ but there isn't really much info there.
I scanned through meeting notes and couldn't find any further discussion.

Simply removing the is redirect check
Right now we could easily remove the conditions checking if a page is a redirect and just add them to the database.

In the case described in T163717#3209303 this would result in something like the images below. Note the red highlighting there would be no IW link to X shown on page FOO on Y.

pasted_file (737×1 px, 951 KB)

And with a bit or normalization in the mix we can end up getting multiple IW links to Y on X due to redirects being recorded.
pasted_file (702×1 px, 876 KB)

On the whole simply removing the is redirect check would probably leave the behaviour in a pretty odd state?

After some thinking, unless the pages are equivalent for Cognate ( e.g. [[fr:y’a]] and [[y'a]]), we should indeed expect X:Foo to link to Y:Foo, no matter if it is a redirect or not.

Better not try to link to a different page, that would be complicated and potentially confusing.

This sounds like the situation in the first image would generally be accepted? even though there would be no IW link to X:Foo from Y:FOO?

@daniel, we can probably sit down next week or the week after and hash this out in person?

@Addshore next week is tight, but the week after that should be fine.

However, I can't help with determining what is wanted by or acceptable to the community. Best work with @Lea_Lacroix_WMDE to figure that out over the course of next week.

@Addshore Sure, let's talk about this next week :) When I understand exactly what you suggest, I can ask the main communities if this solution would work for them.

@Addshore Sure, let's talk about this next week :) When I understand exactly what you suggest, I can ask the main communities if this solution would work for them.

+1

Since nobody's specifically mentioned this, it would also be preferable that links are shown from redirects as well (i.e. when they are viewed with "redirect=no").

I could easier to say that
to make interwiki mapping to another wiki that has the same/exact title
although the another wiki's page is actually a redirect page.
It does not need to double interwiki on a page anywhere.

I am worried that you guys keep misunderstanding the requirements. All we want is to undo the changes for the erroneous feature request T149892, and have redirects be treated as ordinary pages.

@Wikitiki89 So that would be doing step 1 but not step 2. If that is enough then that is even better because step 2 is rather complicated to do.

Hello all, just to mention that I created a discussion topic here, so we can find a consensus whithin the different communities. Feel free to summarize your point of view and your concerns there. Thanks a lot!

4 years later. A solution is needed for " https://sv.wiktionary.org/wiki/When_in_Rome,_do_as_the_Romans_do. " vs " https://en.wiktionary.org/wiki/when_in_Rome,_do_as_the_Romans_do ". Either by allowing linking to redirects, or by some other trick. Most wiktionaries have restrictive policies when it comes to redirects. For example "colour" redirecting to "color" is prohibited on many wiktionaries and thus probably not an issue. Those are NOT same pages. But "When_in_Rome,_do_as_the_Romans_do." and "when_in_Rome,_do_as_the_Romans_do" are same. There is no obvious solution about how to deal with proverbs on wiktionaries. EN wikt has a policy to remove final punctuation and avoid capitalization of beginning letter of a sentence, thus the lemma form is " when_in_Rome,_do_as_the_Romans_do ". SV wikt has a policy resulting in " When_in_Rome,_do_as_the_Romans_do. " (uppercase "W" and dot at the end). Those are SAME LEMMAS and should thus be linked to each other. Unfortunately automatically adjusting the letter case is not possible as it would result in a huge number or false positives. Allowing automatic interwiki linking to redirects would allow to solve the problem manually by creating redirects on both sides. I do not see any better "magic" solution now. If there is an issue with false positives then the interwiki linking to redirects can be restricted to pagenames containing at least one space. This would rule out a mess of "color" and "colour" and "colow" as pointed above. I consider "Cognate" as highly preferable to manual explicit interwiki links (as used before 2017) but this issue with proverbs needs to be solved.

Lydia_Pintscher claimed this task.

For redirects to show up in sitelink in the desired cases you'll sometimes still have to make a dummy edit on the page that contains the redirect now. Otherwise it should work now.