Module:Lang/configuration:修订间差异
外观
IdleTap-bot(留言 | 贡献) 导入自求闻百科 |
CaelLab-import(留言 | 贡献) 导入自中文维基百科 |
||
| 第34行: | 第34行: | ||
['template'] = true, -- supplied by external templates to provide template name for error messaging ({{nihongo}}, etc) | ['template'] = true, -- supplied by external templates to provide template name for error messaging ({{nihongo}}, etc) | ||
['noerror'] = true, | |||
}, | }, | ||
['params_lang_t'] = { -- unique to {{lang}} | ['params_lang_t'] = { -- unique to {{lang}} | ||
[1] = true, -- alias of |code= | [1] = true, -- alias of |code= | ||
| 第111行: | 第113行: | ||
['lang_err_cat'] = 'Lang和lang-xx模板错误', | ['lang_err_cat'] = 'Lang和lang-xx模板错误', | ||
['undefined'] = '未定义', | ['undefined'] = '未定义', | ||
['empty'] = '空/未定义', | |||
} | } | ||
--[[--------------------------< V A L I D A T E _ I T A L I C _ T >-------------------------------------------- | --[[--------------------------< V A L I D A T E _ I T A L I C _ T >-------------------------------------------- | ||
| 第126行: | 第129行: | ||
local validate_italic_t = { | local validate_italic_t = { | ||
['multi_italic'] = ' | ['multi_italic'] = '只应指定 |italic=、|italics= 或 |i= 中的一个', | ||
} | } | ||
--[[--------------------------< V A L I D A T E _ T E X T _ T >------------------------------------------------ | --[[--------------------------< V A L I D A T E _ T E X T _ T >------------------------------------------------ | ||
| 第136行: | 第139行: | ||
['no_text'] = '无文本', | ['no_text'] = '无文本', | ||
['malformed_markup'] = '文本有格式不正确的标记', | ['malformed_markup'] = '文本有格式不正确的标记', | ||
['italic_markup'] = ' | ['italic_markup'] = '模板中指定了斜体,但是文本有斜体标记', | ||
} | } | ||
| 第144行: | 第147行: | ||
local text_script_match_test_t = { | local text_script_match_test_t = { | ||
['latn_txt_mismatch'] = ' | ['latn_txt_mismatch'] = '指定的書寫系統標籤非拉丁字母,但文本為拉丁字母。', | ||
['latn_scr_mismatch'] = ' | ['latn_scr_mismatch'] = '指定的書寫系統標籤是拉丁字母,但文本第 $1 個字元「$2」不是拉丁字母。', -- $1 identifies offending character's position; $2 is the character | ||
} | } | ||
| 第153行: | 第156行: | ||
local lang_t = { | local lang_t = { | ||
['conflict_n_param'] = ' | ['conflict_n_param'] = '參數 {{{$1}}} 和 |$2= 衝突,會優先使用 {{{$1}}}。', -- $1 is positional param number, $2 is named param; shared with _lang_xx() | ||
['conflict_n_param_types'] = { | ['conflict_n_param_types'] = { | ||
['code'] = 'code', | ['code'] = 'code', | ||
| 第159行: | 第162行: | ||
['translit'] = 'translit', | ['translit'] = 'translit', | ||
}, | }, | ||
['invalid_proto'] = ' | ['invalid_proto'] = '參數 |proto 的傳入值 $1 無效', -- _lang_xx also emits this message | ||
} | } | ||
--[[--------------------------< L A N G _ X X _ T >------------------------------------------------------------ | --[[--------------------------< L A N G _ X X _ T >------------------------------------------------------------ | ||
]] | ]] | ||
local lang_xx_t = { | local lang_xx_t = { | ||
['conflict_n_lit'] = ' | ['conflict_n_lit'] = '參數 {{{$1}}} 和 |lit= 或 |translation= 衝突,會優先使用 {{{$1}}}。', -- $1 is positional parameter; can be either 3 ({{lang-??}}) or 4 ({{langx}}) | ||
['conflict_lit'] = ' | ['conflict_lit'] = '參數 |lit= 和 |translation= 衝突,會優先使用 |translation= 。', | ||
['conflict_link'] = ' | ['conflict_link'] = '參數 |links= 和 |link= 衝突,會優先使用 |link= 。', | ||
['invalid_xlit_std'] = ' | ['invalid_xlit_std'] = '參數 translit-std 無效', | ||
['romanization'] = '羅馬化', | ['romanization'] = '羅馬化', | ||
['translit_nonlatn'] = ' | ['translit_nonlatn'] = '拉丁字母轉寫第 $1 個字元「$2」不是拉丁字母。', -- _transl() also emits this message; $1 identifies offending character's position; $2 is the character | ||
['xlit_of_latn'] = ' | ['xlit_of_latn'] = '拉丁字母轉寫', | ||
} | } | ||
| 第190行: | 第193行: | ||
local transl_t = { | local transl_t = { | ||
['unrecog_xlit_std'] = ' | ['unrecog_xlit_std'] = '无法识别转译标准 $1', -- $1 is |translit_std- parameter value | ||
['no_text'] = ' | ['no_text'] = '缺少文本', | ||
['missing_lang_scr'] = ' | ['missing_lang_scr'] = '缺少语言/字母代码', | ||
['unrecog_lang_scr'] = ' | ['unrecog_lang_scr'] = '无法识别语言/字母代码 $1', -- $1 is the language/script code | ||
} | } | ||
| 第201行: | 第204行: | ||
local get_ietf_parts_t = { | local get_ietf_parts_t = { | ||
['maint_promo_cat'] = 'Lang和lang- | ['maint_promo_cat'] = 'Lang和lang-xx代码已升格为ISO 639-1|$1', -- $1 is ISO 639-2/3 subtag | ||
['maint_promo_msg'] = ' | ['maint_promo_msg'] = '語言代码 $1 已升格为代码 $2', -- $1 is ISO 639-2/3 subtag, $2 is synonymous ISO 639-1 subtag | ||
['missing_lang_tag'] = '缺少语言标签', -- also used in _langx() | ['missing_lang_tag'] = '缺少语言标签', -- also used in _langx() | ||
['redundant_scr'] = ' | ['redundant_scr'] = '冗餘的書寫系統標籤', | ||
['redundant_reg'] = ' | ['redundant_reg'] = '冗餘的區域標籤', | ||
['redundant_var'] = ' | ['redundant_var'] = '冗餘的變體標籤', | ||
['unrecog_tag'] = ' | ['unrecog_tag'] = '無法辨識語言標籤 $1', -- $1 is the whole language tag | ||
['unrecog_code'] = ' | ['unrecog_code'] = '無法辨識代碼 $1', -- $1 is code | ||
['unrecog_reg_code'] = ' | ['unrecog_reg_code'] = '無法辨識代碼 $2 所指定的區域 $1。', -- $1 is region, $2 is code | ||
['unrecog_scr_code'] = ' | ['unrecog_scr_code'] = '無法辨識代碼 $2 所指定的書寫系統 $1。', -- $1 is script, $2 is code | ||
['script_code'] = ' | ['script_code'] = '代碼 $2 無法和書寫系統 $1 一起使用', -- $1 is script, $2 is code | ||
['unrecog_var'] = ' | ['unrecog_var'] = '無法辨識變體 $1', -- $1 is variant | ||
['unrecog_var_code'] = ' | ['unrecog_var_code'] = '無法辨識代碼 $2 所指定的變體 $1。', -- $1 is variant, $2 is code | ||
['unrecog_var_code_scr'] = ' | ['unrecog_var_code_scr'] = '無法辨識代碼—書寫系統配對 $2-$3 所指定的變體 $1。', -- $1 is variant, $2 is code, $3 is script | ||
['unrecog_var_code_reg'] = ' | ['unrecog_var_code_reg'] = '無法辨識代碼—區域配對 $2-$3 所指定的變體 $1。', -- $1 is variant, $2 is code, $3 is region | ||
['unrecog_pri'] = ' | ['unrecog_pri'] = '無法辨識私有標籤 $1', -- $1 is private tag | ||
} | } | ||
| 第225行: | 第228行: | ||
local language_name_get_t = { | local language_name_get_t = { | ||
['deprecated_cat'] = 'Lang和lang- | ['deprecated_cat'] = 'Lang和lang-xx使用已弃用的ISO 639代码|$1', -- $1 is deprecated ISO 639 subtag | ||
['deprecated_msg'] = ' | ['deprecated_msg'] = '代码 $1 已弃用', -- $1 is deprecated ISO 639 subtag | ||
} | } | ||
| 第257行: | 第260行: | ||
['explicit_cat'] = '明確引用', -- for explicitly citing this wiki's language | ['explicit_cat'] = '明確引用', -- for explicitly citing this wiki's language | ||
['cat_postfix'] = '的條目', -- postfix for individual languages | ['cat_postfix'] = '的條目', -- postfix for individual languages | ||
['cat_nonezh'] = '非中文內容', | ['cat_nonezh'] = '非中文內容', | ||
} | } | ||
--[[--------------------------< M A K E _ T R A N S L I T _ T >------------------------------------------------ | --[[--------------------------< M A K E _ T R A N S L I T _ T >------------------------------------------------ | ||
2026年10月14日 (三) 07:24的最新版本
此模块的文档可以在Module:Lang/configuration/doc创建
--[[--------------------------< T E M P L A T E S _ T >--------------------------------------------------------
]]
local templates_t = {
lang = 'Lang',
langx = 'Langx',
langxx = 'Lang-xx',
transliteration = 'Transl',
}
--[[--------------------------< K N O W N _ P A R A M S >------------------------------------------------------
lists of all parameters known to {{lang}}, {{langx}}, {{lang-xx}} templates.
Exception: |fn= is known to {{lang}} but is not a 'lang' template; that parameter causes the module to call the
specified lang(), lang_xx_inherit(), or lang_xx_italic() function. These separate functions set |fn= to nill
and then do the known-param checking on the other template parameters
]]
local known_params_t = {
['common_params_all_t'] = { -- these parameters common to {{lang}}, {{langx}}, and {{lang-xx}}
['code'] = true,
['text'] = true,
['rtl'] = true,
['italic'] = true,
['italics'] = true,
['i'] = true,
['size'] = true,
['proto'] = true,
['nocat'] = true,
['cat'] = true,
['template'] = true, -- supplied by external templates to provide template name for error messaging ({{nihongo}}, etc)
['noerror'] = true,
},
['params_lang_t'] = { -- unique to {{lang}}
[1] = true, -- alias of |code=
[2] = true, -- alias of |text=
},
['params_x_t'] = { -- common to {{langx}} and {{lang-xx}}
['translit'] = true,
['translit-std'] = true,
['translit-script'] = true,
['translation'] = true,
['lit='] = true,
['label'] = true,
['link'] = true,
['links'] = true,
['lit'] = true,
},
['params_langx_t'] = { -- unique to {{langx}}
[1] = true, -- alias of |code=
[2] = true, -- alias of |text=
[3] = true, -- alias of |translit=
[4] = true, -- alias of |translation=
},
['params_lang_xx_t'] = { -- unique to {{lang-xx}}
[1] = true, -- alias of |text=
[2] = true, -- alias of |translit=
[3] = true, -- alias of |translation=
['script'] = true, -- these needed to override default params in {{lang-??}} templates
['region'] = true,
['variant'] = true,
},
}
--[[
=============================<< M E S S A G I N G T A B L E S >>=============================================
these tables are for internationalization. Messages or fragments thereof are mostly grouped by function name.
Some messages are shared by functions other than the function table that lists the message or fragment.
]]
--[[--------------------------< K E Y W O R D S _ T >----------------------------------------------------------
]]
local keywords_t = {
['affirmative'] = 'yes',
['negative'] = 'no',
['unset'] = 'unset',
['invert'] = 'invert',
['default'] = 'default',
}
--[[--------------------------< M I S C _ T E X T _ T >--------------------------------------------------------
]]
local misc_text_t = {
['error'] = '错误', -- make_error_msg(), tag_from_name()
['language'] = '语言', -- make_translit(), lang_xx(), name_from_tag()
['help'] = '帮助',
}
--[[--------------------------< M A K E _ E R R O R _ M S G _ T >----------------------------------------------
]]
local make_error_msg_t = {
['xlit_err_cat'] = 'Transliteration模板错误',
['lang_err_cat'] = 'Lang和lang-xx模板错误',
['undefined'] = '未定义',
['empty'] = '空/未定义',
}
--[[--------------------------< V A L I D A T E _ I T A L I C _ T >--------------------------------------------
]]
local parameter_validate_t = {
['invalid_param'] = '无效参数:|$1=', -- $1 is parameter name
}
--[[--------------------------< V A L I D A T E _ I T A L I C _ T >--------------------------------------------
]]
local validate_italic_t = {
['multi_italic'] = '只应指定 |italic=、|italics= 或 |i= 中的一个',
}
--[[--------------------------< V A L I D A T E _ T E X T _ T >------------------------------------------------
]]
local validate_text_t = {
['no_text'] = '无文本',
['malformed_markup'] = '文本有格式不正确的标记',
['italic_markup'] = '模板中指定了斜体,但是文本有斜体标记',
}
--[[--------------------------< T E X T _ S C R I P T _ M A T C H _ T E S T _ T >------------------------------
]]
local text_script_match_test_t = {
['latn_txt_mismatch'] = '指定的書寫系統標籤非拉丁字母,但文本為拉丁字母。',
['latn_scr_mismatch'] = '指定的書寫系統標籤是拉丁字母,但文本第 $1 個字元「$2」不是拉丁字母。', -- $1 identifies offending character's position; $2 is the character
}
--[[--------------------------< L A N G _ T >------------------------------------------------------------------
]]
local lang_t = {
['conflict_n_param'] = '參數 {{{$1}}} 和 |$2= 衝突,會優先使用 {{{$1}}}。', -- $1 is positional param number, $2 is named param; shared with _lang_xx()
['conflict_n_param_types'] = {
['code'] = 'code',
['text'] = 'text',
['translit'] = 'translit',
},
['invalid_proto'] = '參數 |proto 的傳入值 $1 無效', -- _lang_xx also emits this message
}
--[[--------------------------< L A N G _ X X _ T >------------------------------------------------------------
]]
local lang_xx_t = {
['conflict_n_lit'] = '參數 {{{$1}}} 和 |lit= 或 |translation= 衝突,會優先使用 {{{$1}}}。', -- $1 is positional parameter; can be either 3 ({{lang-??}}) or 4 ({{langx}})
['conflict_lit'] = '參數 |lit= 和 |translation= 衝突,會優先使用 |translation= 。',
['conflict_link'] = '參數 |links= 和 |link= 衝突,會優先使用 |link= 。',
['invalid_xlit_std'] = '參數 translit-std 無效',
['romanization'] = '羅馬化',
['translit_nonlatn'] = '拉丁字母轉寫第 $1 個字元「$2」不是拉丁字母。', -- _transl() also emits this message; $1 identifies offending character's position; $2 is the character
['xlit_of_latn'] = '拉丁字母轉寫',
}
--[[--------------------------< T A G _ F R O M _ N A M E _ T >------------------------------------------------
]]
local tag_from_name_t = {
['lang_not_found'] = '语言:$1 未找到', -- $1 is language name parameter value
['missing_lang_name'] = '缺少语言名称',
}
--[[--------------------------< T R A N S L _ T >--------------------------------------------------------------
]]
local transl_t = {
['unrecog_xlit_std'] = '无法识别转译标准 $1', -- $1 is |translit_std- parameter value
['no_text'] = '缺少文本',
['missing_lang_scr'] = '缺少语言/字母代码',
['unrecog_lang_scr'] = '无法识别语言/字母代码 $1', -- $1 is the language/script code
}
--[[--------------------------< G E T _ I E T F _ P A R T S _ T >----------------------------------------------
]]
local get_ietf_parts_t = {
['maint_promo_cat'] = 'Lang和lang-xx代码已升格为ISO 639-1|$1', -- $1 is ISO 639-2/3 subtag
['maint_promo_msg'] = '語言代码 $1 已升格为代码 $2', -- $1 is ISO 639-2/3 subtag, $2 is synonymous ISO 639-1 subtag
['missing_lang_tag'] = '缺少语言标签', -- also used in _langx()
['redundant_scr'] = '冗餘的書寫系統標籤',
['redundant_reg'] = '冗餘的區域標籤',
['redundant_var'] = '冗餘的變體標籤',
['unrecog_tag'] = '無法辨識語言標籤 $1', -- $1 is the whole language tag
['unrecog_code'] = '無法辨識代碼 $1', -- $1 is code
['unrecog_reg_code'] = '無法辨識代碼 $2 所指定的區域 $1。', -- $1 is region, $2 is code
['unrecog_scr_code'] = '無法辨識代碼 $2 所指定的書寫系統 $1。', -- $1 is script, $2 is code
['script_code'] = '代碼 $2 無法和書寫系統 $1 一起使用', -- $1 is script, $2 is code
['unrecog_var'] = '無法辨識變體 $1', -- $1 is variant
['unrecog_var_code'] = '無法辨識代碼 $2 所指定的變體 $1。', -- $1 is variant, $2 is code
['unrecog_var_code_scr'] = '無法辨識代碼—書寫系統配對 $2-$3 所指定的變體 $1。', -- $1 is variant, $2 is code, $3 is script
['unrecog_var_code_reg'] = '無法辨識代碼—區域配對 $2-$3 所指定的變體 $1。', -- $1 is variant, $2 is code, $3 is region
['unrecog_pri'] = '無法辨識私有標籤 $1', -- $1 is private tag
}
--[[--------------------------< L A N G U A G E _ N A M E _ G E T _ T >----------------------------------------
]]
local language_name_get_t = {
['deprecated_cat'] = 'Lang和lang-xx使用已弃用的ISO 639代码|$1', -- $1 is deprecated ISO 639 subtag
['deprecated_msg'] = '代码 $1 已弃用', -- $1 is deprecated ISO 639 subtag
}
--[[--------------------------< H T M L _ T I T L E _ T E X T _ T >--------------------------------------------
]]
local make_text_html_t = {
['zxx'] = '文本', -- for zxx no linguistic content
['collective'] = '汇集文本', -- for collective languages
['individual'] = '文本', -- for individual languages
}
--[[--------------------------< T R A N S L A T I O N _ M A K E _ T >------------------------------------------
]]
local translation_make_t = {
['lit_xlation'] = '直译', -- article title fragment and html title attribute
-- ['lit_abbr'] = 'lit.',
}
--[[--------------------------< M A K E _ C A T E G O R Y _ T >------------------------------------------------
]]
local make_category_t = {
-- ['collective_cat'] = 'Category:Articles with text in', -- for collective languages
['cat_prefix'] = 'Category:含有', -- prefix for explicitly cited and individual languages
['explicit_cat'] = '明確引用', -- for explicitly citing this wiki's language
['cat_postfix'] = '的條目', -- postfix for individual languages
['cat_nonezh'] = '非中文內容',
}
--[[--------------------------< M A K E _ T R A N S L I T _ T >------------------------------------------------
]]
local make_translit_t = {
['script'] = '字母',
['transliteration'] = '转写',
}
--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]
return {
known_params_t = known_params_t,
templates_t = templates_t,
get_ietf_parts_t = get_ietf_parts_t, -- messaging tables
keywords_t = keywords_t,
lang_t = lang_t,
lang_xx_t = lang_xx_t,
language_name_get_t = language_name_get_t,
make_category_t = make_category_t,
make_error_msg_t = make_error_msg_t,
make_text_html_t = make_text_html_t,
make_translit_t = make_translit_t,
misc_text_t = misc_text_t,
parameter_validate_t = parameter_validate_t,
tag_from_name_t = tag_from_name_t,
text_script_match_test_t = text_script_match_test_t,
transl_t = transl_t,
translation_make_t = translation_make_t,
validate_italic_t = validate_italic_t,
validate_text_t = validate_text_t,
}