diff --git a/Claude.md b/Claude.md index bff8ff878d..72793f2818 100644 --- a/Claude.md +++ b/Claude.md @@ -16,7 +16,7 @@ This is a Django + Next.js monorepo. Python/Django backend lives in the root dir - For any frontend content visible to the user, use the translation mechanism used across the whole frontend. `const t = useTranslations()` and then `t("stringKey")` while adding the "stringKey" to all the corresponding language files in `front_end/messages/`: `en.json`, `es.json`, `cs.json`, `pt.json`, `zh.json`, `zh-TW.json`. # Workflow -- When connected to an IDE, check terminal outputs first. If a dev server is already running, do not run a build. Instead, read the dev server terminal output for any latest errors and use those for feedback. +- When connected to an IDE, or have access to a tmux session running node/uv, check terminal outputs first. If a dev server is already running for the project, do not run a build. Instead, read the dev server terminal output for any latest errors and use those for feedback. - When done making code changes, run the relevant linters and formatters based on which files you edited: - Python files: run `uv run ruff format .` and `uv run ruff check .` - Frontend (JS/TS) files: run `cd ./front_end && bun run lint` and `cd ./front_end && bun run format`, and try to build with `cd ./front_end && bun run build` if there is no running dev server in IDE. \ No newline at end of file diff --git a/front_end/messages/cs.json b/front_end/messages/cs.json index 5a1171d0b2..823d1b2382 100644 --- a/front_end/messages/cs.json +++ b/front_end/messages/cs.json @@ -383,6 +383,7 @@ "toggleAllTopics": "Přepnout všechna témata", "toggleNewsAnnotations": "Přepnout anotace zpráv", "Filter": "Filtr", + "sort": "Řadit", "Done": "Hotovo", "Clear": "Vymazat", "predicted": "Předpovězeno", @@ -1021,6 +1022,9 @@ "communitySlugDescription": "Vaše komunita je přístupná přes následující URL:", "communityDescription": "Popis komunity", "contentTranslatedHeaderText": "Některý obsah na této stránce je automaticky přeložen a může být nepřesný.", + "translatedBy": "přeloženo pomocí", + "listLayout": "Zobrazení seznamu", + "gridLayout": "Zobrazení mřížky", "showOriginalContent": "Zobrazit originál", "nextQuestion": "Další otázka", "fullName": "Celé jméno", diff --git a/front_end/messages/en.json b/front_end/messages/en.json index 392a5a4764..b7eb75fb38 100644 --- a/front_end/messages/en.json +++ b/front_end/messages/en.json @@ -601,6 +601,7 @@ "toggleAllTopics": "Toggle all topics", "toggleNewsAnnotations": "Toggle news annotations", "Filter": "Filter", + "sort": "Sort", "done": "done", "clear": "clear", "predicted": "Predicted", @@ -1285,6 +1286,9 @@ "youArePostingAPrivateComment": "You are posting a private comment", "unread": "unread", "contentTranslatedHeaderText": "Some content on this page is automatically translated, and may be inaccurate.", + "translatedBy": "translated by", + "listLayout": "List layout", + "gridLayout": "Grid layout", "showOriginalContent": "Show original", "nextQuestion": "Next Question", "next": "Next", diff --git a/front_end/messages/es.json b/front_end/messages/es.json index ac46d8796e..03fdc0871f 100644 --- a/front_end/messages/es.json +++ b/front_end/messages/es.json @@ -390,6 +390,7 @@ "toggleAllTopics": "Alternar todos los temas", "toggleNewsAnnotations": "Alternar anotaciones de noticias", "Filter": "Filtrar", + "sort": "Ordenar", "Done": "Hecho", "Clear": "Limpiar", "predicted": "Predicho", @@ -1020,6 +1021,9 @@ "communitySlugDescription": "Tu comunidad puede ser accedida a través de la siguiente URL:", "communityDescription": "Descripción de la Comunidad", "contentTranslatedHeaderText": "Parte del contenido en esta página se traduce automáticamente y puede ser inexacto.", + "translatedBy": "traducido por", + "listLayout": "Vista de lista", + "gridLayout": "Vista de cuadrícula", "showOriginalContent": "Mostrar original", "nextQuestion": "Siguiente Pregunta", "fullName": "Nombre Completo", diff --git a/front_end/messages/pt.json b/front_end/messages/pt.json index 8895cd7cc4..44f193ce5c 100644 --- a/front_end/messages/pt.json +++ b/front_end/messages/pt.json @@ -416,6 +416,7 @@ "toggleAllTopics": "Alternar todos os tópicos", "toggleNewsAnnotations": "Alternar anotações de notícias", "Filter": "Filtro", + "sort": "Ordenar", "done": "concluído", "clear": "limpar", "predicted": "Previsto", @@ -974,6 +975,9 @@ "youArePostingAPrivateComment": "Você está postando um comentário privado", "unread": "não lido", "contentTranslatedHeaderText": "Algum conteúdo nesta página foi traduzido automaticamente e pode estar incorreto.", + "translatedBy": "traduzido por", + "listLayout": "Layout de lista", + "gridLayout": "Layout de grade", "showOriginalContent": "Mostrar original", "discard": "Descartar", "onboardingStep4AlmostDone": "Você está quase terminando este tutorial!", diff --git a/front_end/messages/zh-TW.json b/front_end/messages/zh-TW.json index 31dc25025c..b2686d97cc 100644 --- a/front_end/messages/zh-TW.json +++ b/front_end/messages/zh-TW.json @@ -444,6 +444,7 @@ "toggleAllTopics": "切換所有話題", "toggleNewsAnnotations": "切換新聞註釋", "Filter": "篩選", + "sort": "排序", "done": "完成", "clear": "清除", "predicted": "已預測", @@ -1047,6 +1048,9 @@ "youArePostingAPrivateComment": "您正在發佈一則私人評論", "unread": "未讀", "contentTranslatedHeaderText": "此頁面上的部分內容是自動翻譯的,可能不準確。", + "translatedBy": "翻譯提供", + "listLayout": "列表佈局", + "gridLayout": "網格佈局", "showOriginalContent": "顯示原文", "nextQuestion": "下一個問題", "next": "下一步", diff --git a/front_end/messages/zh.json b/front_end/messages/zh.json index a4586eedec..111798e23d 100644 --- a/front_end/messages/zh.json +++ b/front_end/messages/zh.json @@ -387,6 +387,7 @@ "toggleAllTopics": "切換所有主題", "toggleNewsAnnotations": "切换新闻注释", "Filter": "篩選", + "sort": "排序", "Done": "完成", "Clear": "清除", "predicted": "已預測", @@ -1022,6 +1023,9 @@ "communitySlugDescription": "您可以通过以下网址访问您的社区:", "communityDescription": "社区描述", "contentTranslatedHeaderText": "此页面上的一些内容是自动翻译的,可能不准确。", + "translatedBy": "翻译提供", + "listLayout": "列表布局", + "gridLayout": "网格布局", "showOriginalContent": "显示原文", "nextQuestion": "下一问题", "fullName": "全名", diff --git a/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_feed.tsx b/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_feed.tsx index 3a1cf9387a..718592cac2 100644 --- a/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_feed.tsx +++ b/front_end/src/app/(main)/(tournaments)/tournament/components/tournament_feed.tsx @@ -93,6 +93,7 @@ const TournamentFeed: FC = ({ tournament }) => { indexWeights={weights} filters={pageFilters} initialQuestions={questions} + forceLayout="list" /> ); }; diff --git a/front_end/src/app/(main)/accounts/profile/[id]/questions/page.tsx b/front_end/src/app/(main)/accounts/profile/[id]/questions/page.tsx index 5a4a131426..573c6e610f 100644 --- a/front_end/src/app/(main)/accounts/profile/[id]/questions/page.tsx +++ b/front_end/src/app/(main)/accounts/profile/[id]/questions/page.tsx @@ -31,7 +31,7 @@ export default async function Questions(props: Props) { } > - + ); diff --git a/front_end/src/app/(main)/c/[slug]/page.tsx b/front_end/src/app/(main)/c/[slug]/page.tsx index 0f35adae16..b04ce5604e 100644 --- a/front_end/src/app/(main)/c/[slug]/page.tsx +++ b/front_end/src/app/(main)/c/[slug]/page.tsx @@ -95,7 +95,11 @@ export default async function IndividualCommunity(props: Props) { } > - + diff --git a/front_end/src/app/(main)/c/[slug]/settings/page.tsx b/front_end/src/app/(main)/c/[slug]/settings/page.tsx index 90a8d2ed7c..67f5809b54 100644 --- a/front_end/src/app/(main)/c/[slug]/settings/page.tsx +++ b/front_end/src/app/(main)/c/[slug]/settings/page.tsx @@ -60,7 +60,11 @@ export default async function CommunityManagementSettings(props: Props) { } > - + diff --git a/front_end/src/app/(main)/components/content_translated_banner/index.tsx b/front_end/src/app/(main)/components/content_translated_banner/index.tsx index 36af7f6f87..c0834ead72 100644 --- a/front_end/src/app/(main)/components/content_translated_banner/index.tsx +++ b/front_end/src/app/(main)/components/content_translated_banner/index.tsx @@ -32,7 +32,7 @@ const ContentTranslatedBanner: FC<{ forceVisible?: boolean }> = ({ return ( <>
-
+

{t("contentTranslatedHeaderText")}{" "} @@ -48,8 +48,8 @@ const ContentTranslatedBanner: FC<{ forceVisible?: boolean }> = ({

- - translated by + + {t("translatedBy")}
diff --git a/front_end/src/app/(main)/components/footer.tsx b/front_end/src/app/(main)/components/footer.tsx index 61b6c824ca..8bd06f9ac6 100644 --- a/front_end/src/app/(main)/components/footer.tsx +++ b/front_end/src/app/(main)/components/footer.tsx @@ -244,7 +244,7 @@ const Footer: FC<{ hideSelectors?: boolean }> = ({ hideSelectors }) => { const handleContactClick = () => setCurrentModal({ type: "contactUs" }); return ( -