Module:OsmPageTitleParser/doc
Jump to navigation
Jump to search
This is a documentation subpage for Module:OsmPageTitleParser. It contains usage information, categories and other content or metadata that is not part of the original module page. |
This is a documentation subpage for Module:OsmPageTitleParser. It contains usage information, categories and other content or metadata that is not part of the original module page. |
This module parses title object into language, key value, and an optional tag value. This module is designed to be used by other modules. See also testcases code.
2 tests failed.
Text | Expected | Actual | |
---|---|---|---|
Key:something:* | {key="something:",language="en"} | {language="en",key="something:*"} |
Text | Expected | Actual | |
---|---|---|---|
Key:something | {key="something",language="en"} | {language="en",key="something"} | |
Key:some thing | {key="some_thing",language="en"} | {language="en",key="some_thing"} | |
Key:some_thing | {key="some_thing",language="en"} | {language="en",key="some_thing"} | |
Key:some:thing | {key="some:thing",language="en"} | {language="en",key="some:thing"} | |
KEY::some:thing | {key=":some:thing",language="en"} | {language="en",key=":some:thing"} | |
Key:some:thing:aa | {key="some:thing:aa",language="en"} | {language="en",key="some:thing:aa"} | |
Key:some:thing:aa: | {key="some:thing:aa:",language="en"} | {language="en",key="some:thing:aa:"} |
Text | Expected | Actual | |
---|---|---|---|
cnr:Key:name | {key="name",language="cnr"} | {language="cnr",key="name"} | |
cnr:Key:name:cnr | {key="name:cnr",language="cnr"} | {language="cnr",key="name:cnr"} | |
ko:key:some:thing | {key="some:thing",language="ko"} | {language="ko",key="some:thing"} | |
kO:key:some:thing:o | {key="some:thing:o",language="ko"} | {language="ko",key="some:thing:o"} | |
kO:key:so me:thing:o: | {key="so_me:thing:o:",language="ko"} | {language="ko",key="so_me:thing:o:"} | |
No:key:abc | {key="abc",language="no"} | {language="no",key="abc"} |
Text | Expected | Actual | |
---|---|---|---|
ru:Key:something | {key="something",language="ru"} | {language="ru",key="something"} | |
rU:KEY:some:thing:o | {key="some:thing:o",language="ru"} | {language="ru",key="some:thing:o"} | |
rU:keY:so me:thing:o: | {key="so_me:thing:o:",language="ru"} | {language="ru",key="so_me:thing:o:"} |
Text | Expected | Actual | |
---|---|---|---|
en | |||
EN | |||
fr | FR: | FR: | |
Fr | FR: | FR: | |
PT | Pt: | Pt: | |
(nil) |
Text | Expected | Actual | |
---|---|---|---|
bh:Main | {language="bh",_parseFailed=true} | {language="bh",_parseFailed=true} | |
ca-valencia:Main | {language="ca-valencia",_parseFailed=true} | {language="ca-valencia",_parseFailed=true} | |
cnr:Main | {language="cnr",_parseFailed=true} | {language="cnr",_parseFailed=true} | |
gcf:Main | {language="gcf",_parseFailed=true} | {language="gcf",_parseFailed=true} | |
gsw:Main | {language="gsw",_parseFailed=true} | {language="gsw",_parseFailed=true} | |
kbp:Main | {language="kbp",_parseFailed=true} | {language="kbp",_parseFailed=true} | |
kfa:Main | {language="kfa",_parseFailed=true} | {language="kfa",_parseFailed=true} | |
mrw:Main | {language="mrw",_parseFailed=true} | {language="mrw",_parseFailed=true} | |
rcf:Main | {language="rcf",_parseFailed=true} | {language="rcf",_parseFailed=true} | |
sr-cyrl:Main | {language="sr-cyrl",_parseFailed=true} | {language="sr-cyrl",_parseFailed=true} | |
sr-latn:Main | {language="sr-latn",_parseFailed=true} | {language="sr-latn",_parseFailed=true} | |
sxu:Main | {language="sxu",_parseFailed=true} | {language="sxu",_parseFailed=true} | |
swg:Main | {language="swg",_parseFailed=true} | {language="swg",_parseFailed=true} | |
sxu:Main | {language="sxu",_parseFailed=true} | {language="sxu",_parseFailed=true} | |
trp:Main | {language="trp",_parseFailed=true} | {language="trp",_parseFailed=true} | |
tzm:Main | {language="tzm",_parseFailed=true} | {language="tzm",_parseFailed=true} | |
zgh:Main | {language="zgh",_parseFailed=true} | {language="zgh",_parseFailed=true} | |
Nds:Main | {language="nds",_parseFailed=true} | {language="nds",_parseFailed=true} | |
Gcf:Test | {language="gcf",_parseFailed=true} | {language="gcf",_parseFailed=true} | |
Zh-hant:Relation | {language="zh-hant",_parseFailed=true} | {language="zh-hant",_parseFailed=true} | |
Pt-br:Main | {language="pt-br",_parseFailed=true} | {language="pt-br",_parseFailed=true} | |
No:Main | {language="no",_parseFailed=true} | {language="no",_parseFailed=true} |
Text | Expected | Actual | |
---|---|---|---|
POI:Scotiabank | {language="en",_parseFailed=true} | {language="en",_parseFailed=true} | |
Switzerland:Berne | {language="en",_parseFailed=true} | {language="en",_parseFailed=true} |
Text | Expected | Actual | |
---|---|---|---|
akey=avalue | {k="akey",v="avalue"} | {k="akey",v="avalue"} | |
akey | {k="akey"} | {k="akey"} | |
akey= | {k="akey",v=""} | {k="akey",v=""} | |
akey=ava=lue | {k="akey",v="ava=lue"} | {k="akey",v="ava=lue"} | |
akey==ava=lue= | {k="akey",v="=ava=lue="} | {k="akey",v="=ava=lue="} | |
{k=""} | {k=""} | ||
(nil) | {} | {} |
Text | Expected | Actual | |
---|---|---|---|
Tag:something=abc | {value="abc",key="something",language="en"} | {value="abc",key="something",language="en"} | |
Tag:some:thing=abc:xyz | {value="abc:xyz",key="some:thing",language="en"} | {value="abc:xyz",key="some:thing",language="en"} | |
TAG::some:thing=aa=bb=c | {value="aa=bb=c",key=":some:thing",language="en"} | {value="aa=bb=c",key=":some:thing",language="en"} | |
taG:some:thing:aa bb=yy | {value="yy",key="some:thing:aa_bb",language="en"} | {value="yy",key="some:thing:aa_bb",language="en"} | |
Tag:some:thing:aa:=a b | {value="a_b",key="some:thing:aa:",language="en"} | {value="a_b",key="some:thing:aa:",language="en"} |
Text | Expected | Actual | |
---|---|---|---|
cnr:Tag:name:cnr=Studentska | {value="Studentska",key="name:cnr",language="cnr"} | {value="Studentska",key="name:cnr",language="cnr"} | |
ko:key:some:thing=abc x:yz | {value="abc_x:yz",key="some:thing",language="ko"} | {value="abc_x:yz",key="some:thing",language="ko"} | |
kO:key:some:thing:o=:a: | {value=":a:",key="some:thing:o",language="ko"} | {value=":a:",key="some:thing:o",language="ko"} | |
kO:key:so me:thing:o:=* | {value="*",key="so_me:thing:o:",language="ko"} | {value="*",key="so_me:thing:o:",language="ko"} |
Text | Expected | Actual | |
---|---|---|---|
ru:Key:something=abc | {value="abc",key="something",language="ru"} | {value="abc",key="something",language="ru"} | |
rU:KEY:some:thing:o=a=b:c | {value="a=b:c",key="some:thing:o",language="ru"} | {value="a=b:c",key="some:thing:o",language="ru"} | |
rU:keY:so me:thing:o:=== | {value="==",key="so_me:thing:o:",language="ru"} | {value="==",key="so_me:thing:o:",language="ru"} | |
RU:Moscow | {language="ru",_parseFailed=true} | {language="ru",_parseFailed=true} |
Text | Expected | Actual | |
---|---|---|---|
Talk:Main | {language="en",_parseFailed=true} | {language="en",_parseFailed=true} | |
Talk:Pt:Creating an Account | {language="pt",_parseFailed=true} | {language="pt",_parseFailed=true} | |
Talk:Tag:phone=tag | {value="tag",key="phone",language="en",_parseFailed=true} | {value="tag",key="phone",language="en"} | |
JA talk:Bus routes in Kanagawa | {language="ja",_parseFailed=true} | {language="ja",_parseFailed=true} | |
Talk:POI:The Church of Jesus Christ of Latter-day Saints | {language="en",_parseFailed=true} | {language="en",_parseFailed=true} |
Text | Expected | Actual | |
---|---|---|---|
something | {language="en",_parseFailed=true} | {language="en",_parseFailed=true} | |
FR:something | {language="fr",_parseFailed=true} | {language="fr",_parseFailed=true} | |
ko:something | {language="ko",_parseFailed=true} | {language="ko",_parseFailed=true} | |
some:thing | {language="en",_parseFailed=true} | {language="en",_parseFailed=true} | |
FR:some:thing | {language="fr",_parseFailed=true} | {language="fr",_parseFailed=true} | |
KO:some:thing | {language="ko",_parseFailed=true} | {language="ko",_parseFailed=true} | |
{_parseFailed=true} | {_parseFailed=true} |