Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb1d02e2

Browse files
aslilacpull[bot]
authored andcommitted
chore: remove i18next (#9608)
1 parent546d935 commitb1d02e2

File tree

110 files changed

+549
-1496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+549
-1496
lines changed

‎site/.storybook/preview.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { withRouter } from "storybook-addon-react-router-v6";
44
import{HelmetProvider}from"react-helmet-async";
55
import{dark}from"../src/theme";
66
import"../src/theme/globalFonts";
7-
import"../src/i18n";
87
import{QueryClient,QueryClientProvider}from"@tanstack/react-query";
98

109
exportconstdecorators=[

‎site/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
"eventsourcemock":"2.0.0",
7070
"formik":"2.4.1",
7171
"front-matter":"4.0.2",
72-
"i18next":"22.5.0",
7372
"jest-environment-jsdom":"29.5.0",
7473
"lodash":"4.17.21",
7574
"monaco-editor":"0.41.0",
@@ -82,7 +81,6 @@
8281
"react-dom":"18.2.0",
8382
"react-headless-tabs":"6.0.3",
8483
"react-helmet-async":"1.3.0",
85-
"react-i18next":"12.2.2",
8684
"react-markdown":"8.0.3",
8785
"react-router-dom":"6.15.0",
8886
"react-syntax-highlighter":"15.5.0",

‎site/pnpm-lock.yaml

Lines changed: 0 additions & 43 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/@types/i18n.d.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎site/src/components/Dialogs/DeleteDialog/DeleteDialog.test.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import{screen}from"@testing-library/react";
22
importuserEventfrom"@testing-library/user-event";
3-
importi18nextfrom"i18next";
43
import{render}from"testHelpers/renderHelpers";
54
import{DeleteDialog}from"./DeleteDialog";
65

@@ -20,7 +19,6 @@ describe("DeleteDialog", () => {
2019
});
2120

2221
it("disables confirm button when the text field is filled incorrectly",async()=>{
23-
const{ t}=i18next;
2422
render(
2523
<DeleteDialog
2624
isOpen
@@ -30,18 +28,13 @@ describe("DeleteDialog", () => {
3028
name="MyTemplate"
3129
/>,
3230
);
33-
constlabelText=t("deleteDialog.confirmLabel",{
34-
ns:"common",
35-
entity:"template",
36-
});
37-
consttextField=screen.getByLabelText(labelText);
31+
consttextField=screen.getByTestId("delete-dialog-name-confirmation");
3832
awaituserEvent.type(textField,"MyTemplateWrong");
3933
constconfirmButton=screen.getByRole("button",{name:"Delete"});
4034
expect(confirmButton).toBeDisabled();
4135
});
4236

4337
it("enables confirm button when the text field is filled correctly",async()=>{
44-
const{ t}=i18next;
4538
render(
4639
<DeleteDialog
4740
isOpen
@@ -51,11 +44,7 @@ describe("DeleteDialog", () => {
5144
name="MyTemplate"
5245
/>,
5346
);
54-
constlabelText=t("deleteDialog.confirmLabel",{
55-
ns:"common",
56-
entity:"template",
57-
});
58-
consttextField=screen.getByLabelText(labelText);
47+
consttextField=screen.getByTestId("delete-dialog-name-confirmation");
5948
awaituserEvent.type(textField,"MyTemplate");
6049
constconfirmButton=screen.getByRole("button",{name:"Delete"});
6150
expect(confirmButton).not.toBeDisabled();

‎site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import makeStyles from "@mui/styles/makeStyles";
22
importTextFieldfrom"@mui/material/TextField";
33
import{Maybe}from"components/Conditionals/Maybe";
44
import{ChangeEvent,useState,PropsWithChildren,FC}from"react";
5-
import{useTranslation}from"react-i18next";
65
import{ConfirmDialog}from"../ConfirmDialog/ConfirmDialog";
76

87
exportinterfaceDeleteDialogProps{
@@ -25,7 +24,6 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
2524
confirmLoading,
2625
})=>{
2726
conststyles=useStyles();
28-
const{ t}=useTranslation("common");
2927
const[nameValue,setNameValue]=useState("");
3028
constconfirmed=name===nameValue;
3129
consthandleChange=(event:ChangeEvent<HTMLInputElement>)=>{
@@ -35,11 +33,12 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
3533

3634
constcontent=(
3735
<>
38-
<p>{t("deleteDialog.intro",{entity})}</p>
36+
<p>Deleting this{entity} is irreversible!</p>
3937
<Maybecondition={info!==undefined}>
4038
<pclassName={styles.warning}>{info}</p>
4139
</Maybe>
42-
<p>{t("deleteDialog.confirm",{ entity, name})}</p>
40+
<p>Are you sure you want to proceed?</p>
41+
<p>Type{name} below to confirm.</p>
4342

4443
<form
4544
onSubmit={(e)=>{
@@ -59,9 +58,12 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
5958
placeholder={name}
6059
value={nameValue}
6160
onChange={handleChange}
62-
label={t("deleteDialog.confirmLabel",{ entity})}
61+
label={`Name of the${entity} to delete`}
6362
error={hasError}
64-
helperText={hasError&&t("deleteDialog.incorrectName",{ entity})}
63+
helperText={
64+
hasError&&`${nameValue} does not match the name of this${entity}`
65+
}
66+
inputProps={{["data-testid"]:"delete-dialog-name-confirmation"}}
6567
/>
6668
</form>
6769
</>
@@ -72,7 +74,7 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
7274
type="delete"
7375
hideCancel={false}
7476
open={isOpen}
75-
title={t("deleteDialog.title",{entity})}
77+
title={`Delete${entity}`}
7678
onConfirm={onConfirm}
7779
onClose={onCancel}
7880
description={content}

‎site/src/components/Expander/Expander.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
}from"components/DropdownArrows/DropdownArrows";
77
import{PropsWithChildren,FC}from"react";
88
importCollapsefrom"@mui/material/Collapse";
9-
import{useTranslation}from"react-i18next";
109
import{combineClasses}from"utils/combineClasses";
1110

1211
exportinterfaceExpanderProps{
@@ -20,7 +19,6 @@ export const Expander: FC<PropsWithChildren<ExpanderProps>> = ({
2019
children,
2120
})=>{
2221
conststyles=useStyles();
23-
const{ t}=useTranslation("common");
2422

2523
consttoggleExpanded=()=>setExpanded(!expanded);
2624

@@ -29,7 +27,7 @@ export const Expander: FC<PropsWithChildren<ExpanderProps>> = ({
2927
{!expanded&&(
3028
<LinkonClick={toggleExpanded}className={styles.expandLink}>
3129
<spanclassName={styles.text}>
32-
{t("ctas.expand")}
30+
Click here to learn more
3331
<OpenDropdownmargin={false}/>
3432
</span>
3533
</Link>
@@ -43,7 +41,7 @@ export const Expander: FC<PropsWithChildren<ExpanderProps>> = ({
4341
className={combineClasses([styles.expandLink,styles.collapseLink])}
4442
>
4543
<spanclassName={styles.text}>
46-
{t("ctas.collapse")}
44+
Click here to hide
4745
<CloseDropdownmargin={false}/>
4846
</span>
4947
</Link>

‎site/src/components/IconField/IconField.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useRef, FC, useState } from "react";
77
importPickerfrom"@emoji-mart/react";
88
import{makeStyles}from"@mui/styles";
99
import{colors}from"theme/colors";
10-
import{useTranslation}from"react-i18next";
1110
importdatafrom"@emoji-mart/data/sets/14/twitter.json";
1211
import{Stack}from"components/Stack/Stack";
1312

@@ -26,15 +25,14 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
2625
conststyles=useStyles();
2726
constemojiButtonRef=useRef<HTMLButtonElement>(null);
2827
const[isEmojiPickerOpen,setIsEmojiPickerOpen]=useState(false);
29-
const{ t}=useTranslation("templateSettingsPage");
3028
consthasIcon=textFieldProps.value&&textFieldProps.value!=="";
3129

3230
return(
3331
<Stackspacing={1}>
3432
<TextField
3533
{...textFieldProps}
3634
fullWidth
37-
label={t("iconLabel")}
35+
label="Icon"
3836
InputProps={{
3937
endAdornment:hasIcon ?(
4038
<InputAdornmentposition="end"className={styles.adornment}>
@@ -59,7 +57,7 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
5957
setIsEmojiPickerOpen((v)=>!v);
6058
}}
6159
>
62-
{t("selectEmoji")}
60+
Select emoji
6361
</Button>
6462

6563
<Popover

‎site/src/components/Resources/AgentOutdatedTooltip.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
}from"components/HelpTooltip/HelpTooltip";
1212
import{WorkspaceAgent}from"api/typesGenerated";
1313
import{Stack}from"components/Stack/Stack";
14-
import{useTranslation}from"react-i18next";
1514

1615
typeAgentOutdatedTooltipProps=ComponentProps<typeofHelpPopover>&{
1716
agent:WorkspaceAgent;
@@ -30,7 +29,6 @@ export const AgentOutdatedTooltip: FC<AgentOutdatedTooltipProps> = ({
3029
anchorEl,
3130
})=>{
3231
conststyles=useStyles();
33-
const{ t}=useTranslation("workspacePage");
3432

3533
return(
3634
<HelpPopover
@@ -43,25 +41,21 @@ export const AgentOutdatedTooltip: FC<AgentOutdatedTooltipProps> = ({
4341
<HelpTooltipContext.Providervalue={{ open, onClose}}>
4442
<Stackspacing={1}>
4543
<div>
46-
<HelpTooltipTitle>
47-
{t("agentOutdatedTooltip.title")}
48-
</HelpTooltipTitle>
44+
<HelpTooltipTitle>Agent Outdated</HelpTooltipTitle>
4945
<HelpTooltipText>
50-
{t("agentOutdatedTooltip.description")}
46+
This agent is an older version than the Coder server. This can
47+
happen after you update Coder with running workspaces. To fix
48+
this, you can stop and start the workspace.
5149
</HelpTooltipText>
5250
</div>
5351

5452
<Stackspacing={0.5}>
55-
<spanclassName={styles.versionLabel}>
56-
{t("agentOutdatedTooltip.agentVersionLabel")}
57-
</span>
53+
<spanclassName={styles.versionLabel}>Agent version</span>
5854
<span>{agent.version}</span>
5955
</Stack>
6056

6157
<Stackspacing={0.5}>
62-
<spanclassName={styles.versionLabel}>
63-
{t("agentOutdatedTooltip.serverVersionLabel")}
64-
</span>
58+
<spanclassName={styles.versionLabel}>Server version</span>
6559
<span>{serverVersion}</span>
6660
</Stack>
6761

@@ -71,7 +65,7 @@ export const AgentOutdatedTooltip: FC<AgentOutdatedTooltipProps> = ({
7165
onClick={onUpdate}
7266
ariaLabel="Update workspace"
7367
>
74-
{t("agentOutdatedTooltip.updateWorkspaceLabel")}
68+
Update workspace
7569
</HelpTooltipAction>
7670
</HelpTooltipLinksGroup>
7771
</Stack>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp