summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change `valid_until` translation to `valid_until_date` and include ↵Yarden Shoham2023-05-062-2/+2
| | | | | | | | | | | | | placeholder for the date (#24563) - Similar to #24550 - Similar to #24562 The correct thing to do is to translate the entire phrase into a single string. The previous translation assumed all languages have a space between the "valid until" and the date (and that "valid until" comes before the date). Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix docs failing the build on `main` (#24561)Yarden Shoham2023-05-061-2/+2
| | | | | | | | Regression from https://github.com/go-gitea/gitea/pull/23380 First failing build: https://drone.gitea.io/go-gitea/gitea/74565 https://github.com/go-gitea/gitea/actions/runs/4897332409/jobs/8745242395 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Improve wiki user title test (#24559)wxiaoguang2023-05-061-1/+4
| | | | | | The `..` should be covered by TestUserTitleToWebPath. Otherwise, if the random string is "..", it causes unnecessary failure in TestUserWebGitPathConsistency
* Fix incorrect user visibility (#24557)Zettat1232023-05-061-2/+2
| | | Fix #24555
* Change `join_on` translation to `joined_on` and include placeholder for the ↵Yarden Shoham2023-05-065-5/+5
| | | | | | | | | | | | | | | | date (#24550) The correct thing to do is to translate the entire phrase into a single string. The previous translation assumed all languages have a space between the "joined on" and the date (and that "joined on" comes before the date). Some languages, like Hebrew, have no space between the "joined on" and the date. For example: ```ini joined_on=נרשם ב-%s ``` ("joined" becomes נרשם, "on" is ב and when paired with a date we use a dash to connect ב with the date)
* Require at least one unit to be enabled (#24189)Lunny Xiao2023-05-069-75/+109
| | | | | | | | | | | | | | Don't remember why the previous decision that `Code` and `Release` are non-disable units globally. Since now every unit include `Code` could be disabled, maybe we should have a new rule that the repo should have at least one unit. So any unit could be disabled. Fixes #20960 Fixes #7525 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: yp05327 <576951401@qq.com>
* Fix broken `README` link (#24546)JakobDev2023-05-061-1/+1
|
* Check latest version on CI (#24556)Lunny Xiao2023-05-062-0/+6
|
* Add RPM registry (#23380)KN4CK3R2023-05-0529-43/+1998
| | | | | | | | | | | | | | | Fixes #20751 This PR adds a RPM package registry. You can follow [this tutorial](https://opensource.com/article/18/9/how-build-rpm-packages) to build a *.rpm package for testing. This functionality is similar to the Debian registry (#22854) and therefore shares some methods. I marked this PR as blocked because it should be merged after #22854. ![grafik](https://user-images.githubusercontent.com/1666336/223806549-d8784fd9-9d79-46a2-9ae2-f038594f636a.png)
* Docs for Gitea Actions (#24405)Jason Song2023-05-0514-1/+888
| | | | | | | | | | | | | | | | | A new documentation section for Gitea Actions. Some content comes from: - [Hacking on Gitea Actions](https://blog.gitea.io/2023/03/hacking-on-gitea-actions/) - The README of [act_runner](https://gitea.com/gitea/act_runner) - @ChristopherHX's excellent overview of the differences between Gitea Actions and GitHub Actions in [this comment](https://github.com/go-gitea/gitea/issues/13539#issuecomment-1448888850). --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update LDAP filters to include both username and email address (#24547)Gary Moon2023-05-055-13/+13
| | | | | | | Since the login form label for user_name unconditionally displays `Username or Email Address` for the `user_name` field, bring matching LDAP filters to more prominence in the documentation/placeholders. Signed-off-by: Gary Moon <gary@garymoon.net>
* Temporarily disable PATs until next release (#24527)Kyle D2023-05-051-2/+5
| | | | | | | This might be a bit contentious, but I think we should try to limit the impact of deprecating scoped PATs with the rewrite proposed here we're working on for v1.20: https://github.com/go-gitea/gitea/issues/24501 We should have a PR opened shortly to re-scope the routes.
* Replace placeholders in licenses (#24354)Jason Song2023-05-054-3/+330
| | | | | | | | | | | | | | | | | | | | | | | | | Replace #22117. Implement it in a more maintainable way. Some licenses have placeholders e.g. the BSD licenses start with this line: ``` Copyright (c) <year> <owner>. ``` This PR replaces the placeholders with the correct value when initialize a new repo. ### FAQ - Why not use a regex? It will be a pretty complicated regex which could be hard to maintain. - There're still missing placeholders. There are over 500 licenses, it's impossible for anyone to inspect all of them alone. Please help to add them if you find any, and it is also OK to leave them for the future. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix the permission of team's `Actions` unit issue (#24536)sillyguodong2023-05-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | close #24449 The unit of `Actions` should be contorlled not only by `repository.DISABLED_REPO_UNITS` but also by `actions.ENABLED` in the `app.ini`. Previously, the permission of the team's `Actions` unit was not controlled by `actions.Enabled`. So, even if the user sets `actions.Enabled` to false, he can still select the permission of the `Actions` unit for the team. This PR makes the permissions of the team's `Actions` unit also controlled by `actions.Enabled`. Just append`TypeActions` into `DisabledRepoUnits` slice when initializing if `actions.Enabled` is false. ### Changes: If `Actions` is set disbaled in `app.ini`, like below: ```yaml [actions] ENABLED = false ``` 1. If user try to create/edit a team, will prompt user that `Actions` is disabled. ![image](https://user-images.githubusercontent.com/33891828/236370415-961082b2-82d2-4d9e-8025-83872ad08cbb.png) 2. `actions` is not displayed in the sidebar on the team details page ![image](https://user-images.githubusercontent.com/33891828/236371817-f39f9bc9-5926-4b88-b5e6-d93617fcfb07.png)
* Bump golang deps (#24533)techknowlogick2023-05-053-262/+314
|
* Fix mirrors repository disapeared on user dashboard (#24520)Lunny Xiao2023-05-051-1/+1
| | | Fix regression from #23405
* Revert "Prevent a user with a different email from accepting the team ↵Lunny Xiao2023-05-053-26/+11
| | | | | invite" (#24531) Reverts go-gitea/gitea#24491
* Fix form method/class (#24535)wxiaoguang2023-05-051-3/+3
| | | Fix #24534
* Fix typo in rename branch dialog (#24537)sillyguodong2023-05-051-1/+1
| | | Fix https://github.com/go-gitea/gitea/pull/24512#discussion_r1185664695
* Check length of `LogIndexes` in case it is outdated (#24516)Jason Song2023-05-041-2/+12
| | | Fix #24458
* Harmonize title formatting in ↵Benjamin Loison2023-05-051-1/+1
| | | | `docs/content/doc/development/api-usage.en-us.md` (#24529)
* automate locking closed threads (#24525)techknowlogick2023-05-052-23/+21
| | | | | | | | | With comments happening on closed issues/prs this locks issues that have been closed for >45days. This allows for comments on recently closed issues/prs to still happen. --------- Co-authored-by: silverwind <me@silverwind.io>
* [skip ci] Updated translations via CrowdinGiteaBot2023-05-051-0/+123
|
* Display warning when user try to rename default branch (#24512)sillyguodong2023-05-043-0/+11
| | | | | | | | | | | | | | | Follow #24380 It's better to warn users when they try to rename the default branch. ![image](https://user-images.githubusercontent.com/33891828/236107929-c8ac2854-dd0f-4500-a0a7-800c8fe48861.png) --------- Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Upgrade to Node 20 on CI, enable actions cancellation (#24524)silverwind2023-05-046-9/+29
| | | | | | | | | | | | - Upgrade node, the [snap](https://github.com/go-gitea/gitea/blob/7abe958f5b507efa676fb3b2e27d30517f6d1908/snap/snapcraft.yaml#L47) is excluded from this because [there is no Node 20 snap yet](https://snapcraft.io/node). - Add actions build cancellation based on [this](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value). --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix incorrectly quoted translation (#24514)Lunny Xiao2023-05-041-1/+1
| | | | Looks like crowdin cannot recognize a value starting with a double quote but not end with a double quote.
* Fix color for transfer related buttons when having no permission to act (#24510)Hester Gong2023-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: <img width="1410" alt="Screen Shot 2023-05-04 at 09 28 23" src="https://user-images.githubusercontent.com/17645053/236100146-2b64d274-2d79-4b4c-827c-3906a2a9dbb7.png"> <img width="1413" alt="Screen Shot 2023-05-04 at 09 28 30" src="https://user-images.githubusercontent.com/17645053/236100157-15c12e83-a4f5-4b4e-b26b-73a8ce8bc0db.png"> After: With no permission: <img width="1409" alt="Screen Shot 2023-05-04 at 12 17 12" src="https://user-images.githubusercontent.com/17645053/236144666-c2bb6ca2-59e1-45ae-93cd-d43545500d06.png"> <img width="1402" alt="Screen Shot 2023-05-04 at 12 17 17" src="https://user-images.githubusercontent.com/17645053/236144677-c51a65cf-8aef-4566-b265-14b2ebb46d0b.png"> With permission: <img width="1412" alt="Screen Shot 2023-05-04 at 12 16 45" src="https://user-images.githubusercontent.com/17645053/236144565-9c5aa9a6-1424-49e3-a2b2-a129fecb856c.png"> <img width="1420" alt="Screen Shot 2023-05-04 at 12 16 51" src="https://user-images.githubusercontent.com/17645053/236144573-a4064136-80d9-4c41-8f98-f51b4352bdf7.png"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Fix some mistakes when using `ignSignIn` (#24415)wxiaoguang2023-05-041-7/+7
| | | | | | | | | | | | | | Some old code doesn't respect the definition of `RequireSignInView` (the `ignSignIn` is forgotten). After #24413, this PR will do more fixes, ~~and rename the strange `ignSignIn` to `optSignIn`.~~ This PR is ready for review, I think we can postpone the "ignSignIn" renaming to another, to make this PR simple and clear. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unused zapx replace statement on go.mod (#24515)Lunny Xiao2023-05-041-2/+0
| | | | | Fix #23617 Co-authored-by: Giteabot <teabot@gitea.io>
* Don't display creating page button in a mirror wiki repository (#24395)Lunny Xiao2023-05-043-2/+3
| | | | A mirror repository with wiki is also a mirror. So creating page from UI should be disabled. This PR hides the button like other places.
* Improve template system and panic recovery (#24461)wxiaoguang2023-05-0425-363/+276
| | | | | | | | | | | | | | | | | | | | | | | | | Partially for #24457 Major changes: 1. The old `signedUserNameStringPointerKey` is quite hacky, use `ctx.Data[SignedUser]` instead 2. Move duplicate code from `Contexter` to `CommonTemplateContextData` 3. Remove incorrect copying&pasting code `ctx.Data["Err_Password"] = true` in API handlers 4. Use one unique `RenderPanicErrorPage` for panic error page rendering 5. Move `stripSlashesMiddleware` to be the first middleware 6. Install global panic recovery handler, it works for both `install` and `web` 7. Make `500.tmpl` only depend minimal template functions/variables, avoid triggering new panics Screenshot: <details> ![image](https://user-images.githubusercontent.com/2114189/235444895-cecbabb8-e7dc-4360-a31c-b982d11946a7.png) </details>
* Faster git.GetDivergingCommits (#24482)oliverpool2023-05-042-22/+40
| | | | | | Using `git rev-list --left-right` is almost 2x faster than calling `git rev-list` twice. Co-authored-by: silverwind <me@silverwind.io>
* Merge setting.InitXXX into one function with options (#24389)Lunny Xiao2023-05-0428-136/+103
| | | | This PR will merge 3 Init functions on setting packages as 1 and introduce an options struct.
* Changelog for 1.19.3 (#24495) (#24506)Yarden Shoham2023-05-031-0/+13
| | | | | | Frontport #24495 Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Use Actions for DB & E2E tests (#24494)techknowlogick2023-05-049-853/+428
| | | | | | | | | | following https://github.com/go-gitea/gitea/pull/24314 and https://github.com/go-gitea/gitea/pull/24434, this PR moves drone cron pipelines to (GitHub) Actions. As these are mostly compatible with Gitea Actions, when we start to dogfood, these will already be migrated. --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix intermittent CI failure in EmptyQueue (#23753)zeripath2023-05-031-26/+29
| | | | | | | | | | | | | The ordering of the final token causing a close of the queue in this test may be out of sync due to concurrency. Instead just use ensure that the queue is closed when everything expected is done. Fixes: https://github.com/go-gitea/gitea/issues/23608 Fixes: https://github.com/go-gitea/gitea/issues/23977 --------- Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Prevent a user with a different email from accepting the team invite (#24491)Jack Hay2023-05-033-11/+26
| | | | | ## Changes - Fixes the case where a logged in user can accept an email invitation even if their email address does not match the address in the invitation
* Fix incorrect webhook time and use relative-time to display it (#24477)yp053272023-05-035-27/+57
| | | | | | | | | | | Fixes #24414 After click replay this webhook, it will display `now` ![image](https://user-images.githubusercontent.com/18380374/235559399-05a23927-13f5-442d-8f10-2c7cd24022a0.png) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Make Issue/PR/projects more compact, misc CSS tweaks (#24459)silverwind2023-05-0334-320/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove various horizontal dividers on repo pages that didn't provide visual benefit - Remove label/milestone pills on single issue/pr page - Remove issue-related pill buttons on projects page - Increase contrast of color-secondary on arc-green - Improve notifications icon, make circle bigger - Remove some inline styles - Fix focus in issue/pr title edit and select all text on button click ### Issue and PR before and after <img width="1249" alt="Screenshot 2023-05-01 at 11 44 22" src="https://user-images.githubusercontent.com/115237/235436662-a708288e-84fb-4b2e-a5a2-3a1c17d28f6c.png"> <img width="1248" alt="Screenshot 2023-05-01 at 11 58 51" src="https://user-images.githubusercontent.com/115237/235437992-f863e483-f3cc-4cc1-8204-fd223647a0c9.png"> ### Projects before and after <img width="1255" alt="Screenshot 2023-05-01 at 11 41 02" src="https://user-images.githubusercontent.com/115237/235436433-0deb85d6-4e7d-4e74-847f-254cc70a0cf9.png"> <img width="1267" alt="Screenshot 2023-05-01 at 11 40 03" src="https://user-images.githubusercontent.com/115237/235436431-715b13cb-f78c-4d86-b27a-9229f9738c5b.png"> ### Releases before and after <img width="1243" alt="Screenshot 2023-05-01 at 11 41 12" src="https://user-images.githubusercontent.com/115237/235436457-b655ee6f-03b8-4595-8d8c-b15ea469e988.png"> <img width="1240" alt="Screenshot 2023-05-01 at 11 40 10" src="https://user-images.githubusercontent.com/115237/235436456-05a2a0dd-7cbb-4f26-b0d3-4f667df4bb95.png"> ### Misc <img width="58" alt="Screenshot 2023-05-01 at 10 49 13" src="https://user-images.githubusercontent.com/115237/235432494-936ce995-6e22-47bc-ab2d-c9e93d31987d.png"> <img width="57" alt="Screenshot 2023-05-01 at 18 57 08" src="https://user-images.githubusercontent.com/115237/235492430-1d32cfe0-0f2c-467c-b2fa-925b27e30e0e.png"> Issue title edit and wrap: <img width="1238" alt="Screenshot 2023-05-01 at 12 34 40" src="https://user-images.githubusercontent.com/115237/235441407-d5067a57-e586-4865-a652-282e5944abb4.png"> <img width="1232" alt="Screenshot 2023-05-01 at 12 06 24" src="https://user-images.githubusercontent.com/115237/235438710-1a543dda-220f-4d87-8f93-f1710c0695f0.png"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Implement Cargo HTTP index (#24452)KN4CK3R2023-05-034-43/+141
| | | | | | | | | | | | | | | | This implements the HTTP index [RFC](https://rust-lang.github.io/rfcs/2789-sparse-index.html) for Cargo registries. Currently this is a preview feature and you need to use the nightly of `cargo`: `cargo +nightly -Z sparse-registry update` See https://github.com/rust-lang/cargo/issues/9069 for more information. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Clean up polluted styles and remove dead CSS code (#24497)wxiaoguang2023-05-0311-58/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow #24393 The funny history: * At the beginning, `.ui.message` was polluted by `text-align: center` * Then people do `<div class="ui ... message text left">` * But `.ui.left` is polluted by `float: left` * Then people do `#xxx .ui.message { width: 100% !important;}` The code just becomes more and more hacky. After removing the pollution, everything becomes clear and straight. And, this PR also does: 1. Remove the `package.css`, its styles could be provided by `top aligned` 2. Remove `#avatar-arrow`, dead code Screenshot: ![image](https://user-images.githubusercontent.com/2114189/235862130-a9eb5d8f-7d01-457c-99f7-21d0abc3075e.png) ![image](https://user-images.githubusercontent.com/2114189/235862222-139709a7-95c2-4f89-a40f-100b2d76d9bb.png) Co-authored-by: Giteabot <teabot@gitea.io>
* Improve pull request merge box when pull request merged and branch deleted. ↵Lunny Xiao2023-05-033-13/+19
| | | | | | | | | | | | | | | | | | | | | | (#24397) This PR hide the pull request merge box totally if it's merged and branch deleted. It's also add a bold for merge base commit id in merged message comment Before: <img width="989" alt="图片" src="https://user-images.githubusercontent.com/81045/235066590-28deb506-e824-4a42-a9a2-791cd136756e.png"> After: <img width="1030" alt="图片" src="https://user-images.githubusercontent.com/81045/235080749-11d5efe8-a06e-4528-a75f-f6c6d191db50.png"> --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix EasyMDE toolbar (#24489)silverwind2023-05-034-81/+217
| | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/24486 The "clean block" button is gone because I could not find a matching octicon. Order of buttons is roughly equal to textarea. <img width="824" alt="Screenshot 2023-05-02 at 21 10 00" src="https://user-images.githubusercontent.com/115237/235762593-ceccb260-e665-4932-ac8a-ef6fe8406a3c.png"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enhance stylelint rule config, remove dead CSS (#24472)silverwind2023-05-023-22/+2
| | | | | | | | | | | | | | | | | | | | | | Make this stylelint rule match on more properties. The dead CSS relates to the navbar, which currently has classes: ``` ui top secondary stackable main menu following bar light ``` Which means `.following.bar .top.menu` can never match, so remove this dead CSS as well as inactive `z-index` and `left` on it. Commits table striping becomes more visible on dark theme, but I don't think it's worth introducing a new color until https://github.com/go-gitea/gitea/pull/24423 is ready, which would have to remove it again: <img width="668" alt="Screenshot 2023-05-01 at 18 41 49" src="https://user-images.githubusercontent.com/115237/235489873-6b272899-1d78-443a-872c-ee7731c269f9.png"> <img width="680" alt="Screenshot 2023-05-01 at 18 41 41" src="https://user-images.githubusercontent.com/115237/235489878-1b9468af-c74f-48a6-a469-9eba57cfcb4d.png">
* Fix api error message if fork exists (#24487)Otto Richter (fnetX)2023-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | On the @Forgejo instance of Codeberg, we discovered that forking a repo which is already forked now returns a 500 Internal Server Error, which is unexpected. This is an attempt at fixing this. The error message in the log: ~~~ 2023/05/02 08:36:30 .../api/v1/repo/fork.go:147:CreateFork() [E] [6450cb8e-113] ForkRepository: repository is already forked by user [uname: ...., repo path: .../..., fork path: .../...] ~~~ The service that is used for forking returns a custom error message which is not checked against. About the order of options: The case that the fork already exists should be more common, followed by the case that a repo with the same name already exists for other reasons. The case that the global repo limit is hit is probably not the likeliest. Co-authored-by: Otto Richter <otto@codeberg.org> Co-authored-by: Giteabot <teabot@gitea.io>
* Add ntlm authentication support for mail (#23811)木木田2023-05-022-1/+33
| | | | | | | | | Add ntlm authentication support for mail use "github.com/Azure/go-ntlmssp" --------- Co-authored-by: yangtan_win <YangTan@Fitsco.com.cn> Co-authored-by: silverwind <me@silverwind.io>
* Fix test delivery button in repo webhook settings page (#24478)yp053272023-05-021-1/+1
| | | | | | | | | | | | | Caused by https://github.com/go-gitea/gitea/pull/24246/files#diff-2bfe41d93dbb409583a4f945902e46bb513f60f1c9301649c1689200c4f1466eR1 Class `new` was removed in #24246, but in function `initCompWebHookEditor`, it will check `.new.webhook`. So in repo webhook settings page, `initCompWebHookEditor` will init nothing, and no response after click the test delivery button. https://github.com/go-gitea/gitea/blob/da65b7ad47e8d0d82f47cb24ee9ac2a0ec50dc25/web_src/js/features/comp/WebHookEditor.js#L6-L9 Co-authored-by: Giteabot <teabot@gitea.io>
* Add Debian package registry (#24426)KN4CK3R2023-05-0257-96/+2008
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: @awkwardbunny This PR adds a Debian package registry. You can follow [this tutorial](https://www.baeldung.com/linux/create-debian-package) to build a *.deb package for testing. Source packages are not supported at the moment and I did not find documentation of the architecture "all" and how these packages should be treated. ![grafik](https://user-images.githubusercontent.com/1666336/218126879-eb80a866-775c-4c8e-8529-5797203a64e6.png) Part of #20751. Revised copy of #22854. --------- Co-authored-by: Brian Hong <brian@hongs.me> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Enable whitespace rendering on selection in Monaco (#24444)silverwind2023-05-021-1/+0
| | | | | | | | | | | Remove the [renderWhitespace](https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.IEditorOptions.html#renderWhitespace) override, so the default value of `selection` takes over and makes whitespace visible on selection. <img width="128" alt="Screenshot 2023-04-30 at 19 09 41" src="https://user-images.githubusercontent.com/115237/235366707-d598268d-03cc-4839-a195-c460bddae99b.png"> Co-authored-by: Giteabot <teabot@gitea.io>
* Replace `N/A` with `-` everywhere (#24474)silverwind2023-05-028-32/+32
| | | | | | | | | | | | | | Followup to https://github.com/go-gitea/gitea/pull/24427. Reasoning is that `N/A` is specific to english while `-` is language-neutral and does not need translation. Before: <img width="891" alt="Screenshot 2023-05-01 at 20 58 20" src="https://user-images.githubusercontent.com/115237/235511592-8a36d0f2-34ff-4dbe-b642-67c0ade644fe.png"> After: <img width="901" alt="Screenshot 2023-05-01 at 20 59 59" src="https://user-images.githubusercontent.com/115237/235511594-d49f6d09-92e8-4e99-be7b-2a37f5d24129.png">