KEMBAR78
fix: switching between zh and en bug by user-xixiboliya · Pull Request #720 · LinuxSuRen/api-testing · GitHub
Skip to content

Conversation

@user-xixiboliya
Copy link
Contributor

We highly recommend you read the contributor's documentation before starting the review process especially since this is your first contribution to this project.

It was updated on 2024/5/27

What type of PR is this?
fix:switching between zh and en bug

What this PR does / why we need it:
This PR enables real-time switching from English to Chinese without requiring a page refresh. In addition, the modification to console/atest-ui/src/views/TestSuite.vue addresses a warning that appeared during npm run dev.

Because I have configured a pre-commit hook, the following error occurred during commit:

.PHONY: fmt
fmt:
	go fmt ./... What does it mean

> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
make[1]: Entering directory ‘/home/pi/APITesting-fork’
make[1]: *** No rule to make target ‘fmt’.  Stop.
make[1]: Leaving directory ‘/home/pi/APITesting-fork’
make: *** [Makefile:19: _run] Error 2

To fix this, I modified tools/make/common.mk to recursively format all Go files under the current directory and its subdirectories.

Which issue(s) this PR fixes:

Fixes # issues/710

@CLAassistant
Copy link

CLAassistant commented Jun 22, 2025

CLA assistant check
All committers have signed the CLA.

console/atest-desktop/coverage
atest-store-git
.db
.marscode/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new blank line

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, we put a new line at the end of each file. You can search the reason in Google.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,I will search it.

@echo -e "Usage:\n make \033[36m<Target>\033[0m \033[36m<Option>\033[0m\n\nTargets:"
@awk 'BEGIN {FS = ":.*##"; printf ""} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
@echo -e "\n$$USAGE_OPTIONS"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this mk target more appropriate to put it in golang .mk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your correction. I will read the code carefully again.

@LinuxSuRen LinuxSuRen added bug Something isn't working ospp 开源之夏 https://summer-ospp.ac.cn/ labels Jun 22, 2025
@LinuxSuRen LinuxSuRen changed the title fix:switching between zh and en bug fix: switching between zh and en bug Jun 22, 2025
Copy link
Owner

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested the function. It works well. It's great. Thanks for your efforts. I learn from it.

By the way, the go fmt command is duplicated. Please let me know how to reproduce the error.

Comment on lines 126 to 128
.PHONY: fmt
fmt:
go fmt ./...
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already exists. You can find it from golang.mk

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, what is your pre-commit hook command?

@sonarqubecloud
Copy link

@LinuxSuRen LinuxSuRen merged commit 24b0b3f into LinuxSuRen:master Jun 24, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ospp 开源之夏 https://summer-ospp.ac.cn/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants