From 72715dfcd961c2e811bb65fbe0042d8d821cb8a8 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Fri, 19 Mar 2021 13:26:29 +0100 Subject: [PATCH] Display error messages --- public/explore.html | 2 ++ public/i18n/locale-en.json | 31 ++++++++++++++++++ public/index.html | 2 ++ public/partials/404.htm | 9 +++--- public/partials/anonymize.htm | 7 +++- public/partials/dashboard.htm | 6 +++- public/partials/explore.htm | 2 +- public/partials/loading.htm | 2 +- public/script/exploreApp.js | 28 ++++++++++------ ...gular-translate-loader-static-files.min.js | 6 ++++ .../script/external/angular-translate.min.js | 6 ++++ public/script/homeApp.js | 32 +++++++++++++++---- routes/file.js | 3 +- routes/repositoy.js | 4 +-- routes/user.js | 2 +- routes/webview.js | 2 +- utils/file.js | 6 ++-- 17 files changed, 117 insertions(+), 33 deletions(-) create mode 100644 public/i18n/locale-en.json create mode 100644 public/script/external/angular-translate-loader-static-files.min.js create mode 100644 public/script/external/angular-translate.min.js diff --git a/public/explore.html b/public/explore.html index b70bb9d..f018442 100644 --- a/public/explore.html +++ b/public/explore.html @@ -21,6 +21,8 @@ + + diff --git a/public/i18n/locale-en.json b/public/i18n/locale-en.json new file mode 100644 index 0000000..76fa3ed --- /dev/null +++ b/public/i18n/locale-en.json @@ -0,0 +1,31 @@ +{ + "ERRORS": { + "repo_not_found": "The repository is not found.", + "repo_not_accessible": "Anonymous GitHub does not have the persmission to access the repository.", + "repository_expired": "The repository is expired", + "repository_not_ready": "Anonymous GitHub is still processing the repository, it can take several minutes.", + "repo_is_updating": "Anonymous GitHub is still processing the repository, it can take several minutes.", + "repoUrl_not_defined": "The repository url needs to be defined.", + "repoId_already_used": "The repository id is already used.", + "invalid_repoId": "The format of the repository id is invalid", + "branch_not_specified": "The branch is not specified", + "options_not_provided": "options_not_provided", + "invalid_terms_format": "invalid_terms_format", + "unable_to_anonymize": "unable_to_anonymize", + "non_supported_mode": "The selected anonymization mode is invalid, only download and stream are supported.", + "invalid_path": "The provided path is invalid or missing.", + "file_not_found": "The requested file is not found.", + "file_not_accessible": "The requested file is not accessible.", + "file_not_supported": "The file type is not supported. Anonymous GitHub cannot handle it.", + "file_too_big": "The file size exceed the limit of Anonymous GitHub.", + "is_folder": "The path points to a folder.", + "unable_to_write_file": "Unable to write file on disk.", + "stats_unsupported": "Statistics are only supported in download mode.", + "branches_not_found": "The requested branch is not found.", + "readme_not_available": "No readme for the repository is found.", + "user_not_found": "The current user is not found in the database", + "not_connected": "User is not connectd", + "page_not_supported_on_different_branch": "Anonimized GitHub pages are only supported on the same branch.", + "page_not_activated": "Anonimized GitHub page is not enabled." + } +} diff --git a/public/index.html b/public/index.html index 297aa0a..2ae3c22 100644 --- a/public/index.html +++ b/public/index.html @@ -17,6 +17,8 @@ + + diff --git a/public/partials/404.htm b/public/partials/404.htm index b54530d..02544fb 100644 --- a/public/partials/404.htm +++ b/public/partials/404.htm @@ -1,6 +1,5 @@ -
- -
-

404

-
+
+

+
404
Page not found +

diff --git a/public/partials/anonymize.htm b/public/partials/anonymize.htm index c586d79..869f3ad 100644 --- a/public/partials/anonymize.htm +++ b/public/partials/anonymize.htm @@ -459,7 +459,12 @@
- +