Internationalize remaining TODO-marked UI text in Expo app

This commit is contained in:
Adolfo Reyna
2026-02-20 22:30:20 -05:00
parent a8d21d31f8
commit 06e620dbf6
16 changed files with 230 additions and 69 deletions

View File

@@ -4,6 +4,7 @@ import { StyleSheet, SafeAreaView, FlatList, View, ActivityIndicator } from 'rea
import API from "../API"; import API from "../API";
import GroupCard from "../components/GroupCard"; import GroupCard from "../components/GroupCard";
import AsyncStorage from '@react-native-async-storage/async-storage'; import AsyncStorage from '@react-native-async-storage/async-storage';
import i18n from "../i18nMessages.js";
const GROUPS_CACHE_KEY = 'groups_following'; const GROUPS_CACHE_KEY = 'groups_following';
@@ -113,7 +114,7 @@ const Groups = ({navigation}) => {
}} /> }} />
</View> : </View> :
<Searchbar <Searchbar
placeholder="Search Groups" placeholder={i18n.t("message.searchGroups")}
onChangeText={onChangeSearch} onChangeText={onChangeSearch}
value={searchQuery} value={searchQuery}
clearButtonMode="while-editing" clearButtonMode="while-editing"
@@ -125,7 +126,7 @@ const Groups = ({navigation}) => {
/> />
} }
</View> </View>
<Title style={styles.title} >{searchQuery ? "Results:" : "Your Groups:"}</Title> <Title style={styles.title} >{searchQuery ? i18n.t("message.results") : i18n.t("message.yourGroups")}</Title>
</> </>
} }
style={{backgroundColor: "#edf2f7",}} style={{backgroundColor: "#edf2f7",}}

View File

@@ -72,10 +72,12 @@ let InviteView = ()=>{
onPress={()=>{setChecked(!checked)}} onPress={()=>{setChecked(!checked)}}
/> />
<Divider /> <Divider />
<Button mode="outlined" onPress={sendInvite}>Invite</Button> <Button mode="outlined" onPress={sendInvite}>
{i18n.t("message.invite")}
</Button>
</ImageBackground> </ImageBackground>
</View> </View>
) )
} }
export default InviteView; export default InviteView;

View File

@@ -30,7 +30,7 @@ export default function App({ navigation, route }) {
style={styles.logo} style={styles.logo}
source={require('./../assets/icon.png')} source={require('./../assets/icon.png')}
/> />
<Text style={styles.header}>EMI Fellowship</Text> <Text style={styles.header}>{i18n.t("message.appName")}</Text>
<View style={{ flexDirection: "row", justifyContent: "center", width: "100%" }}> <View style={{ flexDirection: "row", justifyContent: "center", width: "100%" }}>
<Button disabled={isLogin} onPress={() => setIsLogin(true)}> <Button disabled={isLogin} onPress={() => setIsLogin(true)}>
{i18n.t("message.login")} {i18n.t("message.login")}

View File

@@ -71,33 +71,33 @@ let MenuView = ({ navigation }) => {
> >
<ProfileCardHorizontal profileObj={viewer} skipFollow={true} skiptOnPress={true} key={viewer._id} /> <ProfileCardHorizontal profileObj={viewer} skipFollow={true} skiptOnPress={true} key={viewer._id} />
<List.Accordion <List.Accordion
title="Change Active Profile" title={i18n.t("message.changeActiveProfile")}
left={props => <List.Icon {...props} icon="published-with-changes" />} left={props => <List.Icon {...props} icon="published-with-changes" />}
> >
{profileLists} {profileLists}
</List.Accordion> </List.Accordion>
<List.Section title="User Actions"> <List.Section title={i18n.t("message.userActions")}>
<List.Item key='ProfileEditor' title={i18n.t('message.profile')} onPress={() => { navigation.navigate("ProfileSettings") }} left={props => <List.Icon {...props} icon="person" />} /> <List.Item key='ProfileEditor' title={i18n.t('message.profile')} onPress={() => { navigation.navigate("ProfileSettings") }} left={props => <List.Icon {...props} icon="person" />} />
<List.Item key='Settings' title={i18n.t('message.settings')} left={props => <List.Icon {...props} icon="settings" />} /> <List.Item key='Settings' title={i18n.t('message.settings')} left={props => <List.Icon {...props} icon="settings" />} />
<List.Item key="Logout" title={i18n.t('message.logout')} onPress={() => { navigation.navigate("Logout") }} left={props => <List.Icon {...props} icon="logout" />} /> <List.Item key="Logout" title={i18n.t('message.logout')} onPress={() => { navigation.navigate("Logout") }} left={props => <List.Icon {...props} icon="logout" />} />
</List.Section> </List.Section>
<List.Section title="Fellowship App"> <List.Section title={i18n.t("message.fellowshipApp")}>
<List.Item key='Invite' title={i18n.t('message.invite')} onPress={() => { navigation.navigate("Invite") }} left={props => <List.Icon {...props} icon="person-add" />} /> <List.Item key='Invite' title={i18n.t('message.invite')} onPress={() => { navigation.navigate("Invite") }} left={props => <List.Icon {...props} icon="person-add" />} />
<List.Item key='About' title={i18n.t('message.about')} left={props => <List.Icon {...props} icon="more" />} /> <List.Item key='About' title={i18n.t('message.about')} left={props => <List.Icon {...props} icon="more" />} />
</List.Section> </List.Section>
<View style={{ padding: 10 }}> <View style={{ padding: 10 }}>
<Text>App Language:</Text> <Text>{i18n.t("message.appLanguage")}:</Text>
<RadioButton.Group onValueChange={newValue => changeLang(newValue)} value={value}> <RadioButton.Group onValueChange={newValue => changeLang(newValue)} value={value}>
<RadioButton.Item value="es" label="Español" /> <RadioButton.Item value="es" label={i18n.t("message.languageSpanish")} />
<RadioButton.Item value="en" label="English" /> <RadioButton.Item value="en" label={i18n.t("message.languageEnglish")} />
<RadioButton.Item value="da" label="Danish" /> <RadioButton.Item value="da" label={i18n.t("message.languageDanish")} />
<RadioButton.Item value="fr" label="French" /> <RadioButton.Item value="fr" label={i18n.t("message.languageFrench")} />
</RadioButton.Group> </RadioButton.Group>
</View> </View>
<View style={{ padding: 10, alignContent: "center", flex: 1 }}> <View style={{ padding: 10, alignContent: "center", flex: 1 }}>
<Text>Version: {Updates.runtimeVersion}</Text> <Text>{i18n.t("message.version")}: {Updates.runtimeVersion}</Text>
<Text>Channel: {Updates.Channel}</Text> <Text>{i18n.t("message.channel")}: {Updates.Channel}</Text>
</View> </View>
</ImageBackground> </ImageBackground>
</ScrollView> </ScrollView>

View File

@@ -3,6 +3,7 @@ import { StyleSheet, SafeAreaView, ImageBackground, View, ScrollView, Alert, Ima
import { Title, TextInput, Button, Text, Switch } from 'react-native-paper'; import { Title, TextInput, Button, Text, Switch } from 'react-native-paper';
import API from "../API"; import API from "../API";
import * as ImagePicker from 'expo-image-picker'; import * as ImagePicker from 'expo-image-picker';
import i18n from "../i18nMessages.js";
const DefaultPhoto = "https://social.emmint.com/uploads/e6f9be6d665dc43417701bf16a90122c.png"; const DefaultPhoto = "https://social.emmint.com/uploads/e6f9be6d665dc43417701bf16a90122c.png";
@@ -108,33 +109,33 @@ const NewGroup = ({ navigation }) => {
imageStyle={styles.backgroundImage} imageStyle={styles.backgroundImage}
> >
<ScrollView contentContainerStyle={styles.container}> <ScrollView contentContainerStyle={styles.container}>
<Title style={styles.title}>New Group</Title> <Title style={styles.title}>{i18n.t("message.newGroup")}</Title>
<View style={styles.photoRow}> <View style={styles.photoRow}>
<Image <Image
source={{ uri: selectedPhoto?.uri || DefaultPhoto }} source={{ uri: selectedPhoto?.uri || DefaultPhoto }}
style={styles.photoPreview} style={styles.photoPreview}
/> />
<Button mode="outlined" icon="photo" onPress={pickImage} disabled={isSubmitting}> <Button mode="outlined" icon="photo" onPress={pickImage} disabled={isSubmitting}>
{selectedPhoto ? "Change image" : "Add group image"} {selectedPhoto ? i18n.t("message.changeImage") : i18n.t("message.addGroupImage")}
</Button> </Button>
</View> </View>
<TextInput <TextInput
mode="outlined" mode="outlined"
label="Group name" label={i18n.t("message.groupName")}
value={title} value={title}
onChangeText={setTitle} onChangeText={setTitle}
style={styles.input} style={styles.input}
/> />
<TextInput <TextInput
mode="outlined" mode="outlined"
label="Subtitle (optional)" label={i18n.t("message.subtitleOptional")}
value={subtitle} value={subtitle}
onChangeText={setSubtitle} onChangeText={setSubtitle}
style={styles.input} style={styles.input}
/> />
<TextInput <TextInput
mode="outlined" mode="outlined"
label="Description" label={i18n.t("message.description")}
value={description} value={description}
onChangeText={setDescription} onChangeText={setDescription}
multiline multiline
@@ -143,8 +144,8 @@ const NewGroup = ({ navigation }) => {
/> />
<View style={styles.switchRow}> <View style={styles.switchRow}>
<View style={styles.switchTextWrap}> <View style={styles.switchTextWrap}>
<Text style={styles.switchTitle}>Private group</Text> <Text style={styles.switchTitle}>{i18n.t("message.privateGroup")}</Text>
<Text style={styles.switchSubtitle}>Require approval before people can join.</Text> <Text style={styles.switchSubtitle}>{i18n.t("message.requireApprovalBeforeJoin")}</Text>
</View> </View>
<Switch value={isPrivate} onValueChange={setIsPrivate} /> <Switch value={isPrivate} onValueChange={setIsPrivate} />
</View> </View>
@@ -155,7 +156,7 @@ const NewGroup = ({ navigation }) => {
disabled={isSubmitting} disabled={isSubmitting}
style={styles.button} style={styles.button}
> >
Create Group {i18n.t("message.createGroupAction")}
</Button> </Button>
</ScrollView> </ScrollView>
</ImageBackground> </ImageBackground>

View File

@@ -170,7 +170,7 @@ let NewPostView = (props) => {
{ {
toProfile._id ? toProfile._id ?
<Text style={{ paddingLeft: 10, paddingBottom: 5 }}> <Text style={{ paddingLeft: 10, paddingBottom: 5 }}>
Posting on: {toProfile.profile?.firstName} {toProfile.profile?.lastName} {i18n.t("message.postingOn")}: {toProfile.profile?.firstName} {toProfile.profile?.lastName}
</Text> : null </Text> : null
} }
<Divider bold={true} /> <Divider bold={true} />
@@ -178,7 +178,7 @@ let NewPostView = (props) => {
<TextInput <TextInput
value={postContent} value={postContent}
onChangeText={setPostContent} onChangeText={setPostContent}
placeholder="What is on your mind today?" placeholder={i18n.t("message.whatIsOnYourMindToday")}
multiline={true} multiline={true}
numberOfLines={8} numberOfLines={8}
style={{ style={{
@@ -194,18 +194,18 @@ let NewPostView = (props) => {
{/* Button to pick images from the gallery */} {/* Button to pick images from the gallery */}
<View style={{ flexDirection: "row", marginTop: 10, justifyContent: "space-around" }}> <View style={{ flexDirection: "row", marginTop: 10, justifyContent: "space-around" }}>
<Button icon="add-a-photo" mode="outlined" onPress={pickImage}> <Button icon="add-a-photo" mode="outlined" onPress={pickImage}>
Add Photos {i18n.t("message.addPhotos")}
</Button> </Button>
{isUploading && ( {isUploading && (
<Button icon="cancel" mode="outlined" onPress={handleCancelUpload}> <Button icon="cancel" mode="outlined" onPress={handleCancelUpload}>
Cancel Upload {i18n.t("message.cancelUpload")}
</Button> </Button>
)} )}
</View> </View>
{/* Display uploading state and selected image preview */} {/* Display uploading state and selected image preview */}
{photo && ( {photo && (
<View> <View>
<Text>Uploading...</Text> <Text>{i18n.t("message.uploading")}</Text>
<Image <Image
source={{ uri: photo.uri }} source={{ uri: photo.uri }}
style={{ width: 100, height: 100 }} style={{ width: 100, height: 100 }}
@@ -215,7 +215,7 @@ let NewPostView = (props) => {
{/* Display upload progress if in progress */} {/* Display upload progress if in progress */}
{ {
uploadProgress > 0 && uploadProgress < 100 && ( uploadProgress > 0 && uploadProgress < 100 && (
<Text>Upload Progress: {uploadProgress.toFixed(2)}%</Text> <Text>{i18n.t("message.uploadProgress")}: {uploadProgress.toFixed(2)}%</Text>
) )
} }
{/* Display media content if extra content is available */} {/* Display media content if extra content is available */}
@@ -229,4 +229,4 @@ let NewPostView = (props) => {
) )
} }
export default NewPostView; export default NewPostView;

View File

@@ -9,6 +9,7 @@ import ProfileHeader from '../components/ProfileHeader.js';
import AsyncStorage from '@react-native-async-storage/async-storage'; import AsyncStorage from '@react-native-async-storage/async-storage';
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';
import GlobalState from '../contexts/GlobalState.js'; import GlobalState from '../contexts/GlobalState.js';
import i18n from "../i18nMessages.js";
const PROFILE_LOG_PREFIX = '[Profile]'; const PROFILE_LOG_PREFIX = '[Profile]';
const logProfile = (...args) => { const logProfile = (...args) => {
@@ -203,18 +204,18 @@ let Profile = ({ navigation, route }) => {
navigation.navigate('NewPost', {toProfile: profile._id}) navigation.navigate('NewPost', {toProfile: profile._id})
}} /> }} />
</View> </View>
<Button style={{paddingLeft:12, backgroundColor:"#fff"}} title="Images" icon={tag == 'images' ? 'remove' : "image"} mode="outlined" onPress={()=>{ <Button style={{paddingLeft:12, backgroundColor:"#fff"}} title={i18n.t("message.images")} icon={tag == 'images' ? 'remove' : "image"} mode="outlined" onPress={()=>{
if(tag == 'images') return setTag(''); if(tag == 'images') return setTag('');
setTag('images'); setTag('images');
}}>{tag == 'images' ? "Images" : ''}</Button> }}>{tag == 'images' ? i18n.t("message.images") : ''}</Button>
<Button style={{paddingLeft:12, backgroundColor:"#fff"}} title="Media" icon={tag == 'media' ? 'remove' : "subscriptions"} mode="outlined" onPress={()=>{ <Button style={{paddingLeft:12, backgroundColor:"#fff"}} title={i18n.t("message.media")} icon={tag == 'media' ? 'remove' : "subscriptions"} mode="outlined" onPress={()=>{
if(tag == 'media') return setTag(''); if(tag == 'media') return setTag('');
setTag('media'); setTag('media');
}}>{tag == 'media' ? "Media" : ''}</Button> }}>{tag == 'media' ? i18n.t("message.media") : ''}</Button>
<Button style={{paddingLeft:12, backgroundColor:"#fff"}} title="Embedded" icon={tag == 'embedded' ? 'remove' : "folder"} mode="outlined" onPress={()=>{ <Button style={{paddingLeft:12, backgroundColor:"#fff"}} title={i18n.t("message.embedded")} icon={tag == 'embedded' ? 'remove' : "folder"} mode="outlined" onPress={()=>{
if(tag == 'embedded') return setTag(''); if(tag == 'embedded') return setTag('');
setTag('embedded'); setTag('embedded');
}}>{tag == 'embedded' ? "Files" : ''}</Button> }}>{tag == 'embedded' ? i18n.t("message.files") : ''}</Button>
</View> </View>
{isOwnedGroup ? ( {isOwnedGroup ? (
<View style={styles.deleteGroupRow}> <View style={styles.deleteGroupRow}>
@@ -226,7 +227,7 @@ let Profile = ({ navigation, route }) => {
disabled={isDeletingGroup} disabled={isDeletingGroup}
onPress={handleDeleteGroup} onPress={handleDeleteGroup}
> >
Delete Group {i18n.t("message.deleteGroup")}
</Button> </Button>
</View> </View>
) : <></>} ) : <></>}

View File

@@ -41,12 +41,12 @@ let ProfileSettings = () => {
}; };
const languageOptions = [ const languageOptions = [
{ value: "es", label: "Español" }, { value: "es", label: i18n.t("message.languageSpanish") },
{ value: "en", label: "English" }, { value: "en", label: i18n.t("message.languageEnglish") },
{ value: "da", label: "Danish" }, { value: "da", label: i18n.t("message.languageDanish") },
{ value: "fr", label: "French" }, { value: "fr", label: i18n.t("message.languageFrench") },
]; ];
const currentLanguageLabel = languageOptions.find((opt) => opt.value === language)?.label || "English"; const currentLanguageLabel = languageOptions.find((opt) => opt.value === language)?.label || i18n.t("message.languageEnglish");
const pickImage = async () => { const pickImage = async () => {
if (uploading) return; if (uploading) return;
@@ -176,8 +176,10 @@ let ProfileSettings = () => {
<View style={{ paddingTop: 10 }}> <View style={{ paddingTop: 10 }}>
<ProfileCardHorizontal profileObj={previewProfile} skipFollow={true} skiptOnPress={true} key={updateKey} /> <ProfileCardHorizontal profileObj={previewProfile} skipFollow={true} skiptOnPress={true} key={updateKey} />
</View> </View>
<Text style={{ marginBottom: 10, marginTop: 10, fontSize: 20 }}>Profile Setting</Text> <Text style={{ marginBottom: 10, marginTop: 10, fontSize: 20 }}>{i18n.t("message.profileSetting")}</Text>
<Button icon="photo" mode="outlined" onPress={pickImage}>{!uploading ? i18n.t("message.updatePhoto") : "uploading"}</Button> <Button icon="photo" mode="outlined" onPress={pickImage}>
{!uploading ? i18n.t("message.updatePhoto") : i18n.t("message.uploading")}
</Button>
<Divider /> <Divider />
<View style={{ flexDirection: "row", justifyContent: "space-between" }}> <View style={{ flexDirection: "row", justifyContent: "space-between" }}>
<TextInput <TextInput
@@ -201,7 +203,7 @@ let ProfileSettings = () => {
value={description} value={description}
onChangeText={text => setDescription(text)} onChangeText={text => setDescription(text)}
/> />
<Text style={{ marginBottom: 4 }}>Language:</Text> <Text style={{ marginBottom: 4 }}>{i18n.t("message.language")}:</Text>
<View style={{ marginBottom: 10 }}> <View style={{ marginBottom: 10 }}>
<Menu <Menu
visible={languageMenuVisible} visible={languageMenuVisible}

View File

@@ -6,6 +6,7 @@ import ProfileCardHorizontal from "../components/ProfileCardHorizontal";
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';
import GlobalState from '../contexts/GlobalState.js'; import GlobalState from '../contexts/GlobalState.js';
import ProfileHeader from "../components/ProfileHeader"; import ProfileHeader from "../components/ProfileHeader";
import i18n from "../i18nMessages.js";
const Search = () => { const Search = () => {
const viewer = useSnapshot(GlobalState).me; const viewer = useSnapshot(GlobalState).me;
@@ -47,7 +48,7 @@ const Search = () => {
return ( return (
<SafeAreaView style={{ flex: 1, backgroundColor: "#edf2f7", }}> <SafeAreaView style={{ flex: 1, backgroundColor: "#edf2f7", }}>
<Searchbar <Searchbar
placeholder="Search Users" placeholder={i18n.t("message.searchUsers")}
onChangeText={onChangeSearch} onChangeText={onChangeSearch}
value={searchQuery} value={searchQuery}
/> />
@@ -66,7 +67,7 @@ const Search = () => {
data={followers} data={followers}
renderItem={renderFollowing} renderItem={renderFollowing}
keyExtractor={item => item} keyExtractor={item => item}
ListHeaderComponent={<Text style={{fontSize:20, padding:10, alignSelf: "center"}}>Recently Following</Text>} ListHeaderComponent={<Text style={{fontSize:20, padding:10, alignSelf: "center"}}>{i18n.t("message.recentlyFollowing")}</Text>}
/> />
} }
</SafeAreaView> </SafeAreaView>

View File

@@ -43,23 +43,23 @@ let MenuView = ({ navigation }) => {
style={{ paddingTop: 10 }} style={{ paddingTop: 10 }}
imageStyle={{ resizeMode: "contain", opacity: 0.05 }} imageStyle={{ resizeMode: "contain", opacity: 0.05 }}
> >
<List.Section title="Current Profile"> <List.Section title={i18n.t("message.currentProfile")}>
<ProfileCardHorizontal profileObj={viewer} skipFollow={true} skiptOnPress={true} /> <ProfileCardHorizontal profileObj={viewer} skipFollow={true} skiptOnPress={true} />
</List.Section> </List.Section>
<List.Section title="User Actions"> <List.Section title={i18n.t("message.userActions")}>
<List.Item title={i18n.t('message.profile')} onPress={() => { navigation.navigate("ProfileSettings") }} left={props => <List.Icon {...props} icon="person" />} /> <List.Item title={i18n.t('message.profile')} onPress={() => { navigation.navigate("ProfileSettings") }} left={props => <List.Icon {...props} icon="person" />} />
<List.Item title={i18n.t('message.settings')} left={props => <List.Icon {...props} icon="settings" />} /> <List.Item title={i18n.t('message.settings')} left={props => <List.Icon {...props} icon="settings" />} />
<List.Item title={i18n.t('message.logout')} onPress={() => { navigation.navigate("Logout") }} left={props => <List.Icon {...props} icon="logout" />} /> <List.Item title={i18n.t('message.logout')} onPress={() => { navigation.navigate("Logout") }} left={props => <List.Icon {...props} icon="logout" />} />
</List.Section> </List.Section>
<List.Section title="Fellowship App"> <List.Section title={i18n.t("message.fellowshipApp")}>
<List.Item title={i18n.t('message.invite')} onPress={() => { navigation.navigate("Invite") }} left={props => <List.Icon {...props} icon="person-add" />} /> <List.Item title={i18n.t('message.invite')} onPress={() => { navigation.navigate("Invite") }} left={props => <List.Icon {...props} icon="person-add" />} />
<List.Item title={i18n.t('message.about')} left={props => <List.Icon {...props} icon="more" />} /> <List.Item title={i18n.t('message.about')} left={props => <List.Icon {...props} icon="more" />} />
</List.Section> </List.Section>
<View style={{ padding: 10 }}> <View style={{ padding: 10 }}>
<Text>Language:</Text> <Text>{i18n.t("message.language")}:</Text>
<RadioButton.Group onValueChange={newValue => changeLang(newValue)} value={value}> <RadioButton.Group onValueChange={newValue => changeLang(newValue)} value={value}>
<RadioButton.Item value="es" label="Español" /> <RadioButton.Item value="es" label={i18n.t("message.languageSpanish")} />
<RadioButton.Item value="en" label="English" /> <RadioButton.Item value="en" label={i18n.t("message.languageEnglish")} />
</RadioButton.Group> </RadioButton.Group>
</View> </View>
</ImageBackground> </ImageBackground>
@@ -67,4 +67,4 @@ let MenuView = ({ navigation }) => {
) )
} }
export default MenuView; export default MenuView;

View File

@@ -46,7 +46,7 @@ let LoginForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setEmail(text)} onChangeText={text => setEmail(text)}
defaultValue={email} defaultValue={email}
placeholder="email" placeholder={i18n.t("message.email")}
label={i18n.t("message.email")} label={i18n.t("message.email")}
autoCapitalize='none' autoCapitalize='none'
autoComplete='email' autoComplete='email'
@@ -61,7 +61,7 @@ let LoginForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setPassword(text)} onChangeText={text => setPassword(text)}
defaultValue={password} defaultValue={password}
placeholder="password" placeholder={i18n.t("message.password")}
textContentType="password" textContentType="password"
label={i18n.t("message.password")} label={i18n.t("message.password")}
secureTextEntry={true} secureTextEntry={true}
@@ -113,4 +113,4 @@ const styles = StyleSheet.create({
marginTop: 10, marginTop: 10,
} }
}); });

View File

@@ -4,6 +4,7 @@ import { TextInput, Button } from 'react-native-paper';
import API from './../API.js'; import API from './../API.js';
import { useNavigation } from '@react-navigation/native'; import { useNavigation } from '@react-navigation/native';
import AwesomeIcon from 'react-native-vector-icons/FontAwesome'; import AwesomeIcon from 'react-native-vector-icons/FontAwesome';
import i18n from "../i18nMessages.js";
let NewComment = ({ postid, newComentAdded }) => { let NewComment = ({ postid, newComentAdded }) => {
@@ -13,7 +14,7 @@ let NewComment = ({ postid, newComentAdded }) => {
return ( return (
<View style={styles.NewComment}> <View style={styles.NewComment}>
<TextInput <TextInput
label="New Comment" label={i18n.t("message.newComment")}
value={commentContent} value={commentContent}
onChangeText={setCommentContent} onChangeText={setCommentContent}
mode="outlined" mode="outlined"
@@ -55,4 +56,4 @@ const styles = StyleSheet.create({
flexDirection: "row", flexDirection: "row",
flex: 6 flex: 6
} }
}); });

View File

@@ -104,7 +104,7 @@ let NewPost = ({ profileid, newPostCB }) => {
</View> </View>
{photo && ( {photo && (
<View> <View>
<Text>Uploading...</Text> <Text>{i18n.t("message.uploading")}</Text>
<Image <Image
source={{ uri: photo.uri }} source={{ uri: photo.uri }}
style={{ width: 100, height: 100 }} style={{ width: 100, height: 100 }}
@@ -131,4 +131,4 @@ const styles = StyleSheet.create({
margin: 10, margin: 10,
padding: 10, padding: 10,
} }
}); });

View File

@@ -239,7 +239,7 @@ let Post = (props) => {
<View style={styles.swipeWrap}> <View style={styles.swipeWrap}>
<View style={styles.deleteActionWrap}> <View style={styles.deleteActionWrap}>
<Pressable style={styles.deleteActionBtn} onPress={confirmDelete}> <Pressable style={styles.deleteActionBtn} onPress={confirmDelete}>
<Text style={styles.deleteActionText}>Delete</Text> <Text style={styles.deleteActionText}>{i18n.t("message.delete")}</Text>
</Pressable> </Pressable>
</View> </View>
<Animated.View style={{ transform: [{ translateX: swipeX }] }} {...panResponder.panHandlers}> <Animated.View style={{ transform: [{ translateX: swipeX }] }} {...panResponder.panHandlers}>

View File

@@ -57,7 +57,7 @@ let RegisterForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setPassword(text)} onChangeText={text => setPassword(text)}
defaultValue={password} defaultValue={password}
placeholder="password" placeholder={i18n.t("message.password")}
textContentType="password" textContentType="password"
label={i18n.t("message.password")} label={i18n.t("message.password")}
secureTextEntry={true} secureTextEntry={true}
@@ -70,7 +70,7 @@ let RegisterForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setPassword2(text)} onChangeText={text => setPassword2(text)}
defaultValue={password} defaultValue={password}
placeholder="same password" placeholder={i18n.t("message.rpassword")}
textContentType="same password" textContentType="same password"
label={i18n.t("message.rpassword")} label={i18n.t("message.rpassword")}
secureTextEntry={true} secureTextEntry={true}
@@ -83,7 +83,7 @@ let RegisterForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setFirstName(text)} onChangeText={text => setFirstName(text)}
defaultValue={firstName} defaultValue={firstName}
placeholder="First Name" placeholder={i18n.t("message.firstName")}
label={i18n.t("message.name")} label={i18n.t("message.name")}
autoCapitalize='words' autoCapitalize='words'
autoComplete='name' autoComplete='name'
@@ -94,7 +94,7 @@ let RegisterForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setLastName(text)} onChangeText={text => setLastName(text)}
defaultValue={lastName} defaultValue={lastName}
placeholder="Last Name" placeholder={i18n.t("message.lastName")}
label={i18n.t("message.lastName")} label={i18n.t("message.lastName")}
autoCapitalize='words' autoCapitalize='words'
autoComplete='name' autoComplete='name'
@@ -105,7 +105,7 @@ let RegisterForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setDescription(text)} onChangeText={text => setDescription(text)}
defaultValue={description} defaultValue={description}
placeholder="Description so others can know you" placeholder={i18n.t("message.describeYourself")}
label={i18n.t("message.describeYourself")} label={i18n.t("message.describeYourself")}
autoCapitalize='sentences' autoCapitalize='sentences'
autoComplete='description' autoComplete='description'
@@ -121,7 +121,7 @@ let RegisterForm = () => {
style={styles.input} style={styles.input}
onChangeText={text => setEmail(text)} onChangeText={text => setEmail(text)}
defaultValue={email} defaultValue={email}
placeholder="email" placeholder={i18n.t("message.email")}
label={i18n.t("message.email")} label={i18n.t("message.email")}
autoCapitalize='none' autoCapitalize='none'
autoComplete='email' autoComplete='email'
@@ -162,4 +162,4 @@ const styles = StyleSheet.create({
marginTop: 10, marginTop: 10,
} }
}); });

View File

@@ -79,6 +79,44 @@ const messages = {
ocupation: "Ocupation", ocupation: "Ocupation",
country: 'Country', country: 'Country',
clickToSeeAllPhotos: "Click to see all photos", clickToSeeAllPhotos: "Click to see all photos",
recentlyFollowing: "Recently Following",
changeActiveProfile: "Change Active Profile",
userActions: "User Actions",
fellowshipApp: "Fellowship App",
appLanguage: "App Language",
language: "Language",
languageSpanish: "Spanish",
languageEnglish: "English",
languageDanish: "Danish",
languageFrench: "French",
version: "Version",
channel: "Channel",
postingOn: "Posting on",
whatIsOnYourMindToday: "What is on your mind today?",
addPhotos: "Add Photos",
cancelUpload: "Cancel Upload",
uploading: "Uploading...",
uploadProgress: "Upload Progress",
newGroup: "New Group",
changeImage: "Change image",
addGroupImage: "Add group image",
groupName: "Group name",
subtitleOptional: "Subtitle (optional)",
requireApprovalBeforeJoin: "Require approval before people can join.",
createGroupAction: "Create Group",
newComment: "New Comment",
currentProfile: "Current Profile",
profileSetting: "Profile Setting",
searchGroups: "Search Groups",
results: "Results:",
yourGroups: "Your Groups:",
images: "Images",
media: "Media",
embedded: "Embedded",
files: "Files",
deleteGroup: "Delete Group",
delete: "Delete",
appName: "EMI Fellowship",
}, },
}, },
es: { es: {
@@ -153,6 +191,44 @@ const messages = {
ocupation: 'Ocupación', ocupation: 'Ocupación',
country: 'País', country: 'País',
clickToSeeAllPhotos: "Haz clic para ver todas las fotos", clickToSeeAllPhotos: "Haz clic para ver todas las fotos",
recentlyFollowing: "Siguiendo recientemente",
changeActiveProfile: "Cambiar perfil activo",
userActions: "Acciones de usuario",
fellowshipApp: "App Fellowship",
appLanguage: "Idioma de la app",
language: "Idioma",
languageSpanish: "Español",
languageEnglish: "Inglés",
languageDanish: "Danés",
languageFrench: "Francés",
version: "Versión",
channel: "Canal",
postingOn: "Publicando en",
whatIsOnYourMindToday: "¿Qué tienes en mente hoy?",
addPhotos: "Agregar fotos",
cancelUpload: "Cancelar carga",
uploading: "Subiendo...",
uploadProgress: "Progreso de carga",
newGroup: "Nuevo grupo",
changeImage: "Cambiar imagen",
addGroupImage: "Agregar imagen del grupo",
groupName: "Nombre del grupo",
subtitleOptional: "Subtítulo (opcional)",
requireApprovalBeforeJoin: "Requiere aprobación antes de que las personas puedan unirse.",
createGroupAction: "Crear grupo",
newComment: "Nuevo comentario",
currentProfile: "Perfil actual",
profileSetting: "Configuración del perfil",
searchGroups: "Buscar grupos",
results: "Resultados:",
yourGroups: "Tus grupos:",
images: "Imágenes",
media: "Multimedia",
embedded: "Integrado",
files: "Archivos",
deleteGroup: "Eliminar grupo",
delete: "Eliminar",
appName: "EMI Fellowship",
} }
}, },
fr: { fr: {
@@ -227,6 +303,44 @@ const messages = {
ocupation: 'Occupation', ocupation: 'Occupation',
country: 'Pays', country: 'Pays',
clickToSeeAllPhotos: "Cliquez pour voir toutes les photos", clickToSeeAllPhotos: "Cliquez pour voir toutes les photos",
recentlyFollowing: "Abonnements récents",
changeActiveProfile: "Changer le profil actif",
userActions: "Actions utilisateur",
fellowshipApp: "Application Fellowship",
appLanguage: "Langue de l'application",
language: "Langue",
languageSpanish: "Espagnol",
languageEnglish: "Anglais",
languageDanish: "Danois",
languageFrench: "Français",
version: "Version",
channel: "Canal",
postingOn: "Publication sur",
whatIsOnYourMindToday: "Qu'avez-vous en tête aujourd'hui ?",
addPhotos: "Ajouter des photos",
cancelUpload: "Annuler le téléversement",
uploading: "Téléversement...",
uploadProgress: "Progression du téléversement",
newGroup: "Nouveau groupe",
changeImage: "Changer l'image",
addGroupImage: "Ajouter l'image du groupe",
groupName: "Nom du groupe",
subtitleOptional: "Sous-titre (facultatif)",
requireApprovalBeforeJoin: "Nécessite une approbation avant que les personnes puissent rejoindre.",
createGroupAction: "Créer le groupe",
newComment: "Nouveau commentaire",
currentProfile: "Profil actuel",
profileSetting: "Paramètres du profil",
searchGroups: "Rechercher des groupes",
results: "Résultats :",
yourGroups: "Vos groupes :",
images: "Images",
media: "Médias",
embedded: "Intégré",
files: "Fichiers",
deleteGroup: "Supprimer le groupe",
delete: "Supprimer",
appName: "EMI Fellowship",
} }
}, },
da: { da: {
@@ -301,6 +415,44 @@ const messages = {
ocupation: "Beskæftigelse", ocupation: "Beskæftigelse",
country: 'Land', country: 'Land',
clickToSeeAllPhotos: "Klik for at se alle billeder", clickToSeeAllPhotos: "Klik for at se alle billeder",
recentlyFollowing: "For nylig fulgt",
changeActiveProfile: "Skift aktiv profil",
userActions: "Brugerhandlinger",
fellowshipApp: "Fellowship App",
appLanguage: "App-sprog",
language: "Sprog",
languageSpanish: "Spansk",
languageEnglish: "Engelsk",
languageDanish: "Dansk",
languageFrench: "Fransk",
version: "Version",
channel: "Kanal",
postingOn: "Udgiver på",
whatIsOnYourMindToday: "Hvad tænker du på i dag?",
addPhotos: "Tilføj billeder",
cancelUpload: "Annuller upload",
uploading: "Uploader...",
uploadProgress: "Uploadforløb",
newGroup: "Ny gruppe",
changeImage: "Skift billede",
addGroupImage: "Tilføj gruppebillede",
groupName: "Gruppenavn",
subtitleOptional: "Undertitel (valgfri)",
requireApprovalBeforeJoin: "Kræver godkendelse før folk kan deltage.",
createGroupAction: "Opret gruppe",
newComment: "Ny kommentar",
currentProfile: "Nuværende profil",
profileSetting: "Profilindstillinger",
searchGroups: "Søg grupper",
results: "Resultater:",
yourGroups: "Dine grupper:",
images: "Billeder",
media: "Medier",
embedded: "Indlejret",
files: "Filer",
deleteGroup: "Slet gruppe",
delete: "Slet",
appName: "EMI Fellowship",
} }
} }
} }