mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	app_sayunixtime: Use correct inflection for German time.
In function ast_say_date_with_format_de(), take special care when the hour is one o'clock. In this case, the German number "eins" must be inflected to its neutrum form, "ein". This is achieved by playing "digits/1N" instead of "digits/1". Fixes both 12- and 24-hour formats. ASTERISK-30092 Change-Id: Ica9b80125c0b317e378d89c1ea786816e2635510
This commit is contained in:
		
				
					committed by
					
						 Friendly Automation
						Friendly Automation
					
				
			
			
				
	
			
			
			
						parent
						
							d8bbcf4b25
						
					
				
				
					commit
					e92f047e5f
				
			| @@ -4933,6 +4933,8 @@ int ast_say_date_with_format_de(struct ast_channel *chan, time_t t, const char * | |||||||
| 				/* 12-Hour */ | 				/* 12-Hour */ | ||||||
| 				if (tm.tm_hour == 0) | 				if (tm.tm_hour == 0) | ||||||
| 					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg)); | 					ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg)); | ||||||
|  | 				else if (tm.tm_hour == 1) | ||||||
|  | 					ast_copy_string(nextmsg, "digits/1N", sizeof(nextmsg)); | ||||||
| 				else if (tm.tm_hour > 12) | 				else if (tm.tm_hour > 12) | ||||||
| 					snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour - 12); | 					snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour - 12); | ||||||
| 				else | 				else | ||||||
| @@ -4945,7 +4947,11 @@ int ast_say_date_with_format_de(struct ast_channel *chan, time_t t, const char * | |||||||
| 			case 'H': | 			case 'H': | ||||||
| 			case 'k': | 			case 'k': | ||||||
| 				/* 24-Hour */ | 				/* 24-Hour */ | ||||||
| 				res = ast_say_number(chan, tm.tm_hour, ints, lang, (char *) NULL); | 				if (tm.tm_hour == 1) { | ||||||
|  | 					res = wait_file(chan, ints, "digits/1N", lang); | ||||||
|  | 				} else { | ||||||
|  | 					res = ast_say_number(chan, tm.tm_hour, ints, lang, (char *) NULL); | ||||||
|  | 				} | ||||||
| 				if (!res) { | 				if (!res) { | ||||||
| 					res = wait_file(chan, ints, "digits/oclock", lang); | 					res = wait_file(chan, ints, "digits/oclock", lang); | ||||||
| 				} | 				} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user