Index: trunk/extensions/UploadWizard/UploadWizard.config.php |
— | — | @@ -80,7 +80,8 @@ |
81 | 81 | 'licenses' => array( |
82 | 82 | 'cc-by-sa-3.0' => array( |
83 | 83 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0', |
84 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 84 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 85 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/legalcode' |
85 | 86 | ), |
86 | 87 | 'cc-by-sa-3.0-gfdl' => array( |
87 | 88 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-gfdl', |
— | — | @@ -90,60 +91,72 @@ |
91 | 92 | 'cc-by-sa-3.0-at' => array( |
92 | 93 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-at', |
93 | 94 | 'templates' => array( 'cc-by-sa-3.0-at' ), |
94 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 95 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 96 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/at/legalcode' |
95 | 97 | ), |
96 | 98 | 'cc-by-sa-3.0-de' => array( |
97 | 99 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-de', |
98 | 100 | 'templates' => array( 'cc-by-sa-3.0-de' ), |
99 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 101 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 102 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/de/legalcode' |
100 | 103 | ), |
101 | 104 | 'cc-by-sa-3.0-ee' => array( |
102 | 105 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-ee', |
103 | 106 | 'templates' => array( 'cc-by-sa-3.0-ee' ), |
104 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 107 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 108 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/ee/legalcode' |
105 | 109 | ), |
106 | 110 | 'cc-by-sa-3.0-es' => array( |
107 | 111 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-es', |
108 | 112 | 'templates' => array( 'cc-by-sa-3.0-es' ), |
109 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 113 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 114 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/es/legalcode' |
110 | 115 | ), |
111 | 116 | 'cc-by-sa-3.0-hr' => array( |
112 | 117 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-hr', |
113 | 118 | 'templates' => array( 'cc-by-sa-3.0-hr' ), |
114 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 119 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 120 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/hr/legalcode' |
115 | 121 | ), |
116 | 122 | 'cc-by-sa-3.0-lu' => array( |
117 | 123 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-lu', |
118 | 124 | 'templates' => array( 'cc-by-sa-3.0-lu' ), |
119 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 125 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 126 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/lu/legalcode' |
120 | 127 | ), |
121 | 128 | 'cc-by-sa-3.0-nl' => array( |
122 | 129 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-nl', |
123 | 130 | 'templates' => array( 'cc-by-sa-3.0-nl' ), |
124 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 131 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 132 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/nl/legalcode' |
125 | 133 | ), |
126 | 134 | 'cc-by-sa-3.0-no' => array( |
127 | 135 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-no', |
128 | 136 | 'templates' => array( 'cc-by-sa-3.0-no' ), |
129 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 137 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 138 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/no/legalcode' |
130 | 139 | ), |
131 | 140 | 'cc-by-sa-3.0-pl' => array( |
132 | 141 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-pl', |
133 | 142 | 'templates' => array( 'cc-by-sa-3.0-pl' ), |
134 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 143 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 144 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/pl/legalcode' |
135 | 145 | ), |
136 | 146 | 'cc-by-sa-3.0-ro' => array( |
137 | 147 | 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-ro', |
138 | 148 | 'templates' => array( 'cc-by-sa-3.0-ro' ), |
139 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 149 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 150 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/ro/legalcode' |
140 | 151 | ), |
141 | 152 | 'cc-by-3.0' => array( |
142 | 153 | 'msg' => 'mwe-upwiz-license-cc-by-3.0', |
143 | | - 'icons' => array( 'cc-by' ) |
| 154 | + 'icons' => array( 'cc-by' ), |
| 155 | + 'url' => 'http://creativecommons.org/licenses/by/3.0/legalcode' |
144 | 156 | ), |
145 | 157 | 'cc-zero' => array( |
146 | 158 | 'msg' => 'mwe-upwiz-license-cc-zero', |
147 | | - 'icons' => array( 'cc-zero' ) |
| 159 | + 'icons' => array( 'cc-zero' ), |
| 160 | + 'url' => 'http://creativecommons.org/publicdomain/zero/1.0/legalcode' |
148 | 161 | ), |
149 | 162 | 'own-pd' => array( |
150 | 163 | 'msg' => 'mwe-upwiz-license-own-pd', |
— | — | @@ -152,19 +165,24 @@ |
153 | 166 | ), |
154 | 167 | 'cc-by-sa-2.5' => array( |
155 | 168 | 'msg' => 'mwe-upwiz-license-cc-by-sa-2.5', |
156 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 169 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 170 | + 'url' => 'http://creativecommons.org/licenses/by-sa/2.5/legalcode' |
157 | 171 | ), |
158 | 172 | 'cc-by-2.5' => array( |
159 | 173 | 'msg' => 'mwe-upwiz-license-cc-by-2.5', |
160 | | - 'icons' => array( 'cc-by' ) |
| 174 | + 'icons' => array( 'cc-by' ), |
| 175 | + 'url' => 'http://creativecommons.org/licenses/by/2.5/legalcode' |
161 | 176 | ), |
162 | 177 | 'cc-by-sa-2.0' => array( |
163 | 178 | 'msg' => 'mwe-upwiz-license-cc-by-sa-2.0', |
164 | | - 'icons' => array( 'cc-by', 'cc-sa' ) |
| 179 | + 'icons' => array( 'cc-by', 'cc-sa' ), |
| 180 | + 'url' => 'http://creativecommons.org/licenses/by-sa/2.0/legalcode' |
| 181 | + |
165 | 182 | ), |
166 | 183 | 'cc-by-2.0' => array( |
167 | 184 | 'msg' => 'mwe-upwiz-license-cc-by-2.0', |
168 | | - 'icons' => array( 'cc-by' ) |
| 185 | + 'icons' => array( 'cc-by' ), |
| 186 | + 'url' => 'http://creativecommons.org/licenses/by/2.0/legalcode' |
169 | 187 | ), |
170 | 188 | 'fal' => array( |
171 | 189 | 'msg' => 'mwe-upwiz-license-fal', |
— | — | @@ -214,7 +232,8 @@ |
215 | 233 | ), |
216 | 234 | 'custom' => array( |
217 | 235 | 'msg' => 'mwe-upwiz-license-custom', |
218 | | - 'templates' => array( 'subst:Custom license marker added by UW' ) |
| 236 | + 'templates' => array( 'subst:Custom license marker added by UW' ), |
| 237 | + 'url' => '//commons.wikimedia.org/wiki/Commons:Copyright_tags' |
219 | 238 | ) |
220 | 239 | ), |
221 | 240 | |
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | 'mwe-upwiz-source-ownwork-assert-any-license' => 'I, $2, the copyright holder of {{PLURAL:$1|this work|these works}}, hereby irrevocably grant anyone the right to use, modify and redistribute {{PLURAL:$1|this work|these works}} for any purpose, and I therefore publish {{PLURAL:$1|it|them}} under the following terms:', |
108 | 108 | 'mwe-upwiz-source-ownwork-assert' => 'I, $2, the copyright holder of {{PLURAL:$1|this work|these works}}, hereby irrevocably grant anyone the right to use {{PLURAL:$1|this work|these works}} for any purpose, as long as they credit me and share derivative work under the same terms.', |
109 | 109 | 'mwe-upwiz-source-ownwork-assert-custom' => 'I, $2, the copyright holder of {{PLURAL:$1|this work|these works}}, hereby publish {{PLURAL:$1|this work|these works}} under the following license:', |
110 | | - 'mwe-upwiz-source-ownwork-assert-note' => 'I, copyright holder of these works, publish these works under the $1 license.', |
| 110 | + 'mwe-upwiz-source-ownwork-assert-note' => 'I, copyright holder of {{PLURAL:$2|this work|these works}}, publish {{PLURAL:$2|this work|these works}} under the $1 license.', |
111 | 111 | 'mwe-upwiz-source-permission' => 'Their author gave you explicit permission to upload them', |
112 | 112 | 'mwe-upwiz-source-thirdparty' => '{{PLURAL:$1|This file is|These files are}} not my own work.', |
113 | 113 | 'mwe-upwiz-source-thirdparty-intro' => 'Please enter the address where you found each file.', |
— | — | @@ -220,24 +220,24 @@ |
221 | 221 | |
222 | 222 | /* LICENSES & combinations of licenses */ |
223 | 223 | /* may be a good idea to shift to WikimediaLicenseTexts? */ |
224 | | - 'mwe-upwiz-license-cc-by-sa-3.0' => 'Creative Commons Attribution ShareAlike 3.0', |
225 | | - 'mwe-upwiz-license-cc-by-sa-3.0-at' => 'Creative Commons Attribution ShareAlike 3.0 Austria', |
226 | | - 'mwe-upwiz-license-cc-by-sa-3.0-de' => 'Creative Commons Attribution ShareAlike 3.0 Germany', |
227 | | - 'mwe-upwiz-license-cc-by-sa-3.0-ee' => 'Creative Commons Attribution ShareAlike 3.0 Estonia', |
228 | | - 'mwe-upwiz-license-cc-by-sa-3.0-es' => 'Creative Commons Attribution ShareAlike 3.0 Spain', |
229 | | - 'mwe-upwiz-license-cc-by-sa-3.0-hr' => 'Creative Commons Attribution ShareAlike 3.0 Croatia', |
230 | | - 'mwe-upwiz-license-cc-by-sa-3.0-lu' => 'Creative Commons Attribution ShareAlike 3.0 Luxembourg', |
231 | | - 'mwe-upwiz-license-cc-by-sa-3.0-nl' => 'Creative Commons Attribution ShareAlike 3.0 Netherlands', |
232 | | - 'mwe-upwiz-license-cc-by-sa-3.0-no' => 'Creative Commons Attribution ShareAlike 3.0 Norway', |
233 | | - 'mwe-upwiz-license-cc-by-sa-3.0-pl' => 'Creative Commons Attribution ShareAlike 3.0 Poland', |
234 | | - 'mwe-upwiz-license-cc-by-sa-3.0-ro' => 'Creative Commons Attribution ShareAlike 3.0 Romania', |
235 | | - 'mwe-upwiz-license-cc-by-3.0' => 'Creative Commons Attribution 3.0', |
236 | | - 'mwe-upwiz-license-cc-by-sa-2.5' => 'Creative Commons Attribution ShareAlike 2.5', |
237 | | - 'mwe-upwiz-license-cc-by-2.5' => 'Creative Commons Attribution 2.5', |
238 | | - 'mwe-upwiz-license-cc-by-sa-2.0' => 'Creative Commons Attribution ShareAlike 2.0', |
239 | | - 'mwe-upwiz-license-cc-by-2.0' => 'Creative Commons Attribution 2.0', |
240 | | - 'mwe-upwiz-license-cc-zero' => 'Creative Commons CC0 Waiver (release all rights, like public domain)', |
241 | | - 'mwe-upwiz-license-custom' => 'The license is described by the following wikitext:', |
| 224 | + 'mwe-upwiz-license-cc-by-sa-3.0' => 'Creative Commons Attribution ShareAlike 3.0 ([$2 legal code])', |
| 225 | + 'mwe-upwiz-license-cc-by-sa-3.0-at' => 'Creative Commons Attribution ShareAlike 3.0 Austria ([$2 legal code])', |
| 226 | + 'mwe-upwiz-license-cc-by-sa-3.0-de' => 'Creative Commons Attribution ShareAlike 3.0 Germany ([$2 legal code])', |
| 227 | + 'mwe-upwiz-license-cc-by-sa-3.0-ee' => 'Creative Commons Attribution ShareAlike 3.0 Estonia ([$2 legal code])', |
| 228 | + 'mwe-upwiz-license-cc-by-sa-3.0-es' => 'Creative Commons Attribution ShareAlike 3.0 Spain ([$2 legal code])', |
| 229 | + 'mwe-upwiz-license-cc-by-sa-3.0-hr' => 'Creative Commons Attribution ShareAlike 3.0 Croatia ([$2 legal code])', |
| 230 | + 'mwe-upwiz-license-cc-by-sa-3.0-lu' => 'Creative Commons Attribution ShareAlike 3.0 Luxembourg ([$2 legal code])', |
| 231 | + 'mwe-upwiz-license-cc-by-sa-3.0-nl' => 'Creative Commons Attribution ShareAlike 3.0 Netherlands ([$2 legal code])', |
| 232 | + 'mwe-upwiz-license-cc-by-sa-3.0-no' => 'Creative Commons Attribution ShareAlike 3.0 Norway ([$2 legal code])', |
| 233 | + 'mwe-upwiz-license-cc-by-sa-3.0-pl' => 'Creative Commons Attribution ShareAlike 3.0 Poland ([$2 legal code])', |
| 234 | + 'mwe-upwiz-license-cc-by-sa-3.0-ro' => 'Creative Commons Attribution ShareAlike 3.0 Romania ([$2 legal code])', |
| 235 | + 'mwe-upwiz-license-cc-by-3.0' => 'Creative Commons Attribution 3.0 ([$2 legal code])', |
| 236 | + 'mwe-upwiz-license-cc-by-sa-2.5' => 'Creative Commons Attribution ShareAlike 2.5 ([$2 legal code])', |
| 237 | + 'mwe-upwiz-license-cc-by-2.5' => 'Creative Commons Attribution 2.5 ([$2 legal code])', |
| 238 | + 'mwe-upwiz-license-cc-by-sa-2.0' => 'Creative Commons Attribution ShareAlike 2.0 ([$2 legal code])', |
| 239 | + 'mwe-upwiz-license-cc-by-2.0' => 'Creative Commons Attribution 2.0 ([$2 legal code])', |
| 240 | + 'mwe-upwiz-license-cc-zero' => 'Creative Commons CC0 Waiver (release all rights, like public domain: [$2 legal code])', |
| 241 | + 'mwe-upwiz-license-custom' => 'The license is described by the following wikitext (must contain a valid [$2 copyright tag]):', |
242 | 242 | 'mwe-upwiz-license-fal' => 'Free Art License', |
243 | 243 | 'mwe-upwiz-license-own-pd' => 'All rights waived with Creative Commons Zero license (like public domain)', |
244 | 244 | 'mwe-upwiz-license-pd-old-100' => 'Author died more than 100 years ago', |
— | — | @@ -453,6 +453,7 @@ |
454 | 454 | 'mwe-upwiz-show-thumb-tip' => 'The tooltip for the mwe-upwiz-show-thumb link', |
455 | 455 | 'mwe-upwiz-upload' => '{{Identical|Upload}}', |
456 | 456 | 'mwe-upwiz-source-thirdparty-accept' => '{{Identical|OK}}', |
| 457 | + 'mwe-upwiz-source-ownwork-assert-note' => '{{doc-important|In this message, $1 is the name of the license, and $2 is the number of uploads for pluralization.}}', |
457 | 458 | 'mwe-upwiz-more-options' => "Text for a 'more options' toggle that opens more of a form so a user can make more detailed descriptions/add more properties for uploaded images.", |
458 | 459 | 'mwe-upwiz-fewer-options' => '[[File:Commons-uw-L52P.png|right|thumb|Screenshot showing a sample of this message]]', |
459 | 460 | 'mwe-upwiz-desc' => '[[File:Commons-uw-L52P.png|right|thumb|Screenshot showing a sample of this message]] |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js |
— | — | @@ -121,6 +121,12 @@ |
122 | 122 | _this.$form = $j( '<form />' ); |
123 | 123 | |
124 | 124 | _this.$authorInput2 = $j( '<input type="text" />' ).attr( { name: "author2" } ).addClass( 'mwe-upwiz-sign' ); |
| 125 | + |
| 126 | + var defaultLicense = mw.UploadWizard.config.licensesOwnWork.defaults[0]; |
| 127 | + var defaultLicenseURL = mw.isDefined ( mw.UploadWizard.config.licenses[defaultLicense].url ) ? |
| 128 | + mw.UploadWizard.config.licenses[defaultLicense].url : |
| 129 | + '#missing license URL'; |
| 130 | + var defaultLicenseLink = $j( '<a>' ).attr( { 'target': '_blank', 'href': defaultLicenseURL } ); |
125 | 131 | var $standardDiv = $j( '<div />' ).append( |
126 | 132 | $j( '<label for="author2" generated="true" class="mwe-validator-error" style="display:block;" />' ), |
127 | 133 | $j( '<p></p>' ).msg( 'mwe-upwiz-source-ownwork-assert', |
— | — | @@ -128,7 +134,8 @@ |
129 | 135 | _this.$authorInput2 ), |
130 | 136 | $j( '<p class="mwe-small-print"></p>' ).msg( |
131 | 137 | 'mwe-upwiz-source-ownwork-assert-note', |
132 | | - gM( 'mwe-upwiz-license-' + mw.UploadWizard.config.licensesOwnWork.defaults[0] ) |
| 138 | + gM( 'mwe-upwiz-license-' + defaultLicense, uploadCount, defaultLicenseLink ), |
| 139 | + uploadCount |
133 | 140 | ) |
134 | 141 | ); |
135 | 142 | |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js |
— | — | @@ -215,6 +215,11 @@ |
216 | 216 | */ |
217 | 217 | createInputElementLabel: function( license, $input ) { |
218 | 218 | var messageKey = mw.isDefined( license.props['msg'] ) ? license.props.msg : '[missing msg for ' + license.name + ']'; |
| 219 | + |
| 220 | + // The URL is optional, but if the message includes it as $2, we surface the fact |
| 221 | + // that it's misisng. |
| 222 | + var licenseURL = mw.isDefined( license.props['url'] ) ? license.props.url : '#missing license URL'; |
| 223 | + var licenseLink = $j( '<a>' ).attr( { 'target': '_blank', 'href': licenseURL } ); |
219 | 224 | var $icons = $j( '<span></span>' ); |
220 | 225 | if ( mw.isDefined( license.props['icons'] ) ) { |
221 | 226 | $j.each( license.props.icons, function( i, icon ) { |
— | — | @@ -223,7 +228,7 @@ |
224 | 229 | } |
225 | 230 | return $j( '<label />' ) |
226 | 231 | .attr( { 'for': $input.attr('id') } ) |
227 | | - .msg( messageKey, this.count ) |
| 232 | + .msg( messageKey, this.count, licenseLink ) |
228 | 233 | .append( $icons ); |
229 | 234 | }, |
230 | 235 | |