浏览代码

Quite la importacion del modulo de traduccion

ErnestoOrtiz2 3 年前
父节点
当前提交
9727de04c6
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1
    2
      App.js
  2. 2
    1
      locales/en.json

+ 1
- 2
App.js 查看文件

2
 import React from 'react';
2
 import React from 'react';
3
 import { StyleSheet, Text, View } from 'react-native';
3
 import { StyleSheet, Text, View } from 'react-native';
4
 
4
 
5
-import { t } from './locales/index.js'
6
 
5
 
7
 export default function App() {
6
 export default function App() {
8
   return (
7
   return (
9
     <View style={styles.container}>
8
     <View style={styles.container}>
10
-      <Text>{t("Hola")}</Text>
9
+      <Text>"Hello"</Text>
11
       <StatusBar style="auto" />
10
       <StatusBar style="auto" />
12
     </View>
11
     </View>
13
   );
12
   );

+ 2
- 1
locales/en.json 查看文件

1
 {
1
 {
2
-    "Hola": "Hello"
2
+    "Hola": "Hello",
3
+    "Hello": "Hola"
3
 }
4
 }