diff --git a/public/locales/de-DE/translation.json b/public/locales/de/translation.json similarity index 98% rename from public/locales/de-DE/translation.json rename to public/locales/de/translation.json index 8ab7566..9ae7b71 100644 --- a/public/locales/de-DE/translation.json +++ b/public/locales/de/translation.json @@ -38,7 +38,7 @@ "snapshot.header.snapshot.owner":"Eigentümer", "snapshot.header.snapshot.path":"Pfad", - "snapshot.event.sychronize":"Synchronisieren", + "snapshot.event.synchronize":"Synchronisieren", "snapshot.event.snapshot.policy": "Richtlinie", "snapshot.event.snapshot.now": "Snapshot erstellen", "snapshot.event.snapshot.pending": "Wartend", diff --git a/public/locales/en-GB/translation.json b/public/locales/en/translation.json similarity index 98% rename from public/locales/en-GB/translation.json rename to public/locales/en/translation.json index 8dfc655..8b43644 100644 --- a/public/locales/en-GB/translation.json +++ b/public/locales/en/translation.json @@ -44,7 +44,7 @@ "snapshot.feedback.snapshot.start": "Snapshot will start after the previous snapshot completes", "snapshot.event.snapshot.new": "New Snapshot", - "snapshot.event.sychronize":"Synchronize", + "snapshot.event.synchronize":"Synchronize", "repository.status.initializing": "Initializing repository...", "repository.status.connected": "Connected to repository", diff --git a/public/locales/es-ES/translation.json b/public/locales/es/translation.json similarity index 98% rename from public/locales/es-ES/translation.json rename to public/locales/es/translation.json index 14e8d2a..d4f491d 100644 --- a/public/locales/es-ES/translation.json +++ b/public/locales/es/translation.json @@ -41,7 +41,7 @@ "snapshot.event.snapshot.pending": "Pendiente", "snapshot.feedback.snapshot.start": "La instantánea comenzará después de que se complete la instantánea anterior", "snapshot.event.snapshot.new": "Nueva instantánea", - "snapshot.event.sychronize": "Sincronizar", + "snapshot.event.synchronize": "Sincronizar", "repository.status.initializing": "Inicializando el repositorio...", "repository.status.connected": "Conectado al repositorio", diff --git a/public/locales/fr-FR/translation.json b/public/locales/fr/translation.json similarity index 100% rename from public/locales/fr-FR/translation.json rename to public/locales/fr/translation.json diff --git a/public/locales/it-IT/translation.json b/public/locales/it-IT/translation.json deleted file mode 100644 index eea2936..0000000 --- a/public/locales/it-IT/translation.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "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.time.start": "Start time", - "task.status": "Status", - "task.kind": "Kind", - "task.description": "Description", - - "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", - - "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" -} \ No newline at end of file diff --git a/public/locales/it/translation.json b/public/locales/it/translation.json new file mode 100644 index 0000000..75cf141 --- /dev/null +++ b/public/locales/it/translation.json @@ -0,0 +1,107 @@ +{ + "tab.preferences": "Preferenze", + "tab.repository": "Repository", + "tab.tasks": "Attività", + "tab.policies": "Politiche", + "tab.snapshots": "Istantanee", + + "task.all": "Tutte", + "task.running": "In esecuzione", + "task.failed": "Fallite", + "task.loading": "Caricamento...", + "task.header.time.start": "Ora di inizio", + "task.header.status": "Stato", + "task.header.kind": "Tipo", + "task.header.description": "Descrizione", + "task.feedback.search": "Cerca log per descrizione", + "task.feedback.entries": "Un elenco di attività apparirà qui quando crei istantanee, ripristini, esegui manutenzione, ecc.", + + "task.status.succeed.after": "Attività completata dopo", + "task.status.canceled": "Attività annullata dopo", + "task.status.canceling": "Annullamento in corso", + "task.status.error": "Errore nell'attività", + "task.status.running.for": "Attività in esecuzione da", + + "task.status.started": "Avviata", + "task.status.finished": "Completata", + "task.logs": "Log", + + "task.event.stop": "Arresta", + "task.header.counter": "Contatore", + "task.header.value": "Valore", + + "snapshot.header.actions": "Azioni", + "snapshot.header.status": "Stato", + "snapshot.header.snapshot.next": "Prossima istantanea", + "snapshot.header.snapshot.last": "Ultima istantanea", + "snapshot.header.snapshot.size": "Dimensione", + "snapshot.header.snapshot.owner": "Proprietario", + "snapshot.header.snapshot.path": "Percorso", + + "snapshot.event.snapshot.now": "**Crea Istantanea Ora**", + "snapshot.event.snapshot.policy": "Politica", + "snapshot.event.snapshot.pending": "In attesa", + "snapshot.feedback.snapshot.start": "L'istantanea inizierà dopo il completamento dell'istantanea precedente", + "snapshot.event.snapshot.new": "Nuova Istantanea", + + "snapshot.event.synchronize":"Sincronizza", + + "repository.status.initializing": "Inizializzazione del repository...", + "repository.status.connected": "Connesso al repository", + "repository.event.connection.cancel":"Annulla connessione", + "repository.event.connection.disconnect": "Disconnetti dal repository", + "repository.event.description.update": "Aggiorna descrizione", + + "repository.feedback.description.required":"La descrizione del repository è obbligatoria", + "repository.feedback.read.only": "Il repository è in sola lettura", + "repository.feedback.eco.disabled":"Disabilitato", + "repository.feedback.compression.internal.supported": "sì", + "repository.feedback.compression.internal.not.supported": "no", + + "repository.attribute.server.url": "URL del server", + "repository.attribute.config.file": "File di configurazione", + "repository.attribute.provider": "Provider", + "repository.attribute.algorithm.encryption": "Algoritmo di crittografia", + "repository.attribute.algorithm.hash": "Algoritmo di hash", + "repository.attribute.algorithm.splitter": "Algoritmo di suddivisione", + "repository.attribute.algorithm.eco": "Algoritmo di correzione degli errori", + + "repository.attribute.connected.as": "Connesso come", + "repository.attribute.compression.internal": "Compressione interna", + "repository.attribute.format": "Formato del repository", + "repository.attribute.eco": "Overhead di correzione degli errori", + + "log.event.hide": "Nascondi log", + "log.event.show": "Mostra log", + + "user.interface": "Interfaccia utente", + "user.interface.appearance":"Aspetto", + "user.interface.appearance.hint":"Seleziona la dimensione del carattere", + "user.interface.appearance.help": "Specifica l'aspetto dell'interfaccia utente", + + "user.interface.appearance.small": "piccolo", + "user.interface.appearance.medium": "medio", + "user.interface.appearance.large": "grande", + + "user.interface.pagesize.description": "Dimensione pagina", + "user.interface.pagesize.help": "Specifica la dimensione di paginazione nelle tabelle", + "user.interface.pagesize.hint": "Dimensione pagina", + + "user.interface.byte.representation.description": "Seleziona la rappresentazione dei byte", + "user.interface.byte.representation.select": "Seleziona la rappresentazione dei byte", + "user.interface.byte.representation.help": "Specifica la rappresentazione dei byte", + + "user.language": "Lingua", + + "lang.help": "Imposta la lingua per l'interfaccia utente", + "lang.select": "Seleziona la lingua", + "lang.description": "Seleziona la lingua", + + "theme.description": "Tema", + "theme.select": "Seleziona il tema", + "theme.help": "Il tema attivo corrente", + "theme.dark": "scuro", + "theme.light": "chiaro", + "theme.pastel": "pastello", + "theme.ocean": "oceano" +} \ No newline at end of file diff --git a/public/locales/jp-JP/translation.json b/public/locales/jp-JP/translation.json deleted file mode 100644 index eea2936..0000000 --- a/public/locales/jp-JP/translation.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "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.time.start": "Start time", - "task.status": "Status", - "task.kind": "Kind", - "task.description": "Description", - - "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", - - "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" -} \ No newline at end of file diff --git a/public/locales/jp/translation.json b/public/locales/jp/translation.json new file mode 100644 index 0000000..22f3180 --- /dev/null +++ b/public/locales/jp/translation.json @@ -0,0 +1,107 @@ +{ + "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": "オーシャン" +} diff --git a/public/locales/pl-PL/translation.json b/public/locales/pl/translation.json similarity index 100% rename from public/locales/pl-PL/translation.json rename to public/locales/pl/translation.json diff --git a/public/locales/ru-RU/translation.json b/public/locales/ru/translation.json similarity index 76% rename from public/locales/ru-RU/translation.json rename to public/locales/ru/translation.json index eea2936..8b43644 100644 --- a/public/locales/ru-RU/translation.json +++ b/public/locales/ru/translation.json @@ -9,10 +9,12 @@ "task.running":"Running", "task.failed":"Failed", "task.loading": "Loading...", - "task.time.start": "Start time", - "task.status": "Status", - "task.kind": "Kind", - "task.description": "Description", + "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", @@ -28,6 +30,22 @@ "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", diff --git a/src/App.jsx b/src/App.jsx index 2708961..db3ba6b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2,8 +2,7 @@ import 'bootstrap/dist/css/bootstrap.min.css'; import './css/Theme.css'; import './css/App.css'; import axios from 'axios'; -import i18n from './utils/18ns' - +import i18n from './utils/i18n' import { LanguageSelection } from './components/LanguageSelection'; import { React, Component } from 'react'; import { Navbar, Nav, Container } from 'react-bootstrap'; @@ -39,7 +38,7 @@ export default class App extends Component { this.fetchInitialRepositoryDescription = this.fetchInitialRepositoryDescription.bind(this); const tok = document.head.querySelector('meta[name="kopia-csrf-token"]'); - + if (tok && tok.content) { axios.defaults.headers.common['X-Kopia-Csrf-Token'] = tok.content; } else { @@ -103,59 +102,59 @@ export default class App extends Component { render() { const { uiPrefs, runningTaskCount, isRepositoryConnected } = this.state; return ( - - - - - logo - - - - - - + + + + + logo + + + + + + - - -
{this.state.repoDescription}
-
+ + +
{this.state.repoDescription}
+
- - - - - - - - - - - - - - - - -
-
-
-
+ + + + + + + + + + + + + + + + + +
+
+
); } } diff --git a/src/assets/languages.json b/src/assets/languages.json index 4324650..776a91a 100644 --- a/src/assets/languages.json +++ b/src/assets/languages.json @@ -1,42 +1,42 @@ { - "en-GB": { + "en": { "label": "English", "code": "GB", - "value": "en-GB" + "value": "en" }, - "de-DE": { + "de": { "label": "Deutsch", "code": "DE", - "value": "de-DE" + "value": "de" }, - "es-ES": { + "es": { "label": "Español", "code": "ES", - "value": "es-ES" + "value": "es" }, - "fr-FR": { + "fr": { "label": "Français", "code": "FR", - "value": "fr-FR" + "value": "fr" }, - "ru-RU": { + "ru": { "label": "Русский", "code": "RU", - "value": "ru-RU" + "value": "ru" }, - "jp-JP": { + "jp": { "label": "日本語", "code": "JP", - "value": "jp-JP" + "value": "jp" }, - "it-IT": { + "it": { "label": "Italiano", "code": "IT", - "value": "it-IT" + "value": "it" }, - "pl-PL": { + "pl": { "label": "Polski", "code": "PL", - "value": "pl-PL" + "value": "pl" } } \ No newline at end of file diff --git a/src/contexts/UIPreferencesContext.tsx b/src/contexts/UIPreferencesContext.tsx index 703a29e..31620fe 100644 --- a/src/contexts/UIPreferencesContext.tsx +++ b/src/contexts/UIPreferencesContext.tsx @@ -7,12 +7,12 @@ const PREFERENCES_URL = '/api/v1/ui-preferences'; export const PAGE_SIZES = [10, 20, 30, 40, 50, 100]; export const UIPreferencesContext = React.createContext({} as UIPreferences); -const DEFAULT_PREFERENCES = { pageSize: PAGE_SIZES[0], bytesStringBase2: false, defaultSnapshotViewAll: false, theme: getDefaultTheme(), fontSize: "fs-6", language: "en-GB" } as SerializedUIPreferences; +const DEFAULT_PREFERENCES = { pageSize: PAGE_SIZES[0], bytesStringBase2: false, defaultSnapshotViewAll: false, theme: getDefaultTheme(), fontSize: "fs-6", language: "en" } as SerializedUIPreferences; export type Theme = "light" | "dark" | "pastel" | "ocean"; export type PageSize = 10 | 20 | 30 | 40 | 50 | 100; export type FontSize = "fs-6" | "fs-5" | "fs-4"; -export type Language = "en-GB" | "de-DE" | "es-ES" | "fr-FR" | "jp-JP" | "ru-RU" | "it-IT" | "pl-PL"; +export type Language = "en" | "de" | "es" | "fr" | "jp" | "ru" | "it" | "pl"; export interface UIPreferences { get pageSize(): PageSize diff --git a/src/css/App.css b/src/css/App.css index ac36532..49502f7 100644 --- a/src/css/App.css +++ b/src/css/App.css @@ -12,7 +12,7 @@ body { } #select-language { - width: 8em; + width: 10em; font-size: 90%; } @@ -469,3 +469,47 @@ div.tab-body { #kopia li.page-item:disabled { background-color: var(--background-color) } + +#kopia .loader-container{ + position: absolute; + top: 50%; + left: 50%; + margin-top: -50px; + margin-left: -50px; + width: 100px; + height: 100px; +}​ + +#kopia .loader { + width: 48px; + height: 48px; + border-radius: 50%; + position: relative; + animation: rotate 1s linear infinite +} +#kopia .loader::before , .loader::after { + content: ""; + box-sizing: border-box; + position: absolute; + inset: 0px; + border-radius: 50%; + border: 5px solid #FFF; + animation: prixClipFix 2s linear infinite ; +} +#kopia .loader::after{ + inset: 8px; + transform: rotate3d(90, 90, 0, 180deg ); + border-color: #FF3D00; +} + +@keyframes rotate { + 0% {transform: rotate(0deg)} + 100% {transform: rotate(360deg)} +} + +@keyframes prixClipFix { + 0% {clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)} + 50% {clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)} + 75%, 100% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)} +} + diff --git a/src/index.jsx b/src/index.jsx index 54543a8..2b6c873 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,8 +1,19 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import App from './App'; +import './utils/i18n'; import './css/index.css'; -import './utils/18ns'; +import { createRoot } from 'react-dom/client'; +import React, { lazy, Suspense } from 'react'; +const App = lazy(() => import('./App')) const root = createRoot(document.getElementById('root')) -root.render(); +const loadingScreen = ( +
+ +
+) + +root.render( + + + + , + ); \ No newline at end of file diff --git a/src/pages/Repository.jsx b/src/pages/Repository.jsx index 6947d13..d3d646a 100644 --- a/src/pages/Repository.jsx +++ b/src/pages/Repository.jsx @@ -14,7 +14,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCheck, faChevronCircleDown, faChevronCircleUp, faWindowClose } from '@fortawesome/free-solid-svg-icons'; import { Logs } from '../components/Logs'; import { AppContext } from '../contexts/AppContext'; -import i18n from '../utils/18ns' +import i18n from '../utils/i18n' export class Repository extends Component { constructor() { diff --git a/src/pages/SnapshotRestore.jsx b/src/pages/SnapshotRestore.jsx index e31de18..64f6983 100644 --- a/src/pages/SnapshotRestore.jsx +++ b/src/pages/SnapshotRestore.jsx @@ -10,7 +10,7 @@ import { RequiredBoolean } from '../forms/RequiredBoolean'; import { RequiredField } from '../forms/RequiredField'; import { RequiredNumberField } from '../forms/RequiredNumberField'; import { errorAlert, GoBackButton } from '../utils/uiutil'; -import i18n from '../utils/18ns' +import i18n from '../utils/i18n' export class SnapshotRestore extends Component { constructor(props) { diff --git a/src/pages/Snapshots.jsx b/src/pages/Snapshots.jsx index 9fb89af..b5ffdad 100644 --- a/src/pages/Snapshots.jsx +++ b/src/pages/Snapshots.jsx @@ -14,7 +14,7 @@ import { handleChange } from '../forms'; import KopiaTable from '../utils/KopiaTable'; import { CLIEquivalent, compare, errorAlert, ownerName, policyEditorURL, redirect, sizeDisplayName, sizeWithFailures, sourceQueryStringParams } from '../utils/uiutil'; import { UIPreferencesContext } from '../contexts/UIPreferencesContext'; -import i18n from '../utils/18ns' +import i18n from '../utils/i18n' const localSnapshots = "Local Snapshots" const allSnapshots = "All Snapshots" @@ -218,7 +218,9 @@ export class Snapshots extends Component { return

{error.message}

; } if (isLoading) { - return ; + return (
+ +
); } let uniqueOwners = sources.reduce((a, d) => { const owner = ownerName(d.source); @@ -312,7 +314,7 @@ export class Snapshots extends Component { - diff --git a/src/pages/Task.jsx b/src/pages/Task.jsx index 03d62bc..26013be 100644 --- a/src/pages/Task.jsx +++ b/src/pages/Task.jsx @@ -13,7 +13,7 @@ import Spinner from 'react-bootstrap/Spinner'; import { Logs } from '../components/Logs'; import { cancelTask, formatDuration, GoBackButton, redirect, sizeDisplayName } from '../utils/uiutil'; import { UIPreferencesContext } from '../contexts/UIPreferencesContext'; -import i18n from '../utils/18ns' +import i18n from '../utils/i18n' export class Task extends Component { constructor() { diff --git a/src/utils/18ns.js b/src/utils/i18n.js similarity index 71% rename from src/utils/18ns.js rename to src/utils/i18n.js index dedb034..90e6115 100644 --- a/src/utils/18ns.js +++ b/src/utils/i18n.js @@ -1,14 +1,16 @@ import i18n from "i18next"; import { initReactI18next } from "react-i18next"; -import languageDetector from 'i18next-browser-languagedetector'; +import LanguageDetector from 'i18next-browser-languagedetector'; import backend from "i18next-http-backend" i18n .use(backend) - .use(languageDetector) + .use(LanguageDetector) .use(initReactI18next) .init({ - fallbackLng: "en-GB", + lng: "en", + fallbackLng: "en", + debug: true, ns: ["translation"], defaultNS: "translation", interpolation: {