45,646
edits
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
else | else | ||
if hasKey[lang:getCode()] then | if hasKey[lang:getCode()] then | ||
IPA_key = " | IPA_key = "Appendix:" .. lang:getCanonicalName() .. " pronunciation" | ||
else | else | ||
IPA_key = "wikipedia:" .. lang:getCanonicalName() .. " phonology" | IPA_key = "wikipedia:" .. lang:getCanonicalName() .. " phonology" | ||
Line 31: | Line 31: | ||
local prefix = "[[ | local prefix = "[[Wiktionary:International Phonetic Alphabet|IPA]]<sup>(" .. ( key_link or err_text ) .. ")</sup>: " | ||
IPAs = export.format_IPA_multiple(lang, items, separator, no_count) | IPAs = export.format_IPA_multiple(lang, items, separator, no_count) | ||
Line 128: | Line 128: | ||
if lang then | if lang then | ||
-- Add syllable count if the language's diphthongs are listed in [[Module:syllables]]. | -- Add syllable count if the language's diphthongs are listed in [[Module:syllables]]. | ||
-- Don't do this if the term has spaces or a liaison mark (‿). | |||
if not no_count and mw.title.getCurrentTitle().namespace == 0 then | if not no_count and mw.title.getCurrentTitle().namespace == 0 then | ||
m_syllables = m_syllables or require('Module:syllables') | m_syllables = m_syllables or require('Module:syllables') | ||
if | if m_data.langs_to_generate_syllable_count_categories[lang:getCode()] and | ||
(determine_repr(item.pron) == "phonemic" or lang:getCode() == "ru") and | |||
not find(item.pron, "[ ‿]") then | |||
local syllable_count = m_syllables.getVowels(item.pron, lang) | |||
if syllable_count then | |||
table.insert(categories, "[[Category:" .. lang:getCanonicalName() .. " " .. syllable_count .. "-syllable words]]") | |||
end | end | ||
end | end | ||
end | end | ||
if lang:getCode() == "en" | if lang:getCode() == "en" and hasInvalidSeparators(item.pron) then | ||
table.insert(categories, "[[Category:IPA for English using .ˈ or .ˌ]]") | |||
end | end | ||
end | end |