Skip to content

Commit c6e426f

Browse files
committed
no translation for same source and target
1 parent 106453c commit c6e426f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/context/TranslationContext.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export const TranslationProvider: React.FC<TranslationProviderProps> = ({
3939
useEffect(() => {
4040
const initializeTranslations = async () => {
4141
try {
42-
await service.init();
42+
if (config.sourceLocale !== config.targetLocale) {
43+
await service.init();
44+
}
4345
setLoading(false);
4446
} catch (err) {
4547
setError(

0 commit comments

Comments
 (0)