<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 19, 2015 at 3:44 AM, Jaime Crespo <span dir="ltr"><<a href="mailto:jcrespo@wikimedia.org" target="_blank">jcrespo@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Nov 19, 2015 at 12:26 PM, Yetkin Sakal <span dir="ltr"><<a href="mailto:superyetkin@yahoo.com" target="_blank">superyetkin@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div style="color:rgb(0,0,0);font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div>Are namespaces stored in replica databases? How can we link the page_namespae column in the page table to retrieve the full page name?<br></div></div></div></blockquote><div><br></div></span><div>The name of the column is not stored on the database (neither on labs dbs nor in production). There is not such a thing as a canonical name for namespaces, but you can go to<br></div></div></div></div></blockquote><div><br></div><div>There are such things as canonical namespaces, they're the english translations.</div><div>The code is littered with instances of this. But otherwise you're right, we don't store</div><div>the names in the databases, they're by number.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>a) the source code of mediawiki for the predefined names and its translations to each language<br></div></div></div></div></blockquote><div><br></div><div>For core namespaces, you can check out Defines.php which will clearly give you</div><div>the number -> name match.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>b) our custoom/publicly available configuration for custom names/namespaces<br></div></div><<a href="https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L1947" target="_blank">https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L1947</a>><br><br></div><div class="gmail_extra">Please note that the same page/namespace can redirect to different names, depending on the local language:<br>e.g. <a href="https://es.wikipedia.org/wiki/Talk:Portada" target="_blank">https://es.wikipedia.org/wiki/Talk:Portada</a> redirects to <a href="https://es.wikipedia.org/wiki/Discusi%C3%B3n:Portada" target="_blank">https://es.wikipedia.org/wiki/Discusi%C3%B3n:Portada</a>.<span class=""><font color="#888888"><br><br></font></span></div></div></blockquote><div><br></div><div>I'll also add api.php, which can easily give you this for any wiki. For example:</div><div><a href="https://es.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases">https://es.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases</a></div><div><br></div><div>This is probably your best bet, actually. </div><div><br></div><div>-Chad</div></div></div></div>