Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
# Conflicts: # src/components/AutonomousAgent.ts # src/components/Drawer.tsx
| icon={ | ||
| <FaCog className="transition-transform group-hover:rotate-90" /> | ||
| } | ||
| text={t("SETTINGS_BUTTON")} |
There was a problem hiding this comment.
@Cs4K1Sr4C tagging you here for visibility as you've been doing most of the i18n stuff. A default namespace can be added when using the useTranslationHook. Also in the future we can try and just do t("SETTINGS_BUTTON") instead of doing:
${t("SETTINGS_BUTTON", {
ns: "drawer",
})}`There was a problem hiding this comment.
This all I want to remove in the next PR of i18n updates. I wanted to be sure at the beginning about the collecting of every translationable part should land on the correct file. It was easier to my eyes.
| 'errors' | 'drawer' | ||
|
|
||
|
|
||
| export const translate = (key: string, ns: Namespace | undefined) => { |
There was a problem hiding this comment.
@Cs4K1Sr4C util func for using i18n next outside of the react context.
There was a problem hiding this comment.
Much better, I made almost the same on local 😄
| import {createTRPCRouter, protectedProcedure, publicProcedure} from "../trpc"; | ||
| import {prisma} from "../../db"; | ||
| import {MESSAGE_TYPE_TASK, messageSchema} from "../../../types/agentTypes"; |
There was a problem hiding this comment.
nit: we should have spaces between these braces
There was a problem hiding this comment.
Just setup prettier so hopefully this is no longer an issue.
There was a problem hiding this comment.
Makes the code more airy and more transparent with spaces. It depends on the code prettier settings I guess how it's formatting. If we discuss a fixation about the lookout of these braces then I can follow it in the future as well.
There was a problem hiding this comment.
Totally agree on this one! Will likely be formatting the whole repo to fix this.
| ? t("SIGN_OUT") | ||
| : t("SIGN_IN"); |
There was a problem hiding this comment.
Do we need the drawer namespace here?
There was a problem hiding this comment.
It's set at the hook level above!
There was a problem hiding this comment.
I think it's unnecessary...
Cs4K1Sr4C
left a comment
There was a problem hiding this comment.
All changes are clear for me.
| 'errors' | 'drawer' | ||
|
|
||
|
|
||
| export const translate = (key: string, ns: Namespace | undefined) => { |
There was a problem hiding this comment.
Much better, I made almost the same on local 😄
| ? t("SIGN_OUT") | ||
| : t("SIGN_IN"); |
There was a problem hiding this comment.
I think it's unnecessary...
| import {createTRPCRouter, protectedProcedure, publicProcedure} from "../trpc"; | ||
| import {prisma} from "../../db"; | ||
| import {MESSAGE_TYPE_TASK, messageSchema} from "../../../types/agentTypes"; |
There was a problem hiding this comment.
Makes the code more airy and more transparent with spaces. It depends on the code prettier settings I guess how it's formatting. If we discuss a fixation about the lookout of these braces then I can follow it in the future as well.
| type: MESSAGE_TYPE_SYSTEM, | ||
| value: | ||
| "👉 " + t("CREATE_AN_AGENT_DESCRIPTION", { ns: "chat" }), | ||
| value: "👉 " + t("CREATE_AN_AGENT_DESCRIPTION", { ns: "chat" }), |
There was a problem hiding this comment.
I'll take care all of these translations which have emoticons.
# Conflicts: # src/components/Input.tsx # src/components/TaskWindow.tsx # src/pages/index.tsx
refactoring done on plane :)