commonist icon indicating copy to clipboard operation
commonist copied to clipboard

Custom description detection not working

Open tbertels opened this issue 7 years ago • 9 comments
trafficstars

As can be seen in commonist/src/main/resources/image_wikimedia_commons.bpp, the code exists to allow custom description but is commented out.

I suggest enabling it if there's no problem.

tbertels avatar Aug 25 '18 11:08 tbertels

not sure what you mean - i don't see anything commented out there except in line 2 and 3?

ritschwumm avatar Aug 25 '18 12:08 ritschwumm

Indeed, I confused # with the comments marker.

So then I don't understand why "{{Information" wasn't detected here: https://commons.wikimedia.org/w/index.php?title=File:10_-Langhemarcq-_Langemark.jpg&action=edit&oldid=316403155

tbertels avatar Aug 25 '18 12:08 tbertels

It only checks upload.description, so if a custom description is used in common.description, it's not taken into account.

tbertels avatar Aug 25 '18 13:08 tbertels

it might not be detected because if (!upload.description.startsWith("{{Information")) { relies on the description to start with the template, whereas on that page there's an == {{int:filedesc}} == before that.

ritschwumm avatar Aug 25 '18 14:08 ritschwumm

or is the information template in the common.description in your case? btw, you do know you can replace the image_wikimedia_commons.bpp template locally to play with alternative versions, without modifying the packaged application?

ritschwumm avatar Aug 25 '18 14:08 ritschwumm

That page was created by Commonist, with == {{int:filedesc}} == being https://github.com/ritschwumm/commonist/blob/master/src/main/resources/image_wikimedia_commons.bpp#L5 Indeed, the custom description was in common.description.

I tried to, but couldn't find the folder on Windows. A drawback of webstart is that the folder isn't in \Program files\.

tbertels avatar Aug 25 '18 14:08 tbertels

But now that I think about it, I wonder if "Custom description" checkboxes shouldn't be added to disable the other fields. Currently, this custom description feature is a hidden feature.

tbertels avatar Aug 25 '18 14:08 tbertels

the custom resources directory is in a directory named .commonist inside whatever directory the java system property user.home says. if you start the commonist manually (either from the capsule jar or from the start-script) it will log a line INFO("settings directory", settingsDir) with the full directory name into your console.

ritschwumm avatar Aug 25 '18 14:08 ritschwumm

I completely forgot to check on the website. You may want to mention it in the README file and in the repository description by the way.

tbertels avatar Aug 25 '18 14:08 tbertels