Skip to content

Commit 1eb521f

Browse files
iqbalhasandevgithub-actions[bot]
authored andcommitted
style: fix code formatting [skip ci]
1 parent b18d539 commit 1eb521f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ Main hook for accessing translations and locale information.
176176

177177
**Options:**
178178

179-
| Option | Type | Default | Description |
180-
| ---------- | -------- | ---------- | -------------------------------------------- |
181-
| `langPath` | `string` | `'@/lang'` | Custom path to translations directory |
179+
| Option | Type | Default | Description |
180+
| ---------- | -------- | ---------- | ------------------------------------- |
181+
| `langPath` | `string` | `'@/lang'` | Custom path to translations directory |
182182

183183
**Returns:**
184184

hooks/useLocalizer.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,22 @@ export function useLocalizer(options: UseLocalizerOptions = {}): UseLocalizerRet
201201
interface WindowWithTranslations extends Window {
202202
__LARAVEL_LOCALIZER_TRANSLATIONS__?: Record<string, Record<string, string>>;
203203
}
204-
const translations = (window as WindowWithTranslations).__LARAVEL_LOCALIZER_TRANSLATIONS__?.[locale] || {};
204+
const translations =
205+
(window as WindowWithTranslations).__LARAVEL_LOCALIZER_TRANSLATIONS__?.[locale] || {};
205206

206207
// Note: langPath is stored for future use if needed for dynamic imports
207208
// Currently, translations are loaded globally via window object
208209
if (Object.keys(translations).length === 0 && langPath !== '@/lang') {
209-
console.warn(`[Laravel Localizer] Custom langPath '${langPath}' specified but translations not found. Ensure your vite.config has proper path alias.`);
210+
console.warn(
211+
`[Laravel Localizer] Custom langPath '${langPath}' specified but translations not found. Ensure your vite.config has proper path alias.`
212+
);
210213
}
211214

212215
return translations;
213216
} catch {
214-
console.warn(`[Laravel Localizer] Could not load translations for locale: ${locale}. Default path is '${langPath}'.`);
217+
console.warn(
218+
`[Laravel Localizer] Could not load translations for locale: ${locale}. Default path is '${langPath}'.`
219+
);
215220
return {};
216221
}
217222
}, [locale, langPath]);

0 commit comments

Comments
 (0)