Fix link to lexemes, fix #507
This commit is contained in:
parent
ed161afc7e
commit
5f5079ddfe
2 changed files with 10 additions and 1 deletions
|
@ -273,6 +273,15 @@ export default class Wikidata {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
public static IdToArticle(id: string){
|
||||
if(id.startsWith("Q")){
|
||||
return "https://wikidata.org/wiki/"+id
|
||||
}
|
||||
if(id.startsWith("L")){
|
||||
return "https://wikidata.org/wiki/Lexeme:"+id
|
||||
}
|
||||
throw "Unknown id type: "+id
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a wikidata page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue