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

Proposed solution to #487 (International keywords build problems) #499

Closed
wants to merge 3 commits into from

Conversation

aslakhellesoy
Copy link
Contributor

This proposed fix for #487 changes generated java annotations from top level classes to inner classes. This is to work around difficulties with java source files with names containing multibyte characters on OS X.

Prior to this PR, the Swedish translation for Then would be a top level class defined in Så.java, under the package cucumber.api.java.sv.

This PR changes each translation to be defined in a single source file, in this case sv.java defined under the package cucumber.api.java. Each translation contains an inner class for each keyword.

This should remain source compatible with previous releases. The following import statement should work both before and after:

import cucumber.api.java.sv.;

Using this scheme, source file names will only ever contain ASCII characters, so the file name problems should go away.

One minor drawback is that typing @Så in IDEA and then using a hotkey to insert the desired import will write out this code:

import cucumber.api.java.sv;

public class Stepdefs {
    @sv.("test")
    public void testEncoding() {

    }
}

Although this compiles just fine it doesn't look too good, so you might want to change it to:

import cucumber.api.java.sv.*;

public class Stepdefs {
    @("test")
    public void testEncoding() {

    }
}

Please try this out and let me know how it works for you.

@aslakhellesoy
Copy link
Contributor Author

/cc @avokin @klikh - please let me know if this affects IDEA.

@avokin
Copy link
Contributor

avokin commented Apr 10, 2013

I'll take a look, thank you for info

@dkowis
Copy link
Member

dkowis commented Jun 9, 2013

Been two months without comment. I don't think having to manually update the stuff in IDEA is a big deal.

I'm fine with merging this as it is. @avokin, @klikh dissenting opinions?

@ghost ghost assigned aslakhellesoy Jun 10, 2013
@aslakhellesoy
Copy link
Contributor Author

I'm not sure this actually fixes anything. I prefer to do some more testing on a mac before this is merged. I've assigned this issue to myself.

@mpkorstanje mpkorstanje deleted the issue-487-multibyte-class-names branch July 7, 2017 22:06
@lock
Copy link

lock bot commented Oct 25, 2018

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 Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants