Wikipedia:WikiProject Interlanguage Links/Scripts: Difference between revisions
Content deleted Content added
mNo edit summary |
mNo edit summary |
||
Line 52:
----
<pre>
// suggested reciporcal links
// a:x -> b:x and b:x exists and no link from b:? to a:x exists => b:x -> a:x
Line 68 ⟶ 69:
AND a.to_lang = 'en'
AND b.from_lang IS NULL;
// Interlanguage links to redirects
// en -> fr only
SELECT a.from_lang, a.from_title, a.to_lang, a.to_title
FROM inter a
INNER JOIN en.page f
ON f.page_title = a.from_title
AND f.page_namespace = 0
AND f.page_is_redirect = 0
INNER JOIN fr.page t
ON a.to_title = t.page_title
AND t.page_namespace = 0
AND t.page_is_redirect = 1
WHERE a.from_lang = 'en'
AND a.to_lang = 'fr';
</pre>
----
Finally, extract these suggestions in a human-
----
<pre>
|