User:This, that and the other/For the Common Good/Local wiki data

__INDEX__ For the Common Good uses local wiki data to allow its intelligent handling of wikitext to be extended to other wikis. The local wiki data for English Wikipedia is built-in, so if you do not plan to use FtCG on wikis other than English Wikipedia, you don't need to worry about this.

This feature is completely separate from language files, which translate the user interface of FtCG and do not affect how it handles wikitext.

Loading data live from the Internet
This is the best way to use local wiki data, as you will automatically benefit from the latest updates and improvements made to the wikitext handling algorithms. If you choose this option, the local wiki data file you choose (in most cases, no more than 10 KB in size) is fetched from the FtCG website every time you start FtCG.

All the local wiki data files listed at https://atlight.github.io/ftcg/localdata.html are available live within FtCG.

To use live local wiki data, click the "Settings..." button within FtCG, pick "Use live data from the Internet", and choose your wiki from the list. Then click OK.

Live local wiki data was introduced in version 1.1.

Importing a local wiki data file from your computer
It is possible to import local wiki data into FtCG from a file on your computer. This is useful if you wish to use a local wiki data file not available online, if you prefer not to use the live online data, or if you are crafting your own local wiki data file.

Local wiki data is stored in files with the extension ".wiki". You can obtain one in one of these ways:

Note: Each time you make changes to the local wiki data file, you must import it into FtCG again to see the changes.
 * 1) Go to http://atlight.github.io/ftcg/localdata.html for an index of available local wiki data files.
 * 2) Ask "file-savvy" users on a particular wiki whether they have crafted their own FtCG data file for their wiki.
 * 3) Write your own: it's not too difficult to write a basic local wiki data file, but if you want to do more advanced stuff, you need to know regular expressions.

Writing your own data file
Before starting, check out CommonsHelper2: you might be able to gain some inspiration. See if your local wiki has a page there; if it does, look in particular at the "Transfer" section near the bottom.

For further inspiration, you can download the data file for English Wikipedia using the link at http://atlight.github.io/ftcg/localdata.html. However, instead of typing over the English file, consider using the template below, in order to see the helpful comments.

When you are sufficiently inspired, copy and paste the sample below into a text file, and save it with the extension ".wiki". Then edit it to suit, following the guidance given in the file. (Lines beginning with  are ignored by FtCG.)


 * 1) For the Common Good
 * 2) Local wiki data for YOUR WIKI NAME HERE


 * 1) After modifying this file, you must import it into FtCG again to see the changes.

LocalDomain=xyz.wikipedia
 * 1) This should be the web address of your wiki, without ".org"

LocalFtcgPage=w:en:WP:FTCG
 * 1) If there is a page describing FtCG on your wiki, put its name here
 * 2) If not, just keep the following value

Category1=Copy to Wikimedia Commons Category2=Copy to Wikimedia Commons (bot-assessed) Category3=Move to Commons Priority Candidates DefaultCategory=3
 * 1) Three preset categories to appear at the top of the window
 * 2) If you don't have three, just remove the unneeded ones

CategoryNamespace=Category
 * 1) The name of the "Category" namespace on your local wiki, without the colon
 * 2) (since the English name "Category" works on all wikis, you don't need to include
 * 3) it here - FtCG handles it)

NowCommonsTag=now Commons
 * 1) The local name for the "now Commons" template, indicating that the local copy of
 * 2) an image should be deleted after transfer

NowCommonsDeletionSummary=F8: Media file available on Commons
 * 1) The deletion summary used when deleting a file after transfer (option available
 * 2) to admins only) - link to a relevant deletion policy if possible

NowCommonsAddingTagEditSummary=Added tag NowCommonsReplacingTagEditSummary=Replaced tag with  tag
 * 1) Some edit summaries to translate into your wiki's language


 * 1) IMPORTANT: All entries from here onwards are treated as regular expressions.
 * 2) For normal text entry, this should not be a problem, but when using
 * 3) symbols like  [ ] ? * + | etc., please prefix with a backslash: \( \[ etc.

Information=Information Description=Description Date=Date Source=Source Author=Author Permission=Permission Other_versions=Other_versions
 * 1) Local equivalents of the  template and its parameters
 * 2) (put the local name SECOND, e.g. Information=Ergojduhd)

Summary=Summary Licensing=Licensing|License|Permissions
 * 1) Section headings in use on the local wiki
 * 2) (put the local name SECOND, e.g. Summary=Quofkokvej)

CopyToCommonsRegex={{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*}}\n?
 * 1) The regular expression used to detect "Copy to Commons" tags
 * 2) This one is for English Wikipedia


 * 1) If you aren't technically confident, stop here and delete everything from here to the end
 * 2) (FtCG will still work!)


 * 1) Potential problems - conditions which may prevent or affect transfer (like deletion templates)


 * 1) Notes: - Use IfContains= to search for a string of plain text (case-insensitive)
 * 2)        - Use IfRegex= to match against a regex (case-insensitive)
 * 3) These should be listed in order of importance - most "problematic" first.

[PotentialProblem] IfContains={{db- Message=The file appears to be tagged for speedy deletion.

[PotentialProblem] IfRegex={{do not (copy|move) to commons Message=The file is tagged with {{do not move to Commons}}.


 * 1) ... put as many potential problem sections as needed


 * 1) Replacements to carry out


 * 1) LookFor is a regular expression; ReplaceWith is a "replacement pattern"
 * 2) where $n is the nth "capture" of the regex; for help,
 * 3) visit MSDN or ask User:This, that and the other


 * 1) %%OriginalUploader%% and
 * 2) %%InterwikiLinkPrefix%% are special variables supplied by FtCG

[Replacement] LookFor={{orphan image.*}}\n? ReplaceWith=

[Replacement] LookFor={{Some-Name-In-Another-Language-For-PD-art}} ReplaceWith={{PD-art}}


 * 1) ... put as many replacement sections as needed


 * 1) Replacements of self-license tags, like PD-self, GFDL-self


 * 1) These use the same format as "Replacements" above

[SelfLicenseReplacement] LookFor={{PD-self([^\}]*)}} ReplaceWith={{PD-user|%%OriginalUploader%%|en}}

[SelfLicenseReplacement] LookFor={{GFDL-self-with-disclaimers([^\}]*)}} ReplaceWith={{GFDL-user-en-with-disclaimers|%%OriginalUploader%%$1}}

[SelfLicenseReplacement] LookFor={{GFDL-self([^\}]*)}} ReplaceWith=

[SelfLicenseReplacement] LookFor={{self([^\}]*)}} ReplaceWith=


 * 1) ... put as many as needed