Skip to content

Commit

Permalink
translations
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Dec 3, 2023
1 parent fd4378e commit 0d0dedc
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const ListOrganizations = () => {
callModal({
title: (
<p>
<span>Edit Meta</span>
<span>Edit Meta </span>
<span className="text-primary">{org.orgName}</span>
</p>
),
Expand Down
15 changes: 10 additions & 5 deletions src/components/organization/editOrgModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import React, { useEffect, useState } from "react";
import { api } from "~/utils/api";
import toast from "react-hot-toast";
import { useModalStore } from "~/utils/store";
// import { useTranslations } from "next-intl";
import { useTranslations } from "next-intl";
import Input from "../elements/input";

interface Iprops {
organizationId: string;
}

const EditOrganizationModal = ({ organizationId }: Iprops) => {
// const t = useTranslations("admin");
const b = useTranslations("commonButtons");
const t = useTranslations("admin");
const [input, setInput] = useState({ orgDescription: "", orgName: "" });
const { closeModal } = useModalStore((state) => state);
const { refetch: refecthAllOrg } = api.org.getAllOrg.useQuery();
Expand All @@ -37,7 +38,9 @@ const EditOrganizationModal = ({ organizationId }: Iprops) => {
<form className="space-y-5 w-full">
<label className="form-control">
<div className="label">
<span className="label-text">Organization Name</span>
<span className="label-text">
{t("organization.listOrganization.organizationName")}
</span>
</div>
<Input
type="text"
Expand All @@ -50,7 +53,9 @@ const EditOrganizationModal = ({ organizationId }: Iprops) => {
</label>
<label className="form-control">
<div className="label">
<span className="label-text">Description</span>
<span className="label-text">
{t("organization.listOrganization.description")}
</span>
</div>
<textarea
placeholder="type here"
Expand Down Expand Up @@ -81,7 +86,7 @@ const EditOrganizationModal = ({ organizationId }: Iprops) => {
type="submit"
className="btn btn-sm"
>
Submit
{b("submit")}
</button>
</form>
);
Expand Down
7 changes: 4 additions & 3 deletions src/components/organization/editUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Iprops {
}

const EditOrganizationUserModal = ({ user, organizationId }: Iprops) => {
const b = useTranslations("commonButtons");
const t = useTranslations("admin");
const [deleted, setDelete] = useState(false);
const [input, setInput] = useState({ name: "" });
Expand Down Expand Up @@ -97,14 +98,14 @@ const EditOrganizationUserModal = ({ user, organizationId }: Iprops) => {
type="submit"
className="btn-sm btn-error btn w-2/6"
>
Kick User
{b("kickUser")}
</button>
<button
onClick={() => setDelete(!deleted)}
type="submit"
className="btn-sm btn w-2/6"
>
Cancle
{b("cancel")}
</button>
</div>
</form>
Expand All @@ -114,7 +115,7 @@ const EditOrganizationUserModal = ({ user, organizationId }: Iprops) => {
type="submit"
className="btn-sm btn btn-error btn-outline"
>
Kick User
{b("kickUser")}
</button>
)}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"inviteUser": "Invite User",
"meta": "Meta",
"users": "Users",
"kickUser": "Kick User",
"deleteOrganization": "Delete Organization",
"userActions": "User Actions",
"options": "Options"
Expand Down
1 change: 1 addition & 0 deletions src/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"inviteUser": "Invitar usuario",
"meta": "Meta",
"users": "Usuarios",
"kickUser": "Expulsar usuario",
"deleteOrganization": "Eliminar organización",
"userActions": "Acciones del usuario",
"options": "Opciones"
Expand Down
1 change: 1 addition & 0 deletions src/locales/no/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"inviteUser": "Inviter Bruker",
"meta": "Meta",
"users": "Brukere",
"kickUser": "Spark Bruker",
"deleteOrganization": "Slett Organisasjon",
"userActions": "Brukerhandlinger",
"options": "Alternativer"
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"inviteUser": "邀请用户",
"meta": "元数据",
"users": "用户",
"kickUser": "踢出用户",
"deleteOrganization": "删除组织",
"userActions": "用户操作",
"options": "选项"
Expand Down

0 comments on commit 0d0dedc

Please sign in to comment.