לדלג לתוכן

יחידה:תרגום תוכן

מתוך חב"דפדיה, אנציקלופדיה חב"דית חופשית
גרסה מ־21:16, 2 באוקטובר 2025 מאת מ. רובין (שיחה | תרומות) (יצירת דף עם התוכן "-- test, don't run me local this = {} function this.getCxUrl(frame) query = {} sourceTitle = frame.args['sourceTitle'] if sourceTitle == nil then return 'חובה לתת שם דף מקור.' end query.page = sourceTitle targetTitle = frame.args['targetTitle'] if (targetTitle ~= nil) then query.targettitle = targetTitle end query.to = 'he' query.from = frame.args['sourceLanguage'] or 'en' url = mw.uri.fullUrl('Special:CX', query)...")
(הבדל) → הגרסה הקודמת | הגרסה האחרונה (הבדל) | הגרסה הבאה ← (הבדל)

ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:תרגום תוכן/תיעוד

-- test, don't run me

local this = {}

function this.getCxUrl(frame)
	query = {}
	
	sourceTitle = frame.args['sourceTitle']
	if sourceTitle == nil
	then
		return 'חובה לתת שם דף מקור.'
	end
	
	query.page = sourceTitle
	
	targetTitle = frame.args['targetTitle']
	if (targetTitle ~= nil)
	then
		query.targettitle = targetTitle
	end
	
	query.to = 'he'
	query.from = frame.args['sourceLanguage'] or 'en'
	
	url = mw.uri.fullUrl('Special:CX', query)

	return url
end

function this.getCxLink(frame)
	url = this.getCxUrl(frame)
	
	sourceTitle = frame.args['sourceTitle']
	if sourceTitle == nil
	then
		return 'חובה לתת שם דף מקור.'
	end

	link = '[' .. tostring(url) .. ' תרגום ' .. frame.args['sourceTitle'] .. ']'
	
	return link
end

return this