Skip to content

Добавил отображение подсказок на латинице в адресах #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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Arcane561
Copy link

@Arcane561 Arcane561 commented Aug 7, 2020

Обнаружил, что такой функции нет, использовать предлагается вот так:

AddressRequestBuilder.create(__query__).outputLanguage("en").build()

и если нужны на русском, то ничего добавлять не нужно:

AddressRequestBuilder.create(__query__).build()

@codecov
Copy link

codecov bot commented Aug 7, 2020

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.45%. Comparing base (3abf29d) to head (9db0582).
Report is 60 commits behind head on master.

Files with missing lines Patch % Lines
...a/client/domain/address/AddressRequestBuilder.java 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KuliginStepan KuliginStepan self-requested a review August 15, 2020 11:24
Copy link
Owner

@KuliginStepan KuliginStepan left a 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) {
Copy link
Owner

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")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если название поля совпадает с полем в json, то аннотацию @JsonProperty не обязательно ставить

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

Successfully merging this pull request may close these issues.

2 participants