New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title validate support Chinese and Japanese #614

Merged
merged 3 commits into from Nov 14, 2018

Conversation

Projects
None yet
3 participants
@fwchen
Copy link
Contributor

fwchen commented Nov 2, 2018

Issue:
When I type in Chinese the system cannot be used as easy as in English, just like when I edit the title.

I just remove || len(strings.Split(input.Model.Title, " ")) < 3 because I think it is unnecessary when support other language.

@goenning

This comment has been minimized.

Copy link
Member

goenning commented Nov 3, 2018

Hmm, interesting. What about the first validation len(input.Model.Title) < 10? Isn't it also irrelevant on Japanese/Chinese? I guess you can have a very descriptive title with very few chars, or am I wrong? It makes me thing that #575 will be more than just translations, it's also about settings per language.

EDIT: you'll also need to update failing unit tests

@fwchen

This comment has been minimized.

Copy link
Contributor

fwchen commented Nov 4, 2018

emmm... I think len(input.Model.Title) < 10 is enough. It can almost support all the languages.

ok, I will fix the test a few days later.(triping, only on chromebook)

fwchen added some commits Nov 14, 2018

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Nov 14, 2018

Codecov Report

Merging #614 into master will increase coverage by 0.27%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #614      +/-   ##
==========================================
+ Coverage   74.53%   74.81%   +0.27%     
==========================================
  Files         102      100       -2     
  Lines        6546     6426     -120     
==========================================
- Hits         4879     4807      -72     
+ Misses       1309     1272      -37     
+ Partials      358      347      -11
Impacted Files Coverage Δ
app/actions/post.go 75.89% <50%> (ø) ⬆️
app/pkg/log/database/logger.go 63.89% <0%> (-4.17%) ⬇️
app/pkg/log/console/logger.go 72.41% <0%> (-3.45%) ⬇️
app/pkg/email/smtp/smtp.go 16.03% <0%> (-2.43%) ⬇️
app/handlers/oauth.go 62.79% <0%> (-1.87%) ⬇️
app/storage/postgres/post.go 83.42% <0%> (-1.49%) ⬇️
app/pkg/worker/context.go 87.76% <0%> (-0.48%) ⬇️
app/cmd/routes.go 87.18% <0%> (-0.42%) ⬇️
app/pkg/web/context.go 84.06% <0%> (-0.31%) ⬇️
app/pkg/worker/worker.go 95.74% <0%> (ø) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84b1609...8f43b62. Read the comment docs.

@goenning goenning merged commit d811fe2 into getfider:master Nov 14, 2018

5 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: push Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test-server Your tests passed on CircleCI!
Details
ci/circleci: test-ui Your tests passed on CircleCI!
Details
@goenning

This comment has been minimized.

Copy link
Member

goenning commented Nov 14, 2018

Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment