Content deleted Content added
Opencooper (talk | contribs) reuse our regexes |
Opencooper (talk | contribs) add check for kanji when we're getting reading from wikidata |
||
Line 213:
function parseKanaClaim(response) {
var kana;
if (response.claims.
// name in kana▼
kana = response.claims.P1814[0].mainsnak.datavalue.value;▼
▲ } else if (response.claims.P1476 && response.claims.P1476[0].qualifiers
&& response.claims.P1476[0].qualifiers.P1814) {
// title w/ name in kana
kana = response.claims.P1476[0].qualifiers.P1814[0].datavalue.value;
} else if (response.claims.P1705 && response.claims.P1705
&& response.claims.P1705[0].qualifiers
&& response.claims.P1705[0].qualifiers.P1814) {
// native label w/ name in kana
kana = response.claims.P1705[0].qualifiers.P1814[0].datavalue.value;
} else if (response.claims.P1814) {
▲ // name in kana
▲ kana = response.claims.P1814[0].mainsnak.datavalue.value;
} else {
getInterlanguage();
|