-
Notifications
You must be signed in to change notification settings - Fork 19
Добавил отображение подсказок на латинице в адресах #18
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: arcane418 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18 +/- ##
============================================
- Coverage 99.06% 98.45% -0.61%
Complexity 142 142
============================================
Files 45 45
Lines 321 324 +3
Branches 1 1
============================================
+ Hits 318 319 +1
- Misses 3 5 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нужно добавить тестов, которые проверяют, что изменение языка действительно работает
@@ -43,9 +44,15 @@ public AddressRequestBuilder restrictValue() { | |||
return this; | |||
} | |||
|
|||
public AddressRequestBuilder outputLanguage(String language) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаю сделать более типизировано: у нас есть конечный список языков, которые поддерживаются – это русский (ru) и английский (en). Можно сделать Enum, например:
public enum Language {
EN,
RU
}
А при создании AddressRequest
делать такое: language.name().toLower()
@@ -25,17 +25,21 @@ | |||
private Map<String, String> toBound; | |||
@JsonProperty("restrict_value") | |||
private Boolean restrictValue; | |||
@JsonProperty("language") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если название поля совпадает с полем в json, то аннотацию @JsonProperty
не обязательно ставить
Обнаружил, что такой функции нет, использовать предлагается вот так:
и если нужны на русском, то ничего добавлять не нужно: