Jump to content

Module:Wikimedia Resource Center/Individuals/doc

From Meta, a Wikimedia project coordination wiki

This is the documentation page for Module:Wikimedia Resource Center/Individuals

This page stores data related to Connect/Individuals page on Meta in a Lua table. It acts as a database for user information on Connect. Data is gotten via a form which is processed by the MediaWiki:Gadget-wrcAddNewIndividual.js gadget.

Usage

[edit]

A typical entry looks like this (for example):

	{
		type = 'user',
                name = 'DAlangi_(WMF)',
		description = 'I\'m working with the [[Learning_and_Evaluation/Team|Learning & Evaluation team]] to improve the [[Wikimedia_Resource_Center|Wikimedia Resource Center (WRC)]].',
		icon = 'Alangi_Derick_Wiki_Indaba_2017.jpg',
                skills = 'Survey skills',
	},

Syntax

[edit]

First, 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 skills 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 recommended to do some basic indentation.

Parameters

[edit]

For each individual parameter:

  • The type is used to identify the type of data to be saved. In this case, the type should be by default user as it's keep track of individuals (user) data in the Lua table.
  • The name takes is the wiki username of the user.
  • The description is a brief information about the user in concern. This should not be too long and not too short as well. this should also highlight the most important detail about the user.
  • Icon holds the name of the user's picture on commons without the "File:" prefix. The template that renders this will build the full link. If no picture is provided, there is a fall back icon.
  • As stated above, skills 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. This holds the list of skills that the user can share with the community.

Translation

[edit]

The 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!)