You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules
wxiaoguang a4b242ae7a
Clean up template locale usage (#27856)
After many refactoring PRs for the "locale" and "template context
function", now the ".locale" is not needed for web templates any more.

This PR does a clean up for:

1. Remove `ctx.Data["locale"]` for web context.
2. Use `ctx.Locale` in `500.tmpl`, for consistency.
3. Add a test check for `500 page` locale usage.
4. Remove the `Str2html` and `DotEscape` from mail template context
data, they are copy&paste errors introduced by #19169 and #16200 . These
functions are template functions (provided by the common renderer), but
not template data variables.
5. Make email `SendAsync` function mockable (I was planning to add more
tests but it would make this PR much too complex, so the tests could be
done in another PR)
8 months ago
..
actions chore(actions): support cron schedule task (#26655) 10 months ago
activitypub Upgrade to golangci-lint@v1.55.0 (#27756) 8 months ago
analyze Rename code_langauge.go to code_language.go (#26377) 11 months ago
assetfs Use `Set[Type]` instead of `map[Type]bool/struct{}`. (#26804) 10 months ago
auth Next round of `db.DefaultContext` refactor (#27089) 10 months ago
avatar Remove nfnt/resize and oliamb/cutter (#25999) 12 months ago
base Replace `interface{}` with `any` (#25686) 1 year ago
cache improve unit test for caching (#26185) 11 months ago
charset Replace `interface{}` with `any` (#25686) 1 year ago
container Implement FSFE REUSE for golang files (#21840) 2 years ago
context Clean up template locale usage (#27856) 8 months ago
contexttest Replace assert.Fail with assert.FailNow (#27578) 9 months ago
csv Refactor locale number (#24134) 1 year ago
doctor refactor: make db iterate context aware (#27710) 9 months ago
emoji Update emoji set to Unicode 15 (#25595) 1 year ago
eventsource Final round of `db.DefaultContext` refactor (#27587) 9 months ago
generate Handle base64 decoding correctly to avoid panic (#26483) 11 months ago
git Upgrade to golangci-lint@v1.55.0 (#27756) 8 months ago
gitgraph More `db.DefaultContext` refactor (#27265) 9 months ago
graceful Allow the use of alternative net.Listener implementations by downstreams (#25855) 12 months ago
hcaptcha Consume hcaptcha and pwn deps (#22610) 1 year ago
highlight Upgrade go dependencies (#25819) 12 months ago
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) 9 months ago
html Refactor backend SVG package and add tests (#26335) 11 months ago
httpcache Less naked returns (#25713) 1 year ago
httplib Less naked returns (#25713) 1 year ago
indexer Fix issue not showing on default board and add test (#27720) 8 months ago
issue/template Replace `interface{}` with `any` (#25686) 1 year ago
json Replace `interface{}` with `any` (#25686) 1 year ago
label Make label templates have consistent behavior and priority (#23749) 1 year ago
lfs Upgrade to golangci-lint@v1.55.0 (#27756) 8 months ago
log Reduce some allocations in type conversion (#26772) 10 months ago
markup Upgrade to golangci-lint@v1.55.0 (#27756) 8 months ago
mcaptcha Implement FSFE REUSE for golang files (#21840) 2 years ago
metrics Reduce usage of `db.DefaultContext` (#27073) 10 months ago
migration Replace `interface{}` with `any` (#25686) 1 year ago
nosql Update tool dependencies, lock govulncheck and actionlint (#25655) 12 months ago
options Use a general approach to access custom/static/builtin assets (#24022) 1 year ago
packages Close all hashed buffers (#27787) 8 months ago
paginator Use more specific test methods (#24265) 1 year ago
pprof Implement FSFE REUSE for golang files (#21840) 2 years ago
private Replace `interface{}` with `any` (#25686) 1 year ago
process Replace assert.Fail with assert.FailNow (#27578) 9 months ago
proxy Use proxy for pull mirror (#22771) 1 year ago
proxyprotocol Implement FSFE REUSE for golang files (#21840) 2 years ago
public Serve pre-defined files in "public", add "security.txt", add CORS header for ".well-known" (#25974) 12 months ago
queue Increase queue length (#27555) 9 months ago
recaptcha Implement FSFE REUSE for golang files (#21840) 2 years ago
references Replace 'userxx' with 'orgxx' in all test files when the user type is org (#27052) 10 months ago
regexplru Upgrade go dependencies (#25819) 12 months ago
repository Refactor system setting (#27000) 9 months ago
secret Improve decryption failure message (#24573) 1 year ago
session Next round of `db.DefaultContext` refactor (#27089) 10 months ago
setting Enhanced auth token / remember me (#27606) 9 months ago
sitemap Fix sitemap (#22272) 2 years ago
ssh restrict certificate type for builtin SSH server (#26789) 10 months ago
storage Fix object storage path handling (#27024) 10 months ago
structs Fix package webhook (#27839) 8 months ago
svg Refactor backend SVG package and add tests (#26335) 11 months ago
sync Implement FSFE REUSE for golang files (#21840) 2 years ago
system Replace more db.DefaultContext (#27628) 9 months ago
templates Upgrade to golangci-lint@v1.55.0 (#27756) 8 months ago
test Move web/api context related testing function into a separate package (#26859) 10 months ago
testlogger Replace `interface{}` with `any` (#25686) 1 year ago
timeutil Fix incorrect webhook time and use relative-time to display it (#24477) 1 year ago
translation Replace `interface{}` with `any` (#25686) 1 year ago
turnstile Add new captcha: cloudflare turnstile (#22369) 1 year ago
typesniffer Detect ogg mime-type as audio or video (#26494) 11 months ago
updatechecker Replace more db.DefaultContext (#27628) 9 months ago
upload Implement FSFE REUSE for golang files (#21840) 2 years ago
uri Implement FSFE REUSE for golang files (#21840) 2 years ago
user Implement FSFE REUSE for golang files (#21840) 2 years ago
util Upgrade to golangci-lint@v1.55.0 (#27756) 8 months ago
validation Check blocklist for emails when adding them to account (#26812) 10 months ago
web Remove some dead code (#27196) 9 months ago
webhook New webhook trigger for receiving Pull Request review requests (#24481) 1 year ago