-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Localisation test for invalid Strings #3185
Comments
Hi, I am a very beginner. I would like to try to help. Could you give more details about this issue to help me to find a solution ? Thank you very much. |
Hi, A solution would be to add a consistency Test to make sure that there are no whitespaces in the keys and the translations. Whitespaces have to be replaced with underscores. You can simply expand that for a new test case. |
Hi, @steph37tours! EDIT: For example
Make sure to open your pull request early, we are happy to help you! |
Thank you for your quick answers ! I look at this and I come back. |
Firstable, thank you very much for your help ! |
Well, I think you shouldn't replace the spaces, just let the test fail, so the author will be notified that there are invalid characters in the localization properties file. Regarding the parsing, just read in all properties as done in the other tests of https://github.com/JabRef/jabref/blob/master/src/test/java/org/jabref/logic/l10n/LocalizationConsistencyTest.java and then check if there are spaces in the strings. Good luck, and give us a shout if you need further help! |
I just push again. I think it's good. Does I have to make a new pull request ? |
I use properties.replace(" ",""). It was not possible to use replaceAll. I think it's not a trouble as long as the assertEquals compare the String object, with the modified. Just one replace make a difference. |
I try to test by put a space in properties file, but I didn't have error after launch... |
Let's discuss the PR in the PR-Thread. You can run the tests locally in your IDE or using |
Hi Guys,
I would like to help if the issue is not yet solved. It would be great if I
could get some context.
Thanks
…On 5 September 2017 at 20:29, Stéphane Curet ***@***.***> wrote:
I try to test by put a space in properties file, but I didn't have error
after launch...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3185 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHARASgsPnrv-8lBASXvaGM8HVGInWr_ks5sfWG7gaJpZM4PKM29>
.
|
Hey @aayush2610, Mr. @steph37tours is working on this at #3198, and I'm sure he will resolve this soon. Feel free to jump into any other issue. There are some labeled with beginner which we think are easier to resolve, even if you are new to JabRef. |
fixed in #3198 |
@mlep suggested this in #3184 (comment).
There should be another localisation consistency check that detects invalid characters like spaces in the localisation strings.
The text was updated successfully, but these errors were encountered: