Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Module:Wikidata label
(view source)
Revision as of 00:23, 19 April 2019
4 bytes added
,
5 years ago
no edit summary
Line 53:
Line 53:
item = entity.id -- look-up q-code
item = entity.id -- look-up q-code
elseif tonumber(item) then -- if it is just the number than add "Q" in front
elseif tonumber(item) then -- if it is just the number than add "Q" in front
−
item = '
Item:
Q'..item
+
item = 'Q'..item
end
end
item = string.gsub( string.upper(item), 'PROPERTY:P', 'P') -- make all the properties the same and capitalize
item = string.gsub( string.upper(item), 'PROPERTY:P', 'P') -- make all the properties the same and capitalize
Line 67:
Line 67:
label = entity:getLabel(language)
label = entity:getLabel(language)
else
else
−
label = mw.wikibase.getLabelByLang(item, language)
+
label = mw.wikibase.getLabelByLang(
"Item:"..
item, language)
end
end
if label then break end -- label found and we are done
if label then break end -- label found and we are done
Podehaye
Bureaucrats
, editors,
Interface administrators
,
Ninjas
, nuke,
Administrators
,
Widget editors
15,627
edits
Navigation menu
Personal tools
Log in
Request account
Namespaces
Module
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
New Item
New Property
All items
All properties
All pages
Active Users
SAR service dev
Query Service
Maintenance
Administrator
Tools
Special pages
Printable version
Interaction
Community portal
WebXray
Recent changes
Contact Page
Telegram
Discourse forum
MyData Slack