Template talk:Image generation

This is the talk page for discussing improvements to Template:Image generation.

Suggestion to add Scratch editor

edit

There is alot of software and websites you can use to create vector graphics. One that has not been added to the list here but I suggest adding would be Scratch.

While Scratch is commonly regarded as a programming language, you can also draw vector graphics in the costume editor there, which is what I use it for. Examples like this stickman that I drew   were drawn entirely in Scratch's costume editor.

If not possible let me know. This is really just a suggestion, though I think we should add it as it can be used to draw vectors. AuroraANovaUma (talk) 00:50, 6 May 2024 (UTC)Reply

One letter codes for subcategories "s"

edit

I couldn't find the one letter codes for the parameter "s". --Furfur Diskussion 15:18, 19 May 2024 (UTC)Reply

@Furfur: I found them on this page. —VulpesVulpes42 (talk) 11:31, 16 August 2024 (UTC)Reply
Hello VulpesVulpes42, thank you very much for the notification. I will have a look at it. I must say that I find the documentation of this template annoying and unnecessarily complicated. I feel little motivation to use it. --Furfur Diskussion 17:46, 16 August 2024 (UTC)Reply

Documentation broken

edit

Template:Image_generation/doc isn't displayed anymore. There is some issue with {{Ifsandbox}}. Enhancing999 (talk) 09:41, 10 June 2024 (UTC)Reply

@Enhancing999: That was fixed somehow, right? --Chealer (talk) 10:52, 8 October 2024 (UTC)Reply

Lua Errors

edit

I am perpetually confused by this template, as I find one letter codes quite non-intuitive. Lately I was trying to resolve some Lua errors, and files in Category:Valid SVG created with Inkscape:Drapeaux created by User:Sémhur seem to have Lua errors created by {{Igen|I|+|gf|%|sub:=Drapeaux created by User:Sémhur|s=fd}}}} template. Any ideas how to fix it? @Sémhur: . --Jarekt (talk) 04:20, 21 June 2024 (UTC)Reply

This template (or files such as this) seems to call incorrectly Template:Graphic Lab. For the now resolved LUA errors, see Module_talk:Resolve_category_redirect#Lua_errors. Enhancing999 (talk) 11:10, 21 June 2024 (UTC)Reply

Style broken in some cases since September 2024

edit

For some reason, this template includes |style=<nowiki/> in its source code (currently line 29). Apparently this now causes some files to have broken styles – as reported at Template talk:Created with#style broken, File:Blason-gueules-rencontre-cerf-or.svg and File:Meuble-héraldique-Coquille-1.svg now have no border around the “SVG development” block describing that the files were created with text editors. Changing the line in question to |style= seems to restore the border, but before removing the <nowiki/> I’d like to understand why it’s there… does anyone know? Sarang, who had added it in Special:Diff/153440229, sadly passed away last year, so I guess I’m just hoping that someone else can make sense of it… Lucas Werkmeister (talk) 19:59, 25 September 2024 (UTC)Reply

@Lucas Werkmeister:
It's odd: when using string '**/tool~T' (example file) there's no problem unlike on Blason-gueules-rencontre-cerf-or.svg (which uses string '**/161104/658/S' - or simply K2/S) or Meuble-héraldique-Coquille-1.svg which uses string '**/tool~T/S'…
--Kontributor 2K (talk) 09:01, 26 September 2024 (UTC)Reply
Nice catch @Lucas Werkmeister and @Kontributor 2K! This parameter is passed to Template:SimplSVG… which is of course another one of sarang's brainf*cking templates, but I believe I managed to clear up its documentation of that parameter. Basically, it seems that self-closing nowiki tags prevent SimplSVG from returning to line (via CSS clear). I am therefore guessing that it has value in this case, but I can't say why it would misfunction in certain cases and how to avoid that. --Chealer (talk) 04:23, 1 October 2024 (UTC)Reply
It looks like that the issue occurs with parameter '/S' - alias 'Category:SVG simplified Coats of Arms●Zero' + 'Please do not replace…'
(Other example files in that category) --Kontributor 2K (talk) 10:30, 1 October 2024 (UTC)Reply
@Chealer: I don’t think that’s the only purpose of the tag here… it looks like {{SimplSVG}} just shows a completely different first box with any |style= vs. when called without any |style=? This seems to happen because it defaults the style to none, which is a special case in {{Valid SVG}} (the template documentation there calls it the less salient smaller layout which floats). Lucas Werkmeister (talk) 12:29, 1 October 2024 (UTC)Reply
@Kontributor 2K, @Chealer: Another alternative to consider might be |style=/**/. As far as I can see, this also fixes File:Blason-gueules-rencontre-cerf-or.svg; as can be seen from Special:Permalink/931683168, its behavior is subtly different from both |style= and |style=<nowiki/>. I don’t know if the “missing vertical space / line break” after |style=<nowiki/> is an intended or unintended effect, but if it is intended, then |style=/**/ would appear to preserve it, unlike |style=. Lucas Werkmeister (talk) 16:54, 2 October 2024 (UTC)Reply
@Lucas Werkmeister: A similar line-break issue has been occurring for some time now, with Attribs (or withOwn…) - example here
Since then, we use a <br>… --Kontributor 2K (talk) 09:13, 3 October 2024 (UTC)Reply
@Kontributor 2K: {{Attribs}} generally sets float:left, which comes from {{Created with/layout}} (no matter how crazy that sounds). Created with/layout changed in July and August in a way which might have affected that, but the previous version is so hard to read that I can't tell. It looks like floating may have been extra conditional before. Would that timeline match the change you describe? Chealer (talk) 8 October 2024
@Chealer: Yes, that timeline, which is close to Darkmode-deployment (I think) matchs that change - exact date of that change is July 6th 2024, if this can help.
{{SimplSVG}} seems to be impacted too: I left it on this file for an example. Kontributor 2K (talk) 10:52 8 October 2024
Thank you @Lucas Werkmeister
I've looked into this way more than I should and although I clarified {{Valid SVG}}'s documentation a bit, I don't have a definitive conclusion. Your testcases show that {{Valid SVG}} can misbehave with |style=<nowiki/>, but it of course doesn't document such invocations, and it is unclear whether that is a parser bug or a bug in {{Valid SVG}}'s implementation, nor if {{Image generation}} is right to make such a call.
What I can say is that the <div style="/* invalid control char */"> generated comes from MediaWiki's sanitization. As RegExr shows, the characters that trigger that rejection are not in <nowiki/>. The check looks for control characters, which means <nowiki/> is parsed into at least one of these characters. This check is far from new, dating back to this 2010 change from Tim Starling. Either there was a MediaWiki change which now causes {{Image generation}}'s hack to be rejected, or there was some change in this maze which changed the behavior. Chealer (talk) 16:02, 28 October 2024 (UTC)Reply
Return to "Image generation" page.
  NODES
Idea 1
idea 1
Project 1