Module:Wikimedia Resource Center/Content/doc
This is the documentation page for Module:Wikimedia Resource Center/Content
This is a documentation subpage for Module:Wikimedia Resource Center/Content. It contains usage information, categories, and other content that is not part of the original module page. |
Hello! This page contains each individual entry on the Wikimedia Resource Center.
We store each individual entry in a Lua table. This is somewhat unconventional for a wiki, but doing it this way allows us to keep track of all the entries in one location, categorize them, and then display the ones that are most relevant based on selected criteria. This should, in the long term, make maintenance simpler by minimizing the number of pages that need to be kept in sync.
There is a gadget that lets you edit individual entries and create new ones without needing to edit this table directly. Go to Special:Preferences#mw-prefsection-gadgets, scroll to the bottom, and enable the "Wikimedia Resource Center specialized editing interface" gadget. Once you've enabled it, go to any Resource Center page and you will see new plus icons and a button in each section that says "Add new resource." (If you do not see this, you may need to "hard refresh" your browser by pressing control-shift-R or command-shift-R on a Mac.)
If you prefer to edit the listings by hand, it's pretty straightforward.
Usage
editEach entry looks like this:
{ unique_id = 'XgpcDgtbID', header = '[[Trademark policy]]', description = 'Summary of situations when you are and are not allowed to use the Wikimedia trademarks', category = 'Legal', audiences = {'For program leaders', 'For contributors', 'For affiliate leaders'}, community = 'no', },
Syntax
editFirst, a note on the general syntax: editing these entries is comparable to editing templates on Wikipedia such as infoboxes, but with a few key differences:
- Each "block" is wrapped in curly brackets, with a comma following each entry, as you can see above.
- To add a new entry, add a block like above below the last entry, but before the final
}
on the bottom of the module that closes off the whole thing. - Each value after the equals sign has to be surrounded in single quote marks. Here we use single-quotes instead of double quotes. If, however, you want to use an apostrophe, you will need to escape it with a backslash. For example:
Wikimedia\'s mission is to make knowledge available to everyone.
- The audiences parameter is special, since it is a list of values rather than just one value. Therefore it should be wrapped in curly brackets, with each value in single quote marks, separated by commas.
- Indenting is not strictly necessary but it does look nice.
Per parameter
editFor each individual parameter:
- The unique_id is used to distinguish each entry even when the other values change. It does not need to follow a specific pattern but it does need to be unique.
- The header takes regular wiki markup. So you link to other pages on Meta-Wiki
[[like this]]
, and external links are done[https://example.com like this]
. - The description, related, and contact parameters also support wiki markup. Try not to make it too long.
- The category takes one value. An entry cannot belong to more than one category. The current categories are as follows:
- Contact and Questions
- Skills Development
- Grants Support
- Programs Support
- Software Basics
- Software Development
- Technical Infrastructure
- Global Reach Partnerships
- Legal
- Communications
- As stated above, audiences takes any number of values. (For zero values, simply put
{}
.) Even if there is only one value, you still need to treat it like a list of values. The current options are as follows:- For program coordinators
- For contributors
- For developers
- For affiliate organizers
- The community parameter is used to distinguish between Wikimedia Foundation-originated resources and non-Wikimedia Foundation-originated resources. If the resource originates from the Wikimedia Foundation, put
community = 'no',
– otherwise, don't include the parameter.
We recognize that the categories and audiences are not perfect. If you think they should be different, please coordinate with James Hare.
Translations
editThe strings of text presented on the Wikimedia Resource Center are stored in Template:i18n/Wikimedia Resource Center and can be translated through the Translate interface.
Note that this module stores English versions. To update English text, you should update this module directly.
Even if you are editing this module by hand, there is no need to update Template:i18n/Wikimedia Resource Center by hand, since the "Content" section of that page is refreshed every time someone edits using the editor gadget. (However, if you see that Template:i18n/Wikimedia Resource Center needs to be marked for translation, you are welcome to do so!)