mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-03 19:17:11 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			332 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			332 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
import 'package:easy_localization/easy_localization.dart';
 | 
						|
import 'package:intl/message_format.dart';
 | 
						|
 | 
						|
String t(String key, [Map<String, Object>? args]) {
 | 
						|
  try {
 | 
						|
    String message = key.tr();
 | 
						|
    if (args != null) {
 | 
						|
      return MessageFormat(message).format(args);
 | 
						|
    }
 | 
						|
    return message;
 | 
						|
  } catch (e) {
 | 
						|
    return key;
 | 
						|
  }
 | 
						|
}
 |