i18n.Function.getSlotRestrictionLabel - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / i18n / getSlotRestrictionLabel
getSlotRestrictionLabel(
restriction,locale):string|null
Defined in: src/i18n/slots.ts:52
Resolve the short display label for a restricted slot.
A BuildSlot.restriction value.
string
A BCP 47 locale. The restriction-label sources supply English only.
string | null
The English label for an English locale, otherwise null.
If locale is not a string.
import { getSlotRestrictionLabel } from '@elite-dangerous-almanac/core/i18n/slots';
getSlotRestrictionLabel('mining', 'en-GB'); // -> 'mining tools'
getSlotRestrictionLabel('mining', 'fr'); // -> null