diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-02 11:33:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 04:33:57 +0100 |
commit | e61b390d545919244141b699b28e3fbc42adc66f (patch) | |
tree | de17418a260234e1043a6d3a130c2b4a8c27640a /modules/test | |
parent | 88da7a7174f9c1568cc2d8d084d6b05a8d268690 (diff) | |
download | gitea-e61b390d545919244141b699b28e3fbc42adc66f.tar.gz gitea-e61b390d545919244141b699b28e3fbc42adc66f.zip |
Unify and simplify TrN for i18n (#18141)
Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099
Now we have a unique and simple `TrN`, and make the fix of PR #18135 also use the better `TrN` logic.
Diffstat (limited to 'modules/test')
-rw-r--r-- | modules/test/context_tests.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/test/context_tests.go b/modules/test/context_tests.go index 1f893122f3..62ec21f6fe 100644 --- a/modules/test/context_tests.go +++ b/modules/test/context_tests.go @@ -103,6 +103,10 @@ func (l mockLocale) Tr(s string, _ ...interface{}) string { return s } +func (l mockLocale) TrN(_cnt interface{}, key1, _keyN string, _args ...interface{}) string { + return key1 +} + type mockResponseWriter struct { httptest.ResponseRecorder size int |