Skip to content

Commit 282d86b

Browse files
Some more merge resolution
1 parent 30aa0f7 commit 282d86b

File tree

5 files changed

+140
-66
lines changed

5 files changed

+140
-66
lines changed

package-lock.json

Lines changed: 133 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"name": "lang-nav",
33
"private": true,
44
"version": "0.0.0",
@@ -10,19 +10,20 @@
1010
"preview": "vite preview",
1111
"predeploy": "npm run build",
1212
"deploy": "gh-pages -d dist",
13-
"build:cldr-locales": "ts-node scripts/ingest/build-cldr-locales.ts"
1413
"test": "vitest",
1514
"test:watch": "vitest --watch",
1615
"test:ui": "vitest --ui",
1716
"test:run": "vitest run",
18-
"test:coverage": "vitest run --coverage""build:cldr-locales": "ts-node scripts/ingest/build-cldr-locales.ts"
17+
"test:coverage": "vitest run --coverage",
18+
"build:cldr-locales": "ts-node scripts/ingest/build-cldr-locales.ts"
1919
},
2020
"dependencies": {
2121
"cldr-core": "^47.0.0",
2222
"lucide-react": "^0.525.0",
2323
"react": "^19.0.0",
2424
"react-dom": "^19.0.0",
25-
"react-router-dom": "^7.5.1"
25+
"react-router-dom": "^7.5.1",
26+
"ts-node": "^10.9.2"
2627
},
2728
"devDependencies": {
2829
"@eslint/js": "^9.25.0",
@@ -59,4 +60,4 @@
5960
"semi": true,
6061
"printWidth": 100
6162
}
62-
}
63+
}

scripts/ingest/build-cldr-locales.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const CHARTS_TSV_BASE = `https://raw.githubusercontent.com/unicode-org/cldr-stag
2626
'',
2727
)}/tsv`;
2828
const CLDR_REPO_RAW_BASE = 'https://raw.githubusercontent.com/unicode-org/cldr/main/common/main';
29-
import territoryInfo from 'cldr-core/supplemental/territoryInfo.json';
3029

3130
const OUTPUT_FILE = path.join(process.cwd(), 'public/data/unicode/cldrLocales.json');
3231

src/features/data-loading/cldrLocales.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CLDRLocaleIndex, CLDRLocaleSupport } from '@entities/types/CLDRLocaleTypes';
22

3-
import cldrLocalesData from '../../public/data/unicode/cldrLocales.json';
3+
import cldrLocalesData from '../../../public/data/unicode/cldrLocales.json';
44

55
// Import the generated JSON instead of requiring it.
66

src/widgets/details/LocaleDetails.tsx

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
import React from 'react';
22

3-
<<<<<<< HEAD:src/views/locale/LocaleDetails.tsx
4-
import { getCldrLocale } from '../../data/cldrLocales';
5-
import CommaSeparated from '../../generic/CommaSeparated';
6-
import Deemphasized from '../../generic/Deemphasized';
7-
import { numberToFixedUnlessSmall, numberToSigFigs } from '../../generic/numberUtils';
8-
import { PercentageDifference } from '../../generic/PercentageDifference';
9-
import { LocaleData, LocaleSource } from '../../types/DataTypes';
10-
import DetailsField from '../common/details/DetailsField';
11-
import DetailsSection from '../common/details/DetailsSection';
12-
import HoverableObjectName from '../common/HoverableObjectName';
13-
import ObjectWikipediaInfo from '../common/ObjectWikipediaInfo';
14-
=======
153
import Hoverable from '@features/hovercard/Hoverable';
164
import HoverableObjectName from '@features/hovercard/HoverableObjectName';
17-
>>>>>>> origin/master:src/widgets/details/LocaleDetails.tsx
185

196
import LocaleCensusCitation from '@entities/locale/LocaleCensusCitation';
207
import LocaleCLDRSupportSection from '@entities/locale/LocaleDetailsCLDR';
@@ -226,43 +213,6 @@ const LocalePopulationSection: React.FC<{ locale: LocaleData }> = ({ locale }) =
226213
);
227214
};
228215

229-
/** CLDR Support section */
230-
const LocaleCLDRSupportSection: React.FC<{ locale: LocaleData }> = ({ locale }) => {
231-
const cldr = getCldrLocale(locale.ID);
232-
if (!cldr) {
233-
return (
234-
<DetailsSection title="CLDR Support">
235-
<Deemphasized>Not supported by CLDR.</Deemphasized>
236-
</DetailsSection>
237-
);
238-
}
239-
return (
240-
<DetailsSection title="CLDR Support">
241-
<DetailsField title="Tier:">{cldr.tier}</DetailsField>
242-
<DetailsField title="Present in CLDR:">
243-
{cldr.presentInCLDRDatabase ? 'Yes' : 'No'}
244-
</DetailsField>
245-
<DetailsField title="Default Locale:">
246-
{cldr.localeIsDefaultForLanguage ? 'Yes' : 'No'}
247-
</DetailsField>
248-
<DetailsField title="Target / Computed Level:">
249-
{cldr.targetLevel ?? '—'} / {cldr.computedLevel ?? '—'}
250-
</DetailsField>
251-
{cldr.confirmedPct != null && (
252-
<DetailsField title="Confirmed %:">{cldr.confirmedPct.toFixed(1)}%</DetailsField>
253-
)}
254-
{cldr.icuIncluded != null && (
255-
<DetailsField title="ICU:">{cldr.icuIncluded ? 'Yes' : 'No'}</DetailsField>
256-
)}
257-
{cldr.missingCounts && (
258-
<DetailsField title="Missing Counts:">
259-
{cldr.missingCounts.found} found / {cldr.missingCounts.unconfirmed} unconfirmed /{' '}
260-
{cldr.missingCounts.missing} missing
261-
</DetailsField>
262-
)}
263-
{cldr.notes && cldr.notes.length > 0 && (
264-
<DetailsField title="Missing Features:">{cldr.notes.join(', ')}</DetailsField>
265-
)}
266216
const LocaleOtherSection: React.FC<{ locale: LocaleData }> = ({ locale }) => {
267217
const { officialStatus, wikipedia, localeSource, containedLocales } = locale;
268218
return (

0 commit comments

Comments
 (0)