allegro / allegro/tradukisto

Add support for Romanian

未关闭
#119 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Feature request good first issue hacktoberfest java
主要语言
Groovy
星标
214
派生
97
PR 合并指标
30 天内没有已合并 PR

描述

Tradukisto is the library what converts numbers to human-readable words - for example from `14` to `fourteen`. This issue was created to add support for counting in new language. Depending on how numeral system in your language is similar to other languages (english, arabic, german, slavic) and how many exceptions it have - it can be easy or more demanding.

Implementing [unit tests](https://github.com/allegro/tradukisto/blob/master/src/test/groovy/pl/allegro/finance/tradukisto/internal/languages/english/EnglishValuesTest.groovy.) will be really helpful for you, I encourage you to create them first (TDD paradigm), before developing new changes in the code. You can run them in terminal with `./gradlew test` or green button in Intellij code editor.

New language needs to have implementation for [Container](https://github.com/allegro/tradukisto/blob/54e45ee94e13aae69aa64e01d934425c8bd0ed01/src/main/java/pl/allegro/finance/tradukisto/internal/Container.java#L119). Depending on how your language works, having conjugation, gender forms, custom chunking (typically divider is for 3 numbers) etc it may be needed to define more advanced container with custom implementations for counting, for example [turkish](https://github.com/allegro/tradukisto/blob/master/src/main/java/pl/allegro/finance/tradukisto/internal/Container.java#L178). Tests will really be helpful for you to see if it needs custom implementations or not.

Also define `Values` - [translations for base numers](https://github.com/allegro/tradukisto/blob/54e45ee94e13aae69aa64e01d934425c8bd0ed01/src/main/java/pl/allegro/finance/tradukisto/internal/languages/english/EnglishValues.java#L17) and for [plural forms (thousands, millions etc)](https://github.com/allegro/tradukisto/blob/54e45ee94e13aae69aa64e01d934425c8bd0ed01/src/main/java/pl/allegro/finance/tradukisto/internal/languages/english/EnglishValues.java#L60).
Feel free to ask if you have more questions, we will try to help you.
https://github.com/allegro/tradukisto/wiki/How-to-start-contributing

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。