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

chore: remove i18next#9608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 67 commits intomainfromaxe-i18next
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
67 commits
Select commitHold shift + click to select a range
0b0725c
remove i18next packages
aslilacSep 8, 2023
6a585bc
remove provider
aslilacSep 8, 2023
7e63f30
refactor `DeleteDialog`
aslilacSep 8, 2023
6636ed7
refactor `Expander`
aslilacSep 8, 2023
202c9fa
refactor `IconField`
aslilacSep 8, 2023
18c04b4
refactor `AgentOutdatedTooltip`
aslilacSep 8, 2023
9d93117
refactor `AgentRowPreview`
aslilacSep 8, 2023
8d79655
refactor `AgentStatus`
aslilacSep 8, 2023
9164286
refactor `ShareIcon`
aslilacSep 8, 2023
7ff932b
refactor `UserAutocomplete`
aslilacSep 8, 2023
9ae7372
remove stale comment
aslilacSep 8, 2023
6678f40
refactor `AuditPageView`
aslilacSep 8, 2023
fc043ed
refactor `AuditPaywall`
aslilacSep 8, 2023
3eb8d69
`AuditLogRow`
aslilacSep 8, 2023
b57d555
refactor `AuditLogDescription`
aslilacSep 8, 2023
b27f918
refactor `BuildAuditDescription`
aslilacSep 8, 2023
f0a9296
refactor `CreateTemplateForm`
aslilacSep 8, 2023
61fdfe5
refactor `CreateTemplatePage`
aslilacSep 8, 2023
f769e69
refactor `TemplateUpload`
aslilacSep 8, 2023
3127d57
refactor `CreateTokenForm`
aslilacSep 8, 2023
9c76a7b
refactor `CreateTokenPage`
aslilacSep 8, 2023
16a3f21
refactor `CreateWorkspacePageView`
aslilacSep 8, 2023
026ddaa
refactor `AppearanceSettingsPageView`
aslilacSep 8, 2023
5784b91
refactor `SettingsGroupPageView`
aslilacSep 8, 2023
f5cb010
refactor utils.ts
aslilacSep 8, 2023
b1d8c5c
refactor `VersionRow`
aslilacSep 8, 2023
b448bb0
refactor `TemplateSettingsForm`
aslilacSep 8, 2023
39438e1
refactor `LoginPage` and `SignInForm`
aslilacSep 8, 2023
adbb256
refactor `StarterTemplatePageView`
aslilacSep 8, 2023
0f181e8
refactor `StarterTemplatesPage`
aslilacSep 8, 2023
5800e18
refactor `Workspace`
aslilacSep 8, 2023
7278c0d
refactor `EditRolesButton`
aslilacSep 8, 2023
78b7cc0
refactor `TemplateScheduleForm`
aslilacSep 8, 2023
29652ea
refactor `TemplateVariableField`
aslilacSep 8, 2023
337c21d
refactor `EmptyTemplates`
aslilacSep 8, 2023
89867ff
refactor `TemplateVariablesPage`
aslilacSep 8, 2023
5e71acb
refactor `userSecuritySettingsXService`
aslilacSep 8, 2023
46cddf5
refactor `ConfirmDeleteDialog`
aslilacSep 8, 2023
633e574
refactor workspace.tsx
aslilacSep 8, 2023
76c78ea
refactor `WorkspaceDeletedBanner`
aslilacSep 8, 2023
90165f7
refactor `TokensPage`
aslilacSep 8, 2023
4dde5f2
refactor formHelpers.tsx
aslilacSep 8, 2023
61e7571
refactor `UsersTableBody`
aslilacSep 8, 2023
106a6fe
refactor `TemplateSettingsPage`
aslilacSep 8, 2023
b2d644f
refactor `AutostopRequirementHelperText`
aslilacSep 8, 2023
441803b
refactor `TemplateVariablesForm`
aslilacSep 8, 2023
8ec0f96
refactor `TemplateVersionPage`
aslilacSep 8, 2023
72abadb
remove stale comment
aslilacSep 8, 2023
ef93712
refactor `TokensPageView`
aslilacSep 8, 2023
32252f3
refactor `BuildRow`
aslilacSep 8, 2023
66da852
refactor `WorkspaceReadyPage`
aslilacSep 8, 2023
87a1654
refactor `WorkspacesTable`
aslilacSep 8, 2023
2ab4c40
refactor `useValidationSchemaForRichParameters`
aslilacSep 8, 2023
9a4ba70
refactor `UpdateBuildParametersDialog`
aslilacSep 8, 2023
1440b5a
refactor `WorkspaceSchedulePage`
aslilacSep 8, 2023
d1a2905
refactor `WorkspaceParametersForm`
aslilacSep 8, 2023
622ce4a
refactor `WorkspaceSettingsPageView`
aslilacSep 8, 2023
bd51244
refactor `CreateWorkspacePage` test
aslilacSep 8, 2023
f1c5909
refactor all the remaining tests
aslilacSep 8, 2023
4e26e98
refactor `TTLHelperText`
aslilacSep 8, 2023
1ee252d
stragglers
aslilacSep 8, 2023
a85cd71
linting
aslilacSep 8, 2023
4a7b127
fix tests
aslilacSep 8, 2023
366d513
remove remaining translation files
aslilacSep 8, 2023
7359de0
fix storybook build
aslilacSep 8, 2023
45c3335
Merge branch 'main' into axe-i18next
aslilacSep 11, 2023
9216208
fix a couple stories
aslilacSep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletionsite/.storybook/preview.jsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@ import { withRouter } from "storybook-addon-react-router-v6";
import { HelmetProvider } from "react-helmet-async";
import { dark } from "../src/theme";
import "../src/theme/globalFonts";
import "../src/i18n";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

export const decorators = [
Expand Down
2 changes: 0 additions & 2 deletionssite/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -69,7 +69,6 @@
"eventsourcemock": "2.0.0",
"formik": "2.4.1",
"front-matter": "4.0.2",
"i18next": "22.5.0",
"jest-environment-jsdom": "29.5.0",
"lodash": "4.17.21",
"monaco-editor": "0.41.0",
Expand All@@ -82,7 +81,6 @@
"react-dom": "18.2.0",
"react-headless-tabs": "6.0.3",
"react-helmet-async": "1.3.0",
"react-i18next": "12.2.2",
"react-markdown": "8.0.3",
"react-router-dom": "6.15.0",
"react-syntax-highlighter": "15.5.0",
Expand Down
43 changes: 0 additions & 43 deletionssite/pnpm-lock.yaml
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

10 changes: 0 additions & 10 deletionssite/src/@types/i18n.d.ts
View file
Open in desktop

This file was deleted.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
import { screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import i18next from "i18next";
import { render } from "testHelpers/renderHelpers";
import { DeleteDialog } from "./DeleteDialog";

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

it("disables confirm button when the text field is filled incorrectly", async () => {
const { t } = i18next;
render(
<DeleteDialog
isOpen
Expand All@@ -30,18 +28,13 @@ describe("DeleteDialog", () => {
name="MyTemplate"
/>,
);
const labelText = t("deleteDialog.confirmLabel", {
ns: "common",
entity: "template",
});
const textField = screen.getByLabelText(labelText);
const textField = screen.getByTestId("delete-dialog-name-confirmation");
await userEvent.type(textField, "MyTemplateWrong");
const confirmButton = screen.getByRole("button", { name: "Delete" });
expect(confirmButton).toBeDisabled();
});

it("enables confirm button when the text field is filled correctly", async () => {
const { t } = i18next;
render(
<DeleteDialog
isOpen
Expand All@@ -51,11 +44,7 @@ describe("DeleteDialog", () => {
name="MyTemplate"
/>,
);
const labelText = t("deleteDialog.confirmLabel", {
ns: "common",
entity: "template",
});
const textField = screen.getByLabelText(labelText);
const textField = screen.getByTestId("delete-dialog-name-confirmation");
await userEvent.type(textField, "MyTemplate");
const confirmButton = screen.getByRole("button", { name: "Delete" });
expect(confirmButton).not.toBeDisabled();
Expand Down
16 changes: 9 additions & 7 deletionssite/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,6 @@ import makeStyles from "@mui/styles/makeStyles";
import TextField from "@mui/material/TextField";
import { Maybe } from "components/Conditionals/Maybe";
import { ChangeEvent, useState, PropsWithChildren, FC } from "react";
import { useTranslation } from "react-i18next";
import { ConfirmDialog } from "../ConfirmDialog/ConfirmDialog";

export interface DeleteDialogProps {
Expand All@@ -25,7 +24,6 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
confirmLoading,
}) => {
const styles = useStyles();
const { t } = useTranslation("common");
const [nameValue, setNameValue] = useState("");
const confirmed = name === nameValue;
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
Expand All@@ -35,11 +33,12 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({

const content = (
<>
<p>{t("deleteDialog.intro", {entity })}</p>
<p>Deleting this {entity} is irreversible!</p>
<Maybe condition={info !== undefined}>
<p className={styles.warning}>{info}</p>
</Maybe>
<p>{t("deleteDialog.confirm", { entity, name })}</p>
<p>Are you sure you want to proceed?</p>
<p>Type {name} below to confirm.</p>

<form
onSubmit={(e) => {
Expand All@@ -59,9 +58,12 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
placeholder={name}
value={nameValue}
onChange={handleChange}
label={t("deleteDialog.confirmLabel", { entity })}
label={`Name of the ${entity} to delete`}
error={hasError}
helperText={hasError && t("deleteDialog.incorrectName", { entity })}
helperText={
hasError && `${nameValue} does not match the name of this ${entity}`
}
inputProps={{ ["data-testid"]: "delete-dialog-name-confirmation" }}
/>
</form>
</>
Expand All@@ -72,7 +74,7 @@ export const DeleteDialog: FC<PropsWithChildren<DeleteDialogProps>> = ({
type="delete"
hideCancel={false}
open={isOpen}
title={t("deleteDialog.title", {entity })}
title={`Delete ${entity}`}
onConfirm={onConfirm}
onClose={onCancel}
description={content}
Expand Down
6 changes: 2 additions & 4 deletionssite/src/components/Expander/Expander.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,6 @@ import {
} from "components/DropdownArrows/DropdownArrows";
import { PropsWithChildren, FC } from "react";
import Collapse from "@mui/material/Collapse";
import { useTranslation } from "react-i18next";
import { combineClasses } from "utils/combineClasses";

export interface ExpanderProps {
Expand All@@ -20,7 +19,6 @@ export const Expander: FC<PropsWithChildren<ExpanderProps>> = ({
children,
}) => {
const styles = useStyles();
const { t } = useTranslation("common");

const toggleExpanded = () => setExpanded(!expanded);

Expand All@@ -29,7 +27,7 @@ export const Expander: FC<PropsWithChildren<ExpanderProps>> = ({
{!expanded && (
<Link onClick={toggleExpanded} className={styles.expandLink}>
<span className={styles.text}>
{t("ctas.expand")}
Click here to learn more
<OpenDropdown margin={false} />
</span>
</Link>
Expand All@@ -43,7 +41,7 @@ export const Expander: FC<PropsWithChildren<ExpanderProps>> = ({
className={combineClasses([styles.expandLink, styles.collapseLink])}
>
<span className={styles.text}>
{t("ctas.collapse")}
Click here to hide
<CloseDropdown margin={false} />
</span>
</Link>
Expand Down
6 changes: 2 additions & 4 deletionssite/src/components/IconField/IconField.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,6 @@ import { useRef, FC, useState } from "react";
import Picker from "@emoji-mart/react";
import { makeStyles } from "@mui/styles";
import { colors } from "theme/colors";
import { useTranslation } from "react-i18next";
import data from "@emoji-mart/data/sets/14/twitter.json";
import { Stack } from "components/Stack/Stack";

Expand All@@ -26,15 +25,14 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
const styles = useStyles();
const emojiButtonRef = useRef<HTMLButtonElement>(null);
const [isEmojiPickerOpen, setIsEmojiPickerOpen] = useState(false);
const { t } = useTranslation("templateSettingsPage");
const hasIcon = textFieldProps.value && textFieldProps.value !== "";

return (
<Stack spacing={1}>
<TextField
{...textFieldProps}
fullWidth
label={t("iconLabel")}
label="Icon"
InputProps={{
endAdornment: hasIcon ? (
<InputAdornment position="end" className={styles.adornment}>
Expand All@@ -59,7 +57,7 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
setIsEmojiPickerOpen((v) => !v);
}}
>
{t("selectEmoji")}
Select emoji
</Button>

<Popover
Expand Down
20 changes: 7 additions & 13 deletionssite/src/components/Resources/AgentOutdatedTooltip.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,6 @@ import {
} from "components/HelpTooltip/HelpTooltip";
import { WorkspaceAgent } from "api/typesGenerated";
import { Stack } from "components/Stack/Stack";
import { useTranslation } from "react-i18next";

type AgentOutdatedTooltipProps = ComponentProps<typeof HelpPopover> & {
agent: WorkspaceAgent;
Expand All@@ -30,7 +29,6 @@ export const AgentOutdatedTooltip: FC<AgentOutdatedTooltipProps> = ({
anchorEl,
}) => {
const styles = useStyles();
const { t } = useTranslation("workspacePage");

return (
<HelpPopover
Expand All@@ -43,25 +41,21 @@ export const AgentOutdatedTooltip: FC<AgentOutdatedTooltipProps> = ({
<HelpTooltipContext.Provider value={{ open, onClose }}>
<Stack spacing={1}>
<div>
<HelpTooltipTitle>
{t("agentOutdatedTooltip.title")}
</HelpTooltipTitle>
<HelpTooltipTitle>Agent Outdated</HelpTooltipTitle>
<HelpTooltipText>
{t("agentOutdatedTooltip.description")}
This agent is an older version than the Coder server. This can
happen after you update Coder with running workspaces. To fix
this, you can stop and start the workspace.
</HelpTooltipText>
</div>

<Stack spacing={0.5}>
<span className={styles.versionLabel}>
{t("agentOutdatedTooltip.agentVersionLabel")}
</span>
<span className={styles.versionLabel}>Agent version</span>
<span>{agent.version}</span>
</Stack>

<Stack spacing={0.5}>
<span className={styles.versionLabel}>
{t("agentOutdatedTooltip.serverVersionLabel")}
</span>
<span className={styles.versionLabel}>Server version</span>
<span>{serverVersion}</span>
</Stack>

Expand All@@ -71,7 +65,7 @@ export const AgentOutdatedTooltip: FC<AgentOutdatedTooltipProps> = ({
onClick={onUpdate}
ariaLabel="Update workspace"
>
{t("agentOutdatedTooltip.updateWorkspaceLabel")}
Update workspace
</HelpTooltipAction>
</HelpTooltipLinksGroup>
</Stack>
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp