jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383479 )

Change subject: Docs: Discourage use of mw.wikibase.getLabelByLang for getting 
in user lang
......................................................................


Docs: Discourage use of mw.wikibase.getLabelByLang for getting in user lang

This is because this means that the usages depend on who viewed the page
(which they really shouldn't), as this bypasses T173196. That can cause
both DB performance issues (to many DB updates) and inconsistent watchlist
behavior (when does a label change actually affect a page?).

Bug: T173262
Change-Id: I391d6d0049351705a22086e00a9f9ec0760d6ddd
---
M docs/lua.wiki
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/docs/lua.wiki b/docs/lua.wiki
index 89a1e81..24d117f 100644
--- a/docs/lua.wiki
+++ b/docs/lua.wiki
@@ -75,6 +75,8 @@
 <code>wikibase.getLabelByLang( id, languageCode )</code><br>
 Get the label from an entity for a specific language, returns the label as 
string or nil if it couldn't be found. This doesn't apply any language 
fallbacks.
 
+'''Note''': This should not be used to get the label in the user's language on 
multilingual wikis, use [[#mw.wikibase.label|<code>mw.wikibase.label</code>]] 
for that if by any means possible.
+
 An example call might look like this:
 <source lang="lua">
 mw.wikibase.getLabelByLang( 'Q42', 'es' ) -- Returns the Spanish label of the 
item as a string, like "Berlín".

-- 
To view, visit https://gerrit.wikimedia.org/r/383479
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I391d6d0049351705a22086e00a9f9ec0760d6ddd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>
Gerrit-Reviewer: Eranroz <eranro...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to