Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✈️ Plane #488

Merged
merged 11 commits into from May 9, 2023
Merged

✈️ Plane #488

merged 11 commits into from May 9, 2023

Conversation

awtkns
Copy link
Contributor

@awtkns awtkns commented May 9, 2023

refactoring done on plane :)

@vercel
Copy link

vercel bot commented May 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2023 6:19pm

awtkns added 2 commits May 9, 2023 18:27
# Conflicts:
#	src/components/AutonomousAgent.ts
#	src/components/Drawer.tsx
icon={
<FaCog className="transition-transform group-hover:rotate-90" />
}
text={t("SETTINGS_BUTTON")}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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",
})}`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cs4K1Sr4C util func for using i18n next outside of the react context.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, I made almost the same on local 😄

Comment on lines 3 to 5
import {createTRPCRouter, protectedProcedure, publicProcedure} from "../trpc";
import {prisma} from "../../db";
import {MESSAGE_TYPE_TASK, messageSchema} from "../../../types/agentTypes";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we should have spaces between these braces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just setup prettier so hopefully this is no longer an issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree on this one! Will likely be formatting the whole repo to fix this.

Comment on lines +269 to +270
? t("SIGN_OUT")
: t("SIGN_IN");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the drawer namespace here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set at the hook level above!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's unnecessary...

Copy link
Contributor

@Cs4K1Sr4C Cs4K1Sr4C left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes are clear for me.

'errors' | 'drawer'


export const translate = (key: string, ns: Namespace | undefined) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better, I made almost the same on local 😄

Comment on lines +269 to +270
? t("SIGN_OUT")
: t("SIGN_IN");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's unnecessary...

Comment on lines 3 to 5
import {createTRPCRouter, protectedProcedure, publicProcedure} from "../trpc";
import {prisma} from "../../db";
import {MESSAGE_TYPE_TASK, messageSchema} from "../../../types/agentTypes";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@@ -143,29 +142,19 @@ const ChatWindow = ({
<ChatMessage
message={{
type: MESSAGE_TYPE_SYSTEM,
value:
"👉 " + t("CREATE_AN_AGENT_DESCRIPTION", { ns: "chat" }),
value: "👉 " + t("CREATE_AN_AGENT_DESCRIPTION", { ns: "chat" }),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take care all of these translations which have emoticons.

awtkns added 2 commits May 9, 2023 21:17
# Conflicts:
#	src/components/Input.tsx
#	src/components/TaskWindow.tsx
#	src/pages/index.tsx
@awtkns awtkns merged commit edbab36 into main May 9, 2023
5 checks passed
@awtkns awtkns deleted the plane branch May 11, 2023 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants