forked from nalc/death_messages
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			master
			...
			translate_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 3cc9f5cb8d | |||
| 749320358c | |||
| 8abee494e3 | 
							
								
								
									
										8
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								init.lua
									
									
									
									
									
								
							| @@ -42,6 +42,9 @@ local sounds   = { | |||||||
| -- Translation wrapper | -- Translation wrapper | ||||||
| local S = minetest.get_translator(mname) | local S = minetest.get_translator(mname) | ||||||
|  |  | ||||||
|  | -- To translate server-side in server language for irc | ||||||
|  | local lang = minetest.settings:get("language") or "fr" | ||||||
|  |  | ||||||
| -- Lava death messages | -- Lava death messages | ||||||
| messages.lava = { | messages.lava = { | ||||||
| 	"@1 thought lava was cool.", | 	"@1 thought lava was cool.", | ||||||
| @@ -110,7 +113,7 @@ messages.other = { | |||||||
| 	"@1 died.", | 	"@1 died.", | ||||||
| 	"@1 left this world.", | 	"@1 left this world.", | ||||||
| 	"@1 reached miner's heaven.", | 	"@1 reached miner's heaven.", | ||||||
| 	"@1 lost him/her life.", | 	"@1 lost his/her life.", | ||||||
| 	"@1 saw the light.", | 	"@1 saw the light.", | ||||||
| 	"@1 fell from a bit too high.", | 	"@1 fell from a bit too high.", | ||||||
| 	"@1 slipped on a banana skin.", | 	"@1 slipped on a banana skin.", | ||||||
| @@ -208,7 +211,8 @@ local function broadcast_death(msg) | |||||||
| 	logfilep:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. msg .. "\n") | 	logfilep:write(os.date("[%Y-%m-%d %H:%M:%S] ") .. msg .. "\n") | ||||||
| 	logfilep:close() | 	logfilep:close() | ||||||
| 	if irc then | 	if irc then | ||||||
| 		irc.say(msg) | 		local tr_msg = minetest.get_translated_string(lang, msg) | ||||||
|  | 		irc.say(tr_msg) | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user