Help talk:Extension:FileImporter

About this board

Central feedback page for FileImporter/FileExporter.

Importing files from the source wiki te.wikipedia.org

4
Wouterhagens (talkcontribs)

I have asked this in the Village pump and there it was suggested to ask it here. I want to added images from the te.wikipedia.org to a Commons category, but got the response: "Unfortunately, importing files from the source wiki (te.wikipedia.org) is not yet possible because there is no configuration for the wiki in the configuration list". Is there anyone who can make this possible? ~~~~

Michael Schönitzer (WMDE) (talkcontribs)

Hi, you can make te.wikipedia.org supported by creating an configuration "file" (a wiki site) here: Extension:FileImporter/List of configured wikis. The easiest is to copy-paste the configuration from an other project and then change the content where necessary. The configuration states how templates are to be replaced and what license-templates are compatible with Commons.

The format of the configuration is described here.

Wouterhagens (talkcontribs)

Thanks for the info. The problem is that I don't know the Telugu language to change the content where necessary in the copy-paste version.

Jeff G. (talkcontribs)
Reply to "Importing files from the source wiki te.wikipedia.org"

The importer do not accept PD-RusEmpire license

3
Summary by Thiemo Kreuz (WMDE)

The license template needs to be listed as a "good" template.

Andriy.v (talkcontribs)

Why the FileImporter do not allow me to import files with PD-RusEmpire license?

Pppery (talkcontribs)
Andriy.v (talkcontribs)

Ok, thank you. I will add this

field source

4
Summary by Thiemo Kreuz (WMDE)
ZioNicco (talkcontribs)

I apologize for the English from automatic translator .. I am transferring various images from it.wiki and I was wondering if there was the possibility of having the extension replace a value contained in one of the templates to be converted directly. Let me explain, in the Information template there is the "source" field one of the most recurring values ​​is "opera propria" which should be automatically converted to {{own}}, but I didn't understand how it can be done. Thanks

Jeff G. (talkcontribs)

On Commons, that would be "{{own}}".

ZioNicco (talkcontribs)

let me explain better should convert "opera propria" to {{own}}, then I saw that a few days a bot passes to fix it but if there was the possibility to change it immediately it is avoided and maybe it is understandable even by those who do not speak Italian

Thiemo Kreuz (WMDE) (talkcontribs)

The short answer is no, FileImporter currently can't convert values in a template. Only template names and parameter names are converted according to the "transfer" rules. However, it is possible to create a conversion template on Commons that is substituted and does the extra conversions you want. phab:T199453 might contain more information.

Reply to "field source"

Should we remove (or add to "Bad" section) all "GFDL-only" like tags?

3
Liuxinyu970226 (talkcontribs)
Jeff G. (talkcontribs)

Yes, we should.

MGA73 (talkcontribs)

Only for new uploads. If the file was uploaded to a local wiki before 2018 I think it is still acceptable on Commons.

Reply to "Should we remove (or add to "Bad" section) all "GFDL-only" like tags?"

How to fix licenses in a self template?

5
Summary by Thiemo Kreuz (WMDE)
MGA73 (talkcontribs)

Hi! It is easy to translate a template from local name to Commons name by adding it in the configuration page under translate. For example on sr.wikipedia it is simply to add this code to translate глсд to GFDL:

;глсд:GFDL

But if it is {{self|глсд|Cc-by-sa-3.0}} then FileImporter does not translate глсд to GFDL. Can that be done?

MGA73 (talkcontribs)
MGA73 (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)

FileImporter is able to translate template names, as well as the names of template parameters, but not the content of a parameter. The word "глсд" in your example is content and can't be automatically translated with this tool.

However, it might be possible to add this as a feature. I created phab:T267756 to keep track of this idea.

MGA73 (talkcontribs)

Thank you. Self template is a very used template so it would be great!

Reply to "How to fix licenses in a self template?"
Summary by Daehan

Button is only shown to users in the "autoconfirmed" group of local wiki.

Daehan (talkcontribs)

Hello,

I don't have the new tab to export a local file to Commons.

For example, I want to move [https://ko.wikipedia.org/wiki/%ED%8C%8C%EC%9D%BC:Mujujeja1.jpg this file] from wp:ko to Commons, but have no "Export to Wikimedia Commons" tab. It doesn't work either in any other language.

The documentation says "FileExporter is now a default feature on all wikis." so I guess I should not activate anything in my preferences, but can you see what could I do?

Thanks.

Daehan (talkcontribs)

(meanwhile, another user moved the file on my request, but I need the feature :) )

Thiemo Kreuz (WMDE) (talkcontribs)

It looks like you don't have any edits on this wiki. The export button is only shown to users in the "autoconfirmed" group, which typically means 10 edits must have been made, and the user must have been active for a few days. This is an intentional, very basic safety measure to avoid misuse.

Daehan (talkcontribs)

Hello Thiemo,

OK, I understand, thank you.

Improving error messages

5
Summary by Thiemo Kreuz (WMDE)
MGA73 (talkcontribs)

I get errors when I try to move

  1. vi:Tập_tin:Sơ_đồ_thành_cổ_Tân_Sở.svg : "[3cebc9bf-72cf-4731-8a33-210f65603ea1] 2020-08-21 17:03:10: Fatal exception of type "TypeError""
  2. vi:Tập_tin:Plan_de_Son_Tay.svg : "This file (or an older revision of this file) contains elements that cannot be accepted for security reasons: $1"

The first error message does not say anything of use to me. The second does except the $1.

Is it possible to improve the error messages?

MGA73 (talkcontribs)

Someone was so kind to report the first error on phab:T261006 and the second is not very important to me.

Thiemo Kreuz (WMDE) (talkcontribs)

These are super helpful bug reports (not speculating but just repeating what happened, with links). Thank you very much! Both appear to be smaller mistakes we made while working on FileImporter, both loosely related to phab:T253872. I created a ticket for the second issue as well, see phab:T261060.

MGA73 (talkcontribs)

Thanks, thats great Thiemo. It would of course be nice if FileImporter said "Sorry we can't move version 4. Do you want to move the other versions?". But no need to make things more complicated and risk breaking something if it is just because there are a few files that are wierd. :-D

MGA73 (talkcontribs)
Reply to "Improving error messages"
MGA73 (talkcontribs)

The license migration is sometimes a problem. For example on vi.wikipedia and ja.wikipedia. If possible it would be nice if changes like this could be automated. On ja.Wikipedia the changes could look like this. If it makes things too complicated don't try. It can be fixed on Commons. But if it is an easy fix it would be nice.

Thiemo Kreuz (WMDE) (talkcontribs)

There is a feature that allows the replacement of template parameters. In this case chuyển đổi= can be changed to migration= automatically. A rule for this can be added to Extension:FileImporter/Data/vi.wikipedia#Transfer. But that's all we have at the moment.

In the discussions at phab:T199453 and phab:T214365 are alternatives discussed that make use of subst: templates on Commons.

MGA73 (talkcontribs)

Thank you. But changing to "migration=" is only half the solution because we need the part after the "=" to complete the migration.

Off topic: Did you notice what I did with YouTube CC-BY? Someone really wanted to have a review template so I made this and it works :-)

Stefan2 (talkcontribs)
MGA73 (talkcontribs)

User:Stefan2 Hmmmm. I missed those disclaimers. It is easy to fix the conversion. I wonder what those disclaimers are.

MGA73 (talkcontribs)

User:Stefan2 there is a text on c:Template:GFDL-ja saying something like that if file was uploaded before july 2009 then we should use GFDL. It is only GFDL-ja after that date. And only if there was no multi-license.

Stefan2 (talkcontribs)

ウィキペディア日本語版からコモンズへ移入されたファイルのうち、日本語版で2009年7月以前にアップロードされたGFDL単独ライセンスだったファイルには、必ず {{GFDL}} ではなく {{GFDL-ja}} のタグを付してください。

Meaning: If the file was uploaded to jawiki before (not after!) July 2009, then the Commons tag is c:Template:GFDL-ja, not c:Template:GFDL.

なお、日本語版でGFDL/CCマルチライセンスだったファイルには、GFDL-jaのライセンスタグは使用しないでください。

Also, don't use GFDL-ja for GFDL/CC multi-licensed files. I wonder if they are talking about files with ja:Template:Self. Note that {{self|GFDL|cc-by-sa-3.0}} inserts ja:Template:GFDL-no-disclaimers (not ja:Template:GFDL) on the file information page.

Liuxinyu970226 (talkcontribs)
MGA73 (talkcontribs)

I do not think its a new upload if we are talking about moving the file from xx.wiki to Commons. Anyway at least from ja.wiki there are probably no files that does not also have cc-by-sa-3.0 or have been license migrated.

MGA73 (talkcontribs)

User:Stefan2 perhaps we should discuss that on Commons. It is not a bug in FileImporter. Just a matter of changing the settings.

Stefan2 (talkcontribs)

It's a bug in FileImporter or some FileImporter settings (where are those defined?) as ja:Template:GFDL is converted to the wrong Commons template.

MGA73 (talkcontribs)
MGA73 (talkcontribs)

I think I solved it at vi.wiki. The script can translate the first part. And the templates on vi.wiki understand the English terms so I just changed all the file pages to English. Problem solved :-) On ja.wiki the solution can be either changing with my bot on ja.wiki or to remove the template during transfer and then let a bot on Commons fix migration.

MGA73 (talkcontribs)

The problem with GFDL vs GFDL-ja have been fixed on ja.wiki. I changed the license of about 35k files so from now on GFDL=GFDL and GFDL-ja=GFDL-ja. The license migration is also mostly fixed as I changed 99% of the files to use the same migration code as on Commons.

Reply to "License migration"
Ahmetlii (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)
Reply to "Problematic MIT licenses"
Xaosflux (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)

I assume you are talking about the configuration pages at mw:Extension:FileImporter/List of configured wikis. The exact location really doesn't matter that much – from a technical standpoint. We just need to store it somewhere where the community is able to edit the pages. Do you have a suggestion for a better location?

Reply to "config location"
Return to "Extension:FileImporter" page.