From 24d032fd92dda9b89a8255243c8b59304319baf2 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 27 Jul 2022 08:48:08 +0800 Subject: [PATCH 1/3] * Modify tag get. --- lib/scm/gitea.class.php | 9 ++++++++- lib/scm/gitrepo.class.php | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/scm/gitea.class.php b/lib/scm/gitea.class.php index 26a1b3a3b9..d64adf54d9 100644 --- a/lib/scm/gitea.class.php +++ b/lib/scm/gitea.class.php @@ -21,7 +21,14 @@ class Gitea $this->client = $client; $this->root = rtrim($root, DIRECTORY_SEPARATOR); - $this->branch = isset($_COOKIE['repoBranch']) ? 'origin/' . $_COOKIE['repoBranch'] : ''; + + $branch = isset($_COOKIE['repoBranch']) ? $_COOKIE['repoBranch'] : ''; + if($branch) + { + $branches = $this->branch(); + if(isset($branches[$branch])) $branch = "origin/$branch"; + } + $this->branch = $branch; chdir($this->root); exec("{$this->client} config core.quotepath false"); diff --git a/lib/scm/gitrepo.class.php b/lib/scm/gitrepo.class.php index 1e947489ad..bb39bcb417 100644 --- a/lib/scm/gitrepo.class.php +++ b/lib/scm/gitrepo.class.php @@ -21,7 +21,14 @@ class GitRepo $this->client = $client; $this->root = rtrim($root, DIRECTORY_SEPARATOR); - $this->branch = isset($_COOKIE['repoBranch']) ? 'origin/' . $_COOKIE['repoBranch'] : ''; + + $branch = isset($_COOKIE['repoBranch']) ? $_COOKIE['repoBranch'] : ''; + if($branch) + { + $branches = $this->branch(); + if(isset($branches[$branch])) $branch = "origin/$branch"; + } + $this->branch = $branch; chdir($this->root); exec("{$this->client} config core.quotepath false"); From a57bae6c2b9a35562181502df1524e03e35d5122 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 27 Jul 2022 08:52:56 +0800 Subject: [PATCH 2/3] * Add language. --- module/repo/lang/vi.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/module/repo/lang/vi.php b/module/repo/lang/vi.php index a6ce017675..bef7f47b6e 100644 --- a/module/repo/lang/vi.php +++ b/module/repo/lang/vi.php @@ -99,6 +99,10 @@ $lang->repo->acl = 'Phân quyền'; $lang->repo->group = 'Nhóm'; $lang->repo->user = 'Người dùng'; $lang->repo->info = 'Thông tin phiên bản'; +$lang->repo->job = 'Job'; +$lang->repo->fileServerUrl = 'File Server Url'; +$lang->repo->fileServerAccount = 'File Server Account'; +$lang->repo->fileServerPassword = 'File Server Password'; $lang->repo->title = 'Tiêu đề'; $lang->repo->status = 'Tình trạng'; @@ -151,11 +155,15 @@ $lang->repo->serviceProject = 'Project'; $lang->repo->notice = new stdclass(); $lang->repo->notice->syncing = 'Đang đồng bộ. Vui lòng đợi ...'; + +$lang->repo->notice = new stdclass(); +$lang->repo->notice->syncing = 'Synchronizing. Please wait ...'; $lang->repo->notice->syncComplete = 'Synchronized. Now redirecting ...'; $lang->repo->notice->syncedCount = 'The number of records synchronized is '; $lang->repo->notice->delete = 'Bạn có muốn xóa this repo?'; $lang->repo->notice->successDelete = 'Repository is removed.'; $lang->repo->notice->commentContent = 'Nhận xét'; +$lang->repo->notice->deleteReview = 'Do you want to delete this review?'; $lang->repo->notice->deleteBug = 'Bạn có muốn xóa bug này?'; $lang->repo->notice->deleteComment = 'Bạn có muốn xóa this comment?'; $lang->repo->notice->lastSyncTime = 'Last Sync:'; @@ -187,12 +195,15 @@ $lang->repo->error->output = "The command is: %s\nThe error is(%s): %s\n" $lang->repo->error->clientVersion = "Client version is too low, please upgrade or change SVN client"; $lang->repo->error->encoding = "The encoding maybe wrong. Vui lòng change the encoding and try again."; $lang->repo->error->deleted = "Deletion of the repository failed. The current repository has a commit record associated with the design."; +$lang->repo->error->linkedJob = "Deletion of the repository failed. The current repository has associated with the Compile."; $lang->repo->error->clientPath = "The client installation directory cannot have spaces!"; +$lang->repo->error->notFound = "The repository %s’s URL %s does not exist. Please confirm if this repository has been deleted from the local server."; $lang->repo->error->noWritable = '%s is not writable! Please check the privilege, or download will not be done.'; $lang->repo->error->unconnected = 'The directory does not match the repository'; $lang->repo->syncTips = 'Bạn có thể tìm tham khảo làm sao thiết lập đồng bộ Git từ here.'; $lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,ví dụ: utf-8"; +$lang->repo->pathTipsForGitlab = "GitLab Project URL"; $lang->repo->example = new stdclass(); $lang->repo->example->client = new stdclass(); From a3a27c51ecefa50525e2d6858cfdb77074932c59 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 27 Jul 2022 08:56:35 +0800 Subject: [PATCH 3/3] * Adjust code. --- module/repo/lang/vi.php | 94 ++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/module/repo/lang/vi.php b/module/repo/lang/vi.php index bef7f47b6e..92d29cc587 100644 --- a/module/repo/lang/vi.php +++ b/module/repo/lang/vi.php @@ -57,48 +57,48 @@ $lang->repo->line = 'Dòng'; $lang->repo->expand = 'Mở ra'; $lang->repo->collapse = 'Gấp lại'; -$lang->repo->id = 'ID'; -$lang->repo->SCM = 'Loại'; -$lang->repo->name = 'Tên'; -$lang->repo->path = 'Đường dẫn'; -$lang->repo->prefix = 'Prefix'; -$lang->repo->config = 'Cấu hình'; -$lang->repo->desc = 'Mô tả'; -$lang->repo->account = 'Người dùng'; -$lang->repo->password = 'Mật khẩu'; -$lang->repo->encoding = 'Encoding'; -$lang->repo->client = 'Client Path'; -$lang->repo->size = 'Size'; -$lang->repo->revision = 'Revision'; -$lang->repo->revisionA = 'Revision'; -$lang->repo->revisions = 'Revision'; -$lang->repo->time = 'Ngày'; -$lang->repo->committer = 'Committer'; -$lang->repo->commits = 'Commits'; -$lang->repo->synced = 'Khởi tạo đồng bộ'; -$lang->repo->lastSync = 'Last Sync'; -$lang->repo->deleted = 'Đã xóa'; -$lang->repo->commit = 'Giao phó'; -$lang->repo->comment = 'Nhận xét'; -$lang->repo->view = 'Xem File'; -$lang->repo->viewA = 'Xem'; -$lang->repo->log = 'Revision nhật ký'; -$lang->repo->blame = 'Blame'; -$lang->repo->date = 'Ngày'; -$lang->repo->diff = 'Diff'; -$lang->repo->diffAB = 'Diff'; -$lang->repo->diffAll = 'Diff tất cả'; -$lang->repo->viewDiff = 'Xem diff'; -$lang->repo->allLog = 'Tất cả Revisions'; -$lang->repo->location = 'Vị trí'; -$lang->repo->file = 'File'; -$lang->repo->action = 'Hành động'; -$lang->repo->code = 'Mã'; -$lang->repo->review = 'Repo duyệt'; -$lang->repo->acl = 'Phân quyền'; -$lang->repo->group = 'Nhóm'; -$lang->repo->user = 'Người dùng'; -$lang->repo->info = 'Thông tin phiên bản'; +$lang->repo->id = 'ID'; +$lang->repo->SCM = 'Loại'; +$lang->repo->name = 'Tên'; +$lang->repo->path = 'Đường dẫn'; +$lang->repo->prefix = 'Prefix'; +$lang->repo->config = 'Cấu hình'; +$lang->repo->desc = 'Mô tả'; +$lang->repo->account = 'Người dùng'; +$lang->repo->password = 'Mật khẩu'; +$lang->repo->encoding = 'Encoding'; +$lang->repo->client = 'Client Path'; +$lang->repo->size = 'Size'; +$lang->repo->revision = 'Revision'; +$lang->repo->revisionA = 'Revision'; +$lang->repo->revisions = 'Revision'; +$lang->repo->time = 'Ngày'; +$lang->repo->committer = 'Committer'; +$lang->repo->commits = 'Commits'; +$lang->repo->synced = 'Khởi tạo đồng bộ'; +$lang->repo->lastSync = 'Last Sync'; +$lang->repo->deleted = 'Đã xóa'; +$lang->repo->commit = 'Giao phó'; +$lang->repo->comment = 'Nhận xét'; +$lang->repo->view = 'Xem File'; +$lang->repo->viewA = 'Xem'; +$lang->repo->log = 'Revision nhật ký'; +$lang->repo->blame = 'Blame'; +$lang->repo->date = 'Ngày'; +$lang->repo->diff = 'Diff'; +$lang->repo->diffAB = 'Diff'; +$lang->repo->diffAll = 'Diff tất cả'; +$lang->repo->viewDiff = 'Xem diff'; +$lang->repo->allLog = 'Tất cả Revisions'; +$lang->repo->location = 'Vị trí'; +$lang->repo->file = 'File'; +$lang->repo->action = 'Hành động'; +$lang->repo->code = 'Mã'; +$lang->repo->review = 'Repo duyệt'; +$lang->repo->acl = 'Phân quyền'; +$lang->repo->group = 'Nhóm'; +$lang->repo->user = 'Người dùng'; +$lang->repo->info = 'Thông tin phiên bản'; $lang->repo->job = 'Job'; $lang->repo->fileServerUrl = 'File Server Url'; $lang->repo->fileServerAccount = 'File Server Account'; @@ -153,11 +153,11 @@ $lang->repo->gitlabProject = 'Project'; $lang->repo->serviceHost = 'Host'; $lang->repo->serviceProject = 'Project'; +$lang->repo->placeholder = new stdclass; +$lang->repo->placeholder->gitlabHost = 'Input url of gitlab'; + $lang->repo->notice = new stdclass(); $lang->repo->notice->syncing = 'Đang đồng bộ. Vui lòng đợi ...'; - -$lang->repo->notice = new stdclass(); -$lang->repo->notice->syncing = 'Synchronizing. Please wait ...'; $lang->repo->notice->syncComplete = 'Synchronized. Now redirecting ...'; $lang->repo->notice->syncedCount = 'The number of records synchronized is '; $lang->repo->notice->delete = 'Bạn có muốn xóa this repo?'; @@ -201,8 +201,8 @@ $lang->repo->error->notFound = "The repository %s’s URL %s does not exist $lang->repo->error->noWritable = '%s is not writable! Please check the privilege, or download will not be done.'; $lang->repo->error->unconnected = 'The directory does not match the repository'; -$lang->repo->syncTips = 'Bạn có thể tìm tham khảo làm sao thiết lập đồng bộ Git từ here.'; -$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,ví dụ: utf-8"; +$lang->repo->syncTips = 'Bạn có thể tìm tham khảo làm sao thiết lập đồng bộ Git từ here.'; +$lang->repo->encodingsTips = "The encodings of commit comments, can be comma separated values,ví dụ: utf-8"; $lang->repo->pathTipsForGitlab = "GitLab Project URL"; $lang->repo->example = new stdclass();