Details
-
Type: Improvement
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.1.2
-
Component/s: Core, Web Selenium
-
Labels:None
-
Environment:Windows with Turkish locale, jbehave-3.1.2
-
Number of attachments :
Description
In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems, which come to surface when using String.toUpper/LowerCase(). The solution is to use String.toUpper/LowerCase(Locale), while defaulting to Locale.getDefault() if none specified.
String.toLowerCase() is currently used in:
- StoryReporterBuilder.formatNames(boolean): should use the locale specified in the LocalizedKeywords to retrieve the name lower case. If not specified, it defaults to Locale.getDefault().
- UnderscoredCamelCaseResolver: should provide a constructor to inject a non-default Locale
String.toUpperCase() is currently used in:
- PropertyWebDriverProvider: should provide a protected method usingLocale() which can be overridden use the desired Locale.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Summary | org.jbehave.core.reporters.StoryReporterBuilderBehaviour test fails | StoryReporterBuilder.formatNames() should be locale-aware |
Issue Type | Bug [ 1 ] | Improvement [ 4 ] |
Fix Version/s | 3.2 [ 16757 ] | |
Affects Version/s | 3.1.2 [ 16870 ] | |
Description | org.jbehave.core.reporters.StoryReporterBuilderBehaviour.shouldBuildWithReporterOfDifferentFormats test fails when I try to compile jbehave source with maven on my windows machine with Turkish locale. Consider to use "name = name.toLowerCase(java.util.Locale.ENGLISH);" instead of "name = name.toLowerCase();" at line 150 of org.jbehave.core.reporters.StoryReporterBuilder. In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounteer with this kind of problems. |
Add StoryReporterBuilder.formatNames(boolean, Locale) which defaults to formatNames(boolean, Locale.ENGLISH).
Test case on Turkish locale: StoryReporterBuilderBehaviour.shouldBuildWithReporterOfDifferentFormats In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems. |
Component/s | Core [ 11086 ] |
Mauro Talevi
made changes -
Assignee | Mauro Talevi [ maurotalevi ] |
Mauro Talevi
made changes -
Description |
Add StoryReporterBuilder.formatNames(boolean, Locale) which defaults to formatNames(boolean, Locale.ENGLISH).
Test case on Turkish locale: StoryReporterBuilderBehaviour.shouldBuildWithReporterOfDifferentFormats In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems. |
StoryReporterBuilder.formatNames(boolean) should use the locale specified in the LocalizedKeywords to retrieve the name lower case. If not specified, it defaults to Locale.getDefault().
Test case on Turkish locale: StoryReporterBuilderBehaviour.shouldBuildWithReporterOfDifferentFormats In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems. |
Mauro Talevi
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Mauro Talevi
made changes -
Priority | Blocker [ 1 ] | Major [ 3 ] |
Muammer Yucel
made changes -
Attachment | keywords_tr.properties [ 53501 ] |
Mauro Talevi
made changes -
Summary | StoryReporterBuilder.formatNames() should be locale-aware | Use of String.toUpper/LowerCase() should be locale-aware |
Description |
StoryReporterBuilder.formatNames(boolean) should use the locale specified in the LocalizedKeywords to retrieve the name lower case. If not specified, it defaults to Locale.getDefault().
Test case on Turkish locale: StoryReporterBuilderBehaviour.shouldBuildWithReporterOfDifferentFormats In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems. |
In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems, which come to surface when using String.toUpper/LowerCase(). The solution is to use String.toUpper/LowerCase(Locale), while defaulting to Locale.getDefault() if none specified.
String.toLowerCase() is currently used in: - StoryReporterBuilder.formatNames(boolean): should use the locale specified in the LocalizedKeywords to retrieve the name lower case. If not specified, it defaults to Locale.getDefault(). - UnderscoredCamelCaseResolver: should provide a constructor to inject a non-default Locale String.toUpperCase() is currently used in: - PropertyWebDriverProvider: should provide a protected method toUpperCase(String) which can be overridden use the desired Locale. |
Component/s | Web Selenium [ 14124 ] | |
Component/s | Core [ 11086 ] |
Mauro Talevi
made changes -
Component/s | Core [ 11086 ] |
Mauro Talevi
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Fix Version/s | web-3.2 [ 16758 ] | |
Resolution | Fixed [ 1 ] |
Mauro Talevi
made changes -
Description |
In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems, which come to surface when using String.toUpper/LowerCase(). The solution is to use String.toUpper/LowerCase(Locale), while defaulting to Locale.getDefault() if none specified.
String.toLowerCase() is currently used in: - StoryReporterBuilder.formatNames(boolean): should use the locale specified in the LocalizedKeywords to retrieve the name lower case. If not specified, it defaults to Locale.getDefault(). - UnderscoredCamelCaseResolver: should provide a constructor to inject a non-default Locale String.toUpperCase() is currently used in: - PropertyWebDriverProvider: should provide a protected method toUpperCase(String) which can be overridden use the desired Locale. |
In Turkish, there are two letters in order to symbolize English's I. They are I and İ (I with dot). Lower case of "I" is "ı" (i without dot) and lower case of "İ" (I with dot) is "i". Users from different nations may encounter with this kind of problems, which come to surface when using String.toUpper/LowerCase(). The solution is to use String.toUpper/LowerCase(Locale), while defaulting to Locale.getDefault() if none specified.
String.toLowerCase() is currently used in: - StoryReporterBuilder.formatNames(boolean): should use the locale specified in the LocalizedKeywords to retrieve the name lower case. If not specified, it defaults to Locale.getDefault(). - UnderscoredCamelCaseResolver: should provide a constructor to inject a non-default Locale String.toUpperCase() is currently used in: - PropertyWebDriverProvider: should provide a protected method usingLocale() which can be overridden use the desired Locale. |
Pushed a fix for this but could not yet complete the test in the Turkish locale.
Could you please provide a version of the keyworks_xx.properties for the Turkish locale?