translating admin dashboard strings

This commit is contained in:
balzack 2023-09-30 21:25:20 -07:00
parent f26373e99c
commit fbfad8a3fd
3 changed files with 87 additions and 23 deletions

View File

@ -144,6 +144,22 @@ const Strings = [
blockTopic: 'Block Topic', blockTopic: 'Block Topic',
reportTopic: 'Report Topic', reportTopic: 'Report Topic',
unknown: 'unknown', unknown: 'unknown',
accounts: 'Accounts',
createAccount: 'Create Account',
accessAccount: 'Access Account',
token: 'Token',
settings: 'Settings',
federatedHost: 'Federated Host',
storageLimit: 'Storage Limit (GB) / Account',
keyType: 'Account Key Type',
enableImage: 'Enable Image Queue',
enableAudio: 'Enable Audio Queue',
enableVideo: 'Enable Video Queue',
enableCalls: 'Enable WebRTC Calls',
relayUrl: 'Relay URL',
relayUsername: 'Relay Username',
relayPassword: 'Relay Password',
}, },
{ {
visibleRegistry: 'Visible dans le Registre', visibleRegistry: 'Visible dans le Registre',
@ -284,6 +300,22 @@ const Strings = [
blockTopic: 'Bloquer le Sujet', blockTopic: 'Bloquer le Sujet',
reportTopic: 'Signaler le Sujet', reportTopic: 'Signaler le Sujet',
unknown: 'Inconnu', unknown: 'Inconnu',
accounts: 'Comptes',
createAccount: 'Créer un Compte',
accessAccount: 'Accéder au Compte',
token: 'Code',
settings: 'Paramètres',
federatedHost: 'Serveur Fédéré',
storageLimit: 'Espace (Go) / Compte',
keyType: 'Type de Clé',
enableImage: 'Activer les Fichiers Image',
enableAudio: 'Activer les Fichiers Audio',
enableVideo: 'Activer les Fichiers Vidéo',
enableCalls: 'Activer les Appels',
relayUrl: 'URL de Relais',
relayUsername: 'Nom d\'Utilisateur du Relais',
relayPassword: 'Mot de Passe du Relais',
}, },
{ {
visibleRegistry: 'Visible en el Registro', visibleRegistry: 'Visible en el Registro',
@ -424,6 +456,22 @@ const Strings = [
blockTopic: 'Bloquer el Tema', blockTopic: 'Bloquer el Tema',
reportTopic: 'Reportar el Tema', reportTopic: 'Reportar el Tema',
unknown: 'Desconocido', unknown: 'Desconocido',
accounts: 'Cuentas',
createAccount: 'Crear',
accessAccount: 'Acceso',
token: 'Código',
settings: 'Ajustes',
federatedHost: 'Servidor Federado',
storageLimit: 'Espacio (GB) / Cuenta',
keyType: 'Tipo de Clave',
enableImage: 'Permitir Archivos de Imagen',
enableAudio: 'Permitir Archivos de Audio',
enableVideo: 'Permitir Archivos de Vídeo',
enableCalls: 'Permitier Llamadas',
relayUrl: 'URL para Llamadas',
relayUsername: 'Nombre de Usuario para Llamadas',
relayPassword: 'Contraseña para Llamadas',
}, },
{ {
visibleRegistry: 'Sichtbar in der Registrierung', visibleRegistry: 'Sichtbar in der Registrierung',
@ -564,6 +612,22 @@ const Strings = [
blockTopic: 'Blockiere das Thema', blockTopic: 'Blockiere das Thema',
reportTopic: 'Das Thema Melden', reportTopic: 'Das Thema Melden',
unknown: 'Unbekannt', unknown: 'Unbekannt',
accounts: 'Konten',
createAccount: 'Erstellen',
accessAccount: 'Zugang',
token: 'Code',
settings: 'Einstellungen',
federatedHost: 'Verbundname',
storageLimit: 'Raum (GB) / Konto',
keyType: 'Schlüsselart',
enableImage: 'Bilddateien Aktivieren',
enableAudio: 'Audiodateien Aktivieren',
enableVideo: 'Videodateien aktivieren',
enableCalls: 'Anrufe Ermöglichen',
relayUrl: 'URL für Anrufe',
relayUsername: 'Benutzername für Anrufe',
relayPassword: 'Passwort für Anrufe',
} }
]; ];

View File

@ -76,7 +76,7 @@ export function Dashboard(props) {
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<View style={styles.header}> <View style={styles.header}>
<Text style={styles.headerLabel}>Accounts</Text> <Text style={styles.headerLabel}>{ state.strings.accounts }</Text>
<TouchableOpacity onPress={actions.refresh}> <TouchableOpacity onPress={actions.refresh}>
<AntIcon style={styles.icon} name={'reload1'} size={20} /> <AntIcon style={styles.icon} name={'reload1'} size={20} />
</TouchableOpacity> </TouchableOpacity>
@ -139,12 +139,12 @@ export function Dashboard(props) {
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<View style={styles.modalHeader}> <View style={styles.modalHeader}>
<Text style={styles.modalHeaderText}>Settings:</Text> <Text style={styles.modalHeaderText}>{ state.strings.settings }</Text>
</View> </View>
<ScrollView style={styles.modalBody}> <ScrollView style={styles.modalBody}>
<InputField style={styles.field} <InputField style={styles.field}
label={'Federated Host'} label={state.strings.federatedHost}
value={state.domain} value={state.domain}
autoCapitalize={'none'} autoCapitalize={'none'}
spellCheck={false} spellCheck={false}
@ -152,7 +152,7 @@ export function Dashboard(props) {
/> />
<InputField style={styles.field} <InputField style={styles.field}
label={'Storage Limit (GB) / Account'} label={state.strings.storageLimit}
value={state.storage} value={state.storage}
autoCapitalize={'none'} autoCapitalize={'none'}
spellCheck={false} spellCheck={false}
@ -160,7 +160,7 @@ export function Dashboard(props) {
onChangeText={actions.setStorage} onChangeText={actions.setStorage}
/> />
<Text style={styles.modalLabel}>Account Key Type:</Text> <Text style={styles.modalLabel}>{ state.strings.keyType }</Text>
<View style={styles.keyType}> <View style={styles.keyType}>
<TouchableOpacity style={styles.optionLeft} activeOpacity={1} <TouchableOpacity style={styles.optionLeft} activeOpacity={1}
onPress={() => actions.setKeyType('RSA2048')}> onPress={() => actions.setKeyType('RSA2048')}>
@ -186,7 +186,7 @@ export function Dashboard(props) {
<TouchableOpacity style={styles.media} activeOpacity={1} <TouchableOpacity style={styles.media} activeOpacity={1}
onPress={() => actions.setPushSupported(!state.pushSupported)}> onPress={() => actions.setPushSupported(!state.pushSupported)}>
<Text style={styles.modalLabel}>Enable Push Notifications: </Text> <Text style={styles.modalLabel}>{ state.strings.enableNotifications }</Text>
<Switch style={styles.switch} value={state.pushSupported} <Switch style={styles.switch} value={state.pushSupported}
onValueChange={actions.setPushSupported} trackColor={styles.track}/> onValueChange={actions.setPushSupported} trackColor={styles.track}/>
</TouchableOpacity> </TouchableOpacity>
@ -195,19 +195,19 @@ export function Dashboard(props) {
<TouchableOpacity style={styles.media} activeOpacity={1} <TouchableOpacity style={styles.media} activeOpacity={1}
onPress={() => actions.setEnableImage(!state.enableImage)}> onPress={() => actions.setEnableImage(!state.enableImage)}>
<Text style={styles.modalLabel}>Enable Image Queue: </Text> <Text style={styles.modalLabel}>{ state.strings.enableImage }</Text>
<Switch style={styles.switch} value={state.enableImage} <Switch style={styles.switch} value={state.enableImage}
onValueChange={actions.setEnableImage} trackColor={styles.track}/> onValueChange={actions.setEnableImage} trackColor={styles.track}/>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.media} activeOpacity={1} <TouchableOpacity style={styles.media} activeOpacity={1}
onPress={() => actions.setEnableAudio(!state.enableAudio)}> onPress={() => actions.setEnableAudio(!state.enableAudio)}>
<Text style={styles.modalLabel}>Enable Audio Queue: </Text> <Text style={styles.modalLabel}>{ state.strings.enableAudio }</Text>
<Switch style={styles.switch} value={state.enableAudio} <Switch style={styles.switch} value={state.enableAudio}
onValueChange={actions.setEnableAudio} trackColor={styles.track}/> onValueChange={actions.setEnableAudio} trackColor={styles.track}/>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.media} activeOpacity={1} <TouchableOpacity style={styles.media} activeOpacity={1}
onPress={() => actions.setEnableVideo(!state.enableVideo)}> onPress={() => actions.setEnableVideo(!state.enableVideo)}>
<Text style={styles.modalLabel}>Enable Video Queue: </Text> <Text style={styles.modalLabel}>{ state.strings.enableVideo }</Text>
<Switch style={styles.switch} value={state.enableVideo} <Switch style={styles.switch} value={state.enableVideo}
onValueChange={actions.setEnableVideo} trackColor={styles.track}/> onValueChange={actions.setEnableVideo} trackColor={styles.track}/>
</TouchableOpacity> </TouchableOpacity>
@ -215,13 +215,13 @@ export function Dashboard(props) {
<View style={styles.label}></View> <View style={styles.label}></View>
<TouchableOpacity style={styles.ice} activeOpacity={1} <TouchableOpacity style={styles.ice} activeOpacity={1}
onPress={() => actions.setEnableIce(!state.enableIce)}> onPress={() => actions.setEnableIce(!state.enableIce)}>
<Text style={styles.modalLabel}>Enable WebRTC Calls: </Text> <Text style={styles.modalLabel}>{ state.strings.enableCalls }</Text>
<Switch style={styles.switch} value={state.enableIce} <Switch style={styles.switch} value={state.enableIce}
onValueChange={actions.setEnableIce} trackColor={styles.track}/> onValueChange={actions.setEnableIce} trackColor={styles.track}/>
</TouchableOpacity> </TouchableOpacity>
<InputField style={styles.field} <InputField style={styles.field}
label={'Relay URL'} label={state.strings.relayUrl}
value={state.iceUrl} value={state.iceUrl}
autoCapitalize={'none'} autoCapitalize={'none'}
spellCheck={false} spellCheck={false}
@ -230,7 +230,7 @@ export function Dashboard(props) {
/> />
<InputField style={styles.field} <InputField style={styles.field}
label={'Relay Username'} label={state.strings.relayUsername}
value={state.iceUsername} value={state.iceUsername}
autoCapitalize={'none'} autoCapitalize={'none'}
spellCheck={false} spellCheck={false}
@ -239,7 +239,7 @@ export function Dashboard(props) {
/> />
<InputField style={styles.field} <InputField style={styles.field}
label={'Relay Password'} label={state.strings.relayPassword}
value={state.icePassword} value={state.icePassword}
autoCapitalize={'none'} autoCapitalize={'none'}
spellCheck={false} spellCheck={false}
@ -252,10 +252,10 @@ export function Dashboard(props) {
</ScrollView> </ScrollView>
<View style={styles.modalControls}> <View style={styles.modalControls}>
<TouchableOpacity style={styles.cancel} onPress={actions.hideEditConfig}> <TouchableOpacity style={styles.cancel} onPress={actions.hideEditConfig}>
<Text style={styles.cancelText}>Cancel</Text> <Text style={styles.cancelText}>{ state.strings.cancel }</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.save} onPress={saveConfig}> <TouchableOpacity style={styles.save} onPress={saveConfig}>
<Text style={styles.saveText}>Save</Text> <Text style={styles.saveText}>{ state.strings.save }</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
@ -275,10 +275,10 @@ export function Dashboard(props) {
<View style={styles.modalBase}> <View style={styles.modalBase}>
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<View style={styles.modalHeader}> <View style={styles.modalHeader}>
<Text style={styles.modalHeaderText}>Create Account:</Text> <Text style={styles.modalHeaderText}>{ state.strings.createAccount }</Text>
</View> </View>
<View style={styles.accessToken}> <View style={styles.accessToken}>
<Text style={styles.tokenLabel}>Token:</Text> <Text style={styles.tokenLabel}>{ state.strings.token }</Text>
<TouchableOpacity style={styles.copy} onPress={() => Clipboard.setString(state.createToken)}> <TouchableOpacity style={styles.copy} onPress={() => Clipboard.setString(state.createToken)}>
<Text style={styles.token}>{ state.createToken }</Text> <Text style={styles.token}>{ state.createToken }</Text>
<AntIcon style={styles.icon} name={'copy1'} size={20} /> <AntIcon style={styles.icon} name={'copy1'} size={20} />
@ -286,7 +286,7 @@ export function Dashboard(props) {
</View> </View>
<View style={styles.modalControls}> <View style={styles.modalControls}>
<TouchableOpacity style={styles.cancel} onPress={actions.hideAddUser}> <TouchableOpacity style={styles.cancel} onPress={actions.hideAddUser}>
<Text style={styles.cancelText}>Done</Text> <Text style={styles.cancelText}>{ state.strings.close }</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
@ -306,10 +306,10 @@ export function Dashboard(props) {
<View style={styles.modalBase}> <View style={styles.modalBase}>
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<View style={styles.modalHeader}> <View style={styles.modalHeader}>
<Text style={styles.modalHeaderText}>Access Account:</Text> <Text style={styles.modalHeaderText}>{ state.strings.accessAccount }</Text>
</View> </View>
<View style={styles.accessToken}> <View style={styles.accessToken}>
<Text style={styles.tokenLabel}>Token:</Text> <Text style={styles.tokenLabel}>{ state.strings.token }</Text>
<TouchableOpacity style={styles.copy} onPress={() => Clipboard.setString(state.accessToken)}> <TouchableOpacity style={styles.copy} onPress={() => Clipboard.setString(state.accessToken)}>
<Text style={styles.token}>{ state.accessToken }</Text> <Text style={styles.token}>{ state.accessToken }</Text>
<AntIcon style={styles.icon} name={'copy1'} size={20} /> <AntIcon style={styles.icon} name={'copy1'} size={20} />
@ -317,7 +317,7 @@ export function Dashboard(props) {
</View> </View>
<View style={styles.modalControls}> <View style={styles.modalControls}>
<TouchableOpacity style={styles.cancel} onPress={actions.hideAccessUser}> <TouchableOpacity style={styles.cancel} onPress={actions.hideAccessUser}>
<Text style={styles.cancelText}>Done</Text> <Text style={styles.cancelText}>{ state.strings.close }</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>

View File

@ -97,7 +97,7 @@ export const styles = StyleSheet.create({
borderRadius: 4, borderRadius: 4,
padding: 6, padding: 6,
marginRight: 8, marginRight: 8,
width: 72, width: 92,
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
}, },
@ -107,7 +107,7 @@ export const styles = StyleSheet.create({
borderRadius: 4, borderRadius: 4,
padding: 6, padding: 6,
marginRight: 8, marginRight: 8,
width: 72, width: 92,
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
}, },