Skip to content

Commit 7a21f75

Browse files
author
Guillermo Machado
committed
feat: add translations to error message in the webview
1 parent 2f63e39 commit 7a21f75

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/app/www.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React, { useEffect } from 'react';
33
import { View } from 'react-native';
44
import { WebView } from 'react-native-webview';
55

6+
import { translate } from '@/core';
67
import { Text } from '@/ui';
78

89
export default function WWW() {
@@ -21,7 +22,9 @@ export default function WWW() {
2122
if (!url || typeof url !== 'string') {
2223
return (
2324
<View className="flex-1 items-center justify-center bg-white">
24-
<Text className="text-lg text-red-500">Invalid URL</Text>
25+
<Text className="text-lg text-red-500">
26+
{translate('www.invalidUrl')}
27+
</Text>
2528
</View>
2629
);
2730
}

src/translations/en.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,8 @@
5353
"version": "Version",
5454
"website": "Website"
5555
},
56-
"welcome": "Welcome to rootstrap app site"
56+
"welcome": "Welcome to rootstrap app site",
57+
"www": {
58+
"invalidUrl": "Invalid Url"
59+
}
5760
}

0 commit comments

Comments
 (0)