nitro-react/src/api/utils/LocalizeBadgeDescription.ts

11 lines
271 B
TypeScript
Raw Normal View History

2021-08-17 05:38:07 +02:00
import { GetNitroInstance } from '..';
2021-07-27 21:00:35 +02:00
2022-03-16 10:20:39 +01:00
export const LocalizeBadgeDescription = (key: string) =>
2021-07-27 21:00:35 +02:00
{
2022-03-16 10:20:39 +01:00
let badgeDesc = GetNitroInstance().localization.getBadgeName(key);
if(!badgeDesc || !badgeDesc.length) badgeDesc = `badge_desc_${ key }`;
return badgeDesc;
2021-07-27 21:00:35 +02:00
}