From 308a75869d5c1b4f1b614921e7a8cbcabd08db1d Mon Sep 17 00:00:00 2001 From: jagdeep sidhu Date: Fri, 8 May 2026 09:58:44 -0700 Subject: [PATCH] Use regional label for Middle East GeoIP bucket Label ARE as United Arab Emirates and keep IRN grouped as Middle East for the country distribution UI. Co-authored-by: Cursor --- src/lib/formatters.js | 3 ++- src/lib/formatters.test.js | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/lib/formatters.js b/src/lib/formatters.js index 3f9a82a..ec0478a 100644 --- a/src/lib/formatters.js +++ b/src/lib/formatters.js @@ -1,4 +1,5 @@ const COUNTRY_NAMES = { + ARE: 'United Arab Emirates', AUT: 'Austria', BGR: 'Bulgaria', BRA: 'Brazil', @@ -10,7 +11,7 @@ const COUNTRY_NAMES = { FRA: 'France', GBR: 'United Kingdom', IND: 'India', - IRN: 'Iran', + IRN: 'Middle East', ITA: 'Italy', JPN: 'Japan', LTU: 'Lithuania', diff --git a/src/lib/formatters.test.js b/src/lib/formatters.test.js index 55c5b49..84be928 100644 --- a/src/lib/formatters.test.js +++ b/src/lib/formatters.test.js @@ -1,4 +1,9 @@ -import { formatDayMonth, formatShortDate, formatUtcTime } from './formatters'; +import { + formatDayMonth, + formatShortDate, + formatUtcTime, + getCountryName, +} from './formatters'; describe('date formatters', () => { const superblockDate = 'April 20th 2026, 2:15:21 pm'; @@ -12,3 +17,10 @@ describe('date formatters', () => { expect(formatUtcTime(superblockDate)).toBe('2:15 PM'); }); }); + +describe('country formatters', () => { + test('uses a regional Middle East label for IRN', () => { + expect(getCountryName('ARE')).toBe('United Arab Emirates'); + expect(getCountryName('IRN')).toBe('Middle East'); + }); +});