Jochoi Translation5

{$name}namedefault原文链接{$name}default  

The logical link module was created by Sekai_sSekai_s for the Chinese branch, and adapted for the INT by JochoiJochoi.

What it is

The logical link module is used for determining if a certain page is translated and exist in the current site, and show internal or external link accordingly. Especially suitable for scenarios of links to author pages within credit module, links to articles pending for translation in hubs or author pages, etc.

The logical link module does not make use of ListPages mpdule, so it is safe to use in all kinds of pages.

How to use

First include the CSS style.

[[include :scp-wiki-cn:component:logical-link-style]]

CSS style is only required to be included once in each article. Putting in the beginning of the page or along with the codes at the bottom are suggested for easier management.

Unless you have saved once after including CSS style, or else when in "preview" the logical link module cannot be displayed properly. This is a totally normal phenomenon.

Then, you may use the following code to replace your link syntax ([page-name Page Title], [[[page-name|Page Title]]], etc.).

[[include component:logical-link
|name=Page Unix Name (required)
|internal-link=Translated Title
|original-link=Original Title
|branch=Original Branch Site
|internal=Show link to page for translation in current site or not
|original=Show link to original or not
|mark=Show link icon or not
|color-common=Icon color for if the page is translated
|color-newpage=Icon color for if the page is not yet translated
|before=Text to be shown before the link
|after=Text to be shown after the link
]]

Except for the first parameter name which is required, other parameters are all optional. If you want to keep the optional parameter at its default value, delete the respective line.

name

Unix name for the page (name for defining URL), including category, such as "scp-173", "system:recent-changes".

internal-link, original-link

These determines the text to be shown for the link.

If internal-link is not set, then when the current site has page translated, the module automatically displays the respective translated page title.

branch

The website for the branch where the original was, default value is "http://www.scp-wiki.net/". The string "http://"at the beginning and "/" at the end are required.

internal

Display link to page for translation in current site or not. Allowed value is "true". This parameter is only valid when the page is not yet translated. If the page is translated then it would always display the link to the translated page in the current site.

If the page for translation in current site is displayed, then parameter original-link will be invalid, and the link to original will always be displayed in the form of "(Link to original)".

original

Display link to original article or not. Allowed value is "true". This parameter is only valid when the page is already translated, and if the page is not yet translated then the link to original will be displayed.

mark

If value "true" is set, then an icon " " will be displayed at the top right corner of the link, so as for easier identification of if the page has used logical link module. This way, if when the translations for a hub are completed for now, you can change the logical link module back to normal links.

You can also click the "+ Options" "Backlinks" button at the bottom of this page to find which pages have used the logical link module.

color-common, color-newpage

These represents the color of the icon for when there is and there is not a translation. Default values are #009966 and #F00 respectively.

before, after

Due to limitations of Wikidot, the [[include]] syntax must be put in its own line. If you want to add prepending or appending text, you may write here.

This also allows Wikidot syntax partly, for example bolding the link would be making these both "**".

Example

*Do NOT forget to include the CSS style

[[include component:logical-link
|name=dr-bright-s-personnel-file
|internal-link=click this to go to my author page!
|original-link=click this to go to my author page!
|before=For more of my works, please
]]

Untranslated:

For more of my works, please click this to go to my author page!

Translated:

For more of my works, please click this to go to my author page!

[[include component:logical-link
|name=your-turn
|branch=http://ja.scp-wiki.net/
|internal=true
|mark=true
|color-newpage=orangered
]]

Untranslated:

your-turn (Link to original) 

Translated:

Your Turn 

More questions?

Please comment on this page or send a private message to Sekai_sSekai_s.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License