Added "Organisms." prefix to translations for organims

This commit is contained in:
Dylan Van Nielen 2022-07-14 11:45:50 +09:30
parent 7bb187bce1
commit 09c7aa9589
30 changed files with 646 additions and 645 deletions

View file

@ -41,6 +41,7 @@
"browser_not_supported": "Not supported in this browser",
"generic": "Something went wrong!"
},
"Organisms": {
"Welcome": {
"heading": "Welcome to Cinny!",
"subheading": "Yet another Matrix client"
@ -233,7 +234,6 @@
"setup_message": "Setup to verify and keep track of all your sessions. Also required to backup encrypted message.",
"reset_keys_subtitle": "Resetting cross-signing keys is permanent.",
"reset_keys_message": "Anyone you have verified with will see security alerts and your message backup will lost. You almost certainly do not want to do this, unless you have lost Security Key or Phrase and every session you can cross-sign from."
},
"AuthRequest": {
"wrong_password": "Wrong password. Please enter the correct password",
@ -440,3 +440,4 @@
"home": "Home"
}
}
}

View file

@ -137,8 +137,8 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) {
};
const joinRules = ['invite', 'restricted', 'public'];
const joinRuleShortText = [ t("CreateRoom.private_room_short"), t("CreateRoom.restricted_room_short"), t("CreateRoom.public_room_short")];
const joinRuleText = [ t("CreateRoom.private_room_long"), t("CreateRoom.restricted_room_long"), t("CreateRoom.public_room_long")];
const joinRuleShortText = [ t("Organisms.CreateRoom.private_room_short"), t("Organisms.CreateRoom.restricted_room_short"), t("Organisms.CreateRoom.public_room_short")];
const joinRuleText = [ t("Organisms.CreateRoom.private_room_long"), t("Organisms.CreateRoom.restricted_room_long"), t("Organisms.CreateRoom.public_room_long")];
const jrRoomIC = [HashLockIC, HashIC, HashGlobeIC];
const jrSpaceIC = [SpaceLockIC, SpaceIC, SpaceGlobeIC];
const handleJoinRule = (evt) => {
@ -147,7 +147,7 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) {
getEventCords(evt, '.btn-surface'),
(closeMenu) => (
<>
<MenuHeader>{t("CreateRoom.visibility_message")}</MenuHeader>
<MenuHeader>{t("Organisms.CreateRoom.visibility_message")}</MenuHeader>
{
joinRules.map((rule) => (
<MenuItem
@ -174,17 +174,17 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) {
<div className="create-room">
<form className="create-room__form" onSubmit={handleSubmit}>
<SettingTile
title={t("CreateRoom.visibility_title")}
title={t("Organisms.CreateRoom.visibility_title")}
options={(
<Button onClick={handleJoinRule} iconSrc={ChevronBottomIC}>
{joinRuleShortText[joinRules.indexOf(joinRule)]}
</Button>
)}
content={<Text variant="b3">{isSpace ? t("CreateRoom.select_who_can_join_space") : t("CreateRoom.select_who_can_join_room")}</Text>}
content={<Text variant="b3">{isSpace ? t("Organisms.CreateRoom.select_who_can_join_space") : t("Organisms.CreateRoom.select_who_can_join_room")}</Text>}
/>
{joinRule === 'public' && (
<div>
<Text className="create-room__address__label" variant="b2">{isSpace ? t("CreateRoom.space_address") : t("CreateRoom.room_address")}</Text>
<Text className="create-room__address__label" variant="b2">{isSpace ? t("Organisms.CreateRoom.space_address") : t("Organisms.CreateRoom.room_address")}</Text>
<div className="create-room__address">
<Text variant="b1">#</Text>
<Input
@ -197,32 +197,32 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) {
/>
<Text variant="b1">{`:${userHs}`}</Text>
</div>
{isValidAddress === false && <Text className="create-room__address__tip" variant="b3"><span style={{ color: 'var(--bg-danger)' }}>{ t("CreateRoom.room_address_already_in_use", {room_address: `#${addressValue}:${userHs}`})}</span></Text>}
{isValidAddress === false && <Text className="create-room__address__tip" variant="b3"><span style={{ color: 'var(--bg-danger)' }}>{ t("Organisms.CreateRoom.room_address_already_in_use", {room_address: `#${addressValue}:${userHs}`})}</span></Text>}
</div>
)}
{!isSpace && joinRule !== 'public' && (
<SettingTile
title={t("CreateRoom.e2e_title")}
title={t("Organisms.CreateRoom.e2e_title")}
options={<Toggle isActive={isEncrypted} onToggle={setIsEncrypted} />}
content={<Text variant="b3"> {t("CreateRoom.e2e_message")}</Text>}
content={<Text variant="b3"> {t("Organisms.CreateRoom.e2e_message")}</Text>}
/>
)}
<SettingTile
title={t("CreateRoom.role_title")}
title={t("Organisms.CreateRoom.role_title")}
options={(
<SegmentControl
selected={roleIndex}
segments={[{ text: t("CreateRoom.role_admin")}, { text: t("CreateRoom.role_founder")}]}
segments={[{ text: t("Organisms.CreateRoom.role_admin")}, { text: t("Organisms.CreateRoom.role_founder")}]}
onSelect={setRoleIndex}
/>
)}
content={(
<Text variant="b3"> {t("CreateRoom.role_message")}</Text>
<Text variant="b3"> {t("Organisms.CreateRoom.role_message")}</Text>
)}
/>
<Input name="topic" minHeight={174} resizable label= {t("CreateRoom.topic_label")}/>
<Input name="topic" minHeight={174} resizable label= {t("Organisms.CreateRoom.topic_label")}/>
<div className="create-room__name-wrapper">
<Input name="name" label={isSpace ? t("CreateRoom.space_name"): t("CreateRoom.room_name")} required />
<Input name="name" label={isSpace ? t("Organisms.CreateRoom.space_name"): t("Organisms.CreateRoom.room_name")} required />
<Button
disabled={isValidAddress === false || isCreatingRoom}
iconSrc={isSpace ? SpacePlusIC : HashPlusIC}
@ -235,7 +235,7 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) {
{isCreatingRoom && (
<div className="create-room__loading">
<Spinner size="small" />
<Text>{ isSpace ? t("CreateRoom.creating_space") : t("CreateRoom.creating_room")}</Text>
<Text>{ isSpace ? t("Organisms.CreateRoom.creating_space") : t("Organisms.CreateRoom.creating_room")}</Text>
</div>
)}
{typeof creatingError === 'string' && <Text className="create-room__error" variant="b3">{creatingError}</Text>}
@ -284,9 +284,9 @@ function CreateRoom() {
isOpen={create !== null}
title={(
<Text variant="s1" weight="medium" primary>
{parentId ? twemojify(room.name) : t("CreateRoom.home")}
{parentId ? twemojify(room.name) : t("Organisms.CreateRoom.home")}
<span style={{ color: 'var(--tc-surface-low)' }}>
{`${isSpace ? t("CreateRoom.create_space") : t("CreateRoom.create_room")}`}
{`${isSpace ? t("Organisms.CreateRoom.create_space") : t("Organisms.CreateRoom.create_room")}`}
</span>
</Text>
)}

View file

@ -18,7 +18,7 @@ function DragDrop({ isOpen }) {
overlayClassName="drag-drop__overlay"
isOpen={isOpen}
>
<Text variant="h2" weight="medium">{t("DragDrop.drop_file_to_upload_prompt")}</Text>
<Text variant="h2" weight="medium">{t("Organisms.DragDrop.drop_file_to_upload_prompt")}</Text>
</RawModal>
);
}

View file

@ -100,14 +100,14 @@ function EmojiVerificationContent({ data, requestClose }) {
const renderWait = () => (
<>
<Spinner size="small" />
<Text>{t("EmojiVerification.waiting_for_response")}</Text>
<Text>{t("Organisms.EmojiVerification.waiting_for_response")}</Text>
</>
);
if (sas !== null) {
return (
<div className="emoji-verification__content">
<Text>{t("EmojiVerification.confirmation_prompt")}</Text>
<Text>{t("Organisms.EmojiVerification.confirmation_prompt")}</Text>
<div className="emoji-verification__emojis">
{sas.sas.emoji.map((emoji, i) => (
// eslint-disable-next-line react/no-array-index-key
@ -120,8 +120,8 @@ function EmojiVerificationContent({ data, requestClose }) {
<div className="emoji-verification__buttons">
{process ? renderWait() : (
<>
<Button variant="primary" onClick={sasConfirm}>{t("EmojiVerification.emojis_match_button")}</Button>
<Button onClick={sasMismatch}>{t("EmojiVerification.emojis_dont_match_button")}</Button>
<Button variant="primary" onClick={sasConfirm}>{t("Organisms.EmojiVerification.emojis_match_button")}</Button>
<Button onClick={sasMismatch}>{t("Organisms.EmojiVerification.emojis_dont_match_button")}</Button>
</>
)}
</div>
@ -132,7 +132,7 @@ function EmojiVerificationContent({ data, requestClose }) {
if (targetDevice) {
return (
<div className="emoji-verification__content">
<Text>{t("EmojiVerification.accept_request_from_other_device_message")}</Text>
<Text>{t("Organisms.EmojiVerification.accept_request_from_other_device_message")}</Text>
<div className="emoji-verification__buttons">
{renderWait()}
</div>
@ -142,12 +142,12 @@ function EmojiVerificationContent({ data, requestClose }) {
return (
<div className="emoji-verification__content">
<Text>{t("EmojiVerification.begin_verification_process_message")}</Text>
<Text>{t("Organisms.EmojiVerification.begin_verification_process_message")}</Text>
<div className="emoji-verification__buttons">
{
process
? renderWait()
: <Button variant="primary" onClick={beginVerification}>{t("EmojiVerification.begin_verification_button_text")}</Button>
: <Button variant="primary" onClick={beginVerification}>{t("Organisms.EmojiVerification.begin_verification_button_text")}</Button>
}
</div>
</div>
@ -188,7 +188,7 @@ function EmojiVerification() {
className="emoji-verification"
title={(
<Text variant="s1" weight="medium" primary>
{t("EmojiVerification.title")}
{t("Organisms.EmojiVerification.title")}
</Text>
)}
contentOptions={<IconButton src={CrossIC} onClick={requestClose} tooltip={t("common.close")} />}

View file

@ -81,8 +81,8 @@ function InviteList({ isOpen, onRequestClose }) {
? (<Spinner size="small" />)
: (
<div className="invite-btn__container">
<Button onClick={() => rejectInvite(myRoom.roomId)}>{t("InviteList.reject_invite")}</Button>
<Button onClick={() => acceptInvite(myRoom.roomId)} variant="primary">{t("InviteList.accept_invite")}</Button>
<Button onClick={() => rejectInvite(myRoom.roomId)}>{t("Organisms.InviteList.reject_invite")}</Button>
<Button onClick={() => acceptInvite(myRoom.roomId)} variant="primary">{t("Organisms.InviteList.accept_invite")}</Button>
</div>
)
}
@ -93,14 +93,14 @@ function InviteList({ isOpen, onRequestClose }) {
return (
<PopupWindow
isOpen={isOpen}
title={t("InviteList.title")}
title={t("Organisms.InviteList.title")}
contentOptions={<IconButton src={CrossIC} onClick={onRequestClose} tooltip={t("common.close")} />}
onRequestClose={onRequestClose}
>
<div className="invites-content">
{ initMatrix.roomList.inviteDirects.size !== 0 && (
<div className="invites-content__subheading">
<Text variant="b3" weight="bold">{t("InviteList.direct_messages_title")}</Text>
<Text variant="b3" weight="bold">{t("Organisms.InviteList.direct_messages_title")}</Text>
</div>
)}
{
@ -118,8 +118,8 @@ function InviteList({ isOpen, onRequestClose }) {
? (<Spinner size="small" />)
: (
<div className="invite-btn__container">
<Button onClick={() => rejectInvite(myRoom.roomId, true)}>{t("InviteList.reject_invite")}</Button>
<Button onClick={() => acceptInvite(myRoom.roomId, true)} variant="primary">{t("InviteList.accept_invite")}</Button>
<Button onClick={() => rejectInvite(myRoom.roomId, true)}>{t("Organisms.InviteList.reject_invite")}</Button>
<Button onClick={() => acceptInvite(myRoom.roomId, true)} variant="primary">{t("Organisms.InviteList.accept_invite")}</Button>
</div>
)
}
@ -129,14 +129,14 @@ function InviteList({ isOpen, onRequestClose }) {
}
{ initMatrix.roomList.inviteSpaces.size !== 0 && (
<div className="invites-content__subheading">
<Text variant="b3" weight="bold">{t("InviteList.spaces_title")}</Text>
<Text variant="b3" weight="bold">{t("Organisms.InviteList.spaces_title")}</Text>
</div>
)}
{ Array.from(initMatrix.roomList.inviteSpaces).map(renderRoomTile) }
{ initMatrix.roomList.inviteRooms.size !== 0 && (
<div className="invites-content__subheading">
<Text variant="b3" weight="bold">{t("InviteList.rooms_title")}</Text>
<Text variant="b3" weight="bold">{t("Organisms.InviteList.rooms_title")}</Text>
</div>
)}
{ Array.from(initMatrix.roomList.inviteRooms).map(renderRoomTile) }

View file

@ -88,7 +88,7 @@ function InviteUser({
avatar_url: result.avatar_url,
}]);
} catch (e) {
updateSearchQuery({error: t("InviteUser.user_not_found", {user_name: inputUsername})});
updateSearchQuery({error: t("Organisms.InviteUser.user_not_found", {user_name: inputUsername})});
}
} else {
try {
@ -97,7 +97,7 @@ function InviteUser({
limit: 20,
});
if (result.results.length === 0) {
updateSearchQuery({ error: t("InviteUser.no_matches_found", {user_name: inputUsername})});
updateSearchQuery({ error: t("Organisms.InviteUser.no_matches_found", {user_name: inputUsername})});
updateIsSearching(false);
return;
}
@ -179,7 +179,7 @@ function InviteUser({
return <Button onClick={() => { selectRoom(createdDM.get(userId)); onRequestClose(); }}>Open</Button>;
}
if (invitedUserIds.has(userId)) {
return messageJSX(t("InviteUser.invite_result.invited"), true);
return messageJSX(t("Organisms.InviteUser.invite_result.invited"), true);
}
if (typeof roomId === 'string') {
const member = mx.getRoom(roomId).getMember(userId);
@ -187,11 +187,11 @@ function InviteUser({
const userMembership = member.membership;
switch (userMembership) {
case 'join':
return messageJSX(t("InviteUser.invite_result.already_joined"), true);
return messageJSX(t("Organisms.InviteUser.invite_result.already_joined"), true);
case 'invite':
return messageJSX(t("InviteUser.invite_result.already_invited"), true);
return messageJSX(t("Organisms.InviteUser.invite_result.already_invited"), true);
case 'ban':
return messageJSX(t("InviteUser.invite_result.banned"), false);
return messageJSX(t("Organisms.InviteUser.invite_result.banned"), false);
default:
}
}
@ -245,13 +245,13 @@ function InviteUser({
return (
<PopupWindow
isOpen={isOpen}
title={(typeof roomId === 'string' ? t("InviteUser.invite_to_room", {room: mx.getRoom(roomId).name}) : t("InviteUser.invite_to_dm"))}
title={(typeof roomId === 'string' ? t("Organisms.InviteUser.invite_to_room", {room: mx.getRoom(roomId).name}) : t("Organisms.InviteUser.invite_to_dm"))}
contentOptions={<IconButton src={CrossIC} onClick={onRequestClose} tooltip={t("common.close")} />}
onRequestClose={onRequestClose}
>
<div className="invite-user">
<form className="invite-user__form" onSubmit={(e) => { e.preventDefault(); searchUser(usernameRef.current.value); }}>
<Input value={searchTerm} forwardRef={usernameRef} label={t("InviteUser.search_label")} />
<Input value={searchTerm} forwardRef={usernameRef} label={t("Organisms.InviteUser.search_label")} />
<Button disabled={isSearching} iconSrc={UserIC} variant="primary" type="submit">{t("common.search")}</Button>
</form>
<div className="invite-user__search-status">
@ -259,13 +259,13 @@ function InviteUser({
typeof searchQuery.username !== 'undefined' && isSearching && (
<div className="flex--center">
<Spinner size="small" />
<Text variant="b2">{t("InviteUser.searching_for_user", {user_name: searchQuery.username})}</Text>
<Text variant="b2">{t("Organisms.InviteUser.searching_for_user", {user_name: searchQuery.username})}</Text>
</div>
)
}
{
typeof searchQuery.username !== 'undefined' && !isSearching && (
<Text variant="b2">{t("InviteUser.search_result_title", {user_name: searchQuery.username})}</Text>
<Text variant="b2">{t("Organisms.InviteUser.search_result_title", {user_name: searchQuery.username})}</Text>
)
}
{

View file

@ -61,10 +61,10 @@ function JoinAliasContent({ term, requestClose }) {
const alias = e.target.alias.value;
if (alias?.trim() === '') return;
if (alias.match(ALIAS_OR_ID_REG) === null) {
setError(t("JoinAlias.invalid_address"));
setError(t("Organisms.JoinAlias.invalid_address"));
return;
}
setProcess(t("JoinAlias.looking_for_address"));
setProcess(t("Organisms.JoinAlias.looking_for_address"));
setError(undefined);
let via;
if (alias.startsWith('#')) {
@ -72,12 +72,12 @@ function JoinAliasContent({ term, requestClose }) {
const aliasData = await mx.resolveRoomAlias(alias);
via = aliasData?.servers.slice(0, 3) || [];
if (mountStore.getItem()) {
setProcess(t("JoinAlias.joining_alias", {alias_name: alias}));
setProcess(t("Organisms.JoinAlias.joining_alias", {alias_name: alias}));
}
} catch (err) {
if (!mountStore.getItem()) return;
setProcess(false);
setError(t("JoinAlias.couldnt_find_room_or_space_alias", {alias_name: alias}));
setError(t("Organisms.JoinAlias.couldnt_find_room_or_space_alias", {alias_name: alias}));
}
}
try {
@ -88,14 +88,14 @@ function JoinAliasContent({ term, requestClose }) {
} catch {
if (!mountStore.getItem()) return;
setProcess(false);
setError(t("JoinAlias.couldnt_find_room_or_space", {alias_name: alias}));
setError(t("Organisms.JoinAlias.couldnt_find_room_or_space", {alias_name: alias}));
}
};
return (
<form className="join-alias" onSubmit={handleSubmit}>
<Input
label={t("JoinAlias.address_label")}
label={t("Organisms.JoinAlias.address_label")}
value={term}
name="alias"
required
@ -149,7 +149,7 @@ function JoinAlias() {
<Dialog
isOpen={data !== null}
title={(
<Text variant="s1" weight="medium" primary>{t("JoinAlias.title")}</Text>
<Text variant="s1" weight="medium" primary>{t("Organisms.JoinAlias.title")}</Text>
)}
contentOptions={<IconButton src={CrossIC} onClick={requestClose} tooltip={"common.close"} />}
onRequestClose={requestClose}

View file

@ -116,7 +116,7 @@ function DrawerBreadcrumb({ spaceId }) {
className={index === spacePath.length - 1 ? 'drawer-breadcrumb__btn--selected' : ''}
onClick={() => selectSpace(id)}
>
<Text variant="b2">{id === cons.tabs.HOME ? t("DrawerBreadcrumb.home") : twemojify(mx.getRoom(id).name)}</Text>
<Text variant="b2">{id === cons.tabs.HOME ? t("Organisms.DrawerBreadcrumb.home") : twemojify(mx.getRoom(id).name)}</Text>
{ noti !== null && (
<NotificationBadge
alert={noti.highlight !== 0}

View file

@ -44,27 +44,27 @@ export function HomeSpaceOptions({ spaceId, afterOptionSelect }) {
return (
<>
<MenuHeader>{t("DrawerHeader.add_rooms_or_spaces")}</MenuHeader>
<MenuHeader>{t("Organisms.DrawerHeader.add_rooms_or_spaces")}</MenuHeader>
<MenuItem
iconSrc={SpacePlusIC}
onClick={() => { afterOptionSelect(); openCreateRoom(true, spaceId); }}
disabled={!canManage}
>
{t("DrawerHeader.create_new_space")}
{t("Organisms.DrawerHeader.create_new_space")}
</MenuItem>
<MenuItem
iconSrc={HashPlusIC}
onClick={() => { afterOptionSelect(); openCreateRoom(false, spaceId); }}
disabled={!canManage}
>
{t("DrawerHeader.create_new_room")}
{t("Organisms.DrawerHeader.create_new_room")}
</MenuItem>
{ !spaceId && (
<MenuItem
iconSrc={HashGlobeIC}
onClick={() => { afterOptionSelect(); openPublicRooms(); }}
>
{t("DrawerHeader.join_public_room")}
{t("Organisms.DrawerHeader.join_public_room")}
</MenuItem>
)}
{ !spaceId && (
@ -72,7 +72,7 @@ export function HomeSpaceOptions({ spaceId, afterOptionSelect }) {
iconSrc={PlusIC}
onClick={() => { afterOptionSelect(); openJoinAlias(); }}
>
{t("DrawerHeader.join_with_address")}
{t("Organisms.DrawerHeader.join_with_address")}
</MenuItem>
)}
{ spaceId && (
@ -81,7 +81,7 @@ export function HomeSpaceOptions({ spaceId, afterOptionSelect }) {
onClick={() => { afterOptionSelect(); openSpaceAddExisting(spaceId); }}
disabled={!canManage}
>
{t("DrawerHeader.add_existing")}
{t("Organisms.DrawerHeader.add_existing")}
</MenuItem>
)}
{ spaceId && (
@ -89,7 +89,7 @@ export function HomeSpaceOptions({ spaceId, afterOptionSelect }) {
onClick={() => { afterOptionSelect(); openSpaceManage(spaceId); }}
iconSrc={HashSearchIC}
>
{t("DrawerHeader.manage_rooms")}
{t("Organisms.DrawerHeader.manage_rooms")}
</MenuItem>
)}
</>
@ -105,7 +105,7 @@ HomeSpaceOptions.propTypes = {
function DrawerHeader({ selectedTab, spaceId }) {
const mx = initMatrix.matrixClient;
const tabName = selectedTab !== cons.tabs.DIRECTS ? t("DrawerHeader.home") : t("DrawerHeader.direct_messages");
const tabName = selectedTab !== cons.tabs.DIRECTS ? t("Organisms.DrawerHeader.home") : t("Organisms.DrawerHeader.direct_messages");
const isDMTab = selectedTab === cons.tabs.DIRECTS;
const room = mx.getRoom(spaceId);
@ -149,8 +149,8 @@ function DrawerHeader({ selectedTab, spaceId }) {
</TitleWrapper>
)}
{ isDMTab && <IconButton onClick={() => openInviteUser()} tooltip={t("DrawerHeader.start_dm_tooltip")} src={PlusIC} size="small" /> }
{ !isDMTab && <IconButton onClick={openHomeSpaceOptions} tooltip={t("DrawerHeader.add_rooms_spaces_tooltip")} src={PlusIC} size="small" /> }
{ isDMTab && <IconButton onClick={() => openInviteUser()} tooltip={t("Organisms.DrawerHeader.start_dm_tooltip")} src={PlusIC} size="small" /> }
{ !isDMTab && <IconButton onClick={openHomeSpaceOptions} tooltip={t("Organisms.DrawerHeader.add_rooms_spaces_tooltip")} src={PlusIC} size="small" /> }
</Header>
);
}

View file

@ -85,7 +85,7 @@ function ProfileAvatarMenu() {
return (
<SidebarAvatar
onClick={openSettings}
tooltip={t("SideBar.settings_tooltip")}
tooltip={t("Organisms.SideBar.settings_tooltip")}
avatar={(
<Avatar
text={profile.displayName}
@ -107,7 +107,7 @@ function CrossSigninAlert() {
return (
<SidebarAvatar
className="sidebar__cross-signin-alert"
tooltip={t("SideBar.unverified_sessions", {count: unverified.length})}
tooltip={t("Organisms.SideBar.unverified_sessions", {count: unverified.length})}
onClick={() => openSettings(settingTabText.SECURITY)}
avatar={<Avatar iconSrc={ShieldUserIC} iconColor="var(--ic-danger-normal)" size="normal" />}
/>
@ -155,7 +155,7 @@ function FeaturedTab() {
return (
<>
<SidebarAvatar
tooltip={t("SideBar.home_tooltip")}
tooltip={t("Organisms.SideBar.home_tooltip")}
active={selectedTab === cons.tabs.HOME}
onClick={() => selectTab(cons.tabs.HOME)}
avatar={<Avatar iconSrc={HomeIC} size="normal" />}
@ -167,7 +167,7 @@ function FeaturedTab() {
) : null}
/>
<SidebarAvatar
tooltip={t("SideBar.direct_messages_tooltip")}
tooltip={t("Organisms.SideBar.direct_messages_tooltip")}
active={selectedTab === cons.tabs.DIRECTS}
onClick={() => selectTab(cons.tabs.DIRECTS)}
avatar={<Avatar iconSrc={UserIC} size="normal" />}
@ -363,7 +363,7 @@ function SideBar() {
<div className="space-container">
<SpaceShortcut />
<SidebarAvatar
tooltip={t("SideBar.pin_spaces_tooltip")}
tooltip={t("Organisms.SideBar.pin_spaces_tooltip")}
onClick={() => openShortcutSpaces()}
avatar={<Avatar iconSrc={AddPinIC} size="normal" />}
/>
@ -375,13 +375,13 @@ function SideBar() {
<div className="sidebar-divider" />
<div className="sticky-container">
<SidebarAvatar
tooltip={t("SideBar.search_tooltip")}
tooltip={t("Organisms.SideBar.search_tooltip")}
onClick={() => openSearch()}
avatar={<Avatar iconSrc={SearchIC} size="normal" />}
/>
{ totalInvites !== 0 && (
<SidebarAvatar
tooltip={t("SideBar.invites_tooltip")}
tooltip={t("Organisms.SideBar.invites_tooltip")}
onClick={() => openInviteList()}
avatar={<Avatar iconSrc={InviteIC} size="normal" />}
notificationBadge={<NotificationBadge alert content={totalInvites} />}

View file

@ -49,8 +49,8 @@ function ProfileEditor({ userId }) {
const handleAvatarUpload = async (url) => {
if (url === null) {
const isConfirmed = await confirmDialog(
t("ProfileEditor.remove_avatar"),
t("ProfileViewer.remove_avatar_confirmation"),
t("Organisms.ProfileEditor.remove_avatar"),
t("Organisms.ProfileViewer.remove_avatar_confirmation"),
t("common.remove"),
'caution',
);
@ -90,7 +90,7 @@ function ProfileEditor({ userId }) {
onSubmit={(e) => { e.preventDefault(); saveDisplayName(); }}
>
<Input
label={t("ProfileEditor.display_name_message", {user_name: mx.getUserId()})}
label={t("Organisms.ProfileEditor.display_name_message", {user_name: mx.getUserId()})}
onChange={onDisplayNameInputChange}
value={mx.getUser(mx.getUserId()).displayName}
forwardRef={displayNameRef}

View file

@ -77,14 +77,14 @@ function ModerationTools({
<div className="moderation-tools">
{canIKick && (
<form onSubmit={handleKick}>
<Input label={t("ProfileViewer.kick_reason_label")} name="kick-reason" />
<Button type="submit">{t("ProfileViewer.kick_button")}</Button>
<Input label={t("Organisms.ProfileViewer.kick_reason_label")} name="kick-reason" />
<Button type="submit">{t("Organisms.ProfileViewer.kick_button")}</Button>
</form>
)}
{canIBan && (
<form onSubmit={handleBan}>
<Input label={t("ProfileViewer.ban_reason_label")} name="ban-reason" />
<Button type="submit">{t("ProfileViewer.ban_button")}</Button>
<Input label={t("Organisms.ProfileViewer.ban_reason_label")} name="ban-reason" />
<Button type="submit">{t("Organisms.ProfileViewer.ban_button")}</Button>
</form>
)}
</div>
@ -127,8 +127,8 @@ function SessionInfo({ userId }) {
if (!isVisible) return null;
return (
<div className="session-info__chips">
{devices === null && <Text variant="b2">{t("ProfileViewer.loading_sessions")}</Text>}
{devices?.length === 0 && <Text variant="b2">{t("ProfileViewer.no_sessions_found")}</Text>}
{devices === null && <Text variant="b2">{t("Organisms.ProfileViewer.loading_sessions")}</Text>}
{devices?.length === 0 && <Text variant="b2">{t("Organisms.ProfileViewer.no_sessions_found")}</Text>}
{devices !== null && (devices.map((device) => (
<Chip
key={device.deviceId}
@ -146,7 +146,7 @@ function SessionInfo({ userId }) {
onClick={() => setIsVisible(!isVisible)}
iconSrc={isVisible ? ChevronBottomIC : ChevronRightIC}
>
<Text variant="b2">{t("ProfileViewer.view_sessions", {count: devices?.length})}</Text>
<Text variant="b2">{t("Organisms.ProfileViewer.view_sessions", {count: devices?.length})}</Text>
</MenuItem>
{renderSessionChips()}
</div>
@ -261,7 +261,7 @@ function ProfileFooter({ roomId, userId, onRequestClose }) {
onClick={openDM}
disabled={isCreatingDM}
>
{isCreatingDM ? t("ProfileViewer.creating_dm_room") : t("ProfileViewer.send_direct_message_button")}
{isCreatingDM ? t("Organisms.ProfileViewer.creating_dm_room") : t("Organisms.ProfileViewer.send_direct_message_button")}
</Button>
{ isBanned && canIKick && (
<Button
@ -290,8 +290,8 @@ function ProfileFooter({ roomId, userId, onRequestClose }) {
>
{
isUserIgnored
? `${isIgnoring ? t("ProfileViewer.unignoring") : t("ProfileViewer.unignore")}`
: `${isIgnoring ? t("ProfileViewer.ignoring") : t("ProfileViewer.ignore")}`
? `${isIgnoring ? t("Organisms.ProfileViewer.unignoring") : t("Organisms.ProfileViewer.unignore")}`
: `${isIgnoring ? t("Organisms.ProfileViewer.ignoring") : t("Organisms.ProfileViewer.ignore")}`
}
</Button>
</div>
@ -374,14 +374,14 @@ function ProfileViewer() {
const handleChangePowerLevel = async (newPowerLevel) => {
if (newPowerLevel === powerLevel) return;
const SHARED_POWER_MSG = t("ProfileViewer.shared_power_message");
const DEMOTING_MYSELF_MSG = t("ProfileViewer.demoting_self_message");
const SHARED_POWER_MSG = t("Organisms.ProfileViewer.shared_power_message");
const DEMOTING_MYSELF_MSG = t("Organisms.ProfileViewer.demoting_self_message");
const isSharedPower = newPowerLevel === myPowerLevel;
const isDemotingMyself = userId === mx.getUserId();
if (isSharedPower || isDemotingMyself) {
const isConfirmed = await confirmDialog(
t("ProfileViewer.change_power_level"),
t("Organisms.ProfileViewer.change_power_level"),
isSharedPower ? SHARED_POWER_MSG : DEMOTING_MYSELF_MSG,
t("common.change"),
'caution',

View file

@ -59,7 +59,7 @@ function TryJoinWithAlias({ alias, onRequestClose }) {
} catch (e) {
setStatus({
isJoining: false,
error: t("PublicRooms.could_not_join_alias", {alias: alias}),
error: t("Organisms.PublicRooms.could_not_join_alias", {alias: alias}),
roomId: null,
tempRoomId: null,
});
@ -69,12 +69,12 @@ function TryJoinWithAlias({ alias, onRequestClose }) {
return (
<div className="try-join-with-alias">
{status.roomId === null && !status.isJoining && status.error === null && (
<Button onClick={() => joinWithAlias()}>{t("PublicRooms.try_joining_alias", {alias: alias})}</Button>
<Button onClick={() => joinWithAlias()}>{t("Organisms.PublicRooms.try_joining_alias", {alias: alias})}</Button>
)}
{status.isJoining && (
<>
<Spinner size="small" />
<Text>{t("PublicRooms.joining_alias", {alias: alias})}</Text>
<Text>{t("Organisms.PublicRooms.joining_alias", {alias: alias})}</Text>
</>
)}
{status.roomId !== null && (
@ -147,8 +147,8 @@ function PublicRooms({ isOpen, searchTerm, onRequestClose }) {
if (totalRooms.length === 0) {
updateSearchQuery({
error: inputRoomName === ''
? t("PublicRooms.no_public_rooms", {homeserver: inputHs})
: t("PublicRooms.no_result_found", {homeserver: inputHs, input: inputRoomName}),
? t("Organisms.PublicRooms.no_public_rooms", {homeserver: inputHs})
: t("Organisms.PublicRooms.no_result_found", {homeserver: inputHs, input: inputRoomName}),
alias: isInputAlias ? inputRoomName : null,
});
}
@ -225,17 +225,17 @@ function PublicRooms({ isOpen, searchTerm, onRequestClose }) {
return (
<PopupWindow
isOpen={isOpen}
title={t("PublicRooms.title")}
title={t("Organisms.PublicRooms.title")}
contentOptions={<IconButton src={CrossIC} onClick={onRequestClose} tooltip={t("common.close")} />}
onRequestClose={onRequestClose}
>
<div className="public-rooms">
<form className="public-rooms__form" onSubmit={(e) => { e.preventDefault(); searchRooms(); }}>
<div className="public-rooms__input-wrapper">
<Input value={searchTerm} forwardRef={roomNameRef} label={t("PublicRooms.search_room_name_alias")} />
<Input value={searchTerm} forwardRef={roomNameRef} label={t("Organisms.PublicRooms.search_room_name_alias")} />
<Input forwardRef={hsRef} value={userId.slice(userId.indexOf(':') + 1)} label={t("common.homeserver")} required />
</div>
<Button disabled={isSearching} iconSrc={HashSearchIC} variant="primary" type="submit">{t("PublicRooms.search_button")}</Button>
<Button disabled={isSearching} iconSrc={HashSearchIC} variant="primary" type="submit">{t("Organisms.PublicRooms.search_button")}</Button>
</form>
<div className="public-rooms__search-status">
{
@ -244,13 +244,13 @@ function PublicRooms({ isOpen, searchTerm, onRequestClose }) {
? (
<div className="flex--center">
<Spinner size="small" />
<Text variant="b2">{t("PublicRooms.loading", {homeserver: searchQuery.homeserver})}</Text>
<Text variant="b2">{t("Organisms.PublicRooms.loading", {homeserver: searchQuery.homeserver})}</Text>
</div>
)
: (
<div className="flex--center">
<Spinner size="small" />
<Text variant="b2">{t("PublicRooms.searching", {homeserver: searchQuery.homeserver, query: searchQuery.name})}</Text>
<Text variant="b2">{t("Organisms.PublicRooms.searching", {homeserver: searchQuery.homeserver, query: searchQuery.name})}</Text>
</div>
)
)
@ -258,8 +258,8 @@ function PublicRooms({ isOpen, searchTerm, onRequestClose }) {
{
typeof searchQuery.name !== 'undefined' && !isSearching && (
searchQuery.name === ''
? <Text variant="b2">{t("PublicRooms.result_title", {homeserver: searchQuery.homeserver})}</Text>
: <Text variant="b2">{t("PublicRooms.search_result_title", {homeserver: searchQuery.homeserver, query: searchQuery.name})}</Text>
? <Text variant="b2">{t("Organisms.PublicRooms.result_title", {homeserver: searchQuery.homeserver})}</Text>
: <Text variant="b2">{t("Organisms.PublicRooms.search_result_title", {homeserver: searchQuery.homeserver, query: searchQuery.name})}</Text>
)
}
{ searchQuery.error && (

View file

@ -94,9 +94,9 @@ function GeneralSettings({ roomId }) {
variant="danger"
onClick={async () => {
const isConfirmed = await confirmDialog(
t("RoomSettings.leave_room"),
t("RoomSettings.leave_room_confirm_message", {room_name: room.name}),
t("RoomSettings.leave_room_confirm_button"),
t("Organisms.RoomSettings.leave_room"),
t("Organisms.RoomSettings.leave_room_confirm_message", {room_name: room.name}),
t("Organisms.RoomSettings.leave_room_confirm_button"),
'danger',
);
if (!isConfirmed) return;
@ -108,15 +108,15 @@ function GeneralSettings({ roomId }) {
</MenuItem>
</div>
<div className="room-settings__card">
<MenuHeader>{t("RoomSettings.notification_header")}</MenuHeader>
<MenuHeader>{t("Organisms.RoomSettings.notification_header")}</MenuHeader>
<RoomNotification roomId={roomId} />
</div>
<div className="room-settings__card">
<MenuHeader>{t("RoomSettings.visibility_header")}</MenuHeader>
<MenuHeader>{t("Organisms.RoomSettings.visibility_header")}</MenuHeader>
<RoomVisibility roomId={roomId} />
</div>
<div className="room-settings__card">
<MenuHeader>{t("RoomSettings.address_header")}</MenuHeader>
<MenuHeader>{t("Organisms.RoomSettings.address_header")}</MenuHeader>
<RoomAliases roomId={roomId} />
</div>
</>
@ -131,11 +131,11 @@ function SecuritySettings({ roomId }) {
return (
<>
<div className="room-settings__card">
<MenuHeader>{t("RoomSettings.encryption_header")}</MenuHeader>
<MenuHeader>{t("Organisms.RoomSettings.encryption_header")}</MenuHeader>
<RoomEncryption roomId={roomId} />
</div>
<div className="room-settings__card">
<MenuHeader>{t("RoomSettings.message_history_header")}</MenuHeader>
<MenuHeader>{t("Organisms.RoomSettings.message_history_header")}</MenuHeader>
<RoomHistoryVisibility roomId={roomId} />
</div>
</>
@ -187,7 +187,7 @@ function RoomSettings({ roomId }) {
<TitleWrapper>
<Text variant="s1" weight="medium" primary>
{`${room.name}`}
<span style={{ color: 'var(--tc-surface-low)' }}> {t("RoomSettings.room_settings_subtitle")}</span>
<span style={{ color: 'var(--tc-surface-low)' }}> {t("Organisms.RoomSettings.room_settings_subtitle")}</span>
</Text>
</TitleWrapper>
<RawIcon size="small" src={ChevronTopIC} />

View file

@ -68,14 +68,14 @@ function RoomIntroContainer({ event, timeline }) {
let avatarSrc = room.getAvatarUrl(mx.baseUrl, 80, 80, 'crop');
avatarSrc = isDM ? room.getAvatarFallbackMember()?.getAvatarUrl(mx.baseUrl, 80, 80, 'crop') : avatarSrc;
const heading = isDM ? room.name : t("RoomViewContent.welcome_to_room", {room_name: room.name});
const heading = isDM ? room.name : t("Organisms.RoomViewContent.welcome_to_room", {room_name: room.name});
const topic = twemojify(roomTopic || '', undefined, true);
const nameJsx = twemojify(room.name);
const desc = isDM
? (
<>
<Trans
i18nKey={"RoomViewContent.beginning_dm"}
i18nKey={"Organisms.RoomViewContent.beginning_dm"}
values={{user_name: nameJsx}}
components={{bold: <b/>}}
/>
@ -86,7 +86,7 @@ function RoomIntroContainer({ event, timeline }) {
: (
<>
<Trans
i18nKey={"RoomViewContent.beginning_room"}
i18nKey={"Organisms.RoomViewContent.beginning_room"}
values={{room_name: nameJsx}}
components={{bold: <b/>}}
/>
@ -112,7 +112,7 @@ function RoomIntroContainer({ event, timeline }) {
name={room.name}
heading={twemojify(heading)}
desc={desc}
time={event ? t("RoomViewContent.created_on", {date: event.getDate(), formatParams: { date: { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'}}}) : null}
time={event ? t("Organisms.RoomViewContent.created_on", {date: event.getDate(), formatParams: { date: { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'}}}) : null}
/>
);
}
@ -539,7 +539,7 @@ function RoomViewContent({ eventId, roomTimeline }) {
&& readUptoEvent.getTs() < mEvent.getTs());
if (unreadDivider) {
isNewEvent = true;
tl.push(<Divider key={`new-${mEvent.getId()}`} variant="positive" text={t("RoomViewContent.new_messages")} />);
tl.push(<Divider key={`new-${mEvent.getId()}`} variant="positive" text={t("Organisms.RoomViewContent.new_messages")} />);
itemCountIndex += 1;
if (jumpToItemIndex === -1) jumpToItemIndex = itemCountIndex;
}

View file

@ -124,17 +124,17 @@ function RoomViewFloating({
<>
<div className={`room-view__unread ${isJumpToEvent ? 'room-view__unread--open' : ''}`}>
<Button iconSrc={MessageUnreadIC} onClick={jumpToEvent} variant="primary">
<Text variant="b3" weight="medium">{t("RoomViewFloating.jump_unread")}</Text>
<Text variant="b3" weight="medium">{t("Organisms.RoomViewFloating.jump_unread")}</Text>
</Button>
<Button iconSrc={TickMarkIC} onClick={cancelJumpToEvent} variant="primary">
<Text variant="b3" weight="bold">{t("RoomViewFloating.mark_read")}</Text>
<Text variant="b3" weight="bold">{t("Organisms.RoomViewFloating.mark_read")}</Text>
</Button>
</div>
<div className={`room-view__typing${typingMembers.size > 0 ? ' room-view__typing--open' : ''}`}>
<div className="bouncing-loader"><div /></div>
<Text variant="b2">
<Trans
i18nKey="RoomViewFloating.user_typing"
i18nKey="Organisms.RoomViewFloating.user_typing"
values={{count: typingMembers.size, user_one: getUserDisplayName(typingMemberValues?.[0]), user_two: getUserDisplayName(typingMemberValues?.[1]), user_three: getUserDisplayName(typingMemberValues?.[2]), user_four: getUserDisplayName(typingMemberValues?.[3])}}
components={{bold: <b/>}}
/>
@ -142,7 +142,7 @@ function RoomViewFloating({
</div>
<div className={`room-view__STB${isAtBottom ? '' : ' room-view__STB--open'}`}>
<Button iconSrc={MessageIC} onClick={handleScrollToBottom}>
<Text variant="b3" weight="medium">{t("RoomViewFloating.jump_latest")}</Text>
<Text variant="b3" weight="medium">{t("Organisms.RoomViewFloating.jump_latest")}</Text>
</Button>
</div>
</>

View file

@ -98,9 +98,9 @@ function RoomViewHeader({ roomId }) {
</TitleWrapper>
<RawIcon src={ChevronBottomIC} />
</button>
<IconButton onClick={() => toggleRoomSettings(tabText.SEARCH)} tooltip={t("RoomViewHeader.search_tooltip")} src={SearchIC} />
<IconButton className="room-header__drawer-btn" onClick={togglePeopleDrawer} tooltip={t("RoomViewHeader.people_tooltip")} src={UserIC} />
<IconButton className="room-header__members-btn" onClick={() => toggleRoomSettings(tabText.MEMBERS)} tooltip={t("RoomViewHeader.members_tooltip")} src={UserIC} />
<IconButton onClick={() => toggleRoomSettings(tabText.SEARCH)} tooltip={t("Organisms.RoomViewHeader.search_tooltip")} src={SearchIC} />
<IconButton className="room-header__drawer-btn" onClick={togglePeopleDrawer} tooltip={t("Organisms.RoomViewHeader.people_tooltip")} src={UserIC} />
<IconButton className="room-header__members-btn" onClick={() => toggleRoomSettings(tabText.MEMBERS)} tooltip={t("Organisms.RoomViewHeader.members_tooltip")} src={UserIC} />
<IconButton
onClick={openRoomOptions}
tooltip={t("common.options")}

View file

@ -86,7 +86,7 @@ function RoomViewInput({
function uploadingProgress(myRoomId, { loaded, total }) {
if (myRoomId !== roomId) return;
const progressPer = Math.round((loaded * 100) / total);
uploadProgressRef.current.textContent = t("RoomViewInput.upload_progress", {progress: bytesToSize(loaded), total:bytesToSize(total), percent: progressPer});
uploadProgressRef.current.textContent = t("Organisms.RoomViewInput.upload_progress", {progress: bytesToSize(loaded), total:bytesToSize(total), percent: progressPer});
inputBaseRef.current.style.backgroundImage = `linear-gradient(90deg, var(--bg-surface-hover) ${progressPer}%, var(--bg-surface-low) ${progressPer}%)`;
}
function clearAttachment(myRoomId) {
@ -316,8 +316,8 @@ function RoomViewInput({
<Text className="room-input__alert">
{
tombstoneEvent
? tombstoneEvent.getContent()?.body ?? t("RoomViewInput.tombstone_replaced")
: t("RoomViewInput.tombstone_permission_denied")
? tombstoneEvent.getContent()?.body ?? t("Organisms.RoomViewInput.tombstone_replaced")
: t("Organisms.RoomViewInput.tombstone_permission_denied")
}
</Text>
);
@ -338,7 +338,7 @@ function RoomViewInput({
onChange={handleMsgTyping}
onPaste={handlePaste}
onKeyDown={handleKeyDown}
placeholder={t("RoomViewInput.send_message_placeholder")}
placeholder={t("Organisms.RoomViewInput.send_message_placeholder")}
/>
</Text>
</ScrollView>
@ -352,7 +352,7 @@ function RoomViewInput({
cords.y -= 250;
openEmojiBoard(cords, addEmoji);
}}
tooltip={t("RoomViewInput.emoji_tooltip")}
tooltip={t("Organisms.RoomViewInput.emoji_tooltip")}
src={EmojiIC}
/>
<IconButton onClick={sendMessage} tooltip={t("common.send")} src={SendIC} />
@ -373,7 +373,7 @@ function RoomViewInput({
</div>
<div className="room-attachment__info">
<Text variant="b1">{attachment.name}</Text>
<Text variant="b3"><span ref={uploadProgressRef}>{t("RoomViewInput.file_size", {size: bytesToSize(attachment.size)})}</span></Text>
<Text variant="b3"><span ref={uploadProgressRef}>{t("Organisms.RoomViewInput.file_size", {size: bytesToSize(attachment.size)})}</span></Text>
</div>
</div>
);
@ -388,7 +388,7 @@ function RoomViewInput({
setReplyTo(null);
}}
src={CrossIC}
tooltip={t("RoomViewInput.cancel_reply_tooltip")}
tooltip={t("Organisms.RoomViewInput.cancel_reply_tooltip")}
size="extra-small"
/>
<MessageReply

View file

@ -17,7 +17,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.user_joined"}
i18nKey={"Organisms.RoomCommon.user_joined"}
values={{user_name: twemojify(user)}}
components={{bold: <b/>}}
/>
@ -29,7 +29,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.user_left"}
i18nKey={"Organisms.RoomCommon.user_left"}
values={{user_name: twemojify(user)}}
components={{bold: <b/>}}
/>
@ -40,7 +40,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.user_invited"}
i18nKey={"Organisms.RoomCommon.user_invited"}
values={{user_name: twemojify(user), inviter_name: twemojify(inviter)}}
components={{bold: <b/>}}
/>
@ -51,7 +51,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.invite_cancelled"}
i18nKey={"Organisms.RoomCommon.invite_cancelled"}
values={{user_name: twemojify(user), inviter_name: twemojify(inviter)}}
components={{bold: <b/>}}
/>
@ -62,7 +62,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.invite_rejected"}
i18nKey={"Organisms.RoomCommon.invite_rejected"}
values={{user_name: twemojify(user)}}
components={{bold: <b/>}}
/>
@ -74,7 +74,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.user_kicked"}
i18nKey={"Organisms.RoomCommon.user_kicked"}
values={{user_name: twemojify(user), actor: twemojify(actor), reason: twemojify(reasonMsg)}}
components={{bold: <b/>}}
/>
@ -86,7 +86,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.user_banned"}
i18nKey={"Organisms.RoomCommon.user_banned"}
values={{user_name: twemojify(user), actor: twemojify(actor), reason: twemojify(reasonMsg)}}
components={{bold: <b/>}}
/>
@ -97,7 +97,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.user_unbanned"}
i18nKey={"Organisms.RoomCommon.user_unbanned"}
values={{user_name: twemojify(user), actor: twemojify(actor)}}
components={{bold: <b/>}}
/>
@ -108,7 +108,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.avatar_set"}
i18nKey={"Organisms.RoomCommon.avatar_set"}
values={{user_name: twemojify(user)}}
components={{bold: <b/>}}
/>
@ -119,7 +119,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.avatar_changed"}
i18nKey={"Organisms.RoomCommon.avatar_changed"}
values={{user_name: twemojify(user)}}
components={{bold: <b/>}}
/>
@ -130,7 +130,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.avatar_removed"}
i18nKey={"Organisms.RoomCommon.avatar_removed"}
values={{user_name: twemojify(user)}}
components={{bold: <b/>}}
/>
@ -141,7 +141,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.name_set"}
i18nKey={"Organisms.RoomCommon.name_set"}
values={{user_name: twemojify(user), new_name: twemojify(newName)}}
components={{bold: <b/>}}
/>
@ -152,7 +152,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.name_changed"}
i18nKey={"Organisms.RoomCommon.name_changed"}
values={{user_name: twemojify(user), new_name: twemojify(newName)}}
components={{bold: <b/>}}
/>
@ -163,7 +163,7 @@ function getTimelineJSXMessages() {
return (
<>
<Trans
i18nKey={"RoomCommon.name_removed"}
i18nKey={"Organisms.RoomCommon.name_removed"}
values={{user_name: twemojify(user), new_name: twemojify(newName)}}
components={{bold: <b/>}}
/>

View file

@ -229,7 +229,7 @@ function Search() {
</ScrollView>
</div>
<div className="search-dialog__footer">
<Text variant="b3">{t("Search.description")}</Text>
<Text variant="b3">{t("Organisms.Search.description")}</Text>
</div>
</div>
</RawModal>

View file

@ -45,10 +45,10 @@ function AuthRequest({ onComplete, makeRequest }) {
lastUsedPassword = undefined;
if (!mountStore.getItem()) return;
if (err.errcode === 'M_FORBIDDEN') {
setStatus({ error: t("AuthRequest.wrong_password") });
setStatus({ error: t("Organisms.AuthRequest.wrong_password") });
return;
}
setStatus({ error: t("AuthRequest.request_failed") });
setStatus({ error: t("Organisms.AuthRequest.request_failed") });
}
};
@ -61,7 +61,7 @@ function AuthRequest({ onComplete, makeRequest }) {
<form onSubmit={handleForm}>
<Input
name="password"
label={t("AuthRequest.password_label")}
label={t("Organisms.AuthRequest.password_label")}
type="password"
onChange={handleChange}
required

View file

@ -35,13 +35,13 @@ function CrossSigningSetup() {
const renderFailure = (requestClose) => (
<div className="cross-signing__failure">
<Text variant="h1">{twemojify('❌')}</Text>
<Text weight="medium">{t("CrossSigning.setup_failed")}</Text>
<Text weight="medium">{t("Organisms.CrossSigning.setup_failed")}</Text>
<Button onClick={requestClose}>{t("common.close")}</Button>
</div>
);
openReusableDialog(
<Text variant="s1" weight="medium">{t("CrossSigning.setup")}</Text>,
<Text variant="s1" weight="medium">{t("Organisms.CrossSigning.setup")}</Text>,
renderFailure,
);
};
@ -59,7 +59,7 @@ function CrossSigningSetup() {
const renderSecurityKey = () => (
<div className="cross-signing__key">
<Text weight="medium">{t("CrossSigning.save_security_key_message")}</Text>
<Text weight="medium">{t("Organisms.CrossSigning.save_security_key_message")}</Text>
<Text className="cross-signing__key-text">
{key.encodedPrivateKey}
</Text>
@ -74,7 +74,7 @@ function CrossSigningSetup() {
downloadKey();
openReusableDialog(
<Text variant="s1" weight="medium">{t("CrossSigning.security_key_dialog_title")}</Text>,
<Text variant="s1" weight="medium">{t("Organisms.CrossSigning.security_key_dialog_title")}</Text>,
() => renderSecurityKey(),
);
};
@ -130,9 +130,9 @@ function CrossSigningSetup() {
<div className="cross-signing__setup">
<div className="cross-signing__setup-entry">
<Text>
{t("CrossSigning.security_key_generation_message")}
{t("Organisms.CrossSigning.security_key_generation_message")}
</Text>
{genWithPhrase !== false && <Button variant="primary" onClick={() => setup()} disabled={genWithPhrase !== undefined}>{t("CrossSigning.security_key_generation_button")}</Button>}
{genWithPhrase !== false && <Button variant="primary" onClick={() => setup()} disabled={genWithPhrase !== undefined}>{t("Organisms.CrossSigning.security_key_generation_button")}</Button>}
{genWithPhrase === false && <Spinner size="small" />}
</div>
<Text className="cross-signing__setup-divider">{t("common.or")}</Text>
@ -150,13 +150,13 @@ function CrossSigningSetup() {
disabled={genWithPhrase !== undefined}
>
<Text>
{t("CrossSigning.security_phrase_message")}
{t("Organisms.CrossSigning.security_phrase_message")}
</Text>
<Input
name="phrase"
value={values.phrase}
onChange={handleChange}
label={t("CrossSigning.security_phrase_label")}
label={t("Organisms.CrossSigning.security_phrase_label")}
type="password"
required
disabled={genWithPhrase !== undefined}
@ -166,13 +166,13 @@ function CrossSigningSetup() {
name="confirmPhrase"
value={values.confirmPhrase}
onChange={handleChange}
label={t("CrossSigning.security_phrase_confirm_label")}
label={t("Organisms.CrossSigning.security_phrase_confirm_label")}
type="password"
required
disabled={genWithPhrase !== undefined}
/>
{errors.confirmPhrase && <Text variant="b3" className="cross-signing__error">{errors.confirmPhrase}</Text>}
{genWithPhrase !== true && <Button variant="primary" type="submit" disabled={genWithPhrase !== undefined}>{t("CrossSigning.security_phrase_set_button")}</Button>}
{genWithPhrase !== true && <Button variant="primary" type="submit" disabled={genWithPhrase !== undefined}>{t("Organisms.CrossSigning.security_phrase_set_button")}</Button>}
{genWithPhrase === true && <Spinner size="small" />}
</form>
)}
@ -193,9 +193,9 @@ function CrossSigningReset() {
return (
<div className="cross-signing__reset">
<Text variant="h1">{twemojify('✋🧑‍🚒🤚')}</Text>
<Text weight="medium">{t("CrossSigning.reset_keys_subtitle")}</Text>
<Text weight="medium">{t("Organisms.CrossSigning.reset_keys_subtitle")}</Text>
<Text>
{t("CrossSigning.reset_keys_message")}
{t("Organisms.CrossSigning.reset_keys_message")}
</Text>
<Button variant="danger" onClick={setupDialog}>{t("common.reset")}</Button>
</div>
@ -215,8 +215,8 @@ function CrossSignin() {
const isCSEnabled = useCrossSigningStatus();
return (
<SettingTile
title={t("CrossSigning.title")}
content={<Text variant="b3">{t("CrossSigning.setup_message")}</Text>}
title={t("Organisms.CrossSigning.title")}
content={<Text variant="b3">{t("Organisms.CrossSigning.setup_message")}</Text>}
options={(
isCSEnabled
? <Button variant="danger" onClick={resetDialog}>{t("common.reset")}</Button>

View file

@ -45,7 +45,7 @@ const promptDeviceName = async (deviceName) => new Promise((resolve) => {
};
return (
<form className="device-manage__rename" onSubmit={handleSubmit}>
<Input value={deviceName} label={t("DeviceManage.edit_session_name_subtitle")} name="session" />
<Input value={deviceName} label={t("Organisms.DeviceManage.edit_session_name_subtitle")} name="session" />
<div className="device-manage__rename-btn">
<Button variant="primary" type="submit">{t("common.save")}</Button>
<Button onClick={() => onComplete(null)}>{t("common.cancel")}</Button>
@ -55,7 +55,7 @@ const promptDeviceName = async (deviceName) => new Promise((resolve) => {
};
openReusableDialog(
<Text variant="s1" weight="medium">{t("DeviceManage.edit_session_name_title")}</Text>,
<Text variant="s1" weight="medium">{t("Organisms.DeviceManage.edit_session_name_title")}</Text>,
(requestClose) => renderContent((name) => {
isCompleted = true;
resolve(name);
@ -95,7 +95,7 @@ function DeviceManage() {
};
return (
<form className="device-manage__rename" onSubmit={handleSubmit}>
<Input value={deviceName} label={t("DeviceManage.edit_session_name_subtitle")} name="session" />
<Input value={deviceName} label={t("Organisms.DeviceManage.edit_session_name_subtitle")} name="session" />
<div className="device-manage__rename-btn">
<Button variant="primary" type="submit">{t("common.save")}</Button>
<Button onClick={() => onComplete(null)}>{t("common.cancel")}</Button>
@ -105,7 +105,7 @@ function DeviceManage() {
};
openReusableDialog(
<Text variant="s1" weight="medium">{t("DeviceManage.edit_session_name_title")}</Text>,
<Text variant="s1" weight="medium">{t("Organisms.DeviceManage.edit_session_name_title")}</Text>,
(requestClose) => renderContent((name) => {
isCompleted = true;
resolve(name);
@ -132,7 +132,7 @@ function DeviceManage() {
<div className="device-manage">
<div className="device-manage__loading">
<Spinner size="small" />
<Text>{t("DeviceManage.loading_devices")}</Text>
<Text>{t("Organisms.DeviceManage.loading_devices")}</Text>
</div>
</div>
);
@ -155,14 +155,14 @@ function DeviceManage() {
const handleRemove = async (device) => {
const isConfirmed = await confirmDialog(
t("DeviceManage.logout_device_title", {device: device.display_name}),
t("DeviceManage.logout_device_message", {device: device.display_name}),
t("DeviceManage.logout_device_confirm"),
t("Organisms.DeviceManage.logout_device_title", {device: device.display_name}),
t("Organisms.DeviceManage.logout_device_message", {device: device.display_name}),
t("Organisms.DeviceManage.logout_device_confirm"),
'danger',
);
if (!isConfirmed) return;
addToProcessing(device);
await authRequest(t("DeviceManage.logout_device_title", {device: device.display_name}), async (auth) => {
await authRequest(t("Organisms.DeviceManage.logout_device_title", {device: device.display_name}), async (auth) => {
await mx.deleteDevice(device.device_id, auth);
});
@ -171,7 +171,7 @@ function DeviceManage() {
};
const verifyWithKey = async (device) => {
const keyData = await accessSecretStorage(t("DeviceManage.session_verification_title"));
const keyData = await accessSecretStorage(t("Organisms.DeviceManage.session_verification_title"));
if (!keyData) return;
addToProcessing(device);
await mx.checkOwnCrossSigningTrust();
@ -205,7 +205,7 @@ function DeviceManage() {
<Text style={{ color: isVerified !== false ? '' : 'var(--tc-danger-high)' }}>
{displayName}
<Text variant="b3" span>{`${displayName ? ' — ' : ''}${deviceId}`}</Text>
{isCurrentDevice && <Text span className="device-manage__current-label" variant="b3">{t("DeviceManage.current_device_label")}</Text>}
{isCurrentDevice && <Text span className="device-manage__current-label" variant="b3">{t("Organisms.DeviceManage.current_device_label")}</Text>}
</Text>
)}
options={
@ -213,9 +213,9 @@ function DeviceManage() {
? <Spinner size="small" />
: (
<>
{(isCSEnabled && canVerify) && <Button onClick={() => verify(deviceId, isCurrentDevice)} variant="positive">{t("DeviceManage.verify_session_button")}</Button>}
<IconButton size="small" onClick={() => handleRename(device)} src={PencilIC} tooltip={t("DeviceManage.edit_session_name_tooltip")} />
<IconButton size="small" onClick={() => handleRemove(device)} src={BinIC} tooltip={t("DeviceManage.logout_device_tooltip")}/>
{(isCSEnabled && canVerify) && <Button onClick={() => verify(deviceId, isCurrentDevice)} variant="positive">{t("Organisms.DeviceManage.verify_session_button")}</Button>}
<IconButton size="small" onClick={() => handleRename(device)} src={PencilIC} tooltip={t("Organisms.DeviceManage.edit_session_name_tooltip")} />
<IconButton size="small" onClick={() => handleRemove(device)} src={BinIC} tooltip={t("Organisms.DeviceManage.logout_device_tooltip")}/>
</>
)
}
@ -256,38 +256,38 @@ function DeviceManage() {
return (
<div className="device-manage">
<div>
<MenuHeader>{t("DeviceManage.unverified_sessions_title")}</MenuHeader>
<MenuHeader>{t("Organisms.DeviceManage.unverified_sessions_title")}</MenuHeader>
{!isCSEnabled && (
<div style={{ padding: 'var(--sp-extra-tight) var(--sp-normal)' }}>
<InfoCard
rounded
variant="caution"
iconSrc={InfoIC}
title={t("DeviceManage.setup_cross_signing_message")}
title={t("Organisms.DeviceManage.setup_cross_signing_message")}
/>
</div>
)}
{
unverified.length > 0
? unverified.map((device) => renderDevice(device, false))
: <Text className="device-manage__info">{t("DeviceManage.unverified_sessions_none")}</Text>
: <Text className="device-manage__info">{t("Organisms.DeviceManage.unverified_sessions_none")}</Text>
}
</div>
{noEncryption.length > 0 && (
<div>
<MenuHeader>{t("DeviceManage.unencrypted_sessions_title")}</MenuHeader>
<MenuHeader>{t("Organisms.DeviceManage.unencrypted_sessions_title")}</MenuHeader>
{noEncryption.map((device) => renderDevice(device, null))}
</div>
)}
<div>
<MenuHeader>{t("DeviceManage.verified_sessions_title")}</MenuHeader>
<MenuHeader>{t("Organisms.DeviceManage.verified_sessions_title")}</MenuHeader>
{
verified.length > 0
? verified.map((device, index) => {
if (truncated && index >= TRUNCATED_COUNT) return null;
return renderDevice(device, true);
})
: <Text className="device-manage__info">{t("DeviceManage.verified_sessions_none")}</Text>
: <Text className="device-manage__info">{t("Organisms.DeviceManage.verified_sessions_none")}</Text>
}
{ verified.length > TRUNCATED_COUNT && (
<Button className="device-manage__info" onClick={() => setTruncated(!truncated)}>
@ -295,7 +295,7 @@ function DeviceManage() {
</Button>
)}
{ deviceList.length > 0 && (
<Text className="device-manage__info" variant="b3">{t("DeviceManage.session_name_privacy_message")}</Text>
<Text className="device-manage__info" variant="b3">{t("Organisms.DeviceManage.session_name_privacy_message")}</Text>
)}
</div>
</div>

View file

@ -66,18 +66,18 @@ function CreateKeyBackupDialog({ keyData }) {
{done === false && (
<div>
<Spinner size="small" />
<Text>{t("KeyBackup.creating_backup")}</Text>
<Text>{t("Organisms.KeyBackup.creating_backup")}</Text>
</div>
)}
{done === true && (
<>
<Text variant="h1">{twemojify('✅')}</Text>
<Text>{t("KeyBackup.backup_created")}</Text>
<Text>{t("Organisms.KeyBackup.backup_created")}</Text>
</>
)}
{done === null && (
<>
<Text>{t("KeyBackup.backup_failed")}</Text>
<Text>{t("Organisms.KeyBackup.backup_failed")}</Text>
<Button onClick={doBackup}>{t("common.retry")}</Button>
</>
)}
@ -108,7 +108,7 @@ function RestoreKeyBackupDialog({ keyData }) {
meBreath = true;
}, 200);
setStatus({ message: t("KeyBackup.restoring_progress", {progress: progress.successes, total: progress.total}) });
setStatus({ message: t("Organisms.KeyBackup.restoring_progress", {progress: progress.successes, total: progress.total}) });
};
try {
@ -120,14 +120,14 @@ function RestoreKeyBackupDialog({ keyData }) {
{ progressCallback },
);
if (!mountStore.getItem()) return;
setStatus({ done: t("KeyBackup.restore_complete", {progress: info.imported, total: info.total})});
setStatus({ done: t("Organisms.KeyBackup.restore_complete", {progress: info.imported, total: info.total})});
} catch (e) {
if (!mountStore.getItem()) return;
if (e.errcode === 'RESTORE_BACKUP_ERROR_BAD_KEY') {
deletePrivateKey(keyData.keyId);
setStatus({ error: t("KeyBackup.restore_failed_bad_key"), errorCode: 'BAD_KEY' });
setStatus({ error: t("Organisms.KeyBackup.restore_failed_bad_key"), errorCode: 'BAD_KEY' });
} else {
setStatus({ error: t("KeyBackup.restore_failed_unknown"), errCode: 'UNKNOWN' });
setStatus({ error: t("Organisms.KeyBackup.restore_failed_unknown"), errCode: 'UNKNOWN' });
}
}
};
@ -142,7 +142,7 @@ function RestoreKeyBackupDialog({ keyData }) {
{(status === false || status.message) && (
<div>
<Spinner size="small" />
<Text>{status.message ?? t("KeyBackup.restoring")}</Text>
<Text>{status.message ?? t("Organisms.KeyBackup.restoring")}</Text>
</div>
)}
{status.done && (
@ -187,8 +187,8 @@ function DeleteKeyBackupDialog({ requestClose }) {
return (
<div className="key-backup__delete">
<Text variant="h1">{twemojify('🗑')}</Text>
<Text weight="medium">{t("KeyBackup.delete_key_backup_subtitle")}</Text>
<Text>{t("KeyBackup.delete_key_backup_message")}</Text>
<Text weight="medium">{t("Organisms.KeyBackup.delete_key_backup_subtitle")}</Text>
<Text>{t("Organisms.KeyBackup.delete_key_backup_message")}</Text>
{
isDeleting
? <Spinner size="small" />
@ -231,28 +231,28 @@ function KeyBackup() {
}, [isCSEnabled]);
const openCreateKeyBackup = async () => {
const keyData = await accessSecretStorage(t('KeyBackup.create_backup_title'));
const keyData = await accessSecretStorage(t('Organisms.KeyBackup.create_backup_title'));
if (keyData === null) return;
openReusableDialog(
<Text variant="s1" weight="medium">{t('KeyBackup.create_backup_title')}</Text>,
<Text variant="s1" weight="medium">{t('Organisms.KeyBackup.create_backup_title')}</Text>,
() => <CreateKeyBackupDialog keyData={keyData} />,
() => fetchKeyBackupVersion(),
);
};
const openRestoreKeyBackup = async () => {
const keyData = await accessSecretStorage(t('KeyBackup.restore_backup_title'));
const keyData = await accessSecretStorage(t('Organisms.KeyBackup.restore_backup_title'));
if (keyData === null) return;
openReusableDialog(
<Text variant="s1" weight="medium">{t('KeyBackup.restore_backup_title')}</Text>,
<Text variant="s1" weight="medium">{t('Organisms.KeyBackup.restore_backup_title')}</Text>,
() => <RestoreKeyBackupDialog keyData={keyData} />,
);
};
const openDeleteKeyBackup = () => openReusableDialog(
<Text variant="s1" weight="medium">{t('KeyBackup.delete_key_backup_title')}</Text>,
<Text variant="s1" weight="medium">{t('Organisms.KeyBackup.delete_key_backup_title')}</Text>,
(requestClose) => (
<DeleteKeyBackupDialog
requestClose={(isDone) => {
@ -265,28 +265,28 @@ function KeyBackup() {
const renderOptions = () => {
if (keyBackup === undefined) return <Spinner size="small" />;
if (keyBackup === null) return <Button variant="primary" onClick={openCreateKeyBackup}>{t('KeyBackup.create_backup_tooltip')}</Button>;
if (keyBackup === null) return <Button variant="primary" onClick={openCreateKeyBackup}>{t('Organisms.KeyBackup.create_backup_tooltip')}</Button>;
return (
<>
<IconButton src={DownloadIC} variant="positive" onClick={openRestoreKeyBackup} tooltip={t('KeyBackup.restore_backup_tooltip')} />
<IconButton src={BinIC} onClick={openDeleteKeyBackup} tooltip={t('KeyBackup.delete_key_backup_tooltip')} />
<IconButton src={DownloadIC} variant="positive" onClick={openRestoreKeyBackup} tooltip={t('Organisms.KeyBackup.restore_backup_tooltip')} />
<IconButton src={BinIC} onClick={openDeleteKeyBackup} tooltip={t('Organisms.KeyBackup.delete_key_backup_tooltip')} />
</>
);
};
return (
<SettingTile
title={t("KeyBackup.encrypted_messages_backup_title")}
title={t("Organisms.KeyBackup.encrypted_messages_backup_title")}
content={(
<>
<Text variant="b3">{t("KeyBackup.encrypted_messages_backup_description")}</Text>
<Text variant="b3">{t("Organisms.KeyBackup.encrypted_messages_backup_description")}</Text>
{!isCSEnabled && (
<InfoCard
style={{ marginTop: 'var(--sp-ultra-tight)' }}
rounded
variant="caution"
iconSrc={InfoIC}
title={t("KeyBackup.encrypted_messages_backup_cross_signing_disabled")}
title={t("Organisms.KeyBackup.encrypted_messages_backup_cross_signing_disabled")}
/>
)}
</>

View file

@ -53,26 +53,26 @@ function AppearanceSection() {
<div className="settings-appearance__card">
<MenuHeader>Theme</MenuHeader>
<SettingTile
title={t("Settings.theme.follow_system.title")}
title={t("Organisms.Settings.theme.follow_system.title")}
options={(
<Toggle
isActive={settings.useSystemTheme}
onToggle={() => { toggleSystemTheme(); updateState({}); }}
/>
)}
content={<Text variant="b3">{t("Settings.theme.follow_system.description")}</Text>}
content={<Text variant="b3">{t("Organisms.Settings.theme.follow_system.description")}</Text>}
/>
{!settings.useSystemTheme && (
<SettingTile
title={t("Settings.theme.title")}
title={t("Organisms.Settings.theme.title")}
content={(
<SegmentedControls
selected={settings.getThemeIndex()}
segments={[
{ text: t("Settings.theme.theme_light") },
{ text: t("Settings.theme.theme_silver") },
{ text: t("Settings.theme.theme_dark") },
{ text: t("Settings.theme.theme_butter") },
{ text: t("Organisms.Settings.theme.theme_light") },
{ text: t("Organisms.Settings.theme.theme_silver") },
{ text: t("Organisms.Settings.theme.theme_dark") },
{ text: t("Organisms.Settings.theme.theme_butter") },
]}
onSelect={(index) => settings.setTheme(index)}
/>
@ -83,34 +83,34 @@ function AppearanceSection() {
<div className="settings-appearance__card">
<MenuHeader>Room messages</MenuHeader>
<SettingTile
title={t("Settings.markdown.title")}
title={t("Organisms.Settings.markdown.title")}
options={(
<Toggle
isActive={settings.isMarkdown}
onToggle={() => { toggleMarkdown(); updateState({}); }}
/>
)}
content={<Text variant="b3">{t("Settings.markdown.description")}</Text>}
content={<Text variant="b3">{t("Organisms.Settings.markdown.description")}</Text>}
/>
<SettingTile
title={t("Settings.hide_membership_events.title")}
title={t("Organisms.Settings.hide_membership_events.title")}
options={(
<Toggle
isActive={settings.hideMembershipEvents}
onToggle={() => { toggleMembershipEvents(); updateState({}); }}
/>
)}
content={<Text variant="b3">{t("Settings.hide_membership_events.description")}</Text>}
content={<Text variant="b3">{t("Organisms.Settings.hide_membership_events.description")}</Text>}
/>
<SettingTile
title={t("Settings.hide_nickname_avatar_events.title")}
title={t("Organisms.Settings.hide_nickname_avatar_events.title")}
options={(
<Toggle
isActive={settings.hideNickAvatarEvents}
onToggle={() => { toggleNickAvatarEvents(); updateState({}); }}
/>
)}
content={<Text variant="b3">{t("Settings.hide_nickname_avatar_events.description")}</Text>}
content={<Text variant="b3">{t("Organisms.Settings.hide_nickname_avatar_events.description")}</Text>}
/>
</div>
</div>
@ -154,21 +154,21 @@ function NotificationsSection() {
return (
<div className="settings-notifications">
<MenuHeader>{t("Settings.notifications_and_sound.title")}</MenuHeader>
<MenuHeader>{t("Organisms.Settings.notifications_and_sound.title")}</MenuHeader>
<SettingTile
title={t("Settings.notifications_and_sound.desktop.title")}
title={t("Organisms.Settings.notifications_and_sound.desktop.title")}
options={renderOptions()}
content={<Text variant="b3">{t("Settings.notifications_and_sound.desktop.description")}</Text>}
content={<Text variant="b3">{t("Organisms.Settings.notifications_and_sound.desktop.description")}</Text>}
/>
<SettingTile
title={t("Settings.notifications_and_sound.sound.title")}
title={t("Organisms.Settings.notifications_and_sound.sound.title")}
options={(
<Toggle
isActive={settings.isNotificationSounds}
onToggle={() => { toggleNotificationSounds(); updateState({}); }}
/>
)}
content={<Text variant="b3">{t("Settings.notifications_and_sound.desktop.description")}</Text>}
content={<Text variant="b3">{t("Organisms.Settings.notifications_and_sound.desktop.description")}</Text>}
/>
</div>
);
@ -181,27 +181,27 @@ function SecuritySection() {
return (
<div className="settings-security">
<div className="settings-security__card">
<MenuHeader>{t("Settings.security.cross_signing.title")}</MenuHeader>
<MenuHeader>{t("Organisms.Settings.security.cross_signing.title")}</MenuHeader>
<CrossSigning />
<KeyBackup />
</div>
<DeviceManage />
<div className="settings-security__card">
<MenuHeader>{t("Settings.security.export_import_encryption_keys.title")}</MenuHeader>
<MenuHeader>{t("Organisms.Settings.security.export_import_encryption_keys.title")}</MenuHeader>
<SettingTile
title={t("Settings.security.export_encryption_keys.title")}
title={t("Organisms.Settings.security.export_encryption_keys.title")}
content={(
<>
<Text variant="b3">{t("Settings.security.export_encryption_keys.description")}</Text>
<Text variant="b3">{t("Organisms.Settings.security.export_encryption_keys.description")}</Text>
<ExportE2ERoomKeys />
</>
)}
/>
<SettingTile
title={t("Settings.security.import_encryption_keys.title")}
title={t("Organisms.Settings.security.import_encryption_keys.title")}
content={(
<>
<Text variant="b3">{t("Settings.security.import_encryption_keys.description")}</Text>
<Text variant="b3">{t("Organisms.Settings.security.import_encryption_keys.description")}</Text>
<ImportE2ERoomKeys />
</>
)}
@ -218,7 +218,7 @@ function AboutSection() {
return (
<div className="settings-about">
<div className="settings-about__card">
<MenuHeader>{t("Settings.about.application")}</MenuHeader>
<MenuHeader>{t("Organisms.Settings.about.application")}</MenuHeader>
<div className="settings-about__branding">
<img width="60" height="60" src={CinnySVG} alt="Cinny logo" />
<div>
@ -236,7 +236,7 @@ function AboutSection() {
</div>
</div>
<div className="settings-about__card">
<MenuHeader>{t("Settings.about.credits")}</MenuHeader>
<MenuHeader>{t("Organisms.Settings.about.credits")}</MenuHeader>
<div className="settings-about__credits">
<ul>
<li>
@ -314,7 +314,7 @@ function Settings() {
const handleTabChange = (tabItem) => setSelectedTab(tabItem);
const handleLogout = async () => {
if (await confirmDialog(t("Settings.logout.dialog.title"), t("Settings.logout.dialog.description"), t("Settings.logout.dialog.confirm"), 'danger')) {
if (await confirmDialog(t("Organisms.Settings.logout.dialog.title"), t("Organisms.Settings.logout.dialog.description"), t("Organisms.Settings.logout.dialog.confirm"), 'danger')) {
logout();
}
};
@ -323,11 +323,11 @@ function Settings() {
<PopupWindow
isOpen={isOpen}
className="settings-window"
title={<Text variant="s1" weight="medium" primary>{t("Settings.title")}</Text>}
title={<Text variant="s1" weight="medium" primary>{t("Organisms.Settings.title")}</Text>}
contentOptions={(
<>
<Button variant="danger" iconSrc={PowerIC} onClick={handleLogout}>
{t("Settings.logout.title")}
{t("Organisms.Settings.logout.title")}
</Button>
<IconButton src={CrossIC} onClick={requestClose} tooltip={t("common.close")} />
</>

View file

@ -115,18 +115,18 @@ function ShortcutSpacesContent() {
return (
<>
<Text className="shortcut-spaces__header" variant="b3" weight="bold">{t("ShortcutSpaces.pinned_spaces")}</Text>
{spaceShortcut.length === 0 && <Text>{t("ShortcutSpaces.no_pinned_spaces")}</Text>}
<Text className="shortcut-spaces__header" variant="b3" weight="bold">{t("Organisms.ShortcutSpaces.pinned_spaces")}</Text>
{spaceShortcut.length === 0 && <Text>{t("Organisms.ShortcutSpaces.no_pinned_spaces")}</Text>}
{spaceShortcut.map((spaceId) => renderSpace(spaceId, true))}
<Text className="shortcut-spaces__header" variant="b3" weight="bold">{t("ShortcutSpaces.unpinned_spaces")}</Text>
{spaceWithoutShortcut.length === 0 && <Text>{t("ShortcutSpaces.no_unpinned_spaces")}</Text>}
<Text className="shortcut-spaces__header" variant="b3" weight="bold">{t("Organisms.ShortcutSpaces.unpinned_spaces")}</Text>
{spaceWithoutShortcut.length === 0 && <Text>{t("Organisms.ShortcutSpaces.no_unpinned_spaces")}</Text>}
{spaceWithoutShortcut.map((spaceId) => renderSpace(spaceId, false))}
{selected.length !== 0 && (
<div className="shortcut-spaces__footer">
{process && <Spinner size="small" />}
<Text weight="medium">{process || t("ShortcutSpaces.spaces_selected", {count: selected.length})}</Text>
<Text weight="medium">{process || t("Organisms.ShortcutSpaces.spaces_selected", {count: selected.length})}</Text>
{ !process && (
<Button onClick={handleAdd} variant="primary">{t("ShortcutSpaces.pin_button")}</Button>
<Button onClick={handleAdd} variant="primary">{t("Organisms.ShortcutSpaces.pin_button")}</Button>
)}
</div>
)}
@ -160,7 +160,7 @@ function ShortcutSpaces() {
className="shortcut-spaces"
title={(
<Text variant="s1" weight="medium" primary>
{t("ShortcutSpaces.header")}
{t("Organisms.ShortcutSpaces.header")}
</Text>
)}
contentOptions={<IconButton src={CrossIC} onClick={requestClose} tooltip= {t("common.close")}/>}

View file

@ -120,7 +120,7 @@ function SpaceManageItem({
const roomNameJSX = (
<Text>
{twemojify(name)}
<Text variant="b3" span> {t("SpaceManage.room_members", {count: roomInfo.num_joined_members})}</Text>
<Text variant="b3" span> {t("Organisms.SpaceManage.room_members", {count: roomInfo.num_joined_members})}</Text>
</Text>
);
@ -148,7 +148,7 @@ function SpaceManageItem({
>
{roomAvatarJSX}
{roomNameJSX}
{isSuggested && <Text variant="b2">{t("SpaceManage.suggested")}</Text>}
{isSuggested && <Text variant="b2">{t("Organisms.SpaceManage.suggested")}</Text>}
</button>
{roomInfo.topic && expandBtnJsx}
{
@ -187,15 +187,15 @@ function SpaceManageFooter({ parentId, selected }) {
});
const handleRemove = () => {
setProcess(t("SpaceManage.remove", {count: selected.length}));
setProcess(t("Organisms.SpaceManage.remove", {count: selected.length}));
selected.forEach((roomId) => {
mx.sendStateEvent(parentId, 'm.space.child', {}, roomId);
});
};
const handleToggleSuggested = (isMark) => {
if (isMark) setProcess(t("SpaceManage.mark_suggested", {count: selected.length}));
else setProcess(t("SpaceManage.mark_not_suggested", {count: selected.length}));
if (isMark) setProcess(t("Organisms.SpaceManage.mark_suggested", {count: selected.length}));
else setProcess(t("Organisms.SpaceManage.mark_not_suggested", {count: selected.length}));
selected.forEach((roomId) => {
const sEvent = room.currentState.getStateEvents('m.space.child', roomId);
if (!sEvent) return;
@ -210,7 +210,7 @@ function SpaceManageFooter({ parentId, selected }) {
return (
<div className="space-manage__footer">
{process && <Spinner size="small" />}
<Text weight="medium">{process || t("SpaceManage.items_selected", {count: selected.length})}</Text>
<Text weight="medium">{process || t("Organisms.SpaceManage.items_selected", {count: selected.length})}</Text>
{ !process && (
<>
<Button onClick={handleRemove} variant="danger">{t("common.remove")}</Button>
@ -352,11 +352,11 @@ function SpaceManageContent({ roomId, requestClose }) {
{spacePath.length > 1 && (
<SpaceManageBreadcrumb path={spacePath} onSelect={addPathItem} />
)}
<Text variant="b3" weight="bold">{t("SpaceManage.rooms_and_spaces")}</Text>
<Text variant="b3" weight="bold">{t("Organisms.SpaceManage.rooms_and_spaces")}</Text>
<div className="space-manage__content-items">
{!isLoading && currentHierarchy?.rooms?.length === 1 && (
<Text>
{t("SpaceManage.private_rooms_message")}
{t("Organisms.SpaceManage.private_rooms_message")}
</Text>
)}
{currentHierarchy && (currentHierarchy.rooms?.map((roomInfo) => (
@ -378,7 +378,7 @@ function SpaceManageContent({ roomId, requestClose }) {
{!currentHierarchy && <Text>{t("common.loading")}</Text>}
</div>
{currentHierarchy?.canLoadMore && !isLoading && (
<Button onClick={loadRoomHierarchy}>{t("SpaceManage.load_more")}</Button>
<Button onClick={loadRoomHierarchy}>{t("Organisms.SpaceManage.load_more")}</Button>
)}
{isLoading && (
<div className="space-manage__content-loading">
@ -428,7 +428,7 @@ function SpaceManage() {
title={(
<Text variant="s1" weight="medium" primary>
{roomId && twemojify(room.name)}
<span style={{ color: 'var(--tc-surface-low)' }}> {t("SpaceManage.subtitle")}</span>
<span style={{ color: 'var(--tc-surface-low)' }}> {t("Organisms.SpaceManage.subtitle")}</span>
</Text>
)}
contentOptions={<IconButton src={CrossIC} onClick={requestClose} tooltip="Close" />}

View file

@ -83,7 +83,7 @@ function GeneralSettings({ roomId }) {
}}
iconSrc={isCategorized ? CategoryFilledIC : CategoryIC}
>
{isCategorized ? t("SpaceSettings.uncategorize_subspaces") : t("SpaceSettings.categorize_subspaces")}
{isCategorized ? t("Organisms.SpaceSettings.uncategorize_subspaces") : t("Organisms.SpaceSettings.categorize_subspaces")}
</MenuItem>
<MenuItem
onClick={() => {
@ -93,30 +93,30 @@ function GeneralSettings({ roomId }) {
}}
iconSrc={isPinned ? PinFilledIC : PinIC}
>
{isPinned ? t("SpaceSettings.unpin_sidebar") : t("SpaceSettings.pin_sidebar")}
{isPinned ? t("Organisms.SpaceSettings.unpin_sidebar") : t("Organisms.SpaceSettings.pin_sidebar")}
</MenuItem>
<MenuItem
variant="danger"
onClick={async () => {
const isConfirmed = await confirmDialog(
t("SpaceSettings.leave.leave_dialog_title"),
t("SpaceSettings.leave.leave_dialog_message", {space: roomName}),
t("SpaceSettings.leave.leave_space"),
t("Organisms.SpaceSettings.leave.leave_dialog_title"),
t("Organisms.SpaceSettings.leave.leave_dialog_message", {space: roomName}),
t("Organisms.SpaceSettings.leave.leave_space"),
'danger',
);
if (isConfirmed) leave(roomId);
}}
iconSrc={LeaveArrowIC}
>
{t("SpaceSettings.leave.leave_space")}
{t("Organisms.SpaceSettings.leave.leave_space")}
</MenuItem>
</div>
<div className="space-settings__card">
<MenuHeader>{t("SpaceSettings.visibility.header")}</MenuHeader>
<MenuHeader>{t("Organisms.SpaceSettings.visibility.header")}</MenuHeader>
<RoomVisibility roomId={roomId} />
</div>
<div className="space-settings__card">
<MenuHeader>{t("SpaceSettings.addresses.header")}</MenuHeader>
<MenuHeader>{t("Organisms.SpaceSettings.addresses.header")}</MenuHeader>
<RoomAliases roomId={roomId} />
</div>
</>
@ -169,7 +169,7 @@ function SpaceSettings() {
title={(
<Text variant="s1" weight="medium" primary>
{isOpen && twemojify(room.name)}
<span style={{ color: 'var(--tc-surface-low)' }}> {t("SpaceSettings.subtitle")}</span>
<span style={{ color: 'var(--tc-surface-low)' }}> {t("Organisms.SpaceSettings.subtitle")}</span>
</Text>
)}
contentOptions={<IconButton src={CrossIC} onClick={requestClose} tooltip={t("common.close")} />}

View file

@ -56,15 +56,15 @@ function ViewSource() {
const renderViewSource = () => (
<div className="view-source">
{event.isEncrypted() && <ViewSourceBlock title={t("ViewSource.decrypted_source")} json={event.getEffectiveEvent()} />}
<ViewSourceBlock title={t("ViewSource.original_source")} json={event.event} />
{event.isEncrypted() && <ViewSourceBlock title={t("Organisms.ViewSource.decrypted_source")} json={event.getEffectiveEvent()} />}
<ViewSourceBlock title={t("Organisms.ViewSource.original_source")} json={event.event} />
</div>
);
return (
<PopupWindow
isOpen={isOpen}
title={t("ViewSource.title")}
title={t("Organisms.ViewSource.title")}
onAfterClose={handleAfterClose}
onRequestClose={() => setIsOpen(false)}
contentOptions={<IconButton src={CrossIC} onClick={() => setIsOpen(false)} tooltip={t("common.close")} />}

View file

@ -16,8 +16,8 @@ function Welcome() {
<div className="app-welcome flex--center">
<div>
<img className="app-welcome__logo noselect" src={CinnySvg} alt="Cinny logo" />
<Text className="app-welcome__heading" variant="h1" weight="medium" primary>{t('Welcome.heading')}</Text>
<Text className="app-welcome__subheading" variant="s1">{t('Welcome.subheading')}</Text>
<Text className="app-welcome__heading" variant="h1" weight="medium" primary>{t('Organisms.Welcome.heading')}</Text>
<Text className="app-welcome__subheading" variant="s1">{t('Organisms.Welcome.subheading')}</Text>
</div>
</div>
);