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.
gitea/modules/context
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)
1 year ago
..
access_log.go Replace `interface{}` with `any` (#25686) 2 years ago
api.go Updates to the API for archived repos (#27149) 1 year ago
api_org.go Implement FSFE REUSE for golang files (#21840) 2 years ago
api_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Introduce ctx.PathParamRaw to avoid incorrect unescaping (#26392) 2 years ago
captcha.go Replace `interface{}` with `any` (#25686) 2 years ago
context.go Clean up template locale usage (#27856) 1 year ago
context_cookie.go Enhanced auth token / remember me (#27606) 1 year ago
context_model.go Improve Gitea's web context, decouple "issue template" code into service package (#24590) 2 years ago
context_request.go Decouple the different contexts from each other (#24786) 2 years ago
context_response.go Start using template context function (#26254) 2 years ago
context_template.go Start using template context function (#26254) 2 years ago
context_test.go Use standard HTTP library to serve files (#24693) 2 years ago
csrf.go Refactor cookie (#24107) 2 years ago
org.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
package.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
pagination.go Replace `interface{}` with `any` (#25686) 2 years ago
permission.go Add context parameter to some database functions (#26055) 2 years ago
private.go Replace `interface{}` with `any` (#25686) 2 years ago
repo.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
response.go Refactor web package and context package (#25298) 2 years ago
utils.go Avoid double-unescaping of form value (#26853) 1 year ago
xsrf.go Update gitea-vet to check FSFE REUSE (#22004) 2 years ago
xsrf_test.go Update gitea-vet to check FSFE REUSE (#22004) 2 years ago