יחידה:Citation/CS1: הבדלים בין גרסאות בדף

אין תקציר עריכה
אין תקציר עריכה
שורה 117: שורה 117:
end
end
-- if we get this far we have prefix and script
-- if we get this far we have prefix and script
name = mw.language.fetchLanguageName( lang, "en" ); -- get language name so that we can use it to categorize
name = mw.language.fetchLanguageName( lang, "he" ); -- get language name so that we can use it to categorize
if is_set (name) then -- is prefix a proper ISO 639-1 language code?
if is_set (name) then -- is prefix a proper ISO 639-1 language code?
script_value = script_value:gsub ('^%l%l%s*:%s*', ''); -- strip prefix from script
script_value = script_value:gsub ('^%l%l%s*:%s*', ''); -- strip prefix from script
-- is prefix one of these language codes?
-- is prefix one of these language codes?
if inArray (lang, {'ar', 'bs', 'dv', 'el', 'en', 'he', 'fa', 'hy', 'ja', 'ko', 'ku', 'ps', 'ru', 'sd', 'sr', 'th', 'uk', 'ug', 'yi', 'zh'}) then
if inArray (lang, {'ar', 'bs', 'dv', 'el', 'en', 'he', 'fa', 'hy', 'ja', 'ko', 'ku', 'ps', 'ru', 'sd', 'sr', 'th', 'uk', 'ug', 'yi', 'zh'}) then
table.insert( z.properties_cats, 'ציטוט עם תסריט בשפה זרה ('..lang..')'); -- categorize in language-specific categories
table.insert( z.properties_cats, 'ציטוט עם תסריט בשפה זרה ('..name..')'); -- categorize in language-specific categories
else
else
table.insert( z.properties_cats, 'ציטוט משתמש בתסריט בשפה זרה'); -- use this category as a catchall until language-specific category is available
table.insert( z.properties_cats, 'ציטוט משתמש בתסריט בשפה זרה'); -- use this category as a catchall until language-specific category is available