Module:xchc-noun: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
local gsplit = mw.text.gsplit | local gsplit = mw.text.gsplit | ||
local m_tr = require('Module:xchc-translit') | local m_tr = require('Module:xchc-translit') | ||
local m_ipa = require('Module:xchc-pron') | |||
local lang = require('Module:languages').getByCode("xchc") | local lang = require('Module:languages').getByCode("xchc") | ||
Line 15: | Line 16: | ||
function export.getBacknessHarmony(word) | function export.getBacknessHarmony(word) | ||
word = | word = m_ipa.crux(word) | ||
return word | return word:match("ɛ") and "ɛ" or word:match("ɔ") and "ɔ" or "default" | ||
end | end | ||
local declension = { | |||
} | |||
function export.show(frame) | |||
local parent_args = frame:getParent().args | |||
local numbers = {} | |||
local decl = {} | |||
local g = NAMESPACE == "Template" and "a" or parent_args[1] | |||
local word = NAMESPACE == "Template" and "өра̄" or parent_args["word"] or PAGENAME | |||
local unc = parent_args["unc"] or false | |||
local args = {} | |||
if g ~= "i" and g ~= "a" then error("Unknown gender: it must be either ‘i’ or ‘a’") end | |||
end | |||
local navframe = [=[ | |||
<div class="mw-collapsible" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; border: 1px solid #aaaaaa; text-align: center; font-size: 95%; overflow: auto; min-width: 70em; display:inline-block;"> | |||
<div style="min-height: 1.6em; font-size: 100%; text-align: left; background-color:#efefef; padding-left: 10px; background-image: -webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to(#DFDFDF), color-stop(0.6, #E3E3E3)); background-image: -moz-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF); background-image: -o-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF); background: #eff7ff;">'''''{title}'''''<span style="font-weight:normal;">{after_title}</span> </div> | |||
<div class="mw-collapsible-content" style="font-size: 100%;"> | |||
]=] | |||
return export | return export |
Revision as of 12:50, 7 December 2023
- The following documentation is located at Module:xchc-noun/doc.[edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
local sub = mw.ustring.sub
local find = mw.ustring.find
local match = mw.ustring.match
local gmatch = mw.ustring.gmatch
local gsub = mw.ustring.gsub
local u = mw.ustring.char
local split = mw.text.split
local gsplit = mw.text.gsplit
local m_tr = require('Module:xchc-translit')
local m_ipa = require('Module:xchc-pron')
local lang = require('Module:languages').getByCode("xchc")
local export = {}
function export.getBacknessHarmony(word)
word = m_ipa.crux(word)
return word:match("ɛ") and "ɛ" or word:match("ɔ") and "ɔ" or "default"
end
local declension = {
}
function export.show(frame)
local parent_args = frame:getParent().args
local numbers = {}
local decl = {}
local g = NAMESPACE == "Template" and "a" or parent_args[1]
local word = NAMESPACE == "Template" and "өра̄" or parent_args["word"] or PAGENAME
local unc = parent_args["unc"] or false
local args = {}
if g ~= "i" and g ~= "a" then error("Unknown gender: it must be either ‘i’ or ‘a’") end
end
local navframe = [=[
<div class="mw-collapsible" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; border: 1px solid #aaaaaa; text-align: center; font-size: 95%; overflow: auto; min-width: 70em; display:inline-block;">
<div style="min-height: 1.6em; font-size: 100%; text-align: left; background-color:#efefef; padding-left: 10px; background-image: -webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to(#DFDFDF), color-stop(0.6, #E3E3E3)); background-image: -moz-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF); background-image: -o-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF); background: #eff7ff;">'''''{title}'''''<span style="font-weight:normal;">{after_title}</span> </div>
<div class="mw-collapsible-content" style="font-size: 100%;">
]=]
return export