Tobias Gritschacher has submitted this change and it was merged. Change subject: info about approved copyright message in one language will remain ......................................................................
info about approved copyright message in one language will remain With this change, if the copyright message was approved in one language and the user is then approving it in another language as well, it will still be approved in the first language. Change-Id: I2070a44997f650b44d7a4fde0e2b14ad813eca71 --- M repo/resources/wikibase.ui.entityViewInit.js 1 file changed, 6 insertions(+), 4 deletions(-) Approvals: Tobias Gritschacher: Verified; Looks good to me, approved jenkins-bot: Checked diff --git a/repo/resources/wikibase.ui.entityViewInit.js b/repo/resources/wikibase.ui.entityViewInit.js index bcc1175..87f1e7f 100644 --- a/repo/resources/wikibase.ui.entityViewInit.js +++ b/repo/resources/wikibase.ui.entityViewInit.js @@ -10,7 +10,7 @@ * @author Daniel Werner < daniel.werner at wikimedia.de > */ -( function( $, mw, wb, undefined ) { +( function( $, mw, wb ) { 'use strict'; $( document ).ready( function() { @@ -197,10 +197,12 @@ // add copyright warning to 'save' button if there is one: if( mw.config.exists( 'wbCopyrightWarning' ) ) { - var $message = $( '<span><p>' + mw.config.get( 'wbCopyrightWarning' ) + '</p></span>' ), + var userLang = mw.config.get( 'wgUserLanguage' ), + cookieKey = 'wikibase.acknowledgedentitycopyright.' + userLang, + $message = $( '<span><p>' + mw.config.get( 'wbCopyrightWarning' ) + '</p></span>' ), messageText = $.trim( $message.text() ); // get this before adding $hideMessage link! - if( messageText === $.cookie( 'wikibase.acknowledgedentitycopyright' ) ) { + if( messageText === $.cookie( cookieKey ) ) { return; } @@ -242,7 +244,7 @@ $hideMessage.on( 'click', function() { messageAnchor.removeTooltip(); - $.cookie( 'wikibase.acknowledgedentitycopyright', messageText, { 'expires': null, 'path': '/' } ); + $.cookie( cookieKey, messageText, { 'expires': null, 'path': '/' } ); } ); tooltip.show( true ); // show permanently, not just on hover! -- To view, visit https://gerrit.wikimedia.org/r/60281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2070a44997f650b44d7a4fde0e2b14ad813eca71 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner <daniel.wer...@wikimedia.de> Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits