Mattflaschen has submitted this change and it was merged.

Change subject: Added the license to UI.
......................................................................


Added the license to UI.

Bug: 54409

Change-Id: I83ca24201fd469dd84649f7cef75c6cb365ea38c
---
M PronunciationRecording.i18n.php
M SpecialPronunciationRecording.php
M resources/css/ext.pronunciationRecordingToolbar.css
3 files changed, 16 insertions(+), 2 deletions(-)

Approvals:
  Mattflaschen: Verified; Looks good to me, approved



diff --git a/PronunciationRecording.i18n.php b/PronunciationRecording.i18n.php
index 3571b7f..6c67d2d 100644
--- a/PronunciationRecording.i18n.php
+++ b/PronunciationRecording.i18n.php
@@ -28,6 +28,7 @@
        'pronunciationrecording-information-language-label' => 'Language:',
        'pronunciationrecording-mic-access-notify' => 'Click "Allow" to allow 
the browser to access your microphone.',
        'pronunciationrecording-recording-notify' => 'Recording....',
+       'pronunciationrecording-information-license-prompt' => 'By using 
PronunciationRecording and clicking 
{{int:pronunciationrecording-toolbar-upload-label}}, {{GENDER:$1|you}} agree to 
the following terms for your recording:',
 );
 
 
@@ -64,6 +65,10 @@
        'pronunciationrecording-information-language-label' => 'Label text for 
the language dropdown list',
        'pronunciationrecording-mic-access-notify' => 'Notifies the user to 
click "Allow" to allow the browser to get microphone access',
        'pronunciationrecording-recording-notify' => 'Notifies the user that 
his pronunciation is being recorded',
+       'pronunciationrecording-information-license-prompt' => 'Text prompting 
the user about the license. It is the below the language drop down list.
+
+Parameters:
+* $1 - username, for GENDER support',
 );
 
 /** Akan (Akan)
diff --git a/SpecialPronunciationRecording.php 
b/SpecialPronunciationRecording.php
index 159f124..e4c3e33 100644
--- a/SpecialPronunciationRecording.php
+++ b/SpecialPronunciationRecording.php
@@ -31,13 +31,16 @@
                        $output->addHTML( '<form>' );
                        $output->addHTML( '<fieldset>' );
                        $output->addHTML( '<legend>'.wfMessage( 
'pronunciationrecording-information-label' )->escaped().'</legend>' );
-                       $output->addHTML( wfMessage( 
'pronunciationrecording-information-word-label' )->escaped().'<input 
type="text" class="mw-pronunciationrecording-information-word"><br><br>' );
+                       $output->addHTML( '<b>'.wfMessage( 
'pronunciationrecording-information-word-label' )->escaped().'</b><input 
type="text" class="mw-pronunciationrecording-information-word"><br><br>' );
                        $languages = Language::fetchLanguageNames( null, 'mw' );
-                       $output->addHTML( wfMessage( 
'pronunciationrecording-information-language-label' )->escaped().'<select 
class="mw-pronunciationrecording-information-language">' );
+                       $output->addHTML( '<b>'.wfMessage( 
'pronunciationrecording-information-language-label' )->escaped().'</b><select 
class="mw-pronunciationrecording-information-language">' );
                        foreach( $languages as $lang_code => $lang_name) {
                                $output->addHTML( Html::element( 'option', 
array( 'value' => $lang_code ) , $lang_code.' - '.$lang_name ) );
                        }
                        $output->addHTML( '</select>' );
+                       $output->addHTML( '<br><br>'.wfMessage( 
'pronunciationrecording-information-license-prompt', $user )->escaped() );
+                       $output->addHTML( '<div class = 
"mw-pronunciationrecording-information-license-cc-by-sa" >'.wfMessage( 
'mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0', 1, $user, 
'http://creativecommons.org/licenses/by-sa/3.0/deed.en'  )->parse().'<br>' );
+                       $output->addHTML( wfMessage( 
'mwe-upwiz-source-ownwork-cc-by-sa-3.0-explain', 1 )->escaped().'<br></div>' );
                        $output->addHTML( '</fieldset>' );
                        $output->addHTML( '</form>' );
                }
diff --git a/resources/css/ext.pronunciationRecordingToolbar.css 
b/resources/css/ext.pronunciationRecordingToolbar.css
index fac7302..6857bc4 100644
--- a/resources/css/ext.pronunciationRecordingToolbar.css
+++ b/resources/css/ext.pronunciationRecordingToolbar.css
@@ -12,3 +12,9 @@
 .mw-pronunciationrecording-information-language {
        margin-left: 8em;
 }
+
+.mw-pronunciationrecording-information-license-cc-by-sa{
+       margin-top: 0.5em;
+       margin-left: 1.5em;
+}
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I83ca24201fd469dd84649f7cef75c6cb365ea38c
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/PronunciationRecording
Gerrit-Branch: master
Gerrit-Owner: Rahul21 <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Mdale <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to