Editing resource descriptions - WikipediaLibrary/TWLight GitHub Wiki
When creating or editing a resource, the short and long descriptions cannot be edited in the administrator interface. Instead, changes need to be submitted via Github. This creates a Pull Request, which will be reviewed by a TWLight maintainer.
Once approved, Changes to these files will take a short amount of time to be picked up by the Library Card platform (usually no more than 30 minutes). The only files which should be edited on Github are the en
and qqq
files - all others should be edited via https://translatewiki.net/wiki/Translating:Wikipedia_Library_Card_Platform.
To create a new resource:
- Create an entry via the Library Card administrator interface
- Open the English descriptions file (partner_descriptions.json) and click the 'Edit this file' pencil
- Add a new line with the following format:
"<NUMBER>_short_description": "<DESCRIPTION>",
replacing<NUMBER>
with the new resource's database ID (the one that appears in the URL when you click on the resource) and<DESCRIPTION>
with the short description. Likewise, optionally add a line"<NUMBER>_description": "<DESCRIPTION>",
if a long description is required.- The partner name should be inside
<strong>
tags, like<strong>Wiley</strong>
- The line before the last one should end in a
,
but the last line doesn't need one
- The partner name should be inside
- Select Propose Changes or the "Create a new branch for this commit and start a pull request" option.
- Choose a logical name for the pull request branch such as "partner--description." (note the dashes instead of spaces) and click 'Create pull request'
- Please choose a logical name for the pull request. It can be the same as as the branch name, except that spaces are allowed, so "partner
<NUMBER>
description" is a great choice. Create the pull request. - Just under the pull request title, you should see text like "
<USERNAME>
wants to merge commits into WikipediaLibrary:master from<USERNAME>:<BRANCH_NAME>
".<USERNAME>:<BRANCH_NAME>
is a link; click it to browse the code of your branch.
- Add a new line with the following format:
- Navigate to the (locale/qqq/partner_descriptions.json) file in your branch. You can get here by going to your pull request and clicking the "from" branch name.
- Navigate to via the file browser
locale/qqq/partner_descriptions.json
- Click the 'Edit the file' pencil
- Add a new line with the following format:
"<NUMBER>_short_description": "<TRANSLATOR COMMENT>",
replacing<NUMBER>
with the new resource's database ID and<TRANSLATOR COMMENT>
with a helpful descriptive comment for translators. Likewise, optionally add a line"<NUMBER>_description": "<TRANSLATOR COMMENT>",
if a long description was added. The formatting for this can usually copy the other translator comments. - Select the choice to "Commit directly to the
<BRANCH_NAME>
branch." This will put both changes into the same pull request.
- Navigate to via the file browser
To edit an existing resource:
- Find the resource's number in the Library Card
- Navigate to the English partner description (partner_descriptions.json) and click the 'Edit this file' pencil
- Edit the line corresponding to the resource's database ID