This is an automated email from the ASF dual-hosted git repository.
linkinstar pushed a change to branch meta
in repository https://gitbox.apache.org/repos/asf/answer.git
from b9e807a3 Merge branch 'main' into meta
add 20cd4d7c fix(deps): update protoc-gen-validate dependency to a new
version
add 7a1c96d2 fix: fix the issue where the comment_id parameter is forcibly
converted to a string, causing a 500 error in the PostgreSQL database
interface. #1426
add 59df184b fix: Optimization of request parameters
add 9bb87bf8 feat(ui): add min values for inputs and context-based
keyboards for inputs
add 1418745b feat(ui): add types, logic and defaults for min, max value of
input component of form
add 27cd7735 fix(ui): refactor number input props (min,max)
add 8b739c5a fix(service): set default language to "en_US" if invalid
language is provided
add 4609e200 fix(comment): decode CommentID using DeShortID for consistency
add 9b64d7d6 refactor(internal): compile regex once while clearing text
add f86e9816 fix: multi byte run boundary for cut long title
add c0a9f315 fix(ui): null pointer access if get branding fails
add 2b649834 chore(deps): bump mockgen to 0.6.0 for go1.25 support
add d15d55ab fix(answer): update QuestionID handling in answer update
process
add 480474d7 fix: footer layout adjustment
add bb60dca5 fix: footer layout adjustment
add 92de2ef1 fix: When the input box's type is set to number, the result
is forcibly converted to the number type. #1425
add 74654f27 feat: add golangci-lint into lint target
add 62e765f7 refactor(goimports): add goimports to golangci-lint
configuration #1432
add 49500092 refactor(lint): improve error handling and code consistency
across multiple files
add e1255373 refactor(lint): add new linters and fix their issues
add 5fa638a3 fix: The page tag selector exceeds the page height, causing
the page to scroll.
add bf2127db fix: add missing revision data for default content (fixes
#1436)
add 0065e355 fix: get right lang
add 82a1127c Polish translation
add f5600865 Update pt_BR.yaml
add c82f0a4f chore: turkish translation improved (#1454)
add 8f5c164e feat: add env for glob load template files by gin debug render
add 8412ccdc docs(Makefile): upgrade version to 1.7.1
add dd836497 style(sideNav): update ASF header
add 216786a6 New translations (#1456)
new 8ec01f8e Merge remote-tracking branch 'origin/main' into meta
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.gitignore | 2 +-
.golangci.yaml | 49 ++
Makefile | 23 +-
README.md | 4 +-
cmd/wire.go | 3 +-
cmd/wire_gen.go | 8 +-
docs/docs.go | 39 +-
docs/swagger.json | 39 +-
docs/swagger.yaml | 34 +-
go.mod | 16 +-
go.sum | 38 +-
i18n/cs_CZ.yaml | 8 +-
i18n/cy_GB.yaml | 6 +-
i18n/da_DK.yaml | 6 +-
i18n/de_DE.yaml | 6 +-
i18n/en_US.yaml | 7 +-
i18n/es_ES.yaml | 6 +-
i18n/fa_IR.yaml | 6 +-
i18n/fr_FR.yaml | 6 +-
i18n/hi_IN.yaml | 6 +-
i18n/id_ID.yaml | 10 +-
i18n/it_IT.yaml | 6 +-
i18n/ja_JP.yaml | 8 +-
i18n/ko_KR.yaml | 6 +-
i18n/ml_IN.yaml | 6 +-
i18n/pl_PL.yaml | 549 ++++++++++++---------
i18n/pt_BR.yaml | 248 +++++-----
i18n/pt_PT.yaml | 6 +-
i18n/ro_RO.yaml | 6 +-
i18n/ru_RU.yaml | 7 +-
i18n/sk_SK.yaml | 6 +-
i18n/sv_SE.yaml | 14 +-
i18n/te_IN.yaml | 6 +-
i18n/tr_TR.yaml | 62 +--
i18n/uk_UA.yaml | 6 +-
i18n/vi_VN.yaml | 6 +-
i18n/zh_CN.yaml | 6 +-
i18n/zh_TW.yaml | 6 +-
internal/base/conf/conf.go | 4 +-
internal/base/constant/ctx_flag.go | 7 +
internal/base/data/data.go | 2 +-
internal/base/handler/handler.go | 17 +-
internal/base/handler/lang.go | 12 +-
internal/base/handler/response.go | 4 +-
internal/base/handler/short_id.go | 2 +-
internal/base/middleware/accept_language.go | 8 +-
internal/base/middleware/avatar.go | 1 -
internal/base/middleware/rate_limit.go | 1 +
internal/base/pager/pager.go | 2 +-
internal/base/pager/pagination.go | 6 +-
internal/base/reason/reason.go | 2 +-
internal/base/server/http.go | 13 +-
internal/base/server/http_funcmap.go | 19 +-
internal/base/translator/provider.go | 8 +-
internal/base/validator/validator.go | 6 +-
internal/cli/build.go | 52 --
internal/cli/config.go | 7 +-
internal/cli/dump.go | 4 +-
internal/cli/i18n.go | 7 +-
internal/cli/install_check.go | 8 +-
internal/cli/reset_password.go | 4 +-
internal/controller/answer_controller.go | 7 +-
internal/controller/comment_controller.go | 7 +-
internal/controller/lang_controller.go | 2 +-
internal/controller/question_controller.go | 17 +-
internal/controller/report_controller.go | 2 +-
internal/controller/search_controller.go | 2 +-
internal/controller/template_controller.go | 61 +--
internal/controller/template_render/comment.go | 2 +-
internal/controller/template_render/controller.go | 11 +-
internal/controller/user_controller.go | 30 +-
internal/controller/user_plugin_controller.go | 3 +-
internal/controller/vote_controller.go | 8 +-
.../controller_admin/user_backyard_controller.go | 2 +-
internal/entity/badge_entity.go | 3 +-
internal/entity/collection_entity.go | 4 +-
internal/entity/config_entity.go | 1 +
internal/install/install_from_env.go | 5 +-
internal/install/install_req.go | 9 +-
internal/migrations/init.go | 105 +++-
internal/migrations/init_data.go | 2 +-
internal/migrations/migrations.go | 4 +-
internal/migrations/v1.go | 1 +
internal/migrations/v12.go | 1 -
internal/migrations/v13.go | 5 +-
internal/migrations/v14.go | 1 +
internal/migrations/v15.go | 1 +
internal/migrations/v16.go | 1 +
internal/migrations/v17.go | 1 +
internal/migrations/v18.go | 1 +
internal/migrations/v19.go | 1 +
internal/migrations/v2.go | 1 +
internal/migrations/v21.go | 1 +
internal/migrations/v22.go | 4 +
internal/migrations/v24.go | 4 +-
internal/migrations/v25.go | 2 +-
internal/migrations/v6.go | 2 +-
internal/repo/activity/answer_repo.go | 3 +-
internal/repo/activity/follow_repo.go | 2 +-
internal/repo/activity/user_active_repo.go | 1 +
internal/repo/activity_common/follow.go | 6 +-
internal/repo/activity_common/vote.go | 1 +
internal/repo/answer/answer_repo.go | 3 +-
internal/repo/auth/auth.go | 1 +
internal/repo/badge/badge_event_rule.go | 3 +-
internal/repo/badge/badge_repo.go | 1 +
internal/repo/badge_award/badge_award_repo.go | 1 +
internal/repo/badge_group/badge_group_repo.go | 1 +
internal/repo/collection/collection_repo.go | 5 +-
internal/repo/export/email_repo.go | 3 +-
internal/repo/limit/limit.go | 3 +-
internal/repo/meta/meta_repo.go | 4 +-
.../repo/plugin_config/plugin_user_config_repo.go | 5 +-
internal/repo/question/question_repo.go | 8 +-
internal/repo/rank/user_rank_repo.go | 2 +-
internal/repo/repo_test/auth_test.go | 31 +-
internal/repo/repo_test/captcha_test.go | 11 +-
internal/repo/repo_test/comment_repo_test.go | 27 +-
internal/repo/repo_test/email_repo_test.go | 5 +-
internal/repo/repo_test/meta_repo_test.go | 31 +-
internal/repo/repo_test/notification_repo_test.go | 33 +-
internal/repo/repo_test/reason_repo_test.go | 5 +-
internal/repo/repo_test/recommend_test.go | 27 +-
internal/repo/repo_test/repo_main_test.go | 4 +-
internal/repo/repo_test/revision_repo_test.go | 17 +-
internal/repo/repo_test/siteinfo_repo_test.go | 9 +-
internal/repo/repo_test/tag_rel_repo_test.go | 25 +-
internal/repo/repo_test/tag_repo_test.go | 33 +-
internal/repo/repo_test/user_backyard_repo_test.go | 15 +-
internal/repo/repo_test/user_repo_test.go | 35 +-
internal/repo/revision/revision_repo.go | 2 +-
internal/repo/role/user_role_rel_repo.go | 2 +-
internal/repo/search_common/search_repo.go | 30 +-
internal/repo/search_sync/search_sync.go | 1 +
internal/repo/tag/tag_rel_repo.go | 1 +
internal/repo/user/user_repo.go | 2 +-
.../user_notification_config_repo.go | 1 +
internal/router/ui.go | 6 +-
.../siteinfo_service_test.go => router/ui_test.go} | 48 +-
internal/schema/answer_schema.go | 1 -
internal/schema/backyard_user_schema.go | 2 +-
internal/schema/email_template.go | 1 +
internal/schema/meta_schema.go | 16 +-
internal/schema/notification_schema.go | 9 +-
internal/schema/question_schema.go | 28 +-
internal/schema/revision_schema.go | 4 +-
internal/schema/siteinfo_schema.go | 16 +-
internal/schema/tag_schema.go | 2 +-
internal/schema/user_notification_schema.go | 1 +
internal/schema/user_schema.go | 2 +-
internal/service/action/captcha_service.go | 7 +-
internal/service/action/captcha_strategy.go | 48 +-
internal/service/activity/activity.go | 2 +-
.../service/activity/answer_activity_service.go | 1 +
internal/service/auth/auth.go | 2 +-
internal/service/badge/badge_award_service.go | 1 +
internal/service/badge/badge_event_handler.go | 2 +-
internal/service/badge/badge_group_service.go | 1 +
internal/service/badge/badge_service.go | 29 +-
internal/service/comment/comment_service.go | 15 +-
internal/service/content/answer_service.go | 32 +-
.../service/content/question_hottest_service.go | 6 +-
internal/service/content/question_service.go | 80 ++-
internal/service/content/revision_service.go | 6 +-
internal/service/content/search_service.go | 17 +-
internal/service/content/user_service.go | 7 +-
internal/service/content/vote_service.go | 4 +-
internal/service/dashboard/dashboard_service.go | 22 +-
internal/service/export/email_service.go | 3 +-
.../service/file_record/file_record_service.go | 1 -
internal/service/importer/importer_service.go | 7 +-
internal/service/meta/meta_service.go | 15 +-
.../notification/invite_answer_notification.go | 5 +-
.../notification/new_answer_notification.go | 5 +-
.../notification/new_comment_notification.go | 5 +-
.../notification/new_question_notification.go | 5 +-
.../service/notification/notification_service.go | 18 +-
.../service/notification_common/notification.go | 5 +-
internal/service/permission/answer_permission.go | 1 +
internal/service/permission/question_permission.go | 1 +
.../service/plugin_common/plugin_common_service.go | 1 -
internal/service/provider.go | 2 +-
internal/service/question_common/question.go | 13 +-
internal/service/report/report_service.go | 1 +
internal/service/report_handle/report_handle.go | 6 +
internal/service/review/review_service.go | 1 -
internal/service/search_parser/search_parser.go | 3 +-
internal/service/siteinfo/siteinfo_service.go | 12 +-
.../service/siteinfo_common/siteinfo_service.go | 4 +-
.../siteinfo_common/siteinfo_service_test.go | 5 +-
internal/service/tag/tag_service.go | 4 +-
internal/service/tag_common/tag_common.go | 8 +-
internal/service/uploader/upload.go | 30 +-
internal/service/user_admin/user_backyard.go | 34 +-
internal/service/user_common/user.go | 4 +-
.../user_notification_config_service.go | 11 +-
pkg/checker/file_type.go | 12 +-
pkg/checker/password.go | 3 +-
pkg/checker/path_ignore.go | 15 +-
pkg/checker/question_link.go | 11 +-
pkg/converter/markdown.go | 25 +-
pkg/converter/str.go | 5 +-
pkg/day/day.go | 7 +-
pkg/day/day_test.go | 3 +-
pkg/dir/dir.go | 16 +-
pkg/gravatar/gravatar_test.go | 3 +-
pkg/htmltext/htmltext.go | 78 +--
pkg/htmltext/htmltext_test.go | 22 +
plugin/kv_storage.go | 6 +-
plugin/plugin.go | 2 +-
plugin/plugin_test/plugin_main_test.go | 15 +-
ui/src/common/sideNavLayout.scss | 9 +-
ui/src/components/Comment/index.tsx | 2 +-
ui/src/components/Footer/index.tsx | 56 ++-
ui/src/components/SchemaForm/components/Input.tsx | 23 +-
ui/src/components/SchemaForm/index.tsx | 12 +
ui/src/components/SchemaForm/types.ts | 12 +
ui/src/index.scss | 6 +-
ui/src/pages/Admin/Badges/index.tsx | 2 +-
ui/src/pages/Admin/Privileges/index.tsx | 2 +
ui/src/pages/Admin/Smtp/index.tsx | 4 +-
ui/src/pages/Admin/Write/index.tsx | 10 +
ui/src/pages/Admin/index.tsx | 8 +-
.../Questions/Detail/components/Answer/index.tsx | 2 +-
.../Questions/Detail/components/Question/index.tsx | 2 +-
ui/src/pages/SideNavLayout/index.tsx | 8 +-
ui/src/services/admin/badges.ts | 2 +-
ui/static.go | 1 -
ui/template/footer.html | 34 +-
229 files changed, 1775 insertions(+), 1457 deletions(-)
create mode 100644 .golangci.yaml
copy internal/{service/siteinfo_common/siteinfo_service_test.go =>
router/ui_test.go} (56%)