Wikeriadur
brwiktionary
https://br.wiktionary.org/wiki/Wikeriadur:Degemer
MediaWiki 1.47.0-wmf.7
case-sensitive
Media
Dibar
Kaozeal
Implijer
Kaozeadenn Implijer
Wikeriadur
Kaozeadenn Wikeriadur
Restr
Kaozeadenn Restr
MediaWiki
Kaozeadenn MediaWiki
Patrom
Kaozeadenn Patrom
Skoazell
Kaozeadenn Skoazell
Rummad
Kaozeadenn Rummad
Stagadenn
Kaozeadenn Stagadenn
TimedText
TimedText talk
Modulenn
Kaozeadenn modulenn
Event
Event talk
daougromm
0
69902
380774
2026-06-19T15:14:00Z
Bistrakollboued
5959
Pajenn krouet gant : "{{=br=}} : eus [[daou]] ha [[kromm]]. {{-ak-|br}} '''daougromm''' * [[bezañ en e zaougromm]] * [[bezañ etre e zaougromm]] * [[mont en e zaougromm]] *[[daougrommañ]]"
380774
wikitext
text/x-wiki
{{=br=}}
: eus [[daou]] ha [[kromm]].
{{-ak-|br}}
'''daougromm'''
* [[bezañ en e zaougromm]]
* [[bezañ etre e zaougromm]]
* [[mont en e zaougromm]]
*[[daougrommañ]]
lscoysmi4hn1xj86nxu0kjnxi5rpqqb
380775
380774
2026-06-19T20:06:10Z
Bistrakollboued
5959
380775
wikitext
text/x-wiki
{{=br=}}
: Eus [[daou]] ha [[kromm]].
{{-ak-|br}}
'''daougromm''', {{l}} [[daougrommoù]]
* [[bezañ en e zaougromm]]
* [[bezañ etre e zaougromm]]
* [[mont en e zaougromm]]
{{-dvr-}}
*[[daougrommañ]]
[[rummad:daou]]
[[rummad:kromm]]
f2n2b2yatlp3l8dwnlbf1sohdv4lphd
Modulenn:translations
828
69903
380776
2026-06-19T23:07:54Z
Iriep
3090
Pajenn krouet gant : "local export = {} local anchors_module = "Modulenn:eorioù" local debug_track_module = "Modulenn:diveugiñ/heuliañ" local languages_module = "Modulenn:yezhoù" local links_module = "Modulenn:liammoù" local pages_module = "Modulenn:pajennoù" local parameters_module = "Modulenn:arventennoù" local string_utilities_module = "Modulenn:talvoudoù chadenn" local templatestyles_module = "Modulenn:PatromStil" local utilities_module = "Modulenn:talvoudo^ù" local wikimedia..."
380776
Scribunto
text/plain
local export = {}
local anchors_module = "Modulenn:eorioù"
local debug_track_module = "Modulenn:diveugiñ/heuliañ"
local languages_module = "Modulenn:yezhoù"
local links_module = "Modulenn:liammoù"
local pages_module = "Modulenn:pajennoù"
local parameters_module = "Modulenn:arventennoù"
local string_utilities_module = "Modulenn:talvoudoù chadenn"
local templatestyles_module = "Modulenn:PatromStil"
local utilities_module = "Modulenn:talvoudo^ù"
local wikimedia_languages_module = "Modulenn:wikimedia yezhoù"
local concat = table.concat
local html_create = mw.html.create
local insert = table.insert
local load_data = mw.loadData
local new_title = mw.title.new
local require = require
--[==[
Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==]
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function format_categories(...)
format_categories = require(utilities_module).format_categories
return format_categories(...)
end
local function full_link(...)
full_link = require(links_module).full_link
return full_link(...)
end
local function get_link_page(...)
get_link_page = require(links_module).get_link_page
return get_link_page(...)
end
local function get_wikimedia_lang(...)
get_wikimedia_lang = require(wikimedia_languages_module).getByCode
return get_wikimedia_lang(...)
end
local function language_link(...)
language_link = require(links_module).language_link
return language_link(...)
end
local function normalize_anchor(...)
normalize_anchor = require(anchors_module).normalize_anchor
return normalize_anchor(...)
end
local function plain_link(...)
plain_link = require(links_module).plain_link
return plain_link(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function remove_links(...)
remove_links = require(links_module).remove_links
return remove_links(...)
end
local function split_on_slashes(...)
split_on_slashes = require(links_module).split_on_slashes
return split_on_slashes(...)
end
local function templatestyles(...)
templatestyles = require(templatestyles_module)
return templatestyles(...)
end
local function track(...)
track = require(debug_track_module)
return track(...)
end
--[==[
Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==]
local br
local function get_br()
br, get_br = require(languages_module).getByCode("br"), nil
return br
end
local headword_data
local function get_headword_data()
headword_data, get_headword_data = load_data("Modulenn:pennger/roadennoù"), nil
return headword_data
end
local parameters_data
local function get_parameters_data()
parameters_data, get_parameters_data = load_data("Modulenn:arventennoù/roadennoù"), nil
return parameters_data
end
local translations_data
local function get_translations_data()
translations_data, get_translations_data = load_data("Modulenn:troidigezhioù/roadennoù"), nil
return translations_data
end
local function is_translation_subpage(pagename)
if (headword_data or get_headword_data()).page.namespace ~= "" then
return false
elseif not pagename then
pagename = (headword_data or get_headword_data()).encoded_pagename
end
return pagename:match("./troidigezhioù$") and true or false
end
local function canonical_pagename()
local pagename = (headword_data or get_headword_data()).encoded_pagename
return is_translation_subpage(pagename) and pagename:sub(1, -14) or pagename
end
local function interwiki(terminfo, term, lang, langcode)
-- No interwiki link if term is empty/missing
if not term or #term < 1 then
terminfo.interwiki = false
return
end
-- Percent-decode the term.
term = decode_uri(terminfo.term, "PATH")
-- Don't show an interwiki link if it's an invalid title.
if not new_title(term) then
terminfo.interwiki = false
return
end
local interwiki_langcode = (translations_data or get_translations_data()).interwiki_langs[langcode]
local wmlangs = interwiki_langcode and {get_wikimedia_lang(interwiki_langcode)} or lang:getWikimediaLanguages()
-- Don't show the interwiki link if the language is not recognised by Wikimedia.
if #wmlangs == 0 then
terminfo.interwiki = false
return
end
local sc = terminfo.sc
local target_page = get_link_page(term, lang, sc)
local split = split_on_slashes(target_page)
if not split[1] then
terminfo.interwiki = false
return
end
target_page = split[1]
local wmlangcode = wmlangs[1]:getCode()
local interwiki_link = language_link{
lang = lang,
sc = sc,
term = wmlangcode .. ":" .. target_page,
alt = "(" .. wmlangcode .. ")",
tr = "-"
}
terminfo.interwiki = tostring(html_create("span")
:addClass("tpos")
:wikitext(" " .. interwiki_link)
)
end
function export.show_terminfo(terminfo, check)
local lang = terminfo.lang
local langcode, langname = lang:getCode(), lang:getCanonicalName()
-- Translations must be for mainspace languages.
if not lang:hasType("reizh") then
error("Dav eo d'an troidigezhioù bezañ testenniekaet hag aprouet en anv-spas pennañ yezhoù.")
else
local disallowed = (translations_data or get_translations_data()).disallowed
local err_msg = disallowed[langcode]
if err_msg then
error("N'eo ket aotreet an troidigezhioù e " .. langname .. " (" .. langcode .. "). " .. langname .. " an troidigezhioù a zlefe " .. err_msg)
end
local fullcode = lang:getFullCode()
if fullcode ~= langcode then
err_msg = disallowed[fullcode]
if err_msg then
langname = lang:getFullName()
error("N'eo ket aotreet an troidigezhioù e " .. langname .. " (" .. fullcode .. "). " .. langname .. " an troidigezhioù a zlefe " .. err_msg)
end
end
end
if langcode == "br" then
if terminfo.interwiki then
error("N'eo ket aotreet an troidigezhioù etrewiki evit ar brezhoneg; dav e vefe liammañ atav ouzh ur Wikeriadur disheñvel")
end
local current_L2 = require(pages_module).get_current_L2()
if current_L2 ~= "Treuzyezhek" and mw.title.getCurrentTitle().nsText ~= "Wikeriadur" then
if current_L2 then
error("Troidigezhioù brezhonek aotreet er rann Treuzyezhek hepken, n'eo ket e" .. current_L2)
else
error("Troidigezhioù saoznek aotreet er rann Treuzyezhek hepken, n'eo ket er-maez eus L2 all")
end
end
end
local term = terminfo.term
-- Check if there is a term. Don't show the interwiki link if there is nothing to link to.
if not term then
-- Track entries that don't provide a term.
-- FIXME: This should be a category.
track("troidigezhioù/ger ebet")
track("troidigezhioù/ger ebet" .. langcode)
end
if terminfo.interwiki then
interwiki(terminfo, term, lang, langcode)
end
langcode = lang:getFullCode()
if (translations_data or get_translations_data()).need_super[langcode] then
local tr = terminfo.tr
if tr ~= nil then
terminfo.tr = tr:gsub("%d[%d%*%-]*%f[^%d%*]", "<sup>%0</sup>")
end
end
terminfo.show_qualifiers = true
local link = full_link(terminfo, "troidigezh")
local canonical_name = lang:getCanonicalName()
local full_name = lang:getFullName()
local categories = {"Termenoù gant " .. canonical_name .. " troidigezhioù"}
if canonical_name ~= full_name then
insert(categories, "Termenoù gant " .. full_name .. " troidigezhioù")
end
if check then
link = tostring(html_create("span")
:addClass("ttbc")
:tag("sup")
:addClass("ttbc")
:wikitext("([[WT:Troidigezhioù#Troidigezhioù da vezañ adlennet|gwiriet]]) mar plij")
:done()
:wikitext(" " .. link)
)
insert(categories, "Goulennoù adweladennoù e " .. langname .. " troidigezhioù")
end
return link .. format_categories(categories, br or get_br(), nil, canonical_pagename())
end
-- Implements {{t}}, {{t+}}, {{t-check}} and {{t+check}}.
function export.show(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["troidigezhioù"])
local check = frame.args.check
return export.show_terminfo({
lang = args[1],
sc = args.sc,
track_sc = true,
term = args[2],
alt = args.alt,
id = args.id,
genders = args[3],
tr = args.tr,
ts = args.ts,
lit = args.lit,
q = args.q,
qq = args.qq,
l = args.l,
ll = args.ll,
refs = args.ref,
interwiki = frame.args.interwiki,
}, check and check ~= "")
end
local function add_id(div, id)
return id and div:attr("id", normalize_anchor("Troidigezhioù-" .. id)) or div
end
-- Implements {{trans-top}} and part of {{trans-top-also}}.
local function top(args, title, id, navhead)
local column_width = (args["ledander bann"] == "ledan" or args["ledander bann"] == "strizh") and "-" .. args["ledander ar bann"] or ""
local div = html_create("div")
:addClass("Stern merdeiñ")
:node(navhead)
:tag("div")
:addClass("Endalc'had merdeiñ")
:tag("taolenn")
:addClass("troidigezhioù")
:attr("rol", "kinnig")
:attr("lufrañ-roadennoù", title or "")
:tag("tr")
:tag("td")
:addClass("kell-troidigezhioù")
:addClass("multicolumn-list" .. column_width)
:attr("colspan", "3")
:allDone()
div = add_id(div, id)
local categories = {}
if not title then
insert(categories, "Talbenn an daolenn troidigezhioù a vank lufr")
end
local pagename = canonical_pagename()
if is_translation_subpage() then
insert(categories, "Ispajennoù troidigezh")
end
return (tostring(div):gsub("</td></tr></table></div></div>$", "")) ..
(#categories > 0 and format_categories(categories, br or get_br(), nil, pagename) or "") ..
-- Category to trigger [[MediaWiki:Gadget-TranslationAdder.js]]; we want this even on
-- user pages and such.
format_categories("Penngerioù gant boestoù troidigezhioù", nil, nil, nil, true) ..
templatestyles("Modulenn:troidigezhioù/stiloù.css")
end
-- Entry point for {{trans-top}}.
function export.top(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-laez"])
local title = args[1]
local id = args.id or title
title = title and remove_links(title)
return top(args, title, id, html_create("div")
:addClass("PennMerdeiñ")
:css("linennañ an destenn", "kleiz")
:wikitext(title or "Troidigezhioù")
)
end
-- Entry point for {{checktrans-top}}.
function export.check_top(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["checktrans-top"])
local text = "\n:''An troidigezhioù dindan o deus ezhomm da vezañ adlennet hag enlakaet amañ dindan en taolennoù troidigezhioù zo ezhomm anezho. See instructions at " ..
frame:expandTemplate{
title = "liamm ar rann",
args = {"Wikeriadur:Diskwel enmont#Troidigezhioù"}
} ..
".''\n"
local header = html_create("div")
:addClass("gwirdreuz")
:wikitext(text)
local subtitle = args[1]
local title = "Treuzkasadennoù da vezañ adlennet"
if subtitle then
title = title .. "‌: \"" .. subtitle .. "\""
end
-- No ID, since these should always accompany proper translation tables, and can't be trusted anyway (i.e. there's no use-case for links).
return tostring(header) .. "\n" .. top(args, title, nil, html_create("div")
:addClass("PennMerdeiñ")
:css("linennañ an destenn", "kleiz")
:wikitext(title or "Troidigezhioù")
)
end
-- Implements {{trans-bottom}}.
function export.bottom(frame)
-- Check nothing is being passed as a parameter.
process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-traoñ"])
return "</table></div></div>"
end
-- Implements {{trans-see}} and part of {{trans-top-also}}.
local function see(args, see_text)
local navhead = html_create("div")
:addClass("PennMerdeiñ")
:css("linennañ an destenn", "kleiz")
:wikitext(args[1] .. " ")
:tag("span")
:css("pouez polis", "normal")
:wikitext("— ")
:tag("i")
:wikitext(see_text)
:allDone()
local terms, id = args[2], args.id
if #terms == 0 then
terms[1] = args[1]
end
for i = 1, #terms do
local term_id = id[i] or id.default
local data = {
term = terms[i],
id = term_id and "Troidigezhioù-" .. term_id or "Troidigezhioù",
}
terms[i] = plain_link(data)
end
return navhead:wikitext(concat(terms, ",‎ "))
end
-- Entry point for {{trans-see}}.
function export.see(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-gwelet"])
local div = html_create("div")
:addClass("lesanv")
:addClass("SternVerdeiñ")
:node(see(args, "gwelet "))
return tostring(add_id(div, args.id.default or args[1]))
end
-- Entry point for {{trans-top-also}}.
function export.top_also(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-laez-ivez"])
local navhead = see(args, "gwelet ivez ")
local title = args[1]
local id = args.id.default or title
title = remove_links(title)
return top(args, title, id, navhead)
end
-- Implements {{translation subpage}}.
function export.subpage(frame)
process_params(frame:getParent().args, (parameters_data or get_parameters_data())["ispajenn an droidigezh"])
if not is_translation_subpage() then
error("Ne zlefe ar patrom-mañ bezañ implijet nemet war ispajennoù troidigezhioù, gant titloù a echu gant '/troidigezhioù'.")
end
-- "Translation subpages" category is handled by {{trans-top}}.
return ("''Er bajenn-mañ ez eus troidigezhioù evit ''%s''. Sellit ouzh ar pennad pennañ evit gouzout hiroc'h.''"):format(full_link{
lang = br or get_br(),
term = canonical_pagename(),
})
end
-- Implements {{t-needed}}.
function export.needed(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["t-rekiz"])
local lang, category = args[1], ""
local span = html_create("span")
:addClass("trreq")
:attr("roadennoù yezh", lang:getCode())
:tag("i")
:wikitext("ouzhpennit an droidigezh-mañ mar plij ganeoc'h")
:done()
if not args.nocat then
local type, sort = args[2], args.sort
if type == "arroudenn" then
category = "Goulenn troidigezhioù eus" .. lang:getCanonicalName() .. " menegoù"
elseif type == "usex" then
category = "Goulenn troidigezhioù eus " .. lang:getCanonicalName() .. " implij skouerioù"
else
category = "Goulenn troidigezhioù e " .. lang:getCanonicalName()
lang = br or get_br()
end
category = format_categories(category, lang, sort, not sort and canonical_pagename() or nil)
end
return tostring(span) .. category
end
-- Implements {{no equivalent translation}}.
function export.no_equivalent(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["troidigezh kevatal ebet"])
local text = "termen kevatal ebet e " .. args[1]:getCanonicalName()
if not args.noend then
text = text .. ", met gwelet"
end
return tostring(html_create("i"):wikitext(text))
end
-- Implements {{no attested translation}}.
function export.no_attested(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["troidigezh ebet testeniekaet"])
local langname = args[1]:getCanonicalName()
local text = "Termen [[WT:ATTEST|testeniet]] ebet e " .. langname
local category = ""
if not args.noend then
text = text .. ", met sellet"
local sort = args.sort
category = format_categories(langname .. " troidigezhioù hep testeni", br or get_br(), sort, not sort and canonical_pagename() or nil)
end
return tostring(html_create("i"):wikitext(text)) .. category
end
-- Implements {{not used}}.
function export.not_used(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["implij ebet"])
return tostring(html_create("i"):wikitext((args[2] or "implij ebet") .. " e(n) " .. args[1]:getCanonicalName()))
end
return export
lqj9uze4inl2ou3i00nfayymumotra0
380777
380776
2026-06-19T23:13:02Z
Iriep
3090
380777
Scribunto
text/plain
local export = {}
local anchors_module = "Modulenn:eorioù"
local debug_track_module = "Modulenn:diveugiñ/heuliañ"
local languages_module = "Modulenn:yezhoù"
local links_module = "Modulenn:liammoù"
local pages_module = "Modulenn:pajennoù"
local parameters_module = "Modulenn:arventennoù"
local string_utilities_module = "Modulenn:talvoudoù chadenn"
local templatestyles_module = "Modulenn:PatromStil"
local utilities_module = "Modulenn:talvoudoù"
local wikimedia_languages_module = "Modulenn:wikimedia yezhoù"
local concat = table.concat
local html_create = mw.html.create
local insert = table.insert
local load_data = mw.loadData
local new_title = mw.title.new
local require = require
--[==[
Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==]
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function format_categories(...)
format_categories = require(utilities_module).format_categories
return format_categories(...)
end
local function full_link(...)
full_link = require(links_module).full_link
return full_link(...)
end
local function get_link_page(...)
get_link_page = require(links_module).get_link_page
return get_link_page(...)
end
local function get_wikimedia_lang(...)
get_wikimedia_lang = require(wikimedia_languages_module).getByCode
return get_wikimedia_lang(...)
end
local function language_link(...)
language_link = require(links_module).language_link
return language_link(...)
end
local function normalize_anchor(...)
normalize_anchor = require(anchors_module).normalize_anchor
return normalize_anchor(...)
end
local function plain_link(...)
plain_link = require(links_module).plain_link
return plain_link(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function remove_links(...)
remove_links = require(links_module).remove_links
return remove_links(...)
end
local function split_on_slashes(...)
split_on_slashes = require(links_module).split_on_slashes
return split_on_slashes(...)
end
local function templatestyles(...)
templatestyles = require(templatestyles_module)
return templatestyles(...)
end
local function track(...)
track = require(debug_track_module)
return track(...)
end
--[==[
Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==]
local br
local function get_br()
br, get_br = require(languages_module).getByCode("br"), nil
return br
end
local headword_data
local function get_headword_data()
headword_data, get_headword_data = load_data("Modulenn:pennger/roadennoù"), nil
return headword_data
end
local parameters_data
local function get_parameters_data()
parameters_data, get_parameters_data = load_data("Modulenn:arventennoù/roadennoù"), nil
return parameters_data
end
local translations_data
local function get_translations_data()
translations_data, get_translations_data = load_data("Modulenn:troidigezhioù/roadennoù"), nil
return translations_data
end
local function is_translation_subpage(pagename)
if (headword_data or get_headword_data()).page.namespace ~= "" then
return false
elseif not pagename then
pagename = (headword_data or get_headword_data()).encoded_pagename
end
return pagename:match("./troidigezhioù$") and true or false
end
local function canonical_pagename()
local pagename = (headword_data or get_headword_data()).encoded_pagename
return is_translation_subpage(pagename) and pagename:sub(1, -14) or pagename
end
local function interwiki(terminfo, term, lang, langcode)
-- No interwiki link if term is empty/missing
if not term or #term < 1 then
terminfo.interwiki = false
return
end
-- Percent-decode the term.
term = decode_uri(terminfo.term, "PATH")
-- Don't show an interwiki link if it's an invalid title.
if not new_title(term) then
terminfo.interwiki = false
return
end
local interwiki_langcode = (translations_data or get_translations_data()).interwiki_langs[langcode]
local wmlangs = interwiki_langcode and {get_wikimedia_lang(interwiki_langcode)} or lang:getWikimediaLanguages()
-- Don't show the interwiki link if the language is not recognised by Wikimedia.
if #wmlangs == 0 then
terminfo.interwiki = false
return
end
local sc = terminfo.sc
local target_page = get_link_page(term, lang, sc)
local split = split_on_slashes(target_page)
if not split[1] then
terminfo.interwiki = false
return
end
target_page = split[1]
local wmlangcode = wmlangs[1]:getCode()
local interwiki_link = language_link{
lang = lang,
sc = sc,
term = wmlangcode .. ":" .. target_page,
alt = "(" .. wmlangcode .. ")",
tr = "-"
}
terminfo.interwiki = tostring(html_create("span")
:addClass("tpos")
:wikitext(" " .. interwiki_link)
)
end
function export.show_terminfo(terminfo, check)
local lang = terminfo.lang
local langcode, langname = lang:getCode(), lang:getCanonicalName()
-- Translations must be for mainspace languages.
if not lang:hasType("reizh") then
error("Dav eo d'an troidigezhioù bezañ testenniekaet hag aprouet en anv-spas pennañ yezhoù.")
else
local disallowed = (translations_data or get_translations_data()).disallowed
local err_msg = disallowed[langcode]
if err_msg then
error("N'eo ket aotreet an troidigezhioù e " .. langname .. " (" .. langcode .. "). " .. langname .. " an troidigezhioù a zlefe " .. err_msg)
end
local fullcode = lang:getFullCode()
if fullcode ~= langcode then
err_msg = disallowed[fullcode]
if err_msg then
langname = lang:getFullName()
error("N'eo ket aotreet an troidigezhioù e " .. langname .. " (" .. fullcode .. "). " .. langname .. " an troidigezhioù a zlefe " .. err_msg)
end
end
end
if langcode == "br" then
if terminfo.interwiki then
error("N'eo ket aotreet an troidigezhioù etrewiki evit ar brezhoneg; dav e vefe liammañ atav ouzh ur Wikeriadur disheñvel")
end
local current_L2 = require(pages_module).get_current_L2()
if current_L2 ~= "Treuzyezhek" and mw.title.getCurrentTitle().nsText ~= "Wikeriadur" then
if current_L2 then
error("Troidigezhioù brezhonek aotreet er rann Treuzyezhek hepken, n'eo ket e" .. current_L2)
else
error("Troidigezhioù saoznek aotreet er rann Treuzyezhek hepken, n'eo ket er-maez eus L2 all")
end
end
end
local term = terminfo.term
-- Check if there is a term. Don't show the interwiki link if there is nothing to link to.
if not term then
-- Track entries that don't provide a term.
-- FIXME: This should be a category.
track("troidigezhioù/ger ebet")
track("troidigezhioù/ger ebet" .. langcode)
end
if terminfo.interwiki then
interwiki(terminfo, term, lang, langcode)
end
langcode = lang:getFullCode()
if (translations_data or get_translations_data()).need_super[langcode] then
local tr = terminfo.tr
if tr ~= nil then
terminfo.tr = tr:gsub("%d[%d%*%-]*%f[^%d%*]", "<sup>%0</sup>")
end
end
terminfo.show_qualifiers = true
local link = full_link(terminfo, "troidigezh")
local canonical_name = lang:getCanonicalName()
local full_name = lang:getFullName()
local categories = {"Termenoù gant " .. canonical_name .. " troidigezhioù"}
if canonical_name ~= full_name then
insert(categories, "Termenoù gant " .. full_name .. " troidigezhioù")
end
if check then
link = tostring(html_create("span")
:addClass("ttbc")
:tag("sup")
:addClass("ttbc")
:wikitext("([[WT:Troidigezhioù#Troidigezhioù da vezañ adlennet|gwiriet]]) mar plij")
:done()
:wikitext(" " .. link)
)
insert(categories, "Goulennoù adweladennoù e " .. langname .. " troidigezhioù")
end
return link .. format_categories(categories, br or get_br(), nil, canonical_pagename())
end
-- Implements {{t}}, {{t+}}, {{t-check}} and {{t+check}}.
function export.show(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["troidigezhioù"])
local check = frame.args.check
return export.show_terminfo({
lang = args[1],
sc = args.sc,
track_sc = true,
term = args[2],
alt = args.alt,
id = args.id,
genders = args[3],
tr = args.tr,
ts = args.ts,
lit = args.lit,
q = args.q,
qq = args.qq,
l = args.l,
ll = args.ll,
refs = args.ref,
interwiki = frame.args.interwiki,
}, check and check ~= "")
end
local function add_id(div, id)
return id and div:attr("id", normalize_anchor("Troidigezhioù-" .. id)) or div
end
-- Implements {{trans-top}} and part of {{trans-top-also}}.
local function top(args, title, id, navhead)
local column_width = (args["ledander bann"] == "ledan" or args["ledander bann"] == "strizh") and "-" .. args["ledander ar bann"] or ""
local div = html_create("div")
:addClass("Stern merdeiñ")
:node(navhead)
:tag("div")
:addClass("Endalc'had merdeiñ")
:tag("taolenn")
:addClass("troidigezhioù")
:attr("rol", "kinnig")
:attr("lufrañ-roadennoù", title or "")
:tag("tr")
:tag("td")
:addClass("kell-troidigezhioù")
:addClass("multicolumn-list" .. column_width)
:attr("colspan", "3")
:allDone()
div = add_id(div, id)
local categories = {}
if not title then
insert(categories, "Talbenn an daolenn troidigezhioù a vank lufr")
end
local pagename = canonical_pagename()
if is_translation_subpage() then
insert(categories, "Ispajennoù troidigezh")
end
return (tostring(div):gsub("</td></tr></table></div></div>$", "")) ..
(#categories > 0 and format_categories(categories, br or get_br(), nil, pagename) or "") ..
-- Category to trigger [[MediaWiki:Gadget-TranslationAdder.js]]; we want this even on
-- user pages and such.
format_categories("Penngerioù gant boestoù troidigezhioù", nil, nil, nil, true) ..
templatestyles("Modulenn:troidigezhioù/stiloù.css")
end
-- Entry point for {{trans-top}}.
function export.top(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-laez"])
local title = args[1]
local id = args.id or title
title = title and remove_links(title)
return top(args, title, id, html_create("div")
:addClass("PennMerdeiñ")
:css("linennañ an destenn", "kleiz")
:wikitext(title or "Troidigezhioù")
)
end
-- Entry point for {{checktrans-top}}.
function export.check_top(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["checktrans-top"])
local text = "\n:''An troidigezhioù dindan o deus ezhomm da vezañ adlennet hag enlakaet amañ dindan en taolennoù troidigezhioù zo ezhomm anezho. See instructions at " ..
frame:expandTemplate{
title = "liamm ar rann",
args = {"Wikeriadur:Diskwel enmont#Troidigezhioù"}
} ..
".''\n"
local header = html_create("div")
:addClass("gwirdreuz")
:wikitext(text)
local subtitle = args[1]
local title = "Treuzkasadennoù da vezañ adlennet"
if subtitle then
title = title .. "‌: \"" .. subtitle .. "\""
end
-- No ID, since these should always accompany proper translation tables, and can't be trusted anyway (i.e. there's no use-case for links).
return tostring(header) .. "\n" .. top(args, title, nil, html_create("div")
:addClass("PennMerdeiñ")
:css("linennañ an destenn", "kleiz")
:wikitext(title or "Troidigezhioù")
)
end
-- Implements {{trans-bottom}}.
function export.bottom(frame)
-- Check nothing is being passed as a parameter.
process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-traoñ"])
return "</table></div></div>"
end
-- Implements {{trans-see}} and part of {{trans-top-also}}.
local function see(args, see_text)
local navhead = html_create("div")
:addClass("PennMerdeiñ")
:css("linennañ an destenn", "kleiz")
:wikitext(args[1] .. " ")
:tag("span")
:css("pouez polis", "normal")
:wikitext("— ")
:tag("i")
:wikitext(see_text)
:allDone()
local terms, id = args[2], args.id
if #terms == 0 then
terms[1] = args[1]
end
for i = 1, #terms do
local term_id = id[i] or id.default
local data = {
term = terms[i],
id = term_id and "Troidigezhioù-" .. term_id or "Troidigezhioù",
}
terms[i] = plain_link(data)
end
return navhead:wikitext(concat(terms, ",‎ "))
end
-- Entry point for {{trans-see}}.
function export.see(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-gwelet"])
local div = html_create("div")
:addClass("lesanv")
:addClass("SternVerdeiñ")
:node(see(args, "gwelet "))
return tostring(add_id(div, args.id.default or args[1]))
end
-- Entry point for {{trans-top-also}}.
function export.top_also(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["treuz-laez-ivez"])
local navhead = see(args, "gwelet ivez ")
local title = args[1]
local id = args.id.default or title
title = remove_links(title)
return top(args, title, id, navhead)
end
-- Implements {{translation subpage}}.
function export.subpage(frame)
process_params(frame:getParent().args, (parameters_data or get_parameters_data())["ispajenn an droidigezh"])
if not is_translation_subpage() then
error("Ne zlefe ar patrom-mañ bezañ implijet nemet war ispajennoù troidigezhioù, gant titloù a echu gant '/troidigezhioù'.")
end
-- "Translation subpages" category is handled by {{trans-top}}.
return ("''Er bajenn-mañ ez eus troidigezhioù evit ''%s''. Sellit ouzh ar pennad pennañ evit gouzout hiroc'h.''"):format(full_link{
lang = br or get_br(),
term = canonical_pagename(),
})
end
-- Implements {{t-needed}}.
function export.needed(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["t-rekiz"])
local lang, category = args[1], ""
local span = html_create("span")
:addClass("trreq")
:attr("roadennoù yezh", lang:getCode())
:tag("i")
:wikitext("ouzhpennit an droidigezh-mañ mar plij ganeoc'h")
:done()
if not args.nocat then
local type, sort = args[2], args.sort
if type == "arroudenn" then
category = "Goulenn troidigezhioù eus" .. lang:getCanonicalName() .. " menegoù"
elseif type == "usex" then
category = "Goulenn troidigezhioù eus " .. lang:getCanonicalName() .. " implij skouerioù"
else
category = "Goulenn troidigezhioù e " .. lang:getCanonicalName()
lang = br or get_br()
end
category = format_categories(category, lang, sort, not sort and canonical_pagename() or nil)
end
return tostring(span) .. category
end
-- Implements {{no equivalent translation}}.
function export.no_equivalent(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["troidigezh kevatal ebet"])
local text = "termen kevatal ebet e " .. args[1]:getCanonicalName()
if not args.noend then
text = text .. ", met gwelet"
end
return tostring(html_create("i"):wikitext(text))
end
-- Implements {{no attested translation}}.
function export.no_attested(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["troidigezh ebet testeniekaet"])
local langname = args[1]:getCanonicalName()
local text = "Termen [[WT:ATTEST|testeniet]] ebet e " .. langname
local category = ""
if not args.noend then
text = text .. ", met sellet"
local sort = args.sort
category = format_categories(langname .. " troidigezhioù hep testeni", br or get_br(), sort, not sort and canonical_pagename() or nil)
end
return tostring(html_create("i"):wikitext(text)) .. category
end
-- Implements {{not used}}.
function export.not_used(frame)
local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["implij ebet"])
return tostring(html_create("i"):wikitext((args[2] or "implij ebet") .. " e(n) " .. args[1]:getCanonicalName()))
end
return export
ekrjc3qathj8mtu0g9uof3mthjgt993