From 7a8a4f54321f208ebbb0f708a5f0e49c4cd4cc04 Mon Sep 17 00:00:00 2001 From: Leon Busch-George Date: Tue, 11 Apr 2023 08:34:28 +0200 Subject: [PATCH 01/11] Prefer native parser for SSH public key parsing (#23798) Without this patch, the setting SSH.StartBuiltinServer decides whether the native (Go) implementation is used rather than calling 'ssh-keygen'. It's possible for 'using ssh-keygen' and 'using the built-in server' to be independent. In fact, the gitea rootless container doesn't ship ssh-keygen and can be configured to use the host's SSH server - which will cause the public key parsing mechanism to break. This commit changes the decision to be based on SSH.KeygenPath instead. Any existing configurations with a custom KeygenPath set will continue to function. The new default value of '' selects the native version. The downside of this approach is that anyone who has relying on plain 'ssh-keygen' to have special properties will now be using the native version instead. I assume the exec-variant is only there because /x/crypto/ssh didn't support ssh-ed25519 until 2016. I don't see any other reason for using it so it might be an acceptable risk. Fixes #23363 EDIT: this message was garbled when I tried to get the commit description back in.. Trying to reconstruct it: ## :warning: BREAKING :warning: Users who don't have SSH.KeygenPath explicitly set and rely on the ssh-keygen binary need to set SSH.KeygenPath to 'ssh-keygen' in order to be able to continue using it for public key parsing. There was something else but I can't remember at the moment. EDIT2: It was about `make test` and `make lint`. Can't get them to run. To reproduce the issue, I installed `golang` in `docker.io/node:16` and got: ``` ... go: mvdan.cc/xurls/v2@v2.4.0: unknown revision mvdan.cc/xurls/v2.4.0 go: gotest.tools/v3@v3.4.0: unknown revision gotest.tools/v3.4.0 ... go: gotest.tools/v3@v3.0.3: unknown revision gotest.tools/v3.0.3 ... go: error loading module requirements ``` Signed-off-by: Leon M. Busch-George --- custom/conf/app.example.ini | 4 ++-- .../doc/administration/config-cheat-sheet.en-us.md | 2 +- models/asymkey/ssh_key_parse.go | 9 +++++++-- models/asymkey/ssh_key_test.go | 8 ++++++++ modules/setting/ssh.go | 4 ++-- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 0543c85d50daa..88297fe0d975e 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -186,8 +186,8 @@ RUN_MODE = ; prod ;; default is the system temporary directory. ;SSH_KEY_TEST_PATH = ;; -;; Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call. -;SSH_KEYGEN_PATH = ssh-keygen +;; Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself. +;SSH_KEYGEN_PATH = ;; ;; Enable SSH Authorized Key Backup when rewriting all keys, default is true ;SSH_AUTHORIZED_KEYS_BACKUP = true diff --git a/docs/content/doc/administration/config-cheat-sheet.en-us.md b/docs/content/doc/administration/config-cheat-sheet.en-us.md index f976458f2932a..76952df40e751 100644 --- a/docs/content/doc/administration/config-cheat-sheet.en-us.md +++ b/docs/content/doc/administration/config-cheat-sheet.en-us.md @@ -345,7 +345,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect - `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: For the built-in SSH server, choose the keypairs to offer as the host key. The private key should be at `SSH_SERVER_HOST_KEY` and the public `SSH_SERVER_HOST_KEY.pub`. Relative paths are made absolute relative to the `APP_DATA_PATH`. If no key exists a 4096 bit RSA key will be created for you. - `SSH_KEY_TEST_PATH`: **/tmp**: Directory to create temporary files in when testing public keys using ssh-keygen, default is the system temporary directory. -- `SSH_KEYGEN_PATH`: **ssh-keygen**: Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call. +- `SSH_KEYGEN_PATH`: **\**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself. - `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false. - `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to -1 to disable all timeouts.) diff --git a/models/asymkey/ssh_key_parse.go b/models/asymkey/ssh_key_parse.go index 7e61e61dae553..94b1cf112b56c 100644 --- a/models/asymkey/ssh_key_parse.go +++ b/models/asymkey/ssh_key_parse.go @@ -179,7 +179,7 @@ func CheckPublicKeyString(content string) (_ string, err error) { keyType string length int ) - if setting.SSH.StartBuiltinServer { + if len(setting.SSH.KeygenPath) == 0 { fnName = "SSHNativeParsePublicKey" keyType, length, err = SSHNativeParsePublicKey(content) } else { @@ -285,7 +285,12 @@ func SSHKeyGenParsePublicKey(key string) (string, int, error) { } }() - stdout, stderr, err := process.GetManager().Exec("SSHKeyGenParsePublicKey", setting.SSH.KeygenPath, "-lf", tmpName) + keygenPath := setting.SSH.KeygenPath + if len(keygenPath) == 0 { + keygenPath = "ssh-keygen" + } + + stdout, stderr, err := process.GetManager().Exec("SSHKeyGenParsePublicKey", keygenPath, "-lf", tmpName) if err != nil { return "", 0, fmt.Errorf("fail to parse public key: %s - %s", err, stderr) } diff --git a/models/asymkey/ssh_key_test.go b/models/asymkey/ssh_key_test.go index afd79ae6ded50..5378ef66ba29a 100644 --- a/models/asymkey/ssh_key_test.go +++ b/models/asymkey/ssh_key_test.go @@ -57,6 +57,14 @@ func Test_SSHParsePublicKey(t *testing.T) { assert.Equal(t, tc.keyType, keyTypeK) assert.EqualValues(t, tc.length, lengthK) }) + t.Run("SSHParseKeyNative", func(t *testing.T) { + keyTypeK, lengthK, err := SSHNativeParsePublicKey(tc.content) + if err != nil { + assert.Fail(t, "%v", err) + } + assert.Equal(t, tc.keyType, keyTypeK) + assert.EqualValues(t, tc.length, lengthK) + }) }) } } diff --git a/modules/setting/ssh.go b/modules/setting/ssh.go index e8796f98d6f14..a5a9da0b3676b 100644 --- a/modules/setting/ssh.go +++ b/modules/setting/ssh.go @@ -58,7 +58,7 @@ var SSH = struct { ServerCiphers: []string{"chacha20-poly1305@openssh.com", "aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "aes256-gcm@openssh.com"}, ServerKeyExchanges: []string{"curve25519-sha256", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "diffie-hellman-group14-sha256", "diffie-hellman-group14-sha1"}, ServerMACs: []string{"hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1"}, - KeygenPath: "ssh-keygen", + KeygenPath: "", MinimumKeySizeCheck: true, MinimumKeySizes: map[string]int{"ed25519": 256, "ed25519-sk": 256, "ecdsa": 256, "ecdsa-sk": 256, "rsa": 2047}, ServerHostKeys: []string{"ssh/gitea.rsa", "ssh/gogs.rsa"}, @@ -134,7 +134,7 @@ func loadSSHFrom(rootCfg ConfigProvider) { } } - SSH.KeygenPath = sec.Key("SSH_KEYGEN_PATH").MustString("ssh-keygen") + SSH.KeygenPath = sec.Key("SSH_KEYGEN_PATH").String() SSH.Port = sec.Key("SSH_PORT").MustInt(22) SSH.ListenPort = sec.Key("SSH_LISTEN_PORT").MustInt(SSH.Port) SSH.UseProxyProtocol = sec.Key("SSH_SERVER_USE_PROXY_PROTOCOL").MustBool(false) From 91c8261e2cc479af127fb7b1e0803cd0f57d65f7 Mon Sep 17 00:00:00 2001 From: delvh Date: Tue, 11 Apr 2023 09:26:18 +0200 Subject: [PATCH 02/11] Add tooltips for MD editor buttons and add `muted` class for buttons (#23896) Followup of #23876 according to my unreleased review demanding tooltips. Additionally - add a `muted` equivalent for buttons - convert `switch to legacy` to an actual button - enroll `switch to legacy` in the builtin pseudo focus cycle - remove spaces between the buttons The effect of the `muted` class is what you would expect: The button loses all of its normal styling, and is defined only by its content instead. This will help reduce a11y infractions in the future, as that was one of the major points why people didn't use ` diff --git a/web_src/css/base.css b/web_src/css/base.css index c48a36c854764..7640f15244e0d 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -328,14 +328,27 @@ progress::-moz-progress-bar { user-select: none; } +.btn-link { + background: none; + border: none; + color: var(--color-primary); +} + +a:hover, +.btn-link:hover { + text-decoration: underline; +} + a, -.ui.breadcrumb a { +.ui.breadcrumb a, +.btn-link { color: var(--color-primary); cursor: pointer; text-decoration-skip-ink: all; } a.muted, +.btn-link.muted, .muted-links a { color: inherit; } @@ -343,6 +356,7 @@ a.muted, a:hover, a.muted:hover, a.muted:hover [class*="color-text"], +.btn-link.muted:hover, .muted-links a:hover, .ui.breadcrumb a:hover { color: var(--color-primary); diff --git a/web_src/css/editor-markdown.css b/web_src/css/editor-markdown.css index 1a09b5d59670a..df3f756c570e9 100644 --- a/web_src/css/editor-markdown.css +++ b/web_src/css/editor-markdown.css @@ -9,13 +9,12 @@ } .combo-markdown-editor .markdown-toolbar-group { - display: inline-block; + display: flex; } .combo-markdown-editor .markdown-toolbar-button { user-select: none; padding: 5px; - cursor: pointer; } .ui.form .combo-markdown-editor textarea.markdown-text-editor, From 704f3aa91c05aeab7ba18bda62f768ab9233cf6f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 11 Apr 2023 16:36:18 +0800 Subject: [PATCH 03/11] Fine tune markdown editor toolbar (#24046) 1. Remove unnecessary `btn-link` `muted` classes * Link is link, button is button, I can't see a real requirement to make a button like a link. * If anyone insists, please help to show me real example from modern frameworks / websites, how and why they do so. * No need to duplicate a lot of class names on similar elements * Declare styles clearly, for example, `markdown-toolbar` itself should have `display: flex`, but not use `gt-df` to overwrite the `display: block`. 2. Remove unnecessary `role` attribute * https://github.com/github/markdown-toolbar-element/issues/70 * The `markdown-toolbar-element` does want to add `role=button`, but there is a bug. * So we do the similar thing as upstream does (add the role by JS), until they fix their bugs. 3. Indent `markdown-switch-easymde` (before it doesn't have a proper indent) Screenshot: ![image](https://user-images.githubusercontent.com/2114189/231090912-f6ba01cb-d0eb-40ad-bf8c-ffc597d9a778.png) --- templates/shared/combomarkdowneditor.tmpl | 28 +++++++++---------- web_src/css/base.css | 16 +---------- web_src/css/editor-markdown.css | 15 +++++++++- .../js/features/comp/ComboMarkdownEditor.js | 5 +++- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/templates/shared/combomarkdowneditor.tmpl b/templates/shared/combomarkdowneditor.tmpl index 0927249abd59f..30b0de2a49c67 100644 --- a/templates/shared/combomarkdowneditor.tmpl +++ b/templates/shared/combomarkdowneditor.tmpl @@ -19,28 +19,28 @@ Template Attributes: {{end}}
- +
- {{svg "octicon-heading"}} - {{svg "octicon-bold"}} - {{svg "octicon-italic"}} + {{svg "octicon-heading"}} + {{svg "octicon-bold"}} + {{svg "octicon-italic"}}
- {{svg "octicon-quote"}} - {{svg "octicon-code"}} - {{svg "octicon-link"}} + {{svg "octicon-quote"}} + {{svg "octicon-code"}} + {{svg "octicon-link"}}
- {{svg "octicon-list-unordered"}} - {{svg "octicon-list-ordered"}} - {{svg "octicon-tasklist"}} + {{svg "octicon-list-unordered"}} + {{svg "octicon-list-ordered"}} + {{svg "octicon-tasklist"}}
- {{svg "octicon-mention"}} - {{svg "octicon-cross-reference"}} + {{svg "octicon-mention"}} + {{svg "octicon-cross-reference"}}
-
- +
+
diff --git a/web_src/css/base.css b/web_src/css/base.css index 7640f15244e0d..c48a36c854764 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -328,27 +328,14 @@ progress::-moz-progress-bar { user-select: none; } -.btn-link { - background: none; - border: none; - color: var(--color-primary); -} - -a:hover, -.btn-link:hover { - text-decoration: underline; -} - a, -.ui.breadcrumb a, -.btn-link { +.ui.breadcrumb a { color: var(--color-primary); cursor: pointer; text-decoration-skip-ink: all; } a.muted, -.btn-link.muted, .muted-links a { color: inherit; } @@ -356,7 +343,6 @@ a.muted, a:hover, a.muted:hover, a.muted:hover [class*="color-text"], -.btn-link.muted:hover, .muted-links a:hover, .ui.breadcrumb a:hover { color: var(--color-primary); diff --git a/web_src/css/editor-markdown.css b/web_src/css/editor-markdown.css index df3f756c570e9..46ced17cdc954 100644 --- a/web_src/css/editor-markdown.css +++ b/web_src/css/editor-markdown.css @@ -4,7 +4,8 @@ .combo-markdown-editor markdown-toolbar { cursor: default; - display: block; + display: flex; + align-items: center; padding-bottom: 10px; } @@ -12,9 +13,21 @@ display: flex; } +.combo-markdown-editor .markdown-toolbar-group:last-child { + flex: 1; + justify-content: flex-end; +} + .combo-markdown-editor .markdown-toolbar-button { + border: none; + background: none; user-select: none; padding: 5px; + cursor: pointer; +} + +.combo-markdown-editor .markdown-toolbar-button:hover { + color: var(--color-primary); } .ui.form .combo-markdown-editor textarea.markdown-text-editor, diff --git a/web_src/js/features/comp/ComboMarkdownEditor.js b/web_src/js/features/comp/ComboMarkdownEditor.js index 13b28da828d05..7283dab35c022 100644 --- a/web_src/js/features/comp/ComboMarkdownEditor.js +++ b/web_src/js/features/comp/ComboMarkdownEditor.js @@ -70,7 +70,10 @@ class ComboMarkdownEditor { this.textareaMarkdownToolbar = this.container.querySelector('markdown-toolbar'); this.textareaMarkdownToolbar.setAttribute('for', this.textarea.id); - + for (const el of this.textareaMarkdownToolbar.querySelectorAll('.markdown-toolbar-button')) { + // upstream bug: The role code is never executed in base MarkdownButtonElement https://github.com/github/markdown-toolbar-element/issues/70 + el.setAttribute('role', 'button'); + } this.switchToEasyMDEButton = this.container.querySelector('.markdown-switch-easymde'); this.switchToEasyMDEButton?.addEventListener('click', async (e) => { e.preventDefault(); From 25faee3c5f5be23c99b3b7e50418fc0dbad7a41b Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 11 Apr 2023 17:48:13 +0800 Subject: [PATCH 04/11] Fix date display bug (#24047) Follow https://github.com/go-gitea/gitea/pull/23988#pullrequestreview-1377696819 Many template helper functions are not good enough and cause various problems, that's why I am cleaning them. ## Before ![image](https://user-images.githubusercontent.com/51889757/230930898-0c48150f-de85-461d-9455-efcfdc36b644.png) ![image](https://user-images.githubusercontent.com/2114189/231111676-b0da1392-5e47-4f89-a81e-85156aca5cfd.png) ## After ![image](https://user-images.githubusercontent.com/2114189/231111732-920f304d-dd44-4c54-9f5f-518e325006fc.png) --- templates/projects/list.tmpl | 2 +- templates/repo/issue/milestone_issues.tmpl | 2 +- templates/repo/issue/milestones.tmpl | 2 +- templates/repo/issue/view_content/comments.tmpl | 4 ++-- templates/repo/projects/list.tmpl | 2 +- templates/user/dashboard/milestones.tmpl | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index 73ae5ab6e4076..213bab70b66e2 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -42,7 +42,7 @@
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} {{if .IsClosed}} - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} {{end}} {{svg "octicon-issue-opened" 16 "gt-mr-3"}} diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl index 123845de68fa3..c3c25843e8e19 100644 --- a/templates/repo/issue/milestone_issues.tmpl +++ b/templates/repo/issue/milestone_issues.tmpl @@ -31,7 +31,7 @@
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.locale}} {{if .IsClosed}} - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} {{else}} {{svg "octicon-calendar"}} {{if .Milestone.DeadlineString}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index 0336d35c17872..42a6c4f91955f 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -73,7 +73,7 @@
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} {{if .IsClosed}} - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} {{else}} {{svg "octicon-calendar"}} {{if .DeadlineString}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 91bef4fe1ac7b..251f205a0312c 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -125,9 +125,9 @@ {{template "shared/user/authorlink" .Poster}} {{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}} {{if eq $.Issue.PullRequest.Status 3}} - {{$.locale.Tr "repo.issues.manually_pull_merged_at" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID) ($.BaseTarget|Escape) $createdStr | Str2html}} + {{$.locale.Tr "repo.issues.manually_pull_merged_at" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID) ($.BaseTarget|Escape) $createdStr | Safe}} {{else}} - {{$.locale.Tr "repo.issues.pull_merged_at" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID) ($.BaseTarget|Escape) $createdStr | Str2html}} + {{$.locale.Tr "repo.issues.pull_merged_at" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID) ($.BaseTarget|Escape) $createdStr | Safe}} {{end}}
diff --git a/templates/repo/projects/list.tmpl b/templates/repo/projects/list.tmpl index 227a2727055c7..fb5bc4f48d91b 100644 --- a/templates/repo/projects/list.tmpl +++ b/templates/repo/projects/list.tmpl @@ -44,7 +44,7 @@
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} {{if .IsClosed}} - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} {{end}} {{svg "octicon-issue-opened" 16 "gt-mr-3"}} diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl index 1c379ac09d025..6788aa09a2ac8 100644 --- a/templates/user/dashboard/milestones.tmpl +++ b/templates/user/dashboard/milestones.tmpl @@ -93,7 +93,7 @@
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}} {{if .IsClosed}} - {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}} + {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}} {{else}} {{svg "octicon-calendar"}} {{if .DeadlineString}} From 60fb63ba0847e19d8923241733fc7a6c30c3b0b6 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 11 Apr 2023 18:36:58 +0200 Subject: [PATCH 05/11] Update documentation to explain which projects allow Gitea to host static pages (#23993) close #23521 --------- Signed-off-by: 6543 <6543@obermui.de> Co-authored-by: delvh Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: wxiaoguang --- docs/content/doc/help/faq.en-us.md | 8 ++++++++ docs/content/doc/installation/comparison.en-us.md | 7 ++++++- docs/content/doc/installation/comparison.zh-cn.md | 7 ++++++- docs/content/doc/installation/comparison.zh-tw.md | 7 ++++++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/docs/content/doc/help/faq.en-us.md b/docs/content/doc/help/faq.en-us.md index 60e11d4459f20..4847e8e03befe 100644 --- a/docs/content/doc/help/faq.en-us.md +++ b/docs/content/doc/help/faq.en-us.md @@ -118,6 +118,14 @@ The correct path for the template(s) will be relative to the `CustomPath` 2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file) 3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) page to add your template to the correct location. +## Does Gitea have a "GitHub/GitLab pages" feature? + +Gitea doesn't provide a built-in Pages server. You need a dedicated domain to serve static pages to avoid CSRF security risks. + +For simple usage, you can use a reverse proxy to rewrite & serve static contents from Gitea's raw file URLs. + +And there are already available third-party services, like a standalone [pages server](https://codeberg.org/Codeberg/pages-server) or a [caddy plugin](https://github.com/42wim/caddy-gitea), that can provide the required functionality. + ## Active user vs login prohibited user In Gitea, an "active" user refers to a user that has activated their account via email. diff --git a/docs/content/doc/installation/comparison.en-us.md b/docs/content/doc/installation/comparison.en-us.md index d372d1f9ec6d4..082b2a85edd9e 100644 --- a/docs/content/doc/installation/comparison.en-us.md +++ b/docs/content/doc/installation/comparison.en-us.md @@ -31,6 +31,8 @@ _Symbols used in table:_ - _✘ - unsupported_ +- _⚙️ - supported through third-party software_ + ## General Features | Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | @@ -51,7 +53,7 @@ _Symbols used in table:_ | Custom Theme Support | ✓ | ✓ | ✘ | ✘ | ✘ | ✓ | ✘ | | Markdown support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | CSV support | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? | -| 'GitHub / GitLab pages' | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 'GitHub / GitLab pages' | [⚙️][gitea-pages-server], [⚙️][gitea-caddy-plugin] | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | | Repo-specific wiki (as a repo itself) | ✓ | ✓ | ✓ | ✓ | ✓ | / | ✘ | | Deploy Tokens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | Repository Tokens with write rights | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | @@ -144,3 +146,6 @@ _Symbols used in table:_ | Two factor authentication (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | | Integration with the most common services | ✓ | / | ⁄ | ✓ | ✓ | ⁄ | ✓ | | Incorporate external CI/CD | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | + +[gitea-caddy-plugin]: https://github.com/42wim/caddy-gitea +[gitea-pages-server]: https://codeberg.org/Codeberg/pages-server diff --git a/docs/content/doc/installation/comparison.zh-cn.md b/docs/content/doc/installation/comparison.zh-cn.md index b254cf749636b..7dfca526ebb80 100644 --- a/docs/content/doc/installation/comparison.zh-cn.md +++ b/docs/content/doc/installation/comparison.zh-cn.md @@ -29,6 +29,8 @@ _表格中的符号含义:_ * _? - 不确定_ +* _⚙️ - 由第三方服务或插件支持_ + #### 主要特性 | 特性 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | @@ -42,7 +44,7 @@ _表格中的符号含义:_ | 支持 Orgmode | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? | | 支持 CSV | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? | | 支持第三方渲染工具 | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? | -| Git 驱动的静态 pages | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Git 驱动的静态 pages | [⚙️][gitea-pages-server], [⚙️][gitea-caddy-plugin] | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | | Git 驱动的集成化 wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ | | 部署令牌 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | 仓库写权限令牌 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | @@ -129,3 +131,6 @@ _表格中的符号含义:_ | 集成 Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | | 集成 Microsoft Teams | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | | 显示外部 CI/CD 的状态 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | + +[gitea-caddy-plugin]: https://github.com/42wim/caddy-gitea +[gitea-pages-server]: https://codeberg.org/Codeberg/pages-server diff --git a/docs/content/doc/installation/comparison.zh-tw.md b/docs/content/doc/installation/comparison.zh-tw.md index f918fbad75242..89190523434b6 100644 --- a/docs/content/doc/installation/comparison.zh-tw.md +++ b/docs/content/doc/installation/comparison.zh-tw.md @@ -31,6 +31,8 @@ menu: - ✘ - 不支援 +- _⚙️ - 由第三方服務或外掛程式支援_ + ## 一般功能 | 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | @@ -44,7 +46,7 @@ menu: | 支援 Orgmode | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? | | 支援 CSV | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? | | 支援第三方渲染工具 | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? | -| Git 驅動的靜態頁面 | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Git 驅動的靜態頁面 | [⚙️][gitea-pages-server], [⚙️][gitea-caddy-plugin] | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | | Git 驅動的整合 wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | | 部署 Token | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | 有寫入權限的儲存庫 Token | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ | @@ -130,3 +132,6 @@ menu: | 整合 Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | | 整合 Microsoft Teams | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | | 顯示外部 CI/CD 狀態 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | + +[gitea-caddy-plugin]: https://github.com/42wim/caddy-gitea +[gitea-pages-server]: https://codeberg.org/Codeberg/pages-server From 0536712ee7e9592a503bf3057e7203173076872a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 12 Apr 2023 01:22:49 +0800 Subject: [PATCH 06/11] Fix branch protection priority (#24045) Fix #24044 --- models/git/protected_banch_list_test.go | 76 +++++++++++++++++++++++++ models/git/protected_branch_list.go | 10 +--- 2 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 models/git/protected_banch_list_test.go diff --git a/models/git/protected_banch_list_test.go b/models/git/protected_banch_list_test.go new file mode 100644 index 0000000000000..4bb3136d580bf --- /dev/null +++ b/models/git/protected_banch_list_test.go @@ -0,0 +1,76 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package git + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestBranchRuleMatchPriority(t *testing.T) { + kases := []struct { + Rules []string + BranchName string + ExpectedMatchIdx int + }{ + { + Rules: []string{"release/*", "release/v1.17"}, + BranchName: "release/v1.17", + ExpectedMatchIdx: 1, + }, + { + Rules: []string{"release/v1.17", "release/*"}, + BranchName: "release/v1.17", + ExpectedMatchIdx: 0, + }, + { + Rules: []string{"release/**/v1.17", "release/test/v1.17"}, + BranchName: "release/test/v1.17", + ExpectedMatchIdx: 1, + }, + { + Rules: []string{"release/test/v1.17", "release/**/v1.17"}, + BranchName: "release/test/v1.17", + ExpectedMatchIdx: 0, + }, + { + Rules: []string{"release/**", "release/v1.0.0"}, + BranchName: "release/v1.0.0", + ExpectedMatchIdx: 1, + }, + { + Rules: []string{"release/v1.0.0", "release/**"}, + BranchName: "release/v1.0.0", + ExpectedMatchIdx: 0, + }, + { + Rules: []string{"release/**", "release/v1.0.0"}, + BranchName: "release/v2.0.0", + ExpectedMatchIdx: 0, + }, + { + Rules: []string{"release/*", "release/v1.0.0"}, + BranchName: "release/1/v2.0.0", + ExpectedMatchIdx: -1, + }, + } + + for _, kase := range kases { + var pbs ProtectedBranchRules + for _, rule := range kase.Rules { + pbs = append(pbs, &ProtectedBranch{RuleName: rule}) + } + pbs.sort() + matchedPB := pbs.GetFirstMatched(kase.BranchName) + if matchedPB == nil { + if kase.ExpectedMatchIdx >= 0 { + assert.Error(t, fmt.Errorf("no matched rules but expected %s[%d]", kase.Rules[kase.ExpectedMatchIdx], kase.ExpectedMatchIdx)) + } + } else { + assert.EqualValues(t, kase.Rules[kase.ExpectedMatchIdx], matchedPB.RuleName) + } + } +} diff --git a/models/git/protected_branch_list.go b/models/git/protected_branch_list.go index 99c433aa000f8..17fe6d701fb4a 100644 --- a/models/git/protected_branch_list.go +++ b/models/git/protected_branch_list.go @@ -28,12 +28,8 @@ func (rules ProtectedBranchRules) sort() { sort.Slice(rules, func(i, j int) bool { rules[i].loadGlob() rules[j].loadGlob() - if rules[i].isPlainName { - if !rules[j].isPlainName { - return true - } - } else if rules[j].isPlainName { - return true + if rules[i].isPlainName != rules[j].isPlainName { + return rules[i].isPlainName // plain name comes first, so plain name means "less" } return rules[i].CreatedUnix < rules[j].CreatedUnix }) @@ -46,7 +42,7 @@ func FindRepoProtectedBranchRules(ctx context.Context, repoID int64) (ProtectedB if err != nil { return nil, err } - rules.sort() + rules.sort() // to make non-glob rules have higher priority, and for same glob/non-glob rules, first created rules have higher priority return rules, nil } From 6a4be2cb6a6193a3f41d5e08d05044e3c54efc38 Mon Sep 17 00:00:00 2001 From: Hester Gong Date: Wed, 12 Apr 2023 02:28:40 +0800 Subject: [PATCH 07/11] Add cardtype to org/user level project on creation, edit and view (#24043) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of #23318 The way to fix the missing cardtype for user/org level projects in this PR is to port the cardtype related part from #22112 to org/user level projects' template and router functions. Before: 截屏2023-04-11 13 55 49 截屏2023-04-11 13 55 59 After: Create 截屏2023-04-11 13 27 16 Edit 截屏2023-04-11 13 27 05 View 截屏2023-04-11 13 26 56 Co-authored-by: Giteabot --- routers/web/org/projects.go | 22 ++++++++++++++++++++++ templates/projects/new.tmpl | 18 ++++++++++++++++++ templates/projects/view.tmpl | 7 +++++++ 3 files changed, 47 insertions(+) diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go index 5d1d7a15caec8..ed6a2e645fe33 100644 --- a/routers/web/org/projects.go +++ b/routers/web/org/projects.go @@ -13,6 +13,7 @@ import ( issues_model "code.gitea.io/gitea/models/issues" project_model "code.gitea.io/gitea/models/project" + attachment_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -128,6 +129,7 @@ func canWriteProjects(ctx *context.Context) bool { func NewProject(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.projects.new") ctx.Data["BoardTypes"] = project_model.GetBoardConfig() + ctx.Data["CardTypes"] = project_model.GetCardConfig() ctx.Data["CanWriteProjects"] = canWriteProjects(ctx) ctx.Data["PageIsViewProjects"] = true ctx.Data["HomeLink"] = ctx.ContextUser.HomeLink() @@ -145,6 +147,7 @@ func NewProjectPost(ctx *context.Context) { ctx.Data["CanWriteProjects"] = canWriteProjects(ctx) ctx.Data["PageIsViewProjects"] = true ctx.Data["BoardTypes"] = project_model.GetBoardConfig() + ctx.Data["CardTypes"] = project_model.GetCardConfig() ctx.HTML(http.StatusOK, tplProjectsNew) return } @@ -155,6 +158,7 @@ func NewProjectPost(ctx *context.Context) { Description: form.Content, CreatorID: ctx.Doer.ID, BoardType: form.BoardType, + CardType: form.CardType, } if ctx.ContextUser.IsOrganization() { @@ -229,6 +233,8 @@ func EditProject(ctx *context.Context) { ctx.Data["PageIsEditProjects"] = true ctx.Data["PageIsViewProjects"] = true ctx.Data["CanWriteProjects"] = canWriteProjects(ctx) + ctx.Data["CardTypes"] = project_model.GetCardConfig() + shared_user.RenderUserHeader(ctx) p, err := project_model.GetProjectByID(ctx, ctx.ParamsInt64(":id")) @@ -250,6 +256,7 @@ func EditProject(ctx *context.Context) { ctx.Data["content"] = p.Description ctx.Data["redirect"] = ctx.FormString("redirect") ctx.Data["HomeLink"] = ctx.ContextUser.HomeLink() + ctx.Data["card_type"] = p.CardType ctx.HTML(http.StatusOK, tplProjectsNew) } @@ -261,6 +268,8 @@ func EditProjectPost(ctx *context.Context) { ctx.Data["PageIsEditProjects"] = true ctx.Data["PageIsViewProjects"] = true ctx.Data["CanWriteProjects"] = canWriteProjects(ctx) + ctx.Data["CardTypes"] = project_model.GetCardConfig() + shared_user.RenderUserHeader(ctx) if ctx.HasError() { @@ -284,6 +293,7 @@ func EditProjectPost(ctx *context.Context) { p.Title = form.Title p.Description = form.Content + p.CardType = form.CardType if err = project_model.UpdateProject(ctx, p); err != nil { ctx.ServerError("UpdateProjects", err) return @@ -329,6 +339,18 @@ func ViewProject(ctx *context.Context) { return } + if project.CardType != project_model.CardTypeTextOnly { + issuesAttachmentMap := make(map[int64][]*attachment_model.Attachment) + for _, issuesList := range issuesMap { + for _, issue := range issuesList { + if issueAttachment, err := attachment_model.GetAttachmentsByIssueIDImagesLatest(ctx, issue.ID); err == nil { + issuesAttachmentMap[issue.ID] = issueAttachment + } + } + } + ctx.Data["issuesAttachmentMap"] = issuesAttachmentMap + } + linkedPrsMap := make(map[int64][]*issues_model.Issue) for _, issuesList := range issuesMap { for _, issue := range issuesList { diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl index ecb8c74565219..9accfbcc1ca9b 100644 --- a/templates/projects/new.tmpl +++ b/templates/projects/new.tmpl @@ -45,6 +45,24 @@
{{end}} + +
+ + +
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index 20c95c82789a6..41bbb83f7b1de 100644 --- a/templates/projects/view.tmpl +++ b/templates/projects/view.tmpl @@ -175,6 +175,13 @@
+ {{if eq $.Project.CardType 1}}{{/* Images and Text*/}} +
+ {{range (index $.issuesAttachmentMap .ID)}} + {{.Name}} + {{end}} +
+ {{end}}
From 890d10c7c8e18275695cef97a920bbae060bf7d1 Mon Sep 17 00:00:00 2001 From: sillyguodong <33891828+sillyguodong@users.noreply.github.com> Date: Wed, 12 Apr 2023 07:54:26 +0800 Subject: [PATCH 08/11] Fix accidental overwriting of LDAP team memberships (#24050) In the `for` loop, the value of `membershipsToAdd[org]` and `membershipsToRemove[org]` is a slice that should be appended instead of overwritten. Due to the current overwrite, the LDAP group sync only matches the last group at the moment. ## Example reproduction - an LDAP user is both a member of `cn=admin_staff,ou=people,dc=planetexpress,dc=com` and `cn=ship_crew,ou=people,dc=planetexpress,dc=com`. - configuration of `Map LDAP groups to Organization teams ` in `Authentication Sources`: ```json { "cn=admin_staff,ou=people,dc=planetexpress,dc=com":{ "test_organization":[ "admin_staff", "test_add" ] }, "cn=ship_crew,ou=people,dc=planetexpress,dc=com":{ "test_organization":[ "ship_crew" ] } ``` - start `Synchronize external user data` task in the `Dashboard`. - the user was only added for the team `test_organization.ship_crew` --- services/auth/source/source_group_sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/auth/source/source_group_sync.go b/services/auth/source/source_group_sync.go index 20b6095345377..e42f60bde248c 100644 --- a/services/auth/source/source_group_sync.go +++ b/services/auth/source/source_group_sync.go @@ -52,11 +52,11 @@ func resolveMappedMemberships(sourceUserGroups container.Set[string], sourceGrou isUserInGroup := sourceUserGroups.Contains(group) if isUserInGroup { for org, teams := range memberships { - membershipsToAdd[org] = teams + membershipsToAdd[org] = append(membershipsToAdd[org], teams...) } } else { for org, teams := range memberships { - membershipsToRemove[org] = teams + membershipsToRemove[org] = append(membershipsToRemove[org], teams...) } } } From 1380b873115c85ca9e758789b0757ae5a6610a1e Mon Sep 17 00:00:00 2001 From: GiteaBot Date: Wed, 12 Apr 2023 00:08:36 +0000 Subject: [PATCH 09/11] [skip ci] Updated translations via Crowdin --- options/locale/locale_cs-CZ.ini | 4 +-- options/locale/locale_de-DE.ini | 4 +-- options/locale/locale_el-GR.ini | 4 +-- options/locale/locale_es-ES.ini | 4 +-- options/locale/locale_fa-IR.ini | 3 +- options/locale/locale_fi-FI.ini | 3 +- options/locale/locale_fr-FR.ini | 3 +- options/locale/locale_hu-HU.ini | 3 +- options/locale/locale_id-ID.ini | 3 +- options/locale/locale_is-IS.ini | 4 +-- options/locale/locale_it-IT.ini | 4 +-- options/locale/locale_ja-JP.ini | 17 +++++++--- options/locale/locale_ko-KR.ini | 3 +- options/locale/locale_lv-LV.ini | 4 +-- options/locale/locale_nl-NL.ini | 3 +- options/locale/locale_pl-PL.ini | 3 +- options/locale/locale_pt-BR.ini | 4 +-- options/locale/locale_pt-PT.ini | 4 +-- options/locale/locale_ru-RU.ini | 56 ++++++++++++++++++++++++++++++--- options/locale/locale_si-LK.ini | 3 +- options/locale/locale_sk-SK.ini | 1 + options/locale/locale_sv-SE.ini | 3 +- options/locale/locale_tr-TR.ini | 4 +-- options/locale/locale_uk-UA.ini | 3 +- options/locale/locale_zh-CN.ini | 4 +-- options/locale/locale_zh-HK.ini | 3 +- options/locale/locale_zh-TW.ini | 4 +-- 27 files changed, 89 insertions(+), 69 deletions(-) diff --git a/options/locale/locale_cs-CZ.ini b/options/locale/locale_cs-CZ.ini index 263c06e05ad87..d71134b4db0b7 100644 --- a/options/locale/locale_cs-CZ.ini +++ b/options/locale/locale_cs-CZ.ini @@ -110,6 +110,7 @@ never=Nikdy rss_feed=RSS kanál + [aria] navbar=Navigační lišta footer=Patička @@ -2247,8 +2248,6 @@ release.edit_subheader=Vydání organizuje verze projektu. release.tag_name=Název značky release.target=Cíl release.tag_helper=Vyberte existující značku nebo vytvořte novou značku. -release.title=Název -release.content=Obsah release.prerelease_desc=Označit jako předběžná verze release.prerelease_helper=Označit vydání jako nevhodné pro produkční nasazení. release.cancel=Zrušit @@ -3109,7 +3108,6 @@ details.documentation_site=Stránka dokumentace details.license=Licence assets=Prostředky versions=Verze -versions.on= versions.view_all=Zobrazit všechny dependency.id=ID dependency.version=Verze diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini index 4e96ae9a3dc2d..2a598bb7057ae 100644 --- a/options/locale/locale_de-DE.ini +++ b/options/locale/locale_de-DE.ini @@ -107,6 +107,7 @@ never=Niemals rss_feed=RSS Feed + [aria] [filter] @@ -2184,8 +2185,6 @@ release.edit_subheader=In Releases werden Projektversionen verwaltet. release.tag_name=Tag-Name release.target=Ziel release.tag_helper=Wähle einen existierenden oder erstelle einen neuen Tag. -release.title=Titel -release.content=Inhalt release.prerelease_desc=Als Pre-Release kennzeichnen release.prerelease_helper=Dieses Release als „ungeeignet für den produktiven Einsatz“ markieren. release.cancel=Abbrechen @@ -3035,7 +3034,6 @@ details.project_site=Projektseite details.license=Lizenz assets=Dateien versions=Versionen -versions.on=am versions.view_all=Alle anzeigen dependency.id=ID dependency.version=Version diff --git a/options/locale/locale_el-GR.ini b/options/locale/locale_el-GR.ini index 87ae3f7822a63..4f65da1b66cc8 100644 --- a/options/locale/locale_el-GR.ini +++ b/options/locale/locale_el-GR.ini @@ -110,6 +110,7 @@ never=Ποτέ rss_feed=Ροή RSS + [aria] navbar=Γραμμή Πλοήγησης footer=Υποσέλιδο @@ -2277,8 +2278,6 @@ release.target=Στόχος release.tag_helper=Επιλέξτε μια υπάρχουσα ετικέτα ή δημιουργήστε μια νέα. release.tag_helper_new=Νέα ετικέτα. Αυτή η ετικέτα θα δημιουργηθεί από τον προορισμό. release.tag_helper_existing=Υπάρχουσα ετικέτα. -release.title=Τίτλος -release.content=Περιεχόμενο release.prerelease_desc=Σήμανση ως Προ-Κυκλοφορία release.prerelease_helper=Σημείωση αυτής της κυκλοφορίας ως ακατάλληλη για χρήση στη παραγωγή. release.cancel=Ακύρωση @@ -3148,7 +3147,6 @@ details.documentation_site=Ιστοσελίδα Τεκμηρίωσης details.license=Άδεια assets=Πόροι versions=Εκδόσεις -versions.on=τη versions.view_all=Προβολή όλων dependency.id=ID dependency.version=Έκδοση diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini index 045df8bca48ee..931961531d36e 100644 --- a/options/locale/locale_es-ES.ini +++ b/options/locale/locale_es-ES.ini @@ -107,6 +107,7 @@ never=Nunca rss_feed=Fuentes RSS + [aria] [filter] @@ -2215,8 +2216,6 @@ release.edit_subheader=Los lanzamientos organizan las versiones de proyectos. release.tag_name=Nombre de la etiqueta release.target=Destino release.tag_helper=Escoge una etiqueta existente o crea una nueva. -release.title=Título -release.content=Contenido release.prerelease_desc=Marcar como Pre-Lanzamiento release.prerelease_helper=Marcar este lanzamiento como no es adecuada para usar en producción. release.cancel=Cancelar @@ -3070,7 +3069,6 @@ details.project_site=Sitio del proyecto details.license=Licencia assets=Activos versions=Versiones -versions.on=en versions.view_all=Ver todo dependency.id=Id. dependency.version=Versión diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini index 3aadd1cd93cd9..fe7a2a3c6fddf 100644 --- a/options/locale/locale_fa-IR.ini +++ b/options/locale/locale_fa-IR.ini @@ -92,6 +92,7 @@ error404=صفحه موردنظر شما یا وجود نداردnem létezik, vagy er ekki til never=Aldrei + [aria] [filter] @@ -1124,8 +1125,6 @@ release.draft=Uppkast release.compare=Bera saman release.edit=breyta release.tag_name=Merkisheiti -release.title=Heiti -release.content=Innihald release.cancel=Hætta við release.delete_tag=Eyða Merki release.downloads=Niðurhöl @@ -1360,7 +1359,6 @@ details=Nánar details.author=Höfundur details.license=Hugbúnaðarleyfi versions=Útgáfur -versions.on=á versions.view_all=Sjá allar dependency.id=Auðkenni dependency.version=Útgáfa diff --git a/options/locale/locale_it-IT.ini b/options/locale/locale_it-IT.ini index f759b4c43df51..5868fd385a95c 100644 --- a/options/locale/locale_it-IT.ini +++ b/options/locale/locale_it-IT.ini @@ -107,6 +107,7 @@ never=Mai rss_feed=Feed RSS + [aria] [filter] @@ -2195,8 +2196,6 @@ release.edit_subheader=Le release organizzano le versioni del progetto. release.tag_name=Nome tag release.target=Obbiettivo release.tag_helper=Scegli un tag esistente o crea un nuovo tag. -release.title=Titolo -release.content=Contenuto release.prerelease_desc=Contrassegna come pre-release release.prerelease_helper=Contrassegna questa release come inadatta per l'uso di produzione. release.cancel=Annulla @@ -3037,7 +3036,6 @@ details.project_site=Sito Del Progetto details.license=Licenza assets=Asset versions=Versioni -versions.on=su versions.view_all=Vedi tutti dependency.id=ID dependency.version=Versione diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index 929461c3081e9..946338cff3adb 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -112,6 +112,7 @@ never=無し rss_feed=RSSフィード + [aria] navbar=ナビゲーションバー footer=フッター @@ -548,6 +549,8 @@ unfollow=フォロー解除 heatmap.loading=ヒートマップを読み込み中… user_bio=経歴 disabled_public_activity=このユーザーはアクティビティ表示を公開していません。 +email_visibility.limited=あなたのメールアドレスはすべての認証済みユーザーに表示されています +email_visibility.private=あなたのメールアドレスは、あなたと管理者のみに表示されます form.name_reserved=ユーザー名 '%s' は予約されています。 form.name_pattern_not_allowed='%s' の形式はユーザー名に使用できません。 @@ -661,6 +664,7 @@ add_email_success=新しいメールアドレスを追加しました。 email_preference_set_success=メール設定を保存しました。 add_openid_success=新しいOpenIDアドレスを追加しました。 keep_email_private=メールアドレスを隠す +keep_email_private_popup=あなたのメールアドレスは、あなたと管理者にのみ表示されます openid_desc=OpenIDを使うと外部プロバイダーに認証を委任することができます。 manage_ssh_keys=SSHキーの管理 @@ -841,7 +845,9 @@ email_notifications.andyourown=自分に関する通知も含める visibility=ユーザーの公開範囲 visibility.public=パブリック +visibility.public_tooltip=全員に表示します visibility.limited=限定 +visibility.limited_tooltip=認証済みユーザーにのみ表示します visibility.private=プライベート visibility.private_tooltip=組織のメンバーにのみ表示します @@ -930,6 +936,7 @@ delete_preexisting=既存のファイルを削除 delete_preexisting_content=%s のファイルを削除します delete_preexisting_success=%s の未登録ファイルを削除しました blame_prior=この変更より前のBlameを表示 +author_search_tooltip=最大30人までのユーザーを表示 transfer.accept=転送を承認 transfer.accept_desc=`"%s" に転送` @@ -1101,6 +1108,7 @@ download_file=ファイルをダウンロード normal_view=通常表示 line=行 lines=行 +from_comment=(コメント) editor.add_file=ファイル追加 editor.new_file=新規ファイル @@ -1363,7 +1371,7 @@ issues.open_title=オープン issues.closed_title=クローズ issues.draft_title=ドラフト issues.num_comments=%d件のコメント -issues.commented_at=`が %s にコメント` +issues.commented_at=`がコメント %s` issues.delete_comment_confirm=このコメントを削除してよろしいですか? issues.context.copy_link=リンクをコピー issues.context.quote_reply=引用して返信 @@ -1565,6 +1573,8 @@ pulls.compare_changes_desc=マージ先ブランチとプル元ブランチを pulls.has_viewed_file=閲覧済 pulls.has_changed_since_last_review=前回のレビュー後に変更あり pulls.viewed_files_label=%[1]d / %[2]d ファイル閲覧済み +pulls.expand_files=すべてのファイルを展開 +pulls.collapse_files=すべてのファイルを折り畳む pulls.compare_base=マージ先 pulls.compare_compare=プル元 pulls.switch_comparison_type=比較の種類を切り替える @@ -2302,8 +2312,7 @@ release.target=ターゲット release.tag_helper=既存のタグを選択するか、新しいタグを作成します。 release.tag_helper_new=新しいタグです。 このタグはターゲットから作成されます。 release.tag_helper_existing=存在するタグです。 -release.title=タイトル -release.content=内容 +release.title_empty=タイトルは空にできません。 release.prerelease_desc=プレリリース release.prerelease_helper=このリリースが本番使用に適さないことを示します。 release.cancel=キャンセル @@ -2415,6 +2424,7 @@ settings.permission=許可 settings.repoadminchangeteam=リポジトリ管理者はチームのアクセス権の追加・削除が可能 settings.visibility=表示 settings.visibility.public=公開 +settings.visibility.limited=限定 (認証済みユーザーにのみ表示) settings.visibility.limited_shortname=限定 settings.visibility.private=プライベート (組織メンバーにのみ表示) settings.visibility.private_shortname=プライベート @@ -3177,7 +3187,6 @@ details.documentation_site=ドキュメンテーションサイト details.license=ライセンス assets=アセット versions=バージョン -versions.on=on versions.view_all=すべて表示 dependency.id=ID dependency.version=バージョン diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini index 124f3e04de415..95e337f6ceaef 100644 --- a/options/locale/locale_ko-KR.ini +++ b/options/locale/locale_ko-KR.ini @@ -75,6 +75,7 @@ loading=불러오는 중... + [aria] [filter] @@ -1168,8 +1169,6 @@ release.edit=편집 release.source_code=소스 코드 release.tag_name=태그 이름 release.target=대상 -release.title=제목 -release.content=컨텐츠 release.prerelease_desc=프리-릴리즈로 표시 release.cancel=취소 release.publish=릴리즈 게시 diff --git a/options/locale/locale_lv-LV.ini b/options/locale/locale_lv-LV.ini index 761d630ea3018..21b1533aabb77 100644 --- a/options/locale/locale_lv-LV.ini +++ b/options/locale/locale_lv-LV.ini @@ -110,6 +110,7 @@ never=Nekad rss_feed=RSS barotne + [aria] navbar=Navigācijas josla footer=Kājene @@ -2273,8 +2274,6 @@ release.target=Mērķis release.tag_helper=Izvēlieties jau esošu tagu vai izveidojiet jaunu. release.tag_helper_new=Jauns tags. Šis tags tiks izveidots no mērķa. release.tag_helper_existing=Esošs tags. -release.title=Virsraksts -release.content=Saturs release.prerelease_desc=Atzīmēt kā pirmslaidiena versiju release.prerelease_helper=Atzīmēt, ka šo laidienu nav ieteicams lietot produkcijā. release.cancel=Atcelt @@ -3142,7 +3141,6 @@ details.documentation_site=Dokumentācijas lapa details.license=Licence assets=Resursi versions=Versijas -versions.on=publicēta versions.view_all=Parādīt visas dependency.id=ID dependency.version=Versija diff --git a/options/locale/locale_nl-NL.ini b/options/locale/locale_nl-NL.ini index 454705892ed36..88ab00c1507db 100644 --- a/options/locale/locale_nl-NL.ini +++ b/options/locale/locale_nl-NL.ini @@ -107,6 +107,7 @@ never=Nooit rss_feed=RSS Feed + [aria] [filter] @@ -2131,8 +2132,6 @@ release.source_code=Broncode release.tag_name=Tagnaam release.target=Doel release.tag_helper=Kies een bestaande tag, of creëer een nieuwe tag bij publiceren. -release.title=Titel -release.content=Inhoud release.prerelease_desc=Markeren als voorlopige versie release.prerelease_helper=Markeer deze release als ongeschikt voor productiedoeleinden. release.cancel=Annuleren diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini index 99635f5aff275..e82a329ee93d8 100644 --- a/options/locale/locale_pl-PL.ini +++ b/options/locale/locale_pl-PL.ini @@ -105,6 +105,7 @@ error404=Strona, do której próbujesz dotrzeć nie istnieje lu never=Nigdy + [aria] [filter] @@ -1973,8 +1974,6 @@ release.edit_subheader=Wydania pozwalają na zorganizowanie wersji projektu. release.tag_name=Nazwa tagu release.target=Cel release.tag_helper=Wybierz istniejący tag lub stwórz nowy. -release.title=Tytuł -release.content=Treść release.prerelease_desc=Oznacz jako wczesne wydanie release.prerelease_helper=Oznacz to wydanie jako nieprzeznaczone na użytek produkcyjny. release.cancel=Anuluj diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 03562c1a0043b..0c48b79071659 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -110,6 +110,7 @@ never=Nunca rss_feed=Feed RSS + [aria] navbar=Barra de navegação footer=Rodapé @@ -2273,8 +2274,6 @@ release.target=Destino release.tag_helper=Escolha uma tag existente, ou crie uma nova tag. release.tag_helper_new=Nova tag. Esta tag será criada a partir do alvo. release.tag_helper_existing=Tag existente. -release.title=Título -release.content=Conteúdo release.prerelease_desc=Marcar como pré-lançamento release.prerelease_helper=Marcar esta versão como inadequada para uso em produção. release.cancel=Cancelar @@ -3144,7 +3143,6 @@ details.documentation_site=Site da Documentação details.license=Licença assets=Recursos versions=Versões -versions.on=em versions.view_all=Ver todas dependency.id=ID dependency.version=Versão diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini index 75a118f40a328..3794b47906f05 100644 --- a/options/locale/locale_pt-PT.ini +++ b/options/locale/locale_pt-PT.ini @@ -112,6 +112,7 @@ never=Nunca rss_feed=Fonte RSS + [aria] navbar=Barra de navegação footer=Rodapé @@ -2311,9 +2312,7 @@ release.target=Alvo release.tag_helper=Escolha uma etiqueta existente ou crie uma nova. release.tag_helper_new=Nova etiqueta. Esta etiqueta será criada a partir do destino. release.tag_helper_existing=Etiqueta existente. -release.title=Título release.title_empty=O título não pode estar vazio. -release.content=Conteúdo release.prerelease_desc=Marcar como pré-lançamento release.prerelease_helper=Marcar este lançamento como inadequado para uso em produção. release.cancel=Cancelar @@ -3188,7 +3187,6 @@ details.documentation_site=Página web da documentação details.license=Licença assets=Recursos versions=Versões -versions.on=ligado versions.view_all=Ver todas dependency.id=ID dependency.version=Versão diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index f4112dbc6fa98..ba29ed9d1d30e 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -112,6 +112,7 @@ never=Никогда rss_feed=RSS-лента + [aria] navbar=Панель навигации footer=Подвал @@ -584,6 +585,7 @@ comment_type_group_deadline=Модификации сроков выполнен comment_type_group_dependency=Модификации зависимостей comment_type_group_lock=Смена статуса ограничения на обсуждение comment_type_group_review_request=Запросы на рецензию +comment_type_group_project=Проект saved_successfully=Ваши настройки успешно сохранены. privacy=Приватность keep_activity_private=Скрыть активность со страницы профиля @@ -713,6 +715,7 @@ principal_state_desc=Участник был тут в последние 7 дн show_openid=Показывать в профиле hide_openid=Скрыть из профиля ssh_disabled=SSH отключён +ssh_signonly=SSH в настоящее время отключён, поэтому эти ключи используются только для проверки подписей коммитов. ssh_externally_managed=Этот SSH ключ управляется извне для этого пользователя manage_social=Управление привязанными учетными записями в соцсетях social_desc=Эти социальные сети связаны с вашим аккаунтом Gitea. Их можно использовать для входа в учетную запись Gitea, поэтому необходимо быть уверенным в том, что никаких посторонних аккаунтов не подключено. @@ -868,6 +871,7 @@ default_branch_helper=Ветка по умолчанию является баз mirror_prune=Очистить mirror_prune_desc=Удаление устаревших отслеживаемых ссылок mirror_interval_invalid=Недопустимый интервал зеркалирования. +mirror_sync_on_commit=Синхронизировать при отправке коммитов mirror_address=Клонировать по URL mirror_address_desc=Поместите необходимые учетные данные в секцию авторизации. mirror_address_url_invalid=Указанный URL некорректен. Нужно правильно экранировать все компоненты URL. @@ -896,7 +900,7 @@ delete_preexisting_label=Удалить delete_preexisting=Удалить уже существующие файлы delete_preexisting_content=Удалить файлы из %s delete_preexisting_success=Удалены непринятые файлы в %s -blame_prior=Посмотреть авторство до этих изменений +blame_prior=Показать авторство предшествующих изменений author_search_tooltip=Показывает максимум 30 пользователей transfer.accept=Принять трансфер @@ -937,6 +941,7 @@ form.name_pattern_not_allowed=Шаблон имени репозитория '%s need_auth=Авторизация migrate_options=Параметры миграции migrate_service=Сервис миграции +migrate_options_mirror_helper=Этот репозиторий будет зеркалом migrate_options_lfs=Перенос LFS файлов migrate_options_lfs_endpoint.label=LFS Endpoint migrate_options_lfs_endpoint.description=Миграция попытается использовать ваш Git удаленно, чтобы определить сервер LFS. Вы также можете указать пользовательскую конечную точку, если данные хранятся в другом месте. @@ -1033,10 +1038,18 @@ file_view_rendered=Просмотр отрендеренного file_view_raw=Посмотреть исходник file_permalink=Постоянная ссылка file_too_large=Этот файл слишком большой, поэтому он не может быть отображён. +invisible_runes_header=`Этот файл содержит невидимые символы Юникода!` +invisible_runes_description=`Этот файл содержит невидимые символы Юникода, которые могут быть отображены не так, как показано ниже. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы показать скрытые символы.` +ambiguous_runes_header=`Этот файл содержит неоднозначные символы Юникода!` +ambiguous_runes_description=`Этот файл содержит неоднозначные символы Юникода, которые могут быть перепутаны с другими в текущей локали. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы подсветить эти символы.` +invisible_runes_line=`В этой строке есть невидимые символы Юникода` +ambiguous_runes_line=`В этой строке есть неоднозначные символы Юникода` +ambiguous_character=`%[1]c [U+%04[1]X] можно спутать с %[2]c [U+%04[2]X]` escape_control_characters=Экранировать unescape_control_characters=Убрать экранирование file_copy_permalink=Копировать постоянную ссылку +view_git_blame=Показать git blame video_not_supported_in_browser=Ваш браузер не поддерживает HTML5 'video' тэг. audio_not_supported_in_browser=Ваш браузер не поддерживает HTML5 'audio' тэг. stored_lfs=Хранится Git LFS @@ -1046,12 +1059,14 @@ commit_graph.select=Выбрать ветку commit_graph.hide_pr_refs=Скрыть запросы на слияние commit_graph.monochrome=Моно commit_graph.color=Цвет +blame=Ответственный download_file=Скачать файл normal_view=Обычный вид line=строка lines=строки from_comment=(комментарий) +editor.add_file=Добавить файл editor.new_file=Новый файл editor.upload_file=Загрузить файл editor.edit_file=Редактировать файл @@ -1076,12 +1091,15 @@ editor.add=Создал(а) '%s' editor.update=Изменил(а) на '%s' editor.delete=Удалить '%s' editor.patch=Применить патч +editor.patching=Исправление: +editor.fail_to_apply_patch=Невозможно применить патч '%s' editor.new_patch=Новый патч editor.commit_message_desc=Добавьте необязательное расширенное описание… editor.commit_directly_to_this_branch=Сделайте коммит прямо в ветку %s. editor.create_new_branch=Создайте новую ветку для этого коммита, и сделайте запрос на слияние. editor.create_new_branch_np=Создать новую ветку для этого коммита. editor.propose_file_change=Предложить изменение файла +editor.new_branch_name=Укажите имя новой ветки для этого коммита editor.new_branch_name_desc=Новое название ветки… editor.cancel=Отмена editor.filename_cannot_be_empty=Имя файла не может быть пустым. @@ -1100,6 +1118,8 @@ editor.commit_empty_file_text=Файл, который вы собираетес editor.no_changes_to_show=Нет изменений. editor.fail_to_update_file=Ошибка обновления/создания файла '%s'. editor.fail_to_update_file_summary=Ошибка: +editor.push_rejected_no_message=Изменение отклонено сервером без сообщения. Пожалуйста, проверьте хуки Git. +editor.push_rejected=Изменение отклонено сервером. Пожалуйста, проверьте хуки Git. editor.add_subdir=Добавить директорию… editor.unable_to_upload_files=Не удалось загрузить файлы в '%s' из-за ошибки: %v editor.upload_file_is_locked=Файл '%s' заблокирован %s. @@ -1108,12 +1128,15 @@ editor.cannot_commit_to_protected_branch=Нельзя коммитить в за editor.no_commit_to_branch=Невозможно совершить прямой коммит в ветку по причине: editor.user_no_push_to_branch=Пользователь не может отправлять коммиты в эту ветку editor.require_signed_commit=Ветка ожидает подписанный коммит +editor.cherry_pick=Перенести изменения %s в: +editor.revert=Откатить %s к: commits.desc=Просмотр истории изменений исходного кода. commits.commits=Коммитов commits.no_commits=Ничего общего в коммитах. '%s' и '%s' имеют совершенно разные истории. commits.nothing_to_compare=Эти ветки одинаковы. commits.search=Поиск коммитов… +commits.search.tooltip=Можно предварять ключевые слова префиксами "author:", "committer:", "after:", или "before:", например "revert author:Alice before:2019-01-13". commits.find=Поиск commits.search_all=Все ветки commits.author=Автор @@ -1124,7 +1147,9 @@ commits.newer=Новее commits.signed_by=Подписано commits.signed_by_untrusted_user=Подписано ненадежным пользователем commits.gpg_key_id=Идентификатор GPG ключа +commits.ssh_key_fingerprint=Отпечаток ключа SSH +commit.operations=Операции commit.revert=Откатить commit.revert-header=Откат: %s commit.revert-content=Выбрать ветку для отката: @@ -1132,6 +1157,7 @@ commit.cherry-pick=Перенос commit.cherry-pick-header=Cherry-pick: %s commit.cherry-pick-content=Выбрать ветку для переноса: +ext_issues=Доступ к внешним задачам ext_issues.desc=Ссылка на внешнюю систему отслеживания ошибок. projects=Проекты @@ -1156,9 +1182,15 @@ projects.type.bug_triage=Планирование работы с багами projects.template.desc=Шаблон проекта projects.template.desc_helper=Выберите шаблон проекта для начала projects.type.uncategorized=Без категории +projects.column.edit=Изменить столбец projects.column.edit_title=Название projects.column.new_title=Название +projects.column.new_submit=Создать столбец projects.column.new=Новый столбец +projects.column.set_default=Установить по умолчанию +projects.column.set_default_desc=Назначить этот столбец по умолчанию для неклассифицированных задач и запросов на слияние +projects.column.delete=Удалить столбец +projects.column.deletion_desc=При удалении столбца проекта все связанные задачи перемещаются в 'Без категории'. Продолжить? projects.column.color=Цвет projects.open=Открыть projects.close=Закрыть @@ -1212,7 +1244,7 @@ issues.label_templates.fail_to_load_file=Не удалось загрузить issues.add_label=добавил(а) метку %s %s issues.add_labels=добавил(а) метки %s %s issues.remove_label=удалил(а) метку %s %s -issues.remove_labels=удалён %s с метками %s +issues.remove_labels=удалил(а) метки %s %s issues.add_remove_labels=добавил(а) метки %s и удалил(а) %s %s issues.add_milestone_at=`добавил(а) к этапу %s %s` issues.add_project_at=`добавил(а) в %s проект %s` @@ -1236,16 +1268,20 @@ issues.filter_label_exclude=`Используйте alt + cli issues.filter_label_no_select=Все метки issues.filter_milestone=Этап issues.filter_milestone_no_select=Все этапы +issues.filter_project=Проект +issues.filter_project_all=Все проекты issues.filter_project_none=Нет проекта issues.filter_assignee=Назначено issues.filter_assginee_no_select=Все назначения issues.filter_poster=Автор +issues.filter_poster_no_select=Все авторы issues.filter_type=Тип issues.filter_type.all_issues=Все задачи issues.filter_type.assigned_to_you=Назначено вам issues.filter_type.created_by_you=Созданные вами issues.filter_type.mentioning_you=Вы упомянуты issues.filter_type.review_requested=Проверка запрошена +issues.filter_type.reviewed_by_you=Проверенные вами issues.filter_sort=Сортировать issues.filter_sort.latest=Новейшие issues.filter_sort.oldest=Старейшие @@ -1259,6 +1295,7 @@ issues.filter_sort.moststars=Больше звезд issues.filter_sort.feweststars=Меньше звезд issues.filter_sort.mostforks=Больше форков issues.filter_sort.fewestforks=Меньше форков +issues.keyword_search_unavailable=В настоящее время поиск по ключевым словам недоступен. Обратитесь к администратору сайта. issues.action_open=Открыть issues.action_close=Закрыть issues.action_label=Метка @@ -1266,7 +1303,12 @@ issues.action_milestone=Этап issues.action_milestone_no_select=Нет этапа issues.action_assignee=Ответственный issues.action_assignee_no_select=Нет ответственного +issues.action_check=Выбрать/отменить выбор +issues.action_check_all=Выбрать/отменить выбор всех элементов issues.opened_by=открыта %[1]s %[3]s +pulls.merged_by=от %[3]s был слит %[1]s +pulls.merged_by_fake=от %[2]s был слит %[1]s +issues.closed_by=от %[3]s была закрыта %[1]s issues.opened_by_fake=открыт %[1]s пользователем %[2]s issues.closed_by_fake=%[2]s закрыл(а) %[1]s issues.previous=Предыдущая @@ -1283,6 +1325,7 @@ issues.context.reference_issue=Ссылка в новой задаче issues.context.edit=Редактировать issues.context.delete=Удалить issues.no_content=Пока нет содержимого. +issues.close=Закрыть задачу issues.pull_merged_at=`объединил(а) коммит %[2]s в %[3]s %[4]s` issues.manually_pull_merged_at=`%[4]s вручную объединил(а) коммит %[2]s в %[3]s` issues.close_comment_issue=Прокомментировать и закрыть @@ -1615,6 +1658,8 @@ wiki.create_first_page=Создать первую страницу wiki.page=Страница wiki.filter_page=Фильтр страницы wiki.new_page=Страница +wiki.page_title=Заголовок страницы +wiki.page_content=Содержимое страницы wiki.default_commit_message=Описание изменения вики-страницы (необязательно). wiki.save_page=Сохранить страницу wiki.last_commit_info=%s редактировал(а) эту страницу %s @@ -2135,9 +2180,9 @@ release.edit_subheader=Подробный журнал изменений мож release.tag_name=Имя тега release.target=Цель release.tag_helper=Выберите существующий тег, или создайте новый. -release.title=Заголовок +release.title=Название релиза release.title_empty=Заголовок не может быть пустым. -release.content=Содержимое +release.message=Опишите этот релиз release.prerelease_desc=Это предварительный релиз release.prerelease_helper=Отдельно отметим, что этот релиз не готов к использованию в продакшене. release.cancel=Отменить @@ -2416,6 +2461,7 @@ dashboard.gc_times=Количество сборок мусора dashboard.delete_old_actions=Удалите все старые действия из базы данных dashboard.delete_old_actions.started=Удалите все старые действия из запущенной базы данных. dashboard.update_checker=Проверка обновлений +dashboard.delete_old_system_notices=Удалить все старые системные уведомления из базы данных users.user_manage_panel=Панель управления пользователями users.new_account=Создать новый аккаунт @@ -2845,6 +2891,7 @@ monitor.queue.pool.cancel_desc=Выход из очереди без групп notices.system_notice_list=Уведомления системы notices.view_detail_header=Подробности уведомления +notices.operations=Операции notices.select_all=Выбрать всё notices.deselect_all=Отменить выделение notices.inverse_selection=Инверсия выделения @@ -2965,7 +3012,6 @@ details.author=Автор details.project_site=Сайт проекта details.license=Лицензия versions=Версии -versions.on=вкл versions.view_all=Показать всё dependency.version=Версия chef.install=Чтобы установить пакет, выполните следующую команду: diff --git a/options/locale/locale_si-LK.ini b/options/locale/locale_si-LK.ini index 748251506af93..2f769ba9dd365 100644 --- a/options/locale/locale_si-LK.ini +++ b/options/locale/locale_si-LK.ini @@ -92,6 +92,7 @@ error404=ඔබ ළඟා වීමට උත්සාහ කරන පිටු never=කිසි විටෙකත් + [aria] [filter] @@ -1970,8 +1971,6 @@ release.edit_subheader=නිකුතු ව්යාපෘති අනුව release.tag_name=ටැග් නම release.target=ඉලක්කය release.tag_helper=පවතින ටැගය තෝරන්න හෝ නව ටැගය සාදන්න. -release.title=සිරැසිය -release.content=අන්තර්ගතය release.prerelease_desc=පූර්ව නිකුතුව ලෙස සලකුණු කරන්න release.prerelease_helper=නිෂ්පාදන භාවිතය සඳහා නුසුදුසු මෙම නිකුතුව සලකුණු කරන්න. release.cancel=අවලංගු කරන්න diff --git a/options/locale/locale_sk-SK.ini b/options/locale/locale_sk-SK.ini index 43727ad6fe144..bd6dc2ea7188c 100644 --- a/options/locale/locale_sk-SK.ini +++ b/options/locale/locale_sk-SK.ini @@ -106,6 +106,7 @@ never=Nikdy rss_feed=RSS kanál + [aria] [filter] diff --git a/options/locale/locale_sv-SE.ini b/options/locale/locale_sv-SE.ini index 44de685672a8a..730b79a91bdd5 100644 --- a/options/locale/locale_sv-SE.ini +++ b/options/locale/locale_sv-SE.ini @@ -81,6 +81,7 @@ error404=Sidan du försöker nå finns inte eller så h + [aria] [filter] @@ -1592,8 +1593,6 @@ release.edit_subheader=Releaser organiserar projektversioner. release.tag_name=Taggnamn release.target=Mål release.tag_helper=Välj en existerande tagg eller skapa en ny tagg. -release.title=Titel -release.content=Innehåll release.prerelease_desc=Markera som en Pre-Release release.prerelease_helper=Markera denna Release olämpliga för användning i produktion. release.cancel=Avbryt diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index e0d3fe15e9de1..304643b1f13c5 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -110,6 +110,7 @@ never=Asla rss_feed=RSS Beslemesi + [aria] navbar=Gezinti Çubuğu footer=Alt Bilgi @@ -2213,8 +2214,6 @@ release.edit_subheader=Sürümler proje versiyonlarını yönetmenizi sağlar. release.tag_name=Etiket adı release.target=Hedef release.tag_helper=Mevcut bir etiket seçin veya yeni bir etiket oluşturun. -release.title=Başlık -release.content=İçerik release.prerelease_desc=Sürüm Öncesi Olarak İşaretle release.prerelease_helper=Bu sürümü, gerçek kullanım için uygun değildir olarak işaretleyin. release.cancel=İptal @@ -3068,7 +3067,6 @@ details.project_site=Proje Web Sitesi details.license=Lisans assets=Varlıklar versions=Sürümler -versions.on=açık versions.view_all=Tümünü görüntüle dependency.id=Kimlik dependency.version=Sürüm diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini index 3fae52b59375c..137d372b473d8 100644 --- a/options/locale/locale_uk-UA.ini +++ b/options/locale/locale_uk-UA.ini @@ -93,6 +93,7 @@ error404=Сторінка, до якої ви намагаєтеся зверн never=Ніколи + [aria] [filter] @@ -2035,8 +2036,6 @@ release.edit_subheader=Публікація релізів допоможе ва release.tag_name=Назва тегу release.target=Ціль release.tag_helper=Виберіть існуючий тег або створіть новий. -release.title=Заголовок -release.content=Зміст release.prerelease_desc=Позначити як пре-реліз release.prerelease_helper=Позначте цей випуск непридатним для ПРОД використання. release.cancel=Відмінити diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index ed9e75a3db8d1..953a69497d3fc 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -112,6 +112,7 @@ never=从不 rss_feed=RSS 订阅源 + [aria] navbar=导航栏 footer=页脚 @@ -2303,8 +2304,6 @@ release.target=目标分支 release.tag_helper=选择一个存在的标签或者创建新标签。 release.tag_helper_new=新标签。此标签将从目标创建。 release.tag_helper_existing=现有标签。 -release.title=标题 -release.content=内容 release.prerelease_desc=标记为预发行 release.prerelease_helper=标记此版本不适合生产使用。 release.cancel=取消 @@ -3178,7 +3177,6 @@ details.documentation_site=文档站点 details.license=许可协议 assets=文件 versions=版本 -versions.on=于 versions.view_all=查看全部 dependency.id=ID dependency.version=版本 diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini index 0c5060a59ae26..8e81ca8b8f684 100644 --- a/options/locale/locale_zh-HK.ini +++ b/options/locale/locale_zh-HK.ini @@ -51,6 +51,7 @@ enabled=已啟用 + [aria] [filter] @@ -623,8 +624,6 @@ release.edit=編輯 release.source_code=程式碼 release.tag_name=標籤名稱 release.target=目標分支 -release.title=標題 -release.content=內容 release.cancel=取消 release.publish=發佈版本 release.save_draft=儲存草稿 diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini index e0b1f6c0d8b81..b6698314da221 100644 --- a/options/locale/locale_zh-TW.ini +++ b/options/locale/locale_zh-TW.ini @@ -112,6 +112,7 @@ never=從來沒有 rss_feed=RSS 摘要 + [aria] navbar=導航列 footer=頁尾 @@ -2311,9 +2312,7 @@ release.target=目標分支 release.tag_helper=新增或選擇現有的標籤。 release.tag_helper_new=新標籤,將在目標上建立此標籤。 release.tag_helper_existing=現有的標籤。 -release.title=標題 release.title_empty=標題不可為空。 -release.content=內容 release.prerelease_desc=標記為 Pre-Release release.prerelease_helper=標記此版本不適合生產使用。 release.cancel=取消 @@ -3188,7 +3187,6 @@ details.documentation_site=文件網站 details.license=授權條款 assets=檔案 versions=版本 -versions.on=於 versions.view_all=檢視全部 dependency.id=ID dependency.version=版本 From 6892e2b8efff4465acd702e702d16f7aadd07187 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 12 Apr 2023 08:44:26 +0800 Subject: [PATCH 10/11] Use reactive store to share data between components (#23996) Follow #23947 * Use reactive store to share data between components * Remove no-op `this.hashListener = window.addEventListener()` because `addEventListener` returns void/undefined. Reference: https://vuejs.org/guide/scaling-up/state-management.html#simple-state-management-with-reactivity-api Screenshot (the same as before):
image
--------- Co-authored-by: silverwind --- web_src/js/components/DiffFileTree.vue | 11 ++++++----- web_src/js/components/DiffFileTreeItem.vue | 14 ++++---------- web_src/js/modules/stores.js | 5 +++++ 3 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 web_src/js/modules/stores.js diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index 1ead1458e9456..9fc08af1fc2f1 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -5,7 +5,7 @@ >
- +
{{ tooManyFilesMessage }}{{ showMoreMessage }} @@ -17,6 +17,7 @@ import DiffFileTreeItem from './DiffFileTreeItem.vue'; import {doLoadMoreFiles} from '../features/repo-diff.js'; import {toggleElem} from '../utils/dom.js'; +import {DiffTreeStore} from '../modules/stores.js'; const {pageData} = window.config; const LOCAL_STORAGE_KEY = 'diff_file_tree_visible'; @@ -28,7 +29,7 @@ export default { pageData.diffFileInfo.fileTreeIsVisible = fileTreeIsVisible; return { ...pageData.diffFileInfo, - selectedFile: '' + store: DiffTreeStore, }; }, computed: { @@ -102,10 +103,10 @@ export default { document.querySelector('.diff-toggle-file-tree-button').addEventListener('click', this.toggleVisibility); this.hashChangeListener = () => { - this.selectedFile = window.location.hash; + this.store.selectedItem = window.location.hash; }; - this.hashListener = window.addEventListener('hashchange', this.hashChangeListener); - this.selectedFile = window.location.hash; + this.hashChangeListener(); + window.addEventListener('hashchange', this.hashChangeListener); }, unmounted() { document.querySelector('.diff-toggle-file-tree-button').removeEventListener('click', this.toggleVisibility); diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue index 9fdb78875db62..baaa01b782571 100644 --- a/web_src/js/components/DiffFileTreeItem.vue +++ b/web_src/js/components/DiffFileTreeItem.vue @@ -1,7 +1,7 @@