function printableCountryName()

in lambda/dynamic-fronts-fetcher/src/transform.ts [6:21]


function printableCountryName(isoCode: string): string {
	const countryName = getCountryName(isoCode, 'en');
	if (
		!!countryName &&
		(countryName.startsWith('United') ||
			countryName.startsWith('Seychelles') ||
			countryName.endsWith('Islands'))
	) {
		return 'in the ' + countryName;
	} else if (countryName) {
		return 'in ' + countryName;
	} else {
		console.warn(`Could not translate country code ${isoCode}`);
		return 'near you';
	}
}