User:E.Z.O./babel-ja
list openlist all bugsreport a bug
|
Babel Release status: stable |
|||
|---|---|---|---|
| 実装 | Parser extension | ||
| 説明 | Adds a parser function to inform other users about language proficiency and categorise users of the same levels and languages. | ||
| 作者 | Robert Leverington (RobertLTalk) | ||
| バージョン | 1.7.4 (2011-12-18) | ||
| MediaWiki | 1.16.0 or higher (r52203) | ||
| ライセンス | GNU General Public License 2.0 or later | ||
| ダウンロード | スナップショットをダウンロード |
||
| 例 | Translatewiki.net | ||
|
|||
|
|||
babel拡張機能は、完全にテンプレートに依存していた旧バベルのシステムを置き換えるためのパーサの機能が追加されます。これには、下位互換性があり、そして既存のテンプレートをサポートしています(それらは単純に拡張機能を無効にします)。
ウィキペディアでは、バベル(名前はバベルの塔が元)は利用者ページ上で簡単に特定の言語を話せる人に連絡することにより、多言語コミュニケーションを助けるテキストを指します。アイデアはウィキメディア・コモンズに由来し、また他の多くのウィキに実装されています。
Contents |
[edit] インストール
- Download the files from SVN or download a snapshot. Choose the version that matches your version of MediaWiki.
- Create a directory
Babelin your$IP/extensionsdirectory. - Extract the files to this
$IP/extensions/Babeldirectory. - Add
to the bottom of LocalSettings.php.require_once( "$IP/extensions/Babel/Babel.php" );
- Copy the code from
Babel.cssfile into your MediaWiki:Common.css — you can change it as desired. This is not needed from version 1.19 forward. - Installation can now be verified through Special:Version of your wiki.
If the CLDR extension is found language names are taken from that (where translations are unavailable), otherwise built in MediaWiki language names and English defaults are used.
[edit] Usage
Syntax for the #babel parser function is as follows:
{{#babel: babelcode1 | babelcode2 | ... }}
Add one of the following codes for each language you speak or understand, separated by |, where xx is the MediaWiki language code, ISO 639-1 code, or ISO 639-3 code for the language. The general usage of each code level is as follows:
To include any other template, simply add the name of the template, e.g. add User from London if you want to include Template:User from London. A prefix or suffix may be added to template names (e.g. User at the beginning) depending on the local configuration, this can be used to restrict the selection and reduce the length of parameters; for example from London could include Template:User from London if configured in such a way.
[edit] Configuration
Babel has five configuration variables which can be modified in LocalSettings.php.
$wgBabelLanguageCodesCdb- (string) the path of the language code database file, the default should suffice.
$wgBabelLanguageNamesCdb- (string) the path of the language name database file, the default should suffice.
$wgBabelCategoryNames- (array of string or boolean, indexed by the strings '1, '2', … '5', 'N') where each entry is the name of a category for the skill level indicated by its index, possible variable elements are: %code% (language code), %wikiname% (the name of the language in the wiki's content language), and %nativename% (the name of the language in its language). To disable adding a category for a particular level, set the corresponding value to false.
$wgBabelMainCategory- (string) Name of the main (non-level) category for each language, set to false to disable. Uses same variables as
$wgBabelCategoryNames. $wgBabelDefaultLevel- (string) Default ability level to use when none is specified, should be an index from
$wgBabelCategoryNames, that is one of the strings '1, '2', … '5', 'N'
Several customizations can also be made using MediaWiki namespace messages.
- MediaWiki:babel-template
- The format of template names when one is being included.
- MediaWiki:babel-portal
- The format of the target of the link from the language code.
- MediaWiki:Babel-autocreate-user
- Username to be used for autocreation of Babel related categories
- MediaWiki:babel-autocreate-text-levels
- Text to insert into auto-created categories for different language levels.
- MediaWiki:babel-autocreate-text-main
- Text to insert into auto-created categories for non-level categories.
- MediaWiki:babel
- The header of the babel box
- MediaWiki:babel-url
- The pagename where information on the babel extension can be found
- MediaWiki:Babel-footer
- The footer of the babel box
- MediaWiki:babel-footer-url
- The page to link to in the footer of the babel box
[edit] Releases
| Version | Release date | Comments |
|---|---|---|
| 0.1 | 2008-04-19 | Initial version. |
| 0.7 | 2008-04-26 | First beta. |
| 0.9 | 2008-05 | Second beta - still some known issues. |
| 1.0 | 2008-07-02 | Now stable. |
| 1.1.0 | 2009-02-22 | Rewrite language logic. |
| 1.2.0 | 2009-02-22 | Rewrite parameter parser (all MediaWiki supported languages now work), remove options parser (gender moved to core). |
| 1.2.1 | 2009-02-22 | Gender support for 'babel' message. |
| 1.2.2 | 2009-02-22 | Change parser hook callback to be PHP 5.2.0 and lower compatible. |
| 1.2.3 | 2009-02-26 | Comment and whitespace alteration, fix possible exception by always returning null on an invalid language. |
| 1.3.0 | 2009-07-23 | Replace language code handling with CDB. |
| 1.4.0 | 2009-08-14 | New style magic words. |
| 1.4.1 | 2009-08-15 | Do not handle empty values. |
| 1.5.0 | 2011-01-20 | Updated language codes and names database, improve general code quality. |
| 1.6.0 | 2011-01-21 | Category name configuration moved from MediaWiki namespace messages to $wgBabelCategoryNames configuration variable. |
| 1.7.0 | 2011-01-24 | Flexibility and code quality improvements. Replaced $wgBabelUseLevelZeroCategory, $wgBabelUseSimpleCategories, and $wgBabelUseMainCategories with $wgBabelCategoryNames, $wgBabelMainCategory, and $wgBabelDefaultLevel. |
| 1.7.1 | 2011-07-14 | (bug 29663) Do nothing if the username of "babel-autocreate-user" is invalid. Do not create categories if the user is blocked. |
| 1.7.2 | 2011-08-09 | Use ResourceLoader for adding CSS. |
[edit] See also
- meta:Babel extension - これはWikimediaのwiki上で実装する必要があるかどうかに関する議論です。
|
|
この拡張機能はWikimediaの一つもしくは複数のwikiで利用されています。このことは拡張機能が安定していて高いトラフィックのウェブサイトでも十分に動作することを意味します。MediaWiki.orgにインストールされている拡張機能の全リストはバージョン情報ページで見ることができます。 |