mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 00:50:50 +01:00
Fix empty badge name & desc
This commit is contained in:
parent
6baa7207e1
commit
6394b9d2f4
@ -1,6 +1,10 @@
|
|||||||
import { GetNitroInstance } from '..';
|
import { GetNitroInstance } from '..';
|
||||||
|
|
||||||
export function LocalizeBadgeDescription(key: string): string
|
export const LocalizeBadgeDescription = (key: string) =>
|
||||||
{
|
{
|
||||||
return GetNitroInstance().localization.getBadgeDesc(key);
|
let badgeDesc = GetNitroInstance().localization.getBadgeName(key);
|
||||||
|
|
||||||
|
if(!badgeDesc || !badgeDesc.length) badgeDesc = `badge_desc_${ key }`;
|
||||||
|
|
||||||
|
return badgeDesc;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
import { GetNitroInstance } from '..';
|
import { GetNitroInstance } from '..';
|
||||||
|
|
||||||
export function LocalizeBadgeName(key: string): string
|
export const LocalizeBadgeName = (key: string) =>
|
||||||
{
|
{
|
||||||
return GetNitroInstance().localization.getBadgeName(key);
|
let badgeName = GetNitroInstance().localization.getBadgeName(key);
|
||||||
|
|
||||||
|
if(!badgeName || !badgeName.length) badgeName = `badge_name_${ key }`;
|
||||||
|
|
||||||
|
return badgeName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user