Extension:Labeled Section Transclusion/ko

From mediawiki.org
This page is a translated version of the page Extension:Labeled Section Transclusion and the translation is 40% complete.
Outdated translations are marked like this.
미디어위키 확장 기능 설명서
Labeled Section Transclusion
출시 상태: 안정
구현 태그 , 파서 함수
설명 Enables marked sections of text to be transcluded
만든 이 Steve Sanbeg
호환성 정책 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backward compatible.
MediaWiki >= 1.42
데이터베이스 변경 아니오
라이선스 GNU General Public License 2.0 or later
다운로드
Public wikis using 6,919 (Ranked 26th)
Labeled Section Transclusion 확장 기능 번역 (translatewiki.net에서 가능한 경우)
이슈 미해결 작업 · 버그 보고

Labeled Section Transclusion 확장기능은 보통처럼 위키문법을 구문 분석해서 표시된 문단의 선택적인 끼워넣기가 가능합니다. 그 기능은 보통의 끼워넣기를 갖는 ‎<onlyinclude> 태그의 확장 버전과 비슷합니다. 이것은 포함할 문단을 선택합니다. 이것은 위키미디어의 모든 위키에서 유효합니다.

표준 끼워넣기가 기본적으로는 소규모인 틀의 큰 부분을 취급하는 것에 대해서 라벨이 있는 문단의 끼워넣기는 큰 문서의 작은 부분을 의도하고 있습니다.

However, there are some differences. In the native template transclusion, sections are marked by behavior; thus you can have only one (possibly non-contiguous) section to be included or skipped.

Here, sections are marked by name, and behavior is chosen by the caller, which can include or skip sections as needed. Different pages can include or exclude selected sections; there can be arbitrary numbers of sections, which can also overlap arbitrarily.

Marking sections by name rather than behavior allows edit section links to be rendered more appropriately for getting excerpts from larger texts, since the extension can now account for sections that are skipped in the beginning of the page, allowing transcluded sections to be offset appropriately.

Installation

  • 파일을 다운로드하고 LabeledSectionTransclusion 폴더를 extensions/ 디렉토리에 넣어 주세요.
    개발자와 코딩 기여자는 Git을 이용해 확장기능을 다운받는 것이 좋습니다.cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LabeledSectionTransclusion
  • 아래의 코드를 LocalSettings.php 코드의 마지막에 추가합니다.
    wfLoadExtension( 'LabeledSectionTransclusion' );
    
  • Yes 완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.

There is also a Gadget in use on Wikisource.org wikis that makes it possible to define sections with a simplified ## label ## syntax. Its code can be found at Wikisource:MediaWiki:Gadget-Easy_LST.js.

Functions

Transclude any marked part

첫 번째: 사용할 문단에 태그를 붙임

아래처럼 ‎<section> 태그를 사용해서 문단에 태그를 붙입니다:

<section begin="chapter1" />this is a chapter 1<section end="chapter1" />

이들의 태그는 HTML/XML가 아니며 보통의 속성 구문을 사용하지 않는 것에 주의하세요. 이렇리 때문에 beginend의 표시는 XML의 보통 열기 및 닫기 태그가 아닌 개별이기 때문에 문단의 중첩이나 덮어쓰기가 허가됩니다. 이에 따라서 다른 문단과의 간섭을 신경 쓰는 것 없이 section 태그를 삽입할 수 있게 됩니다.

두 번째 A: 문단의 끼워넣기

Call the parser function #lst to transclude it, i.e. to transclude a section called chapter1 from a page called articleX:

{{#lst:articleX|chapter1}}

The target article defines the location of the section; its behavior is determined by the parser function.

두 번째 b: 문서는 끼워넣기 문단은 제외하기

To transclude a page, but exclude a specified section, use the #lstx function:

{{#lstx:articleX|chapter1}}

임의로 제외된 문단으로 대체 문자열을 삽입할 수가 있습니다.

{{#lstx:articleX|chapter1|replacement_text}}

예시:

{{#lstx:articleX|chapter1|See chapter 1 in [[articleX]].}}

치환된 문자열은 문단이 스킵된(제외된) 영역에 표시됩니다.

불연속의 문단

동일한 이름의 여러 문단은 공존할 수 있습니다. 이 사례에서는 동일 이름의 문단은 어느것도 대상으로 하거나 제외하거나 할 수 있습니다. 여러 토론을 표시할 때 특히 유효합니다.

문단 범위

These functions have an additional, optional argument to specify a section range; i.e. {{#lst:articleX|chapter1|chapter3}}, to include everything from the beginning of chapter 1 to the end of chapter 3. This allows using empty marker pairs to mark one end of the section, possibly in a template. A similar mechanism is currently used at the French Wikisource.

풀기 전개

This also works with substitution; it's even possible for an article to substitute a section of itself. One use of this provides a neat way to archive talk pages: Mark the text to be archived using <section begin=archive />, etc. Then create an archive page with the text, using {{subst:#lst:talk_page|archive}}, which copies archived sections. Lastly, replace the contents of talk_page with {{subst:#lstx:talk_page|archive}} to remove those sections.

이 옵션은 표준적인 주제, 예를 들면==this section==로 표시한 문서의 문단의 끼워넣기를 지원합니다. 설치하면 lsth 함수로 실시합니다.

도입부의 끼워넣기

문서 도입부 (첫 번째 주제보다 앞의 부분)을 끼워넣으려면 아래와 같습니다 :

{{#lsth:pagename}}

특정 문단의 끼워넣기

또, sectionX의 내용 전부를 끼워넣기하는 것도 가능합니다(문단의 모든 것이 포함될 수 있지만 sectionX의 주제는 포함되지 않습니다).

{{#lsth:pagename|sectionX}}

주의사항:

  1. 동일 이름의 문단이 여려개 있을 경우 최초로 나타나는 sectionX으로 한정해서 끼워넣기가 된다.
  2. sectionX 문단 이름은 표시될 문자열이 아닌 반드시 in wiki code의 서식으로 입력한다. 예를들면 문단 주제가 ==List of [[Extension]]==일 경우 입력할 문자열을 ‘List of [[Extension]]’가 맞으며 ‘List of Extension’는 아닙니다.
  3. 번역 확장기능을 사용해서 번역대상의 마크를 한 문서에서 문단을 끼워넣기 할 경우 언어 특정판에서 끼워넣기할 것. 예시: 다른 pagename가 아닌 pagename/en을 대상으로 한다.
  4. 매칭은 링크가 대소문자 변경에 따라서 링크가 무너질 것을 방지하기 위함이므로 대소문자를 구별하지 않는다.

복수 문단 끼워넣기

최초 sectionX의 출현(sectionX 자체의 주제 제외)에서 다음으로 나타나는 sectionY까지의 사이를 제외할 수도 있습니다. sectionY는 정지점으로 기능하며 sectionY 내용은 끼워넣기 대상 밖입니다.

{{#lsth:pagename|sectionX|sectionY}}

Notes about skipped headings

Since the traditional transclusion in MediaWiki isn't intended to transclude sections, it doesn't account for skipped headings. As a result, if you were to transclude a template with multiple headings, and skip the first heading, then all of the edit sections links would point to the wrong section in the template.

When this extension is used (with MediaWiki 1.9 or later), the #lst and #lsth functions count headings in the "skipped" beginning part, and offset transcluded headings appropriately. This will allow these links to point to the correct section in the simple case.

Note that #lstx does not count skipped headings, and that skipped headings within discontiguous sections are not offset.

But it seems it has been fixed now (likely when ported to MediaWiki's new preprocessor). The transcluded headings can be linked to the correct sections.

지역화

Internally, the parser functions all use the lst prefix, for consistency with the name of the extension. Since this acronym may be confusing to non-developers, readable English variants have been introduced, so the functions can currently be called from either name.

function 영어 독일어 히브리어 (RTL) 포르투갈어
#lst #section #Abschnitt
#קטע
#trecho
#lstx #section-x #Abschnitt-x
#בלי קטע
#trecho-x
#lsth #section-h

Additionally, the tag can now be localised; currently:

영어, 독일어, 히브리어, 포르투갈어; i.e.:

영어
<section begin=x/> ... <section end=x/>
독일어
<Abschnitt Anfang=x/> ... <Abschnitt Ende=x/>
히브리어 (RTL)
<קטע התחלה=א> ... <קטע סוף=א> ("start" code to the right and "end" code to the left)
포르투갈어
<trecho começo=x/> ... <trecho fim=x/>

Each localization is enabled only if the page matches the respective content language.

제한

  • {{#lsth:pagename|sectionX}} only works on the first section if multiple sections have name sectionX. Only the first occurrence of sectionX is transcluded if an article has more than one section with the same name.
  • While it is possible to use this extension across namespaces, interwiki references are not resolved. It is not yet possible, for example, to include part of a Wikisource page into a remote MediaWiki installation.
  • Section tags cannot themselves be transcluded in order to work on other pages. {{#lst:}} and {{#lstx:}} work only if section tags appear directly in the wikitext of the transcluded page. This means, for instance, that these tags cannot be embedded in a template using template parameters and parser functions. The #tag magic word does not work with section tags.
  • As of 2014, section tags don't have any effect when used inside a template parameter. If page A contains a text {{B|X}}, there's no way {{#lst:A|...}} can access X.

Examples

See also