Skip to content

Commit dd70481

Browse files
committed
i18n, disable headers, #roomname
1 parent 0332150 commit dd70481

28 files changed

+120
-42
lines changed

app/containers/RoomHeader/RoomHeader.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ interface IRoomHeader {
7474
onPress: Function;
7575
testID?: string;
7676
sourceType?: IOmnichannelSource;
77+
disabled?: boolean;
7778
}
7879

7980
const SubTitle = React.memo(({ usersTyping, subtitle, renderFunc, scale }: TRoomHeaderSubTitle) => {
@@ -139,7 +140,8 @@ const Header = React.memo(
139140
teamMain,
140141
testID,
141142
usersTyping = [],
142-
sourceType
143+
sourceType,
144+
disabled
143145
}: IRoomHeader) => {
144146
const { colors } = useTheme();
145147
const portrait = height > width;
@@ -177,8 +179,13 @@ const Header = React.memo(
177179
testID='room-header'
178180
accessibilityLabel={title}
179181
onPress={handleOnPress}
180-
style={styles.container}
181-
disabled={!!tmid}
182+
style={[
183+
styles.container,
184+
{
185+
opacity: disabled ? 0.5 : 1
186+
}
187+
]}
188+
disabled={disabled}
182189
hitSlop={HIT_SLOP}
183190
>
184191
<View style={styles.titleContainer}>

app/containers/RoomHeader/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ interface IRoomHeaderContainerProps {
2020
testID?: string;
2121
sourceType?: IOmnichannelSource;
2222
visitor?: IVisitor;
23+
disabled?: boolean;
2324
}
2425

2526
const RoomHeaderContainer = React.memo(
@@ -36,7 +37,8 @@ const RoomHeaderContainer = React.memo(
3637
tmid,
3738
type,
3839
sourceType,
39-
visitor
40+
visitor,
41+
disabled
4042
}: IRoomHeaderContainerProps) => {
4143
let subtitle: string | undefined;
4244
let statusVisitor: TUserStatus | undefined;
@@ -86,6 +88,7 @@ const RoomHeaderContainer = React.memo(
8688
testID={testID}
8789
onPress={onPress}
8890
sourceType={sourceType}
91+
disabled={disabled}
8992
/>
9093
);
9194
}

app/i18n/locales/ar.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -491,5 +491,7 @@
491491
"you": "أنت",
492492
"you_were_mentioned": "تمت الإشارة إليك",
493493
"missing_room_e2ee_description": "يجب تحديث مفاتيح التشفير للغرفة، ويجب أن يكون عضو آخر في الغرفة متصلاً بالإنترنت حتى يحدث ذلك.",
494-
"missing_room_e2ee_title": "تحقق مرة أخرى بعد بضع لحظات"
494+
"missing_room_e2ee_title": "تحقق مرة أخرى بعد بضع لحظات",
495+
"encrypted_room_description": "أدخل كلمة المرور الخاصة بالتشفير من طرف إلى طرف للوصول.",
496+
"encrypted_room_title": "{{room_name}} مشفر"
495497
}

app/i18n/locales/bn-IN.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -757,5 +757,7 @@
757757
"you": "তুমি",
758758
"you_were_mentioned": "আপনি উল্লেখ করা হয়েছিলেন",
759759
"missing_room_e2ee_description": "ঘরের জন্য এনক্রিপশন কীগুলি আপডেট করা প্রয়োজন, এর জন্য আরেকজন ঘরের সদস্যকে অনলাইনে থাকতে হবে।",
760-
"missing_room_e2ee_title": "কয়েক মুহূর্তের মধ্যে পরীক্ষা করুন"
760+
"missing_room_e2ee_title": "কয়েক মুহূর্তের মধ্যে পরীক্ষা করুন",
761+
"encrypted_room_description": "অ্যাক্সেস করতে আপনার এন্ড-টু-এন্ড এনক্রিপশন পাসওয়ার্ড লিখুন।",
762+
"encrypted_room_title": "{{room_name}} এনক্রিপ্ট করা হয়েছে"
761763
}

app/i18n/locales/de.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -747,5 +747,7 @@
747747
"you": "Sie",
748748
"you_were_mentioned": "Sie wurden erwähnt",
749749
"missing_room_e2ee_description": "Die Verschlüsselungsschlüssel für den Raum müssen aktualisiert werden, ein anderer Raummitglied muss online sein, damit dies geschehen kann.",
750-
"missing_room_e2ee_title": "Überprüfen Sie in ein paar Momenten zurück"
750+
"missing_room_e2ee_title": "Überprüfen Sie in ein paar Momenten zurück",
751+
"encrypted_room_description": "Geben Sie Ihr Passwort für die Ende-zu-Ende-Verschlüsselung ein, um Zugang zu erhalten.",
752+
"encrypted_room_title": "{{room_name}} ist verschlüsselt"
751753
}

app/i18n/locales/en.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@
773773
"e2ee_disabled": "End-to-end encryption is disabled",
774774
"e2ee_enabled": "End-to-end encryption is enabled",
775775
"encrypted_room_description": "Enter your end-to-end encryption password to access.",
776-
"encrypted_room_title": "This room is encrypted",
776+
"encrypted_room_title": "{{room_name}} is encrypted",
777777
"error-action-not-allowed": "{{action}} is not allowed",
778778
"error-avatar-invalid-url": "Invalid avatar URL: {{url}}",
779779
"error-duplicate-channel-name": "A channel with name {{room_name}} exists",

app/i18n/locales/fi.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -719,5 +719,7 @@
719719
"you": "sinä",
720720
"you_were_mentioned": "sinut mainittiin",
721721
"missing_room_e2ee_description": "Huoneen salausavaimet on päivitettävä, toisen huoneen jäsenen on oltava verkossa, jotta tämä voi tapahtua.",
722-
"missing_room_e2ee_title": "Tarkista uudelleen muutaman hetken kuluttua"
722+
"missing_room_e2ee_title": "Tarkista uudelleen muutaman hetken kuluttua",
723+
"encrypted_room_description": "Syötä päästä päähän -salauksen salasanasi päästäksesi käsiksi.",
724+
"encrypted_room_title": "{{room_name}} on salattu"
723725
}

app/i18n/locales/fr.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -638,5 +638,7 @@
638638
"you": "vous",
639639
"you_were_mentioned": "vous avez été mentionné",
640640
"missing_room_e2ee_description": "Les clés de chiffrement de la pièce doivent être mises à jour, un autre membre de la pièce doit être en ligne pour que cela se produise.",
641-
"missing_room_e2ee_title": "Revenez dans quelques instants"
641+
"missing_room_e2ee_title": "Revenez dans quelques instants",
642+
"encrypted_room_description": "Entrez votre mot de passe de cryptage de bout en bout pour accéder.",
643+
"encrypted_room_title": "{{room_name}} est crypté"
642644
}

app/i18n/locales/hi-IN.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -757,5 +757,7 @@
757757
"you": "आप",
758758
"you_were_mentioned": "आपका उल्लेख किया गया था",
759759
"missing_room_e2ee_description": "कमरे के लिए एन्क्रिप्शन कुंजियों को अपडेट किया जाना चाहिए, इसके लिए एक और कमरे के सदस्य को ऑनलाइन होना चाहिए।",
760-
"missing_room_e2ee_title": "कुछ क्षणों में वापस जाँच करें"
760+
"missing_room_e2ee_title": "कुछ क्षणों में वापस जाँच करें",
761+
"encrypted_room_description": "पहुँचने के लिए अपना एंड-टू-एंड एन्क्रिप्शन पासवर्ड दर्ज करें।",
762+
"encrypted_room_title": "{{room_name}} एन्क्रिप्टेड है"
761763
}

app/i18n/locales/hu.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -760,5 +760,7 @@
760760
"you": "ön",
761761
"you_were_mentioned": "önt megemlítették",
762762
"missing_room_e2ee_description": "A szoba titkosítási kulcsait frissíteni kell, ehhez egy másik szobatagnak online kell lennie.",
763-
"missing_room_e2ee_title": "Nézzen vissza néhány perc múlva"
763+
"missing_room_e2ee_title": "Nézzen vissza néhány perc múlva",
764+
"encrypted_room_description": "Adja meg a végponttól végpontig terjedő titkosítási jelszavát a hozzáféréshez.",
765+
"encrypted_room_title": "{{room_name}} titkosítva van"
764766
}

app/i18n/locales/it.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -541,5 +541,7 @@
541541
"you": "tu",
542542
"you_were_mentioned": "sei stato menzionato",
543543
"missing_room_e2ee_description": "Le chiavi di crittografia per la stanza devono essere aggiornate, un altro membro della stanza deve essere online affinché ciò avvenga.",
544-
"missing_room_e2ee_title": "Ricontrolla tra qualche istante"
544+
"missing_room_e2ee_title": "Ricontrolla tra qualche istante",
545+
"encrypted_room_description": "Inserisci la tua password di crittografia end-to-end per accedere.",
546+
"encrypted_room_title": "{{room_name}} è criptato"
545547
}

app/i18n/locales/ja.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -407,5 +407,7 @@
407407
"you": "あなた",
408408
"you_were_mentioned": "あなたがメンションしました",
409409
"missing_room_e2ee_description": "部屋の暗号化キーを更新する必要があります。これが行われるためには、別の部屋のメンバーがオンラインである必要があります。",
410-
"missing_room_e2ee_title": "数分後にもう一度確認してください"
410+
"missing_room_e2ee_title": "数分後にもう一度確認してください",
411+
"encrypted_room_description": "エンドツーエンドの暗号化パスワードを入力してアクセスしてください。",
412+
"encrypted_room_title": "{{room_name}}は暗号化されています"
411413
}

app/i18n/locales/nl.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -638,5 +638,7 @@
638638
"you": "jij",
639639
"you_were_mentioned": "je bent vermeld",
640640
"missing_room_e2ee_description": "De versleutelingssleutels voor de kamer moeten worden bijgewerkt, een ander kamerlid moet online zijn om dit te laten gebeuren.",
641-
"missing_room_e2ee_title": "Kom over een paar momenten terug"
641+
"missing_room_e2ee_title": "Kom over een paar momenten terug",
642+
"encrypted_room_description": "Voer uw end-to-end encryptiewachtwoord in om toegang te krijgen.",
643+
"encrypted_room_title": "{{room_name}} is versleuteld"
642644
}

app/i18n/locales/pt-BR.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -824,5 +824,7 @@
824824
"you": "você",
825825
"you_were_mentioned": "você foi mencionado",
826826
"missing_room_e2ee_description": "As chaves de criptografia da sala precisam ser atualizadas, outro membro da sala precisa estar online para que isso aconteça.",
827-
"missing_room_e2ee_title": "Verifique novamente em alguns momentos"
827+
"missing_room_e2ee_title": "Verifique novamente em alguns momentos",
828+
"encrypted_room_description": "Insira sua senha de criptografia de ponta a ponta para acessar.",
829+
"encrypted_room_title": "{{room_name}} está criptografado"
828830
}

app/i18n/locales/pt-PT.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -369,5 +369,7 @@
369369
"you": "você",
370370
"you_were_mentioned": "você foi mencionado",
371371
"missing_room_e2ee_description": "As chaves de criptografia da sala precisam ser atualizadas, outro membro da sala precisa estar online para que isso aconteça.",
372-
"missing_room_e2ee_title": "Volte a verificar daqui a alguns momentos"
372+
"missing_room_e2ee_title": "Volte a verificar daqui a alguns momentos",
373+
"encrypted_room_description": "Insira a sua palavra-passe de encriptação de ponta a ponta para aceder.",
374+
"encrypted_room_title": "{{room_name}} está encriptado"
373375
}

app/i18n/locales/ru.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -687,5 +687,7 @@
687687
"you": "вы",
688688
"you_were_mentioned": "вы были упомянуты",
689689
"missing_room_e2ee_description": "Ключи шифрования для комнаты должны быть обновлены, другой участник комнаты должен быть в сети, чтобы это произошло.",
690-
"missing_room_e2ee_title": "Проверьте еще раз через несколько моментов"
690+
"missing_room_e2ee_title": "Проверьте еще раз через несколько моментов",
691+
"encrypted_room_description": "Введите свой пароль для шифрования от конца к концу для доступа.",
692+
"encrypted_room_title": "{{room_name}} зашифрован"
691693
}

app/i18n/locales/sl-SI.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -653,5 +653,7 @@
653653
"you": "ti",
654654
"you_were_mentioned": "Bili ste omenjeni",
655655
"missing_room_e2ee_description": "Ključi za šifriranje sobe morajo biti posodobljeni, drugi član sobe mora biti na spletu, da se to zgodi.",
656-
"missing_room_e2ee_title": "Ponovno preverite čez nekaj trenutkov"
656+
"missing_room_e2ee_title": "Ponovno preverite čez nekaj trenutkov",
657+
"encrypted_room_description": "Vnesite geslo za šifriranje od konca do konca za dostop.",
658+
"encrypted_room_title": "{{room_name}} je šifriran"
657659
}

app/i18n/locales/sv.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -717,5 +717,7 @@
717717
"you": "du",
718718
"you_were_mentioned": "du nämndes",
719719
"missing_room_e2ee_description": "Krypteringsnycklarna för rummet behöver uppdateras, en annan rummedlem måste vara online för att detta ska hända.",
720-
"missing_room_e2ee_title": "Kontrollera igen om några ögonblick"
720+
"missing_room_e2ee_title": "Kontrollera igen om några ögonblick",
721+
"encrypted_room_description": "Ange ditt lösenord för end-to-end-kryptering för att få tillgång.",
722+
"encrypted_room_title": "{{room_name}} är krypterat"
721723
}

app/i18n/locales/ta-IN.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -757,5 +757,7 @@
757757
"you": "நீங்கள்",
758758
"you_were_mentioned": "உங்களுக்கு குறிக்கப்பட்டார்",
759759
"missing_room_e2ee_description": "அறைக்கான குறியாக்க விசைகள் புதுப்பிக்கப்பட வேண்டும், இது நடக்க மற்றொரு அறை உறுப்பினர் ஆன்லைனில் இருக்க வேண்டும்.",
760-
"missing_room_e2ee_title": "சில நிமிடங்களில் மீண்டும் சரிபார்க்கவும்"
760+
"missing_room_e2ee_title": "சில நிமிடங்களில் மீண்டும் சரிபார்க்கவும்",
761+
"encrypted_room_description": "அணுகலுக்கு உங்கள் முடிவுக்கு முடிவு குறியாக்க கடவுச்சொல்லை உள்ளிடவும்.",
762+
"encrypted_room_title": "{{room_name}} குறியாக்கப்பட்டுள்ளது"
761763
}

app/i18n/locales/te-IN.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -757,5 +757,7 @@
757757
"you": "మీరు",
758758
"you_were_mentioned": "మీరు పేర్కొనబడింది",
759759
"missing_room_e2ee_description": "గది కోసం ఎన్క్రిప్షన్ కీలు నవీకరించబడాలి, దీని జరగాలంటే మరొక గది సభ్యుడు ఆన్లైన్‌లో ఉండాలి.",
760-
"missing_room_e2ee_title": "కొన్ని క్షణాల్లో తిరిగి తనిఖీ చేయండి"
760+
"missing_room_e2ee_title": "కొన్ని క్షణాల్లో తిరిగి తనిఖీ చేయండి",
761+
"encrypted_room_description": "ప్రాప్యతకు మీ అంతిమ నుండి అంతిమ ఎన్క్రిప్షన్ పాస్‌వర్డ్‌ను నమోదు చేయండి.",
762+
"encrypted_room_title": "{{room_name}} ఎన్క్రిప్ట్ చేయబడింది"
761763
}

app/i18n/locales/tr.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -524,5 +524,7 @@
524524
"you": "siz",
525525
"you_were_mentioned": "senden bahsedildi",
526526
"missing_room_e2ee_description": "Odanın şifreleme anahtarları güncellenmelidir, bunun gerçekleşmesi için başka bir oda üyesinin çevrimiçi olması gerekmektedir.",
527-
"missing_room_e2ee_title": "Birkaç an içinde tekrar kontrol edin"
527+
"missing_room_e2ee_title": "Birkaç an içinde tekrar kontrol edin",
528+
"encrypted_room_description": "Erişmek için uçtan uca şifreleme şifrenizi girin.",
529+
"encrypted_room_title": "{{room_name}} şifrelenmiştir"
528530
}

app/i18n/locales/zh-CN.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -482,5 +482,7 @@
482482
"you": "",
483483
"you_were_mentioned": "你被提到了",
484484
"missing_room_e2ee_description": "房间的加密密钥需要更新,另一位房间成员需要在线才能进行此操作。",
485-
"missing_room_e2ee_title": "过几分钟再回来检查"
485+
"missing_room_e2ee_title": "过几分钟再回来检查",
486+
"encrypted_room_description": "输入您的端到端加密密码以访问。",
487+
"encrypted_room_title": "{{room_name}} 已加密"
486488
}

app/i18n/locales/zh-TW.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -511,5 +511,7 @@
511511
"you": "",
512512
"you_were_mentioned": "你被提到了",
513513
"missing_room_e2ee_description": "房間的加密密鑰需要更新,另一位房間成員需要在線才能進行此操作。",
514-
"missing_room_e2ee_title": "過幾分鐘再回來檢查"
514+
"missing_room_e2ee_title": "過幾分鐘再回來檢查",
515+
"encrypted_room_description": "輸入您的端對端加密密碼以存取。",
516+
"encrypted_room_title": "{{room_name}} 已加密"
515517
}

app/views/RoomView/RightButtons.tsx

+13-4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ interface IRightButtonsProps extends Pick<ISubscription, 't'> {
4848
colors?: TColors;
4949
issuesWithNotifications: boolean;
5050
notificationsDisabled?: boolean;
51+
disabled: boolean;
5152
}
5253

5354
interface IRigthButtonsState {
@@ -361,13 +362,18 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
361362

362363
render() {
363364
const { isFollowingThread, tunread, tunreadUser, tunreadGroup } = this.state;
364-
const { t, tmid, threadsEnabled, rid, colors, issuesWithNotifications, notificationsDisabled } = this.props;
365+
const { t, tmid, threadsEnabled, rid, colors, issuesWithNotifications, notificationsDisabled, disabled } = this.props;
365366

366367
if (t === 'l') {
367368
if (!this.isOmnichannelPreview()) {
368369
return (
369370
<HeaderButton.Container>
370-
<HeaderButton.Item iconName='kebab' onPress={this.showMoreActions} testID='room-view-header-omnichannel-kebab' />
371+
<HeaderButton.Item
372+
iconName='kebab'
373+
onPress={this.showMoreActions}
374+
testID='room-view-header-omnichannel-kebab'
375+
disabled={disabled}
376+
/>
371377
</HeaderButton.Container>
372378
);
373379
}
@@ -380,6 +386,7 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
380386
iconName={isFollowingThread ? 'notification' : 'notification-disabled'}
381387
onPress={this.toggleFollowThread}
382388
testID={isFollowingThread ? 'room-view-header-unfollow' : 'room-view-header-follow'}
389+
disabled={disabled}
383390
/>
384391
</HeaderButton.Container>
385392
);
@@ -392,18 +399,20 @@ class RightButtonsContainer extends Component<IRightButtonsProps, IRigthButtonsS
392399
iconName='notification-disabled'
393400
onPress={this.navigateToNotificationOrPushTroubleshoot}
394401
testID='room-view-push-troubleshoot'
402+
disabled={disabled}
395403
/>
396404
) : null}
397-
{rid ? <HeaderCallButton rid={rid} /> : null}
405+
{rid ? <HeaderCallButton rid={rid} disabled={disabled} /> : null}
398406
{threadsEnabled ? (
399407
<HeaderButton.Item
400408
iconName='threads'
401409
onPress={this.goThreadsView}
402410
testID='room-view-header-threads'
403411
badge={() => <HeaderButton.BadgeUnread tunread={tunread} tunreadUser={tunreadUser} tunreadGroup={tunreadGroup} />}
412+
disabled={disabled}
404413
/>
405414
) : null}
406-
<HeaderButton.Item iconName='search' onPress={this.goSearchView} testID='room-view-search' />
415+
<HeaderButton.Item iconName='search' onPress={this.goSearchView} testID='room-view-search' disabled={disabled} />
407416
</HeaderButton.Container>
408417
);
409418
}

app/views/RoomView/components/EncryptedRoom.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ import Button from '../../../containers/Button';
99
import sharedStyles from '../../Styles';
1010
import { useAppSelector } from '../../../lib/hooks';
1111
import I18n from '../../../i18n';
12+
import { TNavigation } from '../../../stacks/stackType';
1213

1314
const GAP = 32;
1415

1516
export const EncryptedRoom = ({
17+
roomName,
1618
navigation
1719
}: {
18-
navigation: StackNavigationProp<ChatsStackParamList, 'RoomView'>;
20+
roomName: string;
21+
navigation: StackNavigationProp<ChatsStackParamList & TNavigation, 'RoomView'>;
1922
}): ReactElement => {
2023
const { colors } = useTheme();
2124
const styles = useStyle();
@@ -36,7 +39,7 @@ export const EncryptedRoom = ({
3639
<View style={styles.icon}>
3740
<CustomIcon name='encrypted' size={42} color={colors.fontSecondaryInfo} />
3841
</View>
39-
<Text style={styles.title}>{I18n.t('encrypted_room_title')}</Text>
42+
<Text style={styles.title}>{I18n.t('encrypted_room_title', { room_name: `#${roomName}` })}</Text>
4043
<Text style={styles.description}>{I18n.t('encrypted_room_description')}</Text>
4144
</View>
4245
<Button title={I18n.t('Enter_E2EE_Password')} onPress={navigate} />

app/views/RoomView/components/HeaderCallButton.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import React from 'react';
33
import * as HeaderButton from '../../../containers/HeaderButton';
44
import { useVideoConf } from '../../../lib/hooks/useVideoConf';
55

6-
export const HeaderCallButton = ({ rid }: { rid: string }): React.ReactElement | null => {
6+
export const HeaderCallButton = ({ rid, disabled }: { rid: string; disabled: boolean }): React.ReactElement | null => {
77
const { showInitCallActionSheet, callEnabled, disabledTooltip } = useVideoConf(rid);
88

99
if (callEnabled)
1010
return (
1111
<HeaderButton.Item
12-
disabled={disabledTooltip}
12+
disabled={disabledTooltip || disabled}
1313
iconName='phone'
1414
onPress={showInitCallActionSheet}
1515
testID='room-view-header-call'

0 commit comments

Comments
 (0)