MediaWiki talk:Gadget-RotateLink.js/Archive 1

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Archive 1 Archive 2 →

{rotate|0}

If if 0 is an option on the GUI, it probably shouldn't be possible to add this to the file description page (sample: File:2010 07 13140 5932 Chenggong Taiwan.JPG). --  Docu  at 18:32, 20 October 2011 (UTC)

Rotatebot is able to rotate according to Exif so it is a perfectly valid option. I don't think removal will result in fewer mistakes by users. Kind regards -- RE rillke questions? 18:38, 20 October 2011 (UTC)
0° is an accepted option by Rotatebot if there is a EXIF rotation. It was requested here. We added the icons to the buttons to reduce wrong taggings. Cheers --Saibo (Δ) 00:19, 21 October 2011 (UTC)
Is there a sample image where it did something? --  Docu  at 05:34, 21 October 2011 (UTC)
Sure - Luxo mentioned two on your talk page: [1] [2] Cheers --Saibo (Δ) 00:27, 22 October 2011 (UTC)
My question was meant to be: "Are there samples where rotatebot performed some changes based on {{rotate|0}}?". --  Docu  at 05:28, 22 October 2011 (UTC)
Ooops, sorry, I misread "it" as "I". All files which were correctly rotated by 0°: File:Catedral_de_Santa_María_-_Burgos.jpg#filehistory File:Azotea_-_Círculo_de_Bellas_Artes_-_Madrid.jpg#filehistory. (Those files were uploaded and tagged by the user who requested that Rotatebot also does 0° rotation). --Saibo (Δ) 14:48, 22 October 2011 (UTC)
Ok, I see. It could be used to rotate images that no longer need rotating for MediaWiki, but might need that elsewhere ? --  Docu  at 16:25, 22 October 2011 (UTC)
Yes, if you would need to embed the original image somewhere - or if you want (for whatever special reason) the original view (click on the preview image on the file page) to be correct before bugzilla:31366 is fixed. There are not much usecases for 0° rotation - this is why it is not shown as a suggested option in the pop-up (only 90,180,270 are shown). Cheers --Saibo (Δ) 16:43, 22 October 2011 (UTC)
It's still the default choice as the custom rotation field is pre-filled with that. Maybe instead of displaying "0", it should just be empty and display an error message if someone selects that. --  Docu  at 09:24, 23 October 2011 (UTC)
Ah! I didn't notice. What about prefilling it with "123" (if no old value from the cookie is there)?
Well, error message is possible: the question is: do we want it? ;) 0° could make sense in some cases. A informative "error message" is already inside the the rotate template if 0 is used. --Saibo (Δ) 15:51, 23 October 2011 (UTC)
Changed the standard value of the text box. --Saibo (Δ) 15:50, 26 October 2011 (UTC)

Just a note: rotate|0 mis-taggings can occur if the tagging user saw some old (server-cached) version of a image with was rotated due to XMP or IFD1 Orientation tags (which was like this the first days after 1.18). Example. I guess the user did choose correctly 0° because it was displayed correctly in the pop-up with 0° but he initially thought it needs to be rotated since he saw old thumbs (which were wrong). --Saibo (Δ) 14:48, 22 October 2011 (UTC)

Maybe adding a purge-link and a purge-"how-to" (client & server) somewhere? -- RE rillke questions? 10:36, 23 October 2011 (UTC)
There is a purge link in the rotate|0 template. But a additional purge link in the pop-up if 0° is selected would be useful (text like in the rotate template), too. How-To is not needed. --Saibo (Δ) 15:51, 23 October 2011 (UTC)


Feature proposal/request: If someone selects 0° via the text box a additional text above the current "note" text should be shown:

"If this thumbnail here on the right sideis in the correct orientation now but some other thumbnails are not correct (e.g. in articles) please just purge this image (maybe refresh your browser cache) and cancel this rotate request.

Well... gets a bit complicated... ;) Maybe it is worth it. --Saibo (Δ) 14:00, 28 October 2011 (UTC)

And making 0° an extra-option? -- RE rillke questions? 09:51, 30 October 2011 (UTC)
No, not as an explicit option. Too many people would choose it. ;) Text box is enough - if someone needs to tag many pics with 0° the cookie function helps - just two clicks per image after once putting 0 in the text box. Cheers --Saibo (Δ) 14:13, 30 October 2011 (UTC)

File:Palermo - Palazzo Marchesi - Finestra Torre.jpg

Please enable the "Request rotation" label for "Palazzo Marchesi". I have already uploaded a new corrected version of the pic. --Memorato (talk) 08:53, 22 October 2011 (UTC)

Did you mean disable? That's currently impossible. You can disable the link for all pages. See Help:RotateLink for a how-to.
BTW, on talk-pages, it is considered a good practise to add new topics to the bottom (simply click on the "Add topic"-tab, which is next to the "Edit"-tab). Thanks. -- RE rillke questions? 11:14, 22 October 2011 (UTC)
@Rillke: I stumbled over another user who apparently (I am waiting for his second, confirming reply on talk page) think the "request rotation" is some kind of "problem tag". Probably therefore want to say with 0° that the image does not need to have a rotation .... in order to remove the problem tag..  :-O Cheers --Saibo (Δ) 14:54, 22 October 2011 (UTC)
Do they have common language settings? (In order to find better wording for this language) -- RE rillke questions? 17:52, 22 October 2011 (UTC)
It was this user. Habe nach der Sprache gefragt. --Saibo (Δ) 04:22, 23 October 2011 (UTC)

I discussed this here. Might be a problem that the link is similar to the png links on svg pages... Cheers --Saibo (Δ) 04:22, 23 October 2011 (UTC)

Suggestion by User:Phorgo to add a short, explaining intro sentence in the pop-up. Something like: "You can use this function to correct images which display in the wrong orientation (like it frequently occurs with upright digital photos)". --Saibo (Δ) 17:25, 23 October 2011 (UTC)
Cannot be simply added to the "intro" parameter as the window gets a vertical scrollbar then. --Saibo (Δ) 19:01, 23 October 2011 (UTC)

Another user: "ich dachte, das wäre nur eine Darstellungsoption für meinen Bildschirm" (→"I thought this is just a display option for my screen"). Okay, I think we need to get this more clear ... --Saibo (Δ) 22:37, 23 October 2011 (UTC)

Why not implementing this, too? "Rotate this image on screen only" (should be shorter wording)? Picking the full-size image and rotate it (since we have that nice jQuery Plugin here). Shouldn't be difficult.
We can also add a tooltip to the link. But I fear they are often not read. Tell me your thoughts. Sincerely -- RE rillke questions? 09:52, 24 October 2011 (UTC)
A rotation option just for display? Hmm... too much confusing clutter, I guess. And not really needed, is it? Hmm... okay - maybe link the small preview to a bigger rotated version (possible to open this in a new window)? This would be intuitive.
Tooltip to the "request rotation"? Sure - why not. Maybe some people will read it. Can we add it and get it i18ned later? Cheers --Saibo (Δ) 13:58, 25 October 2011 (UTC)
On MediaWiki:Gadget-RotateLink.js, just replace
$('<a>', { href: '#', style: 'white-space:nowrap; display:inline-block;' })
with
$('<a>', { href: '#', style: 'white-space:nowrap; display:inline-block;', title: 'Request a rotation if the thumbs or full-size version display wrongly orientated. Please try to purge the server\'s and client\'s cache before.' })
I am sure you find better words.
Concerning the intro parameter, you could increase the size to prevent scroll-bars: It is at MediaWiki:RotateRequest.js height: 300,. No problem. -- RE rillke questions? 16:44, 25 October 2011 (UTC)
Thanks! I have put something in now. If it is useful it should also get such an i18n object - but I am not sure if it is worth the effort.
Re. the scrollbars can the window get a dynamic height? The fixed height is always not useful - if enough text is added or if the user's font size is big enough. Out now for today. Cheers --Saibo (Δ) 18:22, 25 October 2011 (UTC)
Thank you for this excellent idea. I suggest the following code to be copied to MediaWiki:RotateRequest.js. Thank you. -- RE rillke questions? 07:13, 26 October 2011 (UTC)
Please tell me about such TODOs: "Saibo, put your text here"  ;-) Anyway: found it. :)
mw.html.escape doesn convert a \n to <br /> (at least not in my test in JS console). I used <br /> now.
Can the br be replaced by p tags? Would be more correct, wouldn't it? mw.html.escape(this.i18n.intro) + '<br/>''<p>' + (mw.html.escape(this.i18n.intro)).replace(/\n/g,'<p /><p>') + '</p>'
I would like to have <p>Mit dieser Funktion können falsch gedrehte Bilder (wie es häufig bei Digitalfotos im Hochformat vorkommt) korrigiert werden.</p> <p>Im Uhrzeigersinn:</p> Cheers --Saibo (Δ) 14:00, 26 October 2011 (UTC)
Quite a good feeling. Rillke took care for security ;-) HTML is escaped where possible. But you can remove it mw.html.escape(this.i18n.intro)this.i18n.intro, when preventing proper display. Another option would be adding a new i18n-variable:
mw.html.escape(this.i18n.intro)mw.html.escape(this.i18n.intro) + '<br/>' + mw.html.escape(this.i18n.clockwise) (rename current i18n.intro to clockwise)
And let's drop the rillke from the heading. -- RE rillke questions? 14:08, 26 October 2011 (UTC)

The best way would be mw.html.escape(this.i18n.intro)... <p>' + mw.html.escape(this.i18n.intro) + '</p><p>' + mw.html.escape(this.i18n.clockwise) + '</p>... (rename current i18n.intro to clockwise). This would be both, good HTML and logical correct. -- RE rillke questions? 14:14, 26 October 2011 (UTC)

I have not included the second p since it produces too much space between "clockwise" and the radios. --Saibo (Δ) 15:21, 26 October 2011 (UTC)
We could label the link "fix orientation (rotate)" --  Docu  at 21:10, 25 October 2011 (UTC)
It is a bit longer than the current text..hmm. What do you think now (with the new intro text)? Cheers --Saibo (Δ) 14:00, 26 October 2011 (UTC)
It's a bit longish, maybe the current one is better indeed.
The tooltip is even more text on the file description page. Personally, I rarely read these.
Maybe you could display it once people clicked on the link. There they can still select "cancel". --  Docu  at 09:37, 30 October 2011 (UTC)
To make sure that we talk about the same: please clear your cache. The popup has a explaining intro text now. Do you want to have it in a different way? The current tooltip text was just a try/test. It is also not i18ned. Cheers --Saibo (Δ) 14:12, 30 October 2011 (UTC)

i18ns to pull in

(note to myself mostly)

According to the stats which are available (Commons:Database reports/User preferences, User:Multichill/Browser_language_statistics and Commons:Template_i18n/Interface_language_statistics) the next most useful languages are it, ru, ja. --Saibo (Δ) 03:46, 2 November 2011 (UTC)

Bugs

  • English fix: "(like it frequently occurs with upright digital photos)." -> "(as frequently occurs with vertical orientation digital photos)".
  • Display issue: "Report bugs and ideas" - on my screen at least the s in "ideas" is covered up by the X at the top right which closes the dialog.
  • Clarity: "Note: If you request a rotation by 90, 180 or 270° Rotatebot will do this in a few hours." That leaves unanswered the question of what happens with free-form rotation. (Since I don't know, I can't immediately suggest a change to the text.)

Thanks for a great tool! Rd232 (talk) 16:53, 7 November 2011 (UTC)

Thanks for the fixes.
  • English fix: ✓ Done
  • The "Display issue" should be resolved by jQuery or we should use a shorter title.
  • ✓ Done. This has to be done by hand and it is not predictable how long this will take. -- RE rillke questions? 17:43, 7 November 2011 (UTC)
re "shorter title" - Looking at the title, I'd drop the word "About", because the rotation will be exactly as many degrees as is asked for (won't it?) so it doesn't really make sense. That solves the problem. But actually I'd suggest also moving the "report bugs and ideas" out of the title and putting it below the image on the right. There seems to be space for it there, and it probably makes more sense in terms of prominence. Rd232 (talk) 18:41, 7 November 2011 (UTC)

Suggestion for improvement

Clicking on rotate opens the popup to select the rotation angle based on the thumbnail shown. But it usually takes a while to show both the thumbnail and the note to request orientation changes purely based on the thumbnail. I suggest to immediately show the note as users may select an angle based on what they see on the main image page without the visial confirmation by the thumb shown. BTW what about adding another checkbox for resetexif ? --Denniss (talk) 23:12, 12 December 2011 (UTC)

Agree with the instruction text thingy.
The fact that resetexif is not included is more or less intentional. Users could think that this is the "repairs everything" option if they do not really understand the technical facts. So it is more safe to let them select the correct orientation instead. I am nearly sure it would be not too much work to include it. Maybe a new customization variable could switch it on for expierienced users? Would be handy for the correction of the error which occurs with duplicate EXIF IFD0:Orientation tags. Or to tag many similar uploads from a user. I did tag all uploads from our wine expert with the broken Apple software using Quickdelete (just forgot to set AjaxDeleteWatchFile properly so I had to remove all the files from my watchlist again). Cheers --Saibo (Δ) 23:27, 12 December 2011 (UTC)
Would anybody care to implement the notice regarding the thumb notice? This morning I had to revert multiple rotations obviously ordered without waiting for the preview thumb. --Denniss (talk) 08:28, 25 December 2011 (UTC)
✓ Done -- RE rillke questions? 12:49, 31 December 2011 (UTC)

Wrong time calculation

The edit dialogue contains a sentence: "Note: Rotatebot can execute this request in approximately 1 day, ... hours." The calculation is not adjusted to the current faster work regime of Rotatebot. --ŠJů (talk) 05:43, 31 December 2011 (UTC)

Hmm, for me it displays currently 0:18 hours. Which browser do you use? Or can you please try in another browser, too? --Saibo (Δ) 11:29, 31 December 2011 (UTC)
I assume it is a caching issue. I will build-in a request for the server to limit the max-caching time response-header. -- RE rillke questions? 11:36, 31 December 2011 (UTC)
No, I was wrong. It was the server. The English - &action=render - version was outdated. Don't know how to properly deal with such issues from the client side. I fear, I can’t. In certain intervals it forces a purge now. -- RE rillke questions? 12:48, 31 December 2011 (UTC)
Strange - I used action=render with refresh times of one minute (two weeks ago) and didn't notice a lag. --Saibo (Δ) 14:24, 31 December 2011 (UTC)

Rotation icon requires attribution

Unless I'm mistaken, require attribution usually done by way of a link. —Dispenser (talk) 01:05, 10 January 2012 (UTC)

Even if (it still is a circle arrow...), click on the (?) in the pop up and there you find the attribution: Help:RotateLink#Attribution. A attribution via a direct link to the file page is not possible in the use case here. That would be far to confusing. So either this attribution (as it is usually done at software) is okay for you/us or we need to use another icon. Cheers --Saibo (Δ) 01:39, 10 January 2012 (UTC)
I was just curious, but the (?) icon looks too much like an application icon (from my 20 years of Windows experience...). Dispenser (talk) 04:29, 11 January 2012 (UTC)
Why should the rotation gadget have a "?" as icon?  ;-) Do you have a better porposal how to add attribution? Or do you really think it is necessary for this small size? Cheers --Saibo (Δ) 05:02, 11 January 2012 (UTC)

Angle accuracy

I just noticed (here) that the interface does not accept angles smaller than one degree. That’s not very wise: Often photos are visibly crooked, with tilted horizons, and yet the error is less than one degree. I changed it mannually from 359 to 359.4, but will it work? And could the interface be fixed to allow this? -- Tuválkin 14:59, 5 June 2012 (UTC)

  1. Rotatebot can only rotate by angles divisible by 90.
  2. It could, but as long as the rotation has to be done manually, this would encourage adding backlogs.
-- RE rillke questions? 15:42, 5 June 2012 (UTC)
(Concerning the bot and orthogonal rotations, of course.) It is not harder or more time consuming to open an image in one’s Photoshop or Gimp and rotate it by an angle that happends to be an entire number, say 30.00º, than by an angle that is an “uneven” number of degrees, say 32.19º. Also, can I join the manual rotators’ task force? -- Tuválkin 16:35, 5 June 2012 (UTC)
There are 2 problems with non-orthogonal rotations:
  1. The quality loss (raster images)
  2. The size loss
Category:Images requiring rotation contains all files that can't be rotated by the bot. But I believe we should have a web-tool for this like User:Cropbot.
It needs some careful code review before adding support for decimal places. And automated conversation from "," to "." is required. -- RE rillke questions? 23:29, 5 June 2012 (UTC)
Those degree numbers for manual rotations are just like a hint - usually the image editor will have a look himself. Also it is not possible to see the correct degree (yes, I agree, usually decimals count when rotating images) based on the small thumbnail. Cheers --Saibo (Δ) 01:48, 12 June 2012 (UTC)

Thumbnail slightly too large

The thumbnail is always (thumb width to fit into a 120x120 box) + 1. Picking uncommon sizes forces users to wait 1-15 seconds while the image scalers render the thumbnail. A 120x120 box is used by the category and gallery views and thus usually cached; otherwise MediaWiki prefers widths in multiples of 10. —Dispenser (talk) 15:34, 26 August 2012 (UTC)

This is intention: A while ago, there were wrong cached thumbs. That's why an option for skipping purge was added: Help:Rotatelink#Switching off and customization.
Now it's the question whether the script should have the option enabled by default.
-- Rillke(q?) 19:18, 26 August 2012 (UTC)
You could check if the Last-Modified HTTP header of the 120px thumb is dated after October 2011, but that's more than a single line of code. —Dispenser (talk) 23:47, 26 August 2012 (UTC)
This sounds interesting but I am failing to access the .getAllResponseHeaders() on failed XHRs (images seem to always fail when using XHR due to the content-type set by the server in JavaScript) and the .load()-event on DOM-nodes does not expose them in the arguments passed in. Where I can get them from? -- Rillke(q?) 06:28, 27 August 2012 (UTC)
upload.wikimedia.org is on a different domain so XHR wont work. If we assume MediaWiki has correctly re-read the EXIF orientation tag then I could compile a list of files with it then check the last modified timestamp. —Dispenser (talk) 07:32, 27 August 2012 (UTC)
Oops. Of course the same origin restriction...
You can't assume that MW has corrected the orientation tag after the update. MediaWiki only updates it's Metadata-Database after purging, I think. There are still some of my files that don't show the IPTC tags, I added. But I think the list Umherirrender made was complete and we corrected all affected images, if I recall correctly. If there is no oppose, I'll simply disable purging by default. -- Rillke(q?) 08:27, 27 August 2012 (UTC)

New translation to sl

{{Edit request}} en:ISO 639-1: 'sl'


Note to the admin fulfilling the request: This code will go to: MediaWiki:Gadget-RotateLink.js

  Besedilo oznake/povezave: zahteva za zasuk

Note to the admin fulfilling the request: This code will go to: MediaWiki:RotateRequest.js

'submitButtonLabel': 'potrdi zahtevo za zasuk',
'cancelButtonLabel': 'prekliči',
'headline': 'Za koliko stopinj je treba zavrteti sliko? ' + 
	'<a %ERRLINK%>Sporočite</a> hrošče in predloge.',
'intro': 'To funkcijo lahko uporabite za popravo slik, ki so prikazane napačno usmerjene (pogosto pri pokončnih digitalnih fotografijah).',
'clockwise': 'V smeri urnega kazalca:',
'noteheader': 'Opomba: ',
	// Hint for translation:
	// The following message is displayed e.g. if you request a rotation of e.g. 3° because Rotatebot can't rotate by this angle. 
	// A volunteer has to do this.
'noteAngle': 'Če boste zahtevali zasuk za %1 ali %2°, bo to v nekaj urah opravil Rotatebot; sicer bo to najverjetneje vzelo več časa.',
	// Hint for translation:
	// The following message is displayed e.g. on djvu or pdf-files because Rotatebot can't rotate them. 
	// A volunteer has to do this.
'noteMime': 'Te vrste datoteke ni mogoče <a %ROTATEBOTLINK%>zasukati samodejno</a>; zasuk je treba opraviti ročno, kar lahko vzame nekaj časa.',
'noteBot': 'To zahtevo lahko Rotatebot izvrši v nekaj urah.',
'imgCaption': 'Z izbiro kota popravite usmerjenost predogledne sličice.'

Note to the admin fulfilling the request: This code will go to: User:Rotatebot/approx max wait time rotatelink

 noteBot: [[User:Rotatebot|Rotatebot]] lahko to zahtevo izvrši v %NUMBER% urah.

Eleassar (t/p) 17:49, 28 September 2012 (UTC)

✓ Done. Thank you. You may have to delete the whole cache to see the changes in effect. Otherwise it may take 30d. -- Rillke(q?) 18:08, 28 September 2012 (UTC)

It's working, thanks a lot. Can you further fix it so that the text "Če boste zahtevali zasuk za 90, 180 ali 270°, bo to v nekaj urah opravil Rotatebot; sicer bo to najverjetneje vzelo več časa." reads instead "Če boste zahtevali zasuk za 90°, 180° ali 270°, ga bo v nekaj urah opravil Rotatebot. Sicer bo to najverjetneje vzelo več časa.". --Eleassar (t/p) 19:37, 28 September 2012 (UTC)

Hi Eleassar, I changed the wording but can't change the way the degrees are displayed or I would have to change it for all translations and it might be inappropriate for some languages. Can you live with that or do you think its worth implementing complex plural/listing rules (in case we might decide offering 0° or other values)? -- Rillke(q?) 22:17, 28 September 2012 (UTC)
I don't know how complex would be the rules. I can live with the current situation, of course, although it's lacking. Thanks for the change. --Eleassar (t/p) 22:25, 28 September 2012 (UTC)