translate method
Implementation
String? translate(dynamic textOrId, AFTranslationSet universal) {
if(textOrId is String) {
if(textOrId.isEmpty) {
return textOrId;
}
}
var result = translations[textOrId];
result ??= universal.translations[textOrId];
if(result == null) {
if(AFibD.config.isTestContext) {
AFibF.g.testMissingTranslations.register(locale, textOrId);
}
if(textOrId is String) {
return textOrId;
}
return textOrId.toString();
//throw AFException("Unknown translation $textOrId");
}
return result;
}