Skip to content

Commit

Permalink
fix: parentIntl detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Jun 18, 2024
1 parent aeb62d6 commit 78c7183
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 69 deletions.
6 changes: 3 additions & 3 deletions scripts/generate-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ async function generateDateModule(locale: string): Promise<unknown> {

const pathDate = resolve(pathLocales, locale, 'date');
const parentLocale = locale.substring(0, locale.lastIndexOf('_')) || 'base';
const pathParentLocale = resolve(pathLocales, parentLocale);
const parentExists = await exists(pathParentLocale);
const parentIntlLocale = parentLocale.replaceAll('_', '-');
const parentUsable = isValidLocale(parentLocale) && parentExists;
const parentUsable =
isValidLocale(parentIntlLocale) &&
(await exists(resolve(pathLocales, parentLocale)));

// `src/locales/<locale>/date/weekday.ts`
async function generateWeekdayFile(): Promise<void> {
Expand Down
14 changes: 0 additions & 14 deletions src/locales/en_AU_ocker/date/index.ts

This file was deleted.

34 changes: 0 additions & 34 deletions src/locales/en_AU_ocker/date/month.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/locales/en_AU_ocker/date/weekday.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/locales/en_AU_ocker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
import type { LocaleDefinition } from '../..';
import company from './company';
import date from './date';
import internet from './internet';
import location from './location';
import metadata from './metadata';
Expand All @@ -13,7 +12,6 @@ import phone_number from './phone_number';

const en_AU_ocker: LocaleDefinition = {
company,
date,
internet,
location,
metadata,
Expand Down

0 comments on commit 78c7183

Please sign in to comment.