Index: trunk/extensions/UploadWizard/styles/uploadWizard.css |
— | — | @@ -502,5 +502,4 @@ |
503 | 503 | |
504 | 504 | a.mwe-upwiz-tooltip-link { |
505 | 505 | cursor: pointer; |
506 | | - color: red; |
507 | 506 | } |
Index: trunk/extensions/UploadWizard/js/mw.UploadWizard.js |
— | — | @@ -4,7 +4,8 @@ |
5 | 5 | "mwe-upwiz-step-details": "3. Add descriptions", |
6 | 6 | "mwe-upwiz-step-thanks": "4. Use your files", |
7 | 7 | "mwe-upwiz-intro": "Welcome to Wikimedia Commons, a repository of images, sounds, and movies that anyone can freely download and use. Add to humanity's knowledge by uploading files that could be used for an educational purpose.", |
8 | | - |
| 8 | + |
| 9 | + // XXX maybe use mediawiki PLURAL here |
9 | 10 | "mwe-upwiz-add-file-n": "Add another file", |
10 | 11 | "mwe-upwiz-add-file-0": "Click here to add a file for upload", |
11 | 12 | "mwe-upwiz-browse": "Browse...", |
— | — | @@ -15,12 +16,17 @@ |
16 | 17 | "mwe-upwiz-remove-upload": "Remove this file from the list of files to upload", |
17 | 18 | "mwe-upwiz-remove-description": "Remove this description", |
18 | 19 | "mwe-upwiz-upload": "Upload", |
19 | | - "mwe-upwiz-upload-count": "$1 {{PLURAL:$1|file|files}} of $2 {{PLURAL:$2|file|files}} uploaded", |
| 20 | + "mwe-upwiz-upload-count": "$1 {{PLURAL:$1|file|files}} of $2 uploaded", |
20 | 21 | "mwe-upwiz-progressbar-uploading": "uploading", |
21 | | - "mwe-upwiz-remaining": "$1 {{PLURAL:$1|file|files}} remaining", |
| 22 | + "mwe-upwiz-hrs-mins-secs-remaining": "$1 {{PLURAL:$1|hour|hours}}, $2 {{PLURAL:$2|minute|minutes}}, $3 {{PLURAL:$3|second|seconds}} remaining", |
| 23 | + "mwe-upwiz-mins-secs-remaining": "$1 {{PLURAL:$1|minute|minutes}}, $2 {{PLURAL:$2|second|seconds}} remaining", |
| 24 | + "mwe-upwiz-secs-remaining": "$1 {{PLURAL:$1|second|seconds}} remaining", |
| 25 | + // XXX use mediawiki plurals |
22 | 26 | "mwe-upwiz-deeds-intro": "Thank you! Now we need to set a license for these files, so everyone can legally view or modify them. First, we'll have to know where you got them.", |
| 27 | + // XXX use mediawiki plurals |
23 | 28 | "mwe-upwiz-details-intro": "Now we need some basic information about the files.", |
24 | 29 | "mwe-upwiz-source-ownwork": "This file is my own work.", |
| 30 | + // XXX use mediawiki plurals |
25 | 31 | "mwe-upwiz-source-ownwork-plural": "These files are my own work.", |
26 | 32 | "mwe-upwiz-source-ownwork-assert": "I, $1, the copyright holder of this work, hereby grant anyone the right to use this work for any purpose, as long as they credit me and share derivative work under the same terms.", |
27 | 33 | "mwe-upwiz-source-ownwork-assert-plural": "I, $1, the copyright holder of these works, hereby grant anyone the right to use these works for any purpose, as long as they credit me and share derivative work under the same terms.", |
— | — | @@ -29,16 +35,19 @@ |
30 | 36 | "mwe-upwiz-source-ownwork-assert-note": "This means you release your work under a double Creative Commons Attribution ShareAlike and GFDL license.", |
31 | 37 | "mwe-upwiz-source-permission": "Their author gave you explicit permission to upload them", |
32 | 38 | "mwe-upwiz-source-thirdparty": "This file is not my own work.", |
| 39 | + // XXX use mediawiki plurals |
33 | 40 | "mwe-upwiz-source-thirdparty-plural": "These files are not my own work.", |
34 | 41 | "mwe-upwiz-source-thirdparty-intro" : "Please enter the address where you found each file.", |
35 | 42 | "mwe-upwiz-source-thirdparty-custom-plural-intro" : "If all files have the same source, author, and copyright status, you may enter them only once for all of them.", |
36 | 43 | "mwe-upwiz-source-thirdparty-license" : "The copyright holder of this work published it under the following license(s):", |
| 44 | + // XXX use mediawiki plurals |
37 | 45 | "mwe-upwiz-source-thirdparty-license-plural" : "The copyright holder of these works published them under the following license(s):", |
38 | 46 | "mwe-upwiz-source-thirdparty-accept": "OK", |
39 | 47 | "mwe-upwiz-source-custom": "Did you know? You can <a href=\"$1\">customize</a> the default options you see here.", |
40 | 48 | "mwe-upwiz-more-options": "more options...", |
41 | 49 | "mwe-upwiz-fewer-options": "fewer options...", |
42 | 50 | "mwe-upwiz-desc": "Description in", |
| 51 | + // XXX use mediawiki PLURAL |
43 | 52 | "mwe-upwiz-desc-add-n": "add a description in another language", |
44 | 53 | "mwe-upwiz-desc-add-0": "add a description", |
45 | 54 | "mwe-upwiz-title": "Title", |
— | — | @@ -216,9 +225,21 @@ |
217 | 226 | } |
218 | 227 | |
219 | 228 | if ( remainingTime !== null ) { |
220 | | - _this.$selector |
221 | | - .find( '.mwe-upwiz-etr' ) |
222 | | - .html( gM( 'mwe-upwiz-remaining', mw.seconds2npt( parseInt( remainingTime / 1000 ), 10 ) ) ); |
| 229 | + var tm = mw.seconds2tm( parseInt( remainingTime / 1000, 10 ) ); |
| 230 | + var seconds = tm[0]; |
| 231 | + var minutes = tm[1]; |
| 232 | + var hours = tm[2]; |
| 233 | + var timeString; |
| 234 | + if (hours == 0) { |
| 235 | + if (minutes == 0) { |
| 236 | + timeString = gM( 'mwe-upwiz-secs-remaining', seconds ) |
| 237 | + } else { |
| 238 | + timeString = gM( 'mwe-upwiz-mins-secs-remaining', minutes, seconds ) |
| 239 | + } |
| 240 | + } else { |
| 241 | + timeString = gM( 'mwe-upwiz-hrs-mins-secs-remaining', hours, minutes, seconds ); |
| 242 | + } |
| 243 | + _this.$selector.find( '.mwe-upwiz-etr' ).html( timeString ) |
223 | 244 | } |
224 | 245 | }, |
225 | 246 | |