User talk:Lautgesetz/common.js

From Wikisource
Jump to navigation Jump to search

Common.js not working for new files[edit]

Hi @Lautgesetz:, I would like to reach you from here as the /common.js for displaying palmleaf interface is not working when we added new files from jpg or pdf format. You can see the problem here and here. I am not sure where is the problem as we already try to create the files as same as the original matched Index:Bali-lontar- per request on this program. Please help us when or where the error is coming and what to fixed? Thanks in advance.Joseagush (talk) 10:53, 27 December 2020 (UTC)[reply]

Hi, it's great to see that people are uploading new lontar images! It's good to clarify this. The issue was that it expected all of them to come from the Internet Archive, with certain data in the description on Commons, but I've fixed that now. But it still expects: (1) the filename to begin with "Bali-lontar-", (2) the file to be uploaded to Commons (not Wikisource site directly), (3) the filename to end with ".pdf". I can easily update it to support .jpg and .png too if that would be useful. There needs to be some way to detect if something is lontar and not a different kind of file, so I've left the filename requirement for now, but it would probably be fine to change it to a category requirement instead. --Lautgesetz (talk) 19:04, 27 December 2020 (UTC)[reply]
Hi @Lautgesetz:, Yes, Thanks, its work! We already started WikiProject Balinese WikiLontar to added at least 500 image of balinese palmleafs to Wikisource, Wikidata and Commons. Here is our image catalogs. The issue here is to make all files (pdf and jpg) to added with "Bali-lontar-". Joseagush (talk) 00:52, 28 December 2020 (UTC)[reply]
Some additional remarks:
  1. (1) The filename to begin with "Bali-lontar-", I assume this prefiks added because your needs to be some way to detect if something is lontar and not a different kind of file, isn't it? The problem here is the Index can not create sort of table of contents. Can you solved this or what must we do for the future?
  2. (2) the file to be uploaded to Commons, already did.
  3. (3) the filename to end with ".pdf" If you can do this ["I can easily update it to support .jpg and .png too if that would be useful."] It will be amazing! Thanks. Joseagush (talk) 01:33, 28 December 2020 (UTC)[reply]
@Joseagush: OK, I've added support now in my common.js script for .pdf, .png, and .jpg.
Yes, there needs to be some way to detect whether something is lontar or not. We can probably do this with categories instead of the file name, but I need to be sure it will work. The lontar on Commons from the Internet Archive all belong to the category Balinese lontar, but that's not the immediate parent category so it's not easy to detect from common.js. Instead of using the category of the Commons file, it might be easier to use the category of the Index namespace page on Wikisource.
By the way, we should probably be consistent about the main categories (Balinese work, Balinese lontar work, etc). I don't know what category structure should be used and am happy to leave it up to you and others in Bali. It should just be clear and consistent and we should use the same category when possible. We can still have as many subcategories as we need.
For tables of contents, you need to create a main namespace page and use transclusion. The main namespace page is also where I've put the lontar descriptions from Palmleaf.org. Here is an example. The main namespace pages for items originating from Palmleaf.org are currently auto-generated but can be freely modified in the future once we transition from Palmleaf.org to Wikisource.
Regarding the transition from Palmleaf.org to Wikisource: I've written a script that imports all of the lontar transcriptions from Palmleaf.org to Wikisource. For the lontar that started on Palmleaf.org, we'll need to determine a day on which we're going to officially transition to Wikisource. Before that day, new transcription has to be done on Palmleaf.org -- whatever is on Wikisource will automatically be updated to match, so if someone tries to update it their work will be overwritten. After we do the transition, I'll put up a notice on Palmleaf.org and lock it so that further edits are not allowed. (For the new lontar from Wikicite this doesn't matter because they don't exist on Palmleaf.org and the import process doesn't affect them.)
--Lautgesetz (talk) 06:59, 28 December 2020 (UTC)[reply]