Skip to content
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

gherkin/java:Support unicode colon as separator. #223

Closed
wants to merge 4 commits into from

Conversation

lxbzmy
Copy link

@lxbzmy lxbzmy commented Jun 13, 2017

Summary

Support unicode fullwidth colon as title separator.

Details

Motivation and Context

i18n not only keyword translate,but also punctuate。
Why only colon?because it is title line separator, no syntax meaning.
Original issue post here :cucumber/gherkin#220

How Has This Been Tested?

The change not break exists test.
New test case add in ParserTest.java

Types of changes

  • Bug fix (non-breaking change which fixes an issue).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@aslakhellesoy
Copy link
Contributor

Thanks! Can you please add tests using the new separator?

@olleolleolle
Copy link
Contributor

@aslakhellesoy Is this mergeable? It looks cool.

@aslakhellesoy
Copy link
Contributor

All other implementations must be updated with the same change before this is mergeable.

In order to reduce duplication in tests, please delete the unit test and add an acceptance test in /gherkin/testdata/good instead.

@lxbzmy
Copy link
Author

lxbzmy commented Jul 10, 2017

Done.

public interface GherkinLanguageConstants {
String TAG_PREFIX = "@";
String COMMENT_PREFIX = "#";
String TITLE_KEYWORD_SEPARATOR = ":";
Pattern TITLE_KEYWORD_SEPARATOR2 = Pattern.compile(":|:");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the old TITLE_KEYWORD_SEPARATOR and rename TITLE_KEYWORD_SEPARATOR2 to TITLE_KEYWORD_SEPARATOR

public interface GherkinLanguageConstants {
String TAG_PREFIX = "@";
String COMMENT_PREFIX = "#";
String TITLE_KEYWORD_SEPARATOR = ":";
Pattern TITLE_KEYWORD_SEPARATOR2 = Pattern.compile(":|:");
Copy link
Contributor

Choose a reason for hiding this comment

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

This change must be ported to all other Gherkin implementations (Go, C, Ruby, JavaScript etc) before it can be merged.

Copy link
Author

Choose a reason for hiding this comment

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

should we introduce a constants TITLE_KEYWORD_SEPARATOR_LENGTH? since pattern have no length.

@lxbzmy
Copy link
Author

lxbzmy commented Oct 6, 2017

matchTitleLine or startsWithTitleKeyword need refactor , because matchTitleLine use separator.length()

@stale
Copy link

stale bot commented Dec 5, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Dec 5, 2017
@aslakhellesoy aslakhellesoy added the 🧷 pinned Tells Stalebot not to close this issue label Dec 5, 2017
@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Dec 5, 2017
@lxbzmy
Copy link
Author

lxbzmy commented Dec 8, 2017

Should I make changes in all other language implementations?

@aslakhellesoy
Copy link
Contributor

This PR has gone stale in the light of #425. If you still want this, please make a PR against the gherkin/go codebase.

@lock
Copy link

lock bot commented Jul 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
library: gherkin 🧷 pinned Tells Stalebot not to close this issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants