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

how to contribute #1

Open
palight opened this issue May 2, 2022 · 7 comments
Open

how to contribute #1

palight opened this issue May 2, 2022 · 7 comments

Comments

@palight
Copy link

palight commented May 2, 2022

Hi, i saw folders for english and italian in src. Is it the only place to add new language ?

Thanks

@Stypox
Copy link
Owner

Stypox commented May 2, 2022

I will update the README tomorrow with information about how to contribute. Thank you for opening the issue and reminding me this needs to be done ;-)

@Stypox
Copy link
Owner

Stypox commented May 3, 2022

@palight I added part of the explanation (currently only focusing on resources). It's still not finished, since I need to give a better documentation to how Java classes are "translated", but at least it's a start. What do you think about it?

@AlanSanchezP
Copy link

Hi, I started working on the spanish translation following the guide you wrote, but I'm not sure how to run the tests described by date_time_test.json.

@Stypox
Copy link
Owner

Stypox commented May 9, 2022

I still need to explain how to write the Java code. The tests for date&time formatting are these for the English language, and that class inherits DateTimeTestBase which runs the tests in date_time_test.json

@sl1txdvd
Copy link

I started to work on German and did what is in the Readme file. However I don't know what Java files to touch and what do there exactly. I will take a look at the other languages, but some more info would be appreciated.

Especially how I can test to see if what I am doing is working would be good to know.

@Stypox
Copy link
Owner

Stypox commented Feb 5, 2023

The language-dependent java files are those found in the org.dicio.numbers.lang.LANGUAGE_CODE modules. In order to test your changes you need to create test files (also, it is strongly advised to create those, otherwise it's almost impossible to make sure that such specific code does its job).

For example, this is the structure of the English java files. Green files are for tests. The only really required files are actually just EnglishParser and EnglishFormatter, which extend Parser and Formatter respectively, but I suggest you to roughly keep the structure of other files, too, in order to keep things separated.

image

@tiptoptom
Copy link

I started to work on German and did what is in the Readme file. However I don't know what Java files to touch and what do there exactly. I will take a look at the other languages, but some more info would be appreciated.

Especially how I can test to see if what I am doing is working would be good to know.

What is the status of the German translation? Does it need support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants