Skip to content

Commit

Permalink
Remove more unused translation keys:
Browse files Browse the repository at this point in the history
- Remove WORKSPACE$LABEL (unused)
- Remove CONNECT_TO_GITHUB_BY_TOKEN_MODAL$TERMS_OF_SERVICE (unused)
  • Loading branch information
openhands-agent committed Jan 6, 2025
1 parent 9645ff8 commit f348cf1
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 8 deletions.
93 changes: 93 additions & 0 deletions 0001-Consolidate-duplicate-translation-keys.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
From 9645ff89770c5c491edd69bc6d944808eb2c90eb Mon Sep 17 00:00:00 2001
From: openhands <[email protected]>
Date: Mon, 6 Jan 2025 23:41:02 +0000
Subject: [PATCH] Consolidate duplicate translation keys:

- Remove CHAT$WHAT_DO_YOU_WANT_TO_BUILD and LANDING$BUILD_PROMPT in favor of SUGGESTIONS$WHAT_TO_BUILD
- Remove unused keys:
- STATUS$CONNECTED_TO_SERVER
- BROWSER$SCREENSHOT and BROWSER$SCREENSHOT_ALT
- SUGGESTIONS$AUTO_MERGE and SUGGESTIONS$AUTO_MERGE_PRS
- USER$AVATAR_PLACEHOLDER (duplicate)
---
frontend/src/components/shared/task-form.tsx | 2 +-
frontend/src/i18n/translation.json | 36 ++------------------
2 files changed, 4 insertions(+), 34 deletions(-)

diff --git a/frontend/src/components/shared/task-form.tsx b/frontend/src/components/shared/task-form.tsx
index 3045244d..741c1f9e 100644
--- a/frontend/src/components/shared/task-form.tsx
+++ b/frontend/src/components/shared/task-form.tsx
@@ -57,7 +57,7 @@ export function TaskForm({ ref }: TaskFormProps) {
return t(I18nKey.LANDING$CHANGE_PROMPT, { repo: selectedRepository });
}

- return t(I18nKey.LANDING$BUILD_PROMPT);
+ return t(I18nKey.SUGGESTIONS$WHAT_TO_BUILD);
}, [selectedRepository]);

const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
diff --git a/frontend/src/i18n/translation.json b/frontend/src/i18n/translation.json
index 1254db07..db1f6bd3 100644
--- a/frontend/src/i18n/translation.json
+++ b/frontend/src/i18n/translation.json
@@ -663,10 +663,7 @@
"tr": "Varsayılanlara Sıfırla",
"ja": "デフォルトにリセット"
},
- "CHAT$WHAT_DO_YOU_WANT_TO_BUILD": {
- "en": "What do you want to build?",
- "ja": "何を開発したいですか?"
- },
+
"STATUS$CONNECTED": {
"en": "Connected",
"ja": "接続済み",
@@ -829,21 +826,7 @@
"no": "Kunne ikke hente modeller og agenter",
"ja": "モデルとエージェントの取得に失敗しました"
},
- "SESSION$SERVER_CONNECTED_MESSAGE": {
- "en": "Connected to server",
- "zh-CN": "已连接到服务器",
- "de": "Verbindung zum Server hergestellt",
- "zh-TW": "已連接到伺服器",
- "es": "Conectado al servidor",
- "fr": "Connecté au serveur",
- "it": "Connesso al server",
- "pt": "Conectado ao servidor",
- "ko-KR": "서버에 연결됨",
- "ar": "تم الاتصال بالخادم",
- "tr": "Sunucuya bağlandı",
- "no": "Koblet til server",
- "ja": "サーバーに接続しました"
- },
+
"SESSION$SESSION_HANDLING_ERROR_MESSAGE": {
"en": "Error handling message",
"zh-CN": "处理消息时发生错误",
@@ -1740,20 +1723,7 @@
"ar": "كتابة سكربت باش يعرض أهم خبر على هاكر نيوز",
"no": "Skriv et bash-script som viser topphistorien på Hacker News"
},
- "LANDING$BUILD_PROMPT": {
- "en": "What do you want to build?",
- "ja": "何を開発したいですか?",
- "zh-CN": "你想构建什么?",
- "zh-TW": "你想構建什麼?",
- "ko-KR": "무엇을 만들고 싶으신가요?",
- "fr": "Que voulez-vous construire ?",
- "es": "¿Qué quieres construir?",
- "de": "Was möchtest du bauen?",
- "it": "Cosa vuoi costruire?",
- "pt": "O que você quer construir?",
- "ar": "ماذا تريد أن تبني؟",
- "no": "Hva vil du bygge?"
- },
+
"LANDING$CHANGE_PROMPT": {
"en": "What would you like to change in {{repo}}?",
"ja": "{{repo}}で何を変更したいですか?",
--
2.39.5

10 changes: 2 additions & 8 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,7 @@
"fr": "Nouveau projet",
"tr": "Yeni Proje"
},
"WORKSPACE$LABEL": {
"en": "Workspace",
"ja": "ワークスペース"
},

"BROWSER$SCREENSHOT": {
"en": "Browser Screenshot",
"ja": "ブラウザのスクリーンショット"
Expand Down Expand Up @@ -2907,10 +2904,7 @@
"en": "By connecting you agree to our",
"es": "Al conectarte tu aceptas nuestros"
},
"CONNECT_TO_GITHUB_BY_TOKEN_MODAL$TERMS_OF_SERVICE": {
"en": "terms of service",
"es": "términos de servicio"
},

"CONNECT_TO_GITHUB_BY_TOKEN_MODAL$CONTINUE": {
"en": "Continue",
"es": "Continuar"
Expand Down

0 comments on commit f348cf1

Please sign in to comment.