Extension:Josa
![]() リリースの状態: 安定 |
|
---|---|
実装 | パーサー関数 |
説明 | 韓国語の後置処理の josa 部分を自動化する。 |
作者 | Bae Junehyeon (*devuntトーク) |
最新バージョン | 0.1 (2014-01-29) |
MediaWiki | >= 1.31.0 |
PHP | 5.4+ |
データベースの変更 | いいえ |
ライセンス | MIT ライセンス |
ダウンロード | |
例 | {{#은는:한글}} -> 한글은 |
translatewiki.net で翻訳を利用できる場合は、Josa 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
Josa 拡張機能は、韓国語の後置処理の josa (発音: /dʒo:sa/ または /ʨo:sa/) (助詞) 部分を自動化します。
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のJosa
という名前のディレクトリ内に配置します。 - 以下のコードを
LocalSettings.php
の末尾に追加します:wfLoadExtension( 'Josa' );
- 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
MediaWiki 1.24以前を稼働させている利用者へ:
上記の手順では、wfLoadExtension()
を使用してこの拡張機能をインストールする新しい方法を記載しています。
この拡張機能をこれらの過去のバージョン (MediaWiki 1.24以前) にインストールする必要がある場合は、wfLoadExtension( 'Josa' );
の代わりに以下を使用する必要があります:
require_once "$IP/extensions/Josa/Josa.php";
使用法
{{#functionname: word }}
{{#functionname: word | argument }}
{{#functionname: word | argument 1 | argument 2 }}
1.30+
関数名
関数は以下のとおりです:
英語とその他の言語 | 韓国語 |
---|---|
EulRuel | 을를 |
EunNeun | 은는 |
EGa | 이가 |
GwaWa | 과와 |
AYa | 아야 |
Euro | 으로 |
E | 이 |
A Josa function call without any option will be rendered to the word and a josa. Some special characters are automatically ignored.
{{#EunNeun: 한글}}
→ 한글은{{#EulRuel: 위키백과}}
→ 위키백과를{{#EGa: '비타민'}}
→ '비타민'이{{#과와: 미디어위키}}
→ 미디어위키와{{#아야: 지원}}
→ 지원아{{#이: 정민}}가
→ 정민이가{{#으로: [[학업]]}}
→ 학업으로{{#으로: 100%}}
→ 100%으로{{#EulRuel: 글자 Ñ}}
→ 글자 Ñ를 (bug)
It is OK that the case in given word is written in English alphabet or ends with a number.
{{#EulRuel: DNA}}
→ DNA를{{#EunNeun: ATM}}
→ ATM은{{#Euro: 119}}
→ 119로
But other letters will add parenthesis:
{{#EulRuel: 직원(3명)}}
→ 직원(3명)을(를)
稀にバグが発生します:
{{#EulRuel: 國語}}
→ 國語을
引数
MediaWiki 1.30+
Argument must be one of those:
Argument | Alias | Description |
---|---|---|
josaonly |
조사만 |
Just render a Josa, the given word will be removed. {{#EunNeun: 한글|josaonly}} → 은
|
override=foo |
덮어쓰기 , 오버라이드 |
Replace the Josa with the given text. {{#EulRuel:시약 100g|override=을}} → 시약 100g을
|
The order of the arguments is not matter.
MediaWiki 1.29 or earlier
If second argument is 0
, the base word will be removed.
{{#EulRuel: 한글|0}}
→ 을
Any other argument makes base word remain. Technically, PHP determines whether the value is true
or not. So 'false'
is true
, See more examples:
{{#EulRuel: 한글|false}}
→ 한글을{{#EulRuel: 한글|true}}
→ 한글을{{#EulRuel: 한글|1}}
→ 한글을
この拡張機能は 1 つ以上のウィキメディアのプロジェクトで使用されています。 これはおそらく、この拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。 この拡張機能がインストールされている場所を確認するには、ウィキメディアの設定ファイル CommonSettings.php および InitialiseSettings.php 内で、この拡張機能の名前を探してください。 特定のウィキにインストールされている拡張機能の完全な一覧は、そのウィキの Special:Version ページにあります。 |