Skip to content

Commit

Permalink
frontend/exporer/mini-terminal: convert to FC and translate placehold…
Browse files Browse the repository at this point in the history
…er text
  • Loading branch information
haraldschilly committed Sep 20, 2024
1 parent 9c7363f commit 97ead4c
Show file tree
Hide file tree
Showing 15 changed files with 137 additions and 120 deletions.
10 changes: 7 additions & 3 deletions src/packages/frontend/course/configuration/terminal-command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
Space,
} from "antd";
import { List, Map, fromJS } from "immutable";
import { useState } from "react";
import { useIntl } from "react-intl";

import {
CSS,
Expand All @@ -22,20 +24,22 @@ import {
useActions,
useRedux,
} from "@cocalc/frontend/app-framework";
import { useState } from "react";
import { Gap, Icon } from "@cocalc/frontend/components";
import { labels } from "@cocalc/frontend/i18n";
import { COLORS } from "@cocalc/util/theme";
import { CourseActions } from "../actions";
import { MAX_PARALLEL_TASKS } from "../student-projects/actions";
import { CourseStore, TerminalCommand, TerminalCommandOutput } from "../store";
import { MAX_PARALLEL_TASKS } from "../student-projects/actions";
import { Result } from "../student-projects/run-in-all-projects";

interface Props {
name: string;
}

export const TerminalCommandPanel: React.FC<Props> = React.memo(
(props: Props) => {
const { name } = props;
const intl = useIntl();
const actions = useActions<CourseActions>({ name });
const terminal_command: TerminalCommand | undefined = useRedux(
name,
Expand Down Expand Up @@ -78,7 +82,7 @@ export const TerminalCommandPanel: React.FC<Props> = React.memo(
>
<Input
style={{ fontFamily: "monospace" }}
placeholder="Terminal command..."
placeholder={`${intl.formatMessage(labels.terminal_command)}...`}
onChange={(e) => {
set_field("input", e.target.value);
}}
Expand Down
11 changes: 9 additions & 2 deletions src/packages/frontend/i18n/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,15 @@ export const labels = defineMessages({
connecting: {
id: "labels.connecting",
defaultMessage: "Connecting",
description: "Short label, telling the user a connecting is about to be established."
}
description:
"Short label, telling the user a connecting is about to be established.",
},
terminal_command: {
id: "labels.terminal_command",
defaultMessage: "Terminal command",
description:
"Short label/placeholder for entering a Linux Terminal command in a text box",
},
});

export const menu = defineMessages({
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Unterstützung",
"labels.tabs": "Tabs",
"labels.terminal": "Terminal",
"labels.terminal_command": "Terminalbefehl",
"labels.timetravel": "ZeitReise",
"labels.timetravel_title": "Vollständige Bearbeitungshistorie dieses Dokuments anzeigen",
"labels.undo": "Rückgängig",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Soporte",
"labels.tabs": "Pestañas",
"labels.terminal": "Terminal",
"labels.terminal_command": "Comando de terminal",
"labels.timetravel": "ViajeEnElTiempo",
"labels.timetravel_title": "Mostrar el historial completo de edición de este documento",
"labels.undo": "Deshacer",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Support",
"labels.tabs": "Onglets",
"labels.terminal": "Terminal",
"labels.terminal_command": "Commande terminal",
"labels.timetravel": "VoyageDansLeTemps",
"labels.timetravel_title": "Afficher l'historique complet des modifications de ce document",
"labels.undo": "Annuler",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/he_IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "תמיכה",
"labels.tabs": "כרטיסיות",
"labels.terminal": "טרמינל",
"labels.terminal_command": "פקודת מסוף",
"labels.timetravel": "מסע בזמן",
"labels.timetravel_title": "הצג היסטוריית עריכה מלאה של מסמך זה",
"labels.undo": "בטל",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Supporto",
"labels.tabs": "Schede",
"labels.terminal": "Terminale",
"labels.terminal_command": "Comando terminale",
"labels.timetravel": "ViaggioNelTempo",
"labels.timetravel_title": "Mostra la cronologia completa delle modifiche di questo documento",
"labels.undo": "Annulla",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "サポート",
"labels.tabs": "タブ",
"labels.terminal": "ターミナル",
"labels.terminal_command": "ターミナルコマンド",
"labels.timetravel": "タイムトラベル",
"labels.timetravel_title": "このドキュメントの編集履歴をすべて表示",
"labels.undo": "元に戻す",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ko_KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "지원",
"labels.tabs": "",
"labels.terminal": "터미널",
"labels.terminal_command": "터미널 명령",
"labels.timetravel": "타임트래블",
"labels.timetravel_title": "이 문서의 전체 편집 기록 보기",
"labels.undo": "실행 취소",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Wsparcie",
"labels.tabs": "Karty",
"labels.terminal": "Terminal",
"labels.terminal_command": "Polecenie terminala",
"labels.timetravel": "Podróże w czasie",
"labels.timetravel_title": "Pokaż pełną historię edycji tego dokumentu",
"labels.undo": "Cofnij",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Apoio",
"labels.tabs": "Tabs",
"labels.terminal": "Terminal",
"labels.terminal_command": "Comando do terminal",
"labels.timetravel": "Viagem no Tempo",
"labels.timetravel_title": "Mostrar histórico completo de edição deste documento",
"labels.undo": "Desfazer",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Поддержка",
"labels.tabs": "Вкладки",
"labels.terminal": "Терминал",
"labels.terminal_command": "Команда терминала",
"labels.timetravel": "Путешествие во времени",
"labels.timetravel_title": "Показать полную историю редактирования этого документа",
"labels.undo": "Отменить",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/tr_TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "Destek",
"labels.tabs": "Sekmeler",
"labels.terminal": "Terminal",
"labels.terminal_command": "Terminal komutu",
"labels.timetravel": "ZamanYolculuğu",
"labels.timetravel_title": "Bu belgenin tüm düzenleme geçmişini göster",
"labels.undo": "Geri Al",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@
"labels.support": "支持",
"labels.tabs": "标签",
"labels.terminal": "终端",
"labels.terminal_command": "终端命令",
"labels.timetravel": "过去版本",
"labels.timetravel_title": "显示此文档的完整编辑历史",
"labels.undo": "撤销",
Expand Down
Loading

0 comments on commit 97ead4c

Please sign in to comment.