モジュール:Multilingual descriptionのソースを表示
←
モジュール:Multilingual description
ナビゲーションに移動
検索に移動
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
local p = {} function mld(pargs) local frame = mw.getCurrentFrame() local sorting = require('Module:Multilingual description/sort') local processed = {} local ret = {} local addDesc = function(langcode, val) table.insert( ret, frame:expandTemplate{ title = 'ls', args = { langcode, val, classes = 'description' } } ) end for k, v in pairs( sorting ) do if pargs[v] then addDesc(v, pargs[v]) end processed[v] = 1 end for k, v in pairs( pargs ) do if not processed[k] and type(k) == 'string' and mw.language.isSupportedLanguage(k) then addDesc(k, v) end end return table.concat(ret) end function p.mld(frame) local pargs = ( frame:getParent() or {} ).args or {} return mld(pargs) end --function p.runTests() --local expected = '{{ls|de|Leipzig ist|classes=description}}{{ls|en|Leipzig is|classes=description}}{{ls|fr|Leipzig est|classes=description}}{{ls|hsb|Lipsk je|classes=description}}{{ls|oc|Leipzig es|classes=description}}' --local input = { ['fr'] = 'Leipzig est', ['en'] = 'Leipzig is', ['hsb'] = 'Lipsk je', ['de'] = 'Leipzig ist', ['oc'] = 'Leipzig es' } --return mld(input) == expected --end return p
モジュール:Multilingual description
に戻る。
ナビゲーション メニュー
個人用ツール
ログイン
名前空間
モジュール
議論
English
表示
閲覧
履歴表示
その他
検索
案内
索引
脳科学辞典について
最近完成した項目
編集履歴
執筆にあたって
引用の仕方
著作権について
免責事項
問い合わせ
各学会編集のオンライン用語辞典
About us (in English)
Twitter (BrainScienceBot)
ツール
リンク元
関連ページの更新状況
特別ページ
ページ情報
他のプロジェクト