Skip to content

Commit

Permalink
Some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lupusA committed Mar 12, 2024
1 parent 07d2d11 commit de5d777
Show file tree
Hide file tree
Showing 3 changed files with 160 additions and 159 deletions.
212 changes: 106 additions & 106 deletions public/locales/ru/translation.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
{
"tab.preferences":"Preferences",
"tab.repository":"Repository",
"tab.tasks":"Tasks",
"tab.policies":"Policies",
"tab.snapshots":"Snapshots",

"task.all":"All",
"task.running":"Running",
"task.failed":"Failed",
"task.loading": "Loading...",
"task.header.time.start": "Start time",
"task.header.status": "Status",
"task.header.kind": "Kind",
"task.header.description": "Description",
"task.feedback.search": "Search logs by description",
"task.feedback.entries": "A list of tasks will appear here when you create snapshots, restore, run maintenance, etc.",

"task.status.succeed.after": "Task succeeded after",
"task.status.canceled": "Task canceled after",
"task.status.canceling": "Canceling",
"task.status.error": "Task error",
"task.status.running.for": "Task running for",

"task.status.started": "Started",
"task.status.finished": "Finished",
"task.logs": "Logs",

"task.event.stop": "Stop",
"task.header.counter": "Counter",
"task.header.value": "Value",

"snapshot.header.actions": "Actions",
"snapshot.header.status": "Status",
"snapshot.header.snapshot.next":"Next Snapshot",
"snapshot.header.snapshot.last":"Last Snapshot",
"snapshot.header.snapshot.size":"Size",
"snapshot.header.snapshot.owner":"Owner",
"snapshot.header.snapshot.path":"Path",

"snapshot.event.snapshot.now": "Snapshot Now",
"snapshot.event.snapshot.policy": "Policy",
"snapshot.event.snapshot.pending": "Pending",
"snapshot.feedback.snapshot.start": "Snapshot will start after the previous snapshot completes",
"snapshot.event.snapshot.new": "New Snapshot",

"snapshot.event.synchronize":"Synchronize",

"repository.status.initializing": "Initializing repository...",
"repository.status.connected": "Connected to repository",
"repository.event.connection.cancel":"Cancel connection",
"repository.event.connection.disconnect": "Disconnect from repository",
"repository.event.description.update": "Update description",

"repository.feedback.description.required":"Repository description is required",
"repository.feedback.read.only": "Repository is read-only",
"repository.feedback.eco.disabled":"Disabled",
"repository.feedback.compression.internal.supported": "yes",
"repository.feedback.compression.internal.not.supported": "no",

"repository.attribute.server.url": "Server URL",
"repository.attribute.config.file": "Config file",
"repository.attribute.provider": "Provider",
"repository.attribute.algorithm.encryption": "Encryption algorithm",
"repository.attribute.algorithm.hash": "Hash algorithm",
"repository.attribute.algorithm.splitter": "Splitter algorithm",
"repository.attribute.algorithm.eco": "Error correction algorithm",

"repository.attribute.connected.as": "Connected as",
"repository.attribute.compression.internal": "Internal compression",
"repository.attribute.format": "Repository format",
"repository.attribute.eco": "Error correction overhead",

"log.event.hide": "Hide log",
"log.event.show": "Show log",

"user.interface": "User interface",
"user.interface.appearance":"Appearance",
"user.interface.appearance.hint":"Select font size",
"user.interface.appearance.help": "Specifies the appearance of the user interface",

"user.interface.appearance.small":"small",
"user.interface.appearance.medium":"medium",
"user.interface.appearance.large":"large",

"user.interface.pagesize.description": "Page size",
"user.interface.pagesize.help": "Specifies the pagination size in tables",
"user.interface.pagesize.hint": "Page size",

"user.interface.byte.representation.description":"Select byte representation",
"user.interface.byte.representation.select":"Select byte representation",
"user.interface.byte.representation.help":"Specifies the representation of bytes",

"user.language":"Language",

"lang.help": "Sets the language for the user interface",
"lang.select": "Select language",
"lang.description": "Select the language",

"theme.description": "Theme",
"theme.select": "Select theme",
"theme.help": "The current active theme",
"theme.dark":"dark",
"theme.light": "light",
"theme.pastel": "pastel",
"theme.ocean":"ocean"
}
"tab.preferences": "Настройки",
"tab.repository": "Репозиторий",
"tab.tasks": "Задачи",
"tab.policies": "Политики",
"tab.snapshots": "Снимки",

"task.all": "Все",
"task.running": "Выполняются",
"task.failed": "Не удалось",
"task.loading": "Загрузка...",
"task.header.time.start": "Время начала",
"task.header.status": "Статус",
"task.header.kind": "Тип",
"task.header.description": "Описание",
"task.feedback.search": "Поиск по описанию",
"task.feedback.entries": "Список задач появится здесь при создании снимков, восстановлении, выполнении обслуживания и т. д.",
"task.status.succeed.after": "Задача успешно завершена после",
"task.status.canceled": "Задача отменена после",
"task.status.canceling": "Отмена",
"task.status.error": "Ошибка задачи",
"task.status.running.for": "Задача выполняется в течение",

"task.status.started": "Начало",
"task.status.finished": "Завершено",
"task.logs": "Логи",

"task.event.stop": "Остановить",
"task.header.counter": "Счетчик",
"task.header.value": "Значение",

"snapshot.header.actions": "Действия",
"snapshot.header.status": "Статус",
"snapshot.header.snapshot.next": "Следующий снимок",
"snapshot.header.snapshot.last": "Последний снимок",
"snapshot.header.snapshot.size": "Размер",
"snapshot.header.snapshot.owner": "Владелец",
"snapshot.header.snapshot.path": "Путь",

"snapshot.event.snapshot.now": "Сделать снимок сейчас",
"snapshot.event.snapshot.policy": "Политика",
"snapshot.event.snapshot.pending": "Ожидание",
"snapshot.feedback.snapshot.start": "Снимок начнется после завершения предыдущего снимка",
"snapshot.event.snapshot.new": "Новый снимок",

"snapshot.event.synchronize": "Синхронизировать",

"repository.status.initializing": "Инициализация репозитория...",
"repository.status.connected": "Подключено к репозиторию",
"repository.event.connection.cancel": "Отменить подключение",
"repository.event.connection.disconnect": "Отключиться от репозитория",
"repository.event.description.update": "Обновить описание",

"repository.feedback.description.required": "Требуется описание репозитория",
"repository.feedback.read.only": "Репозиторий доступен только для чтения",
"repository.feedback.eco.disabled": "Отключено",
"repository.feedback.compression.internal.supported": "да",
"repository.feedback.compression.internal.not.supported": "нет",
"repository.attribute.server.url": "URL сервера",
"repository.attribute.config.file": "Файл конфигурации",
"repository.attribute.provider": "Поставщик",
"repository.attribute.algorithm.encryption": "Алгоритм шифрования",
"repository.attribute.algorithm.hash": "Алгоритм хеширования",
"repository.attribute.algorithm.splitter": "Алгоритм разделения",
"repository.attribute.algorithm.eco": "Алгоритм коррекции ошибок",

"repository.attribute.connected.as": "Подключено как",
"repository.attribute.compression.internal": "Внутреннее сжатие",
"repository.attribute.format": "Формат репозитория",
"repository.attribute.eco": "Коррекция ошибок",

"log.event.hide": "Скрыть лог",
"log.event.show": "Показать лог",

"user.interface": "Пользовательский интерфейс",
"user.interface.appearance":"Внешний вид",
"user.interface.appearance.hint":"Выберите размер шрифта",
"user.interface.appearance.help": "Определяет внешний вид пользовательского интерфейса",

"user.interface.appearance.small":"маленький",
"user.interface.appearance.medium":"средний",
"user.interface.appearance.large":"большой",

"user.interface.pagesize.description": "Размер страницы",
"user.interface.pagesize.help": "Определяет размер страницы в таблицах",
"user.interface.pagesize.hint": "Размер страницы",

"user.interface.byte.representation.description":"Выберите представление байта",
"user.interface.byte.representation.select":"Выберите представление байта",
"user.interface.byte.representation.help":"Определяет представление байтов",

"user.language":"Язык",

"lang.help": "Устанавливает язык пользовательского интерфейса",
"lang.select": "Выберите язык",
"lang.description": "Выберите язык",

"theme.description": "Тема",
"theme.select": "Выберите тему",
"theme.help": "Текущая активная тема",
"theme.dark":"темная",
"theme.light": "светлая",
"theme.pastel": "пастельная",
"theme.ocean":"морская"
}
102 changes: 51 additions & 51 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,59 +102,59 @@ export default class App extends Component {
render() {
const { uiPrefs, runningTaskCount, isRepositoryConnected } = this.state;
return (
<Router>
<AppContext.Provider value={this}>
<UIPreferenceProvider initalValue={uiPrefs}>
<Navbar expand="sm" variant="light">
<Navbar.Brand href="/"><img src="/kopia-flat.svg" className="App-logo" alt="logo" /></Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="me-auto">
<span className="d-inline-block" data-toggle="tooltip" title="Repository is not connected">
<NavLink data-testid="tab-snapshots" title="" data-title="Snapshots" className={isRepositoryConnected ? "nav-link" : "nav-link disabled"} to="/snapshots">{i18n.t('tab.snapshots')}</NavLink>
</span>
<span className="d-inline-block" data-toggle="tooltip" title="Repository is not connected">
<NavLink data-testid="tab-policies" title="" data-title="Policies" className={isRepositoryConnected ? "nav-link" : "nav-link disabled"} to="/policies">{i18n.t('tab.policies')}</NavLink>
</span>
<span className="d-inline-block" data-toggle="tooltip" title="Repository is not connected">
<NavLink data-testid="tab-tasks" title="" data-title="Tasks" className={isRepositoryConnected ? "nav-link" : "nav-link disabled"} to="/tasks">{i18n.t('tab.tasks')}
<>{runningTaskCount > 0 && <>({runningTaskCount})</>}</>
</NavLink>
</span>
<NavLink data-testid="tab-repo" data-title="Repository" className="nav-link" to="/repo">{i18n.t('tab.repository')}</NavLink>
<NavLink data-testid="tab-preferences" data-title="Preferences" className="nav-link" to="/preferences">{i18n.t('tab.preferences')}</NavLink>
</Nav>
<Nav>
<LanguageSelection />
</Nav>
</Navbar.Collapse>
</Navbar>
<Router>
<AppContext.Provider value={this}>
<UIPreferenceProvider initalValue={uiPrefs}>
<Navbar expand="sm" variant="light">
<Navbar.Brand href="/"><img src="/kopia-flat.svg" className="App-logo" alt="logo" /></Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="me-auto">
<span className="d-inline-block" data-toggle="tooltip" title="Repository is not connected">
<NavLink data-testid="tab-snapshots" title="" data-title="Snapshots" className={isRepositoryConnected ? "nav-link" : "nav-link disabled"} to="/snapshots">{i18n.t('tab.snapshots')}</NavLink>
</span>
<span className="d-inline-block" data-toggle="tooltip" title="Repository is not connected">
<NavLink data-testid="tab-policies" title="" data-title="Policies" className={isRepositoryConnected ? "nav-link" : "nav-link disabled"} to="/policies">{i18n.t('tab.policies')}</NavLink>
</span>
<span className="d-inline-block" data-toggle="tooltip" title="Repository is not connected">
<NavLink data-testid="tab-tasks" title="" data-title="Tasks" className={isRepositoryConnected ? "nav-link" : "nav-link disabled"} to="/tasks">{i18n.t('tab.tasks')}
<>{runningTaskCount > 0 && <>({runningTaskCount})</>}</>
</NavLink>
</span>
<NavLink data-testid="tab-repo" data-title="Repository" className="nav-link" to="/repo">{i18n.t('tab.repository')}</NavLink>
<NavLink data-testid="tab-preferences" data-title="Preferences" className="nav-link" to="/preferences">{i18n.t('tab.preferences')}</NavLink>
</Nav>
<Nav>
<LanguageSelection />
</Nav>
</Navbar.Collapse>
</Navbar>

<Container fluid>
<NavLink to="/repo" style={{ color: "inherit", textDecoration: "inherit" }}>
<h5 className="mb-4">{this.state.repoDescription}</h5>
</NavLink>
<Container fluid>
<NavLink to="/repo" style={{ color: "inherit", textDecoration: "inherit" }}>
<h5 className="mb-4">{this.state.repoDescription}</h5>
</NavLink>

<Switch>
<Route path="/snapshots/new" component={SnapshotCreate} />
<Route path="/snapshots/single-source/" component={SnapshotHistory} />
<Route path="/snapshots/dir/:oid/restore" component={SnapshotRestore} />
<Route path="/snapshots/dir/:oid" component={SnapshotDirectory} />
<Route path="/snapshots" component={Snapshots} />
<Route path="/policies/edit/" component={Policy} />
<Route path="/policies" component={Policies} />
<Route path="/tasks/:tid" component={Task} />
<Route path="/tasks" component={Tasks} />
<Route path="/repo" component={Repository} />
<Route path="/preferences" component={Preferences} />
<Route exact path="/">
<Redirect to="/snapshots" />
</Route>
</Switch>
</Container>
</UIPreferenceProvider>
</AppContext.Provider>
</Router>
<Switch>
<Route path="/snapshots/new" component={SnapshotCreate} />
<Route path="/snapshots/single-source/" component={SnapshotHistory} />
<Route path="/snapshots/dir/:oid/restore" component={SnapshotRestore} />
<Route path="/snapshots/dir/:oid" component={SnapshotDirectory} />
<Route path="/snapshots" component={Snapshots} />
<Route path="/policies/edit/" component={Policy} />
<Route path="/policies" component={Policies} />
<Route path="/tasks/:tid" component={Task} />
<Route path="/tasks" component={Tasks} />
<Route path="/repo" component={Repository} />
<Route path="/preferences" component={Preferences} />
<Route exact path="/">
<Redirect to="/snapshots" />
</Route>
</Switch>
</Container>
</UIPreferenceProvider>
</AppContext.Provider>
</Router>
);
}
}
5 changes: 3 additions & 2 deletions src/utils/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ i18n
.init({
lng: "en",
fallbackLng: "en",
debug: true,
ns: ["translation"],
defaultNS: "translation",
interpolation: {
escapeValue: false,
},
react:
{ useSuspense: true }
{
useSuspense: true
}
});

export default i18n;

0 comments on commit de5d777

Please sign in to comment.