Sửa đổi Mô đun:Main

Chú ý: Bạn chưa đăng nhập và địa chỉ IP của bạn sẽ hiển thị công khai khi lưu các sửa đổi.

Bạn có thể tham gia như người biên soạn chuyên nghiệp và lâu dài ở Bách khoa Toàn thư Việt Nam, bằng cách đăng ký và đăng nhập - IP của bạn sẽ không bị công khai và có thêm nhiều lợi ích khác.

Các sửa đổi có thể được lùi lại. Xin hãy kiểm tra phần so sánh bên dưới để xác nhận lại những gì bạn muốn làm, sau đó lưu thay đổi ở dưới để hoàn tất việc lùi lại sửa đổi.

Bản hiện tại Nội dung bạn nhập
Dòng 1: Dòng 1:
 
--[[
 
--[[
 
-- This module produces a link to a main article or articles. It implements the
 
-- This module produces a link to a main article or articles. It implements the
-- bản mẫu {{main}}.
+
-- template {{main}}.
 
--  
 
--  
 
-- If the module is used in category or category talk space, it produces "The
 
-- If the module is used in category or category talk space, it produces "The
 
-- main article for this category is xxx". Otherwise, it produces
 
-- main article for this category is xxx". Otherwise, it produces
-- "Mục từ chi tiết: xxx".
+
-- "Main article: xxx".
 
--]]
 
--]]
  
Dòng 27: Dòng 27:
 
if #pages == 0 and mw.title.getCurrentTitle().namespace == 0 then
 
if #pages == 0 and mw.title.getCurrentTitle().namespace == 0 then
 
return mHatnote.makeWikitextError(
 
return mHatnote.makeWikitextError(
'không có trang nào được chỉ định',
+
'no page names specified',
'Template:Chính#Các lỗi',
+
'Template:Main#Errors',
 
args.category
 
args.category
 
)
 
)
Dòng 45: Dòng 45:
 
local firstPage = string.gsub(args[1], '|.*$', '')
 
local firstPage = string.gsub(args[1], '|.*$', '')
 
-- Find the pagetype.
 
-- Find the pagetype.
local pageType = mHatnote.findNamespaceId(firstPage) == 0 and 'Mục từ' or 'Trang'
+
local pageType = mHatnote.findNamespaceId(firstPage) == 0 and 'article' or 'page'
 
-- Make the formatted link text
 
-- Make the formatted link text
 
list = mHatlist.andList(args, true)
 
list = mHatlist.andList(args, true)
Dòng 54: Dòng 54:
 
if (curNs == 14) or (curNs == 15) then --category/talk namespaces
 
if (curNs == 14) or (curNs == 15) then --category/talk namespaces
 
mainForm = isPlural and
 
mainForm = isPlural and
'%s chi tiết cho [[BKTT:Thể loại|thể loại]] này là %s'
+
'The main %ss for this [[Help:Categories|category]] are %s'
 
or
 
or
'%s chi tiết cho [[BKTT:Thể loại|thể loại]] này là %s'
+
'The main %s for this [[Help:Categories|category]] is %s'
 
else
 
else
mainForm = isPlural and '%s chi tiết: %s' or '%s chi tiết: %s'
+
mainForm = isPlural and 'Main %ss: %s' or 'Main %s: %s'
 
end
 
end
 
local text = string.format(mainForm, pageType, list)
 
local text = string.format(mainForm, pageType, list)
 
-- Process the options and pass the text to the _rellink function in
 
-- Process the options and pass the text to the _rellink function in
-- [[Module:Hatnote]].
+
-- [[Mô đun:Hatnote]].
 
options = options or {}
 
options = options or {}
 
local hnOptions = {
 
local hnOptions = {

Lưu ý rằng tất cả các đóng góp của bạn tại Bách khoa Toàn thư Việt Nam sẽ được phát hành theo giấy phép Creative Commons Ghi công–Chia sẻ tương tự (xem thêm Bản quyền). Nếu bạn không muốn những gì mình viết ra sẽ có thể được bình duyệt và có thể bị sửa đổi, và không sẵn lòng cho phép phát hành lại, xin đừng nhấn nút “Lưu trang”. Đảm bảo rằng chính bạn là tác giả của những gì mình viết ra, hoặc chép nó từ một nguồn thuộc phạm vi công cộng hoặc tự do tương đương. ĐỪNG ĐĂNG NỘI DUNG CÓ BẢN QUYỀN MÀ CHƯA XIN PHÉP!

Hủy bỏ Trợ giúp sửa đổi (mở cửa sổ mới)

Bản mẫu dùng trong trang này: