dev add check name with locale
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-14 12:28:52 +07:00
parent 59909c05c3
commit 48cdca56a2
@@ -97,7 +97,8 @@ public class GeoCountryService {
InetAddress ipAddress = InetAddress.getByName(ip);
CityResponse response = cityDbReader.city(ipAddress);
return response.getCity().getName();
return response.getCity().getNames().getOrDefault("ru",
response.getCity().getName());
} catch (Exception e) {
log.error("Failed to get city for IP: {}", ip, e);
return "UNKNOWN";
@@ -109,7 +110,8 @@ public class GeoCountryService {
InetAddress ipAddress = InetAddress.getByName(ip);
CountryResponse response = countryDbReader.country(ipAddress);
return response.getCountry().getName();
return response.getCountry().getNames().getOrDefault("ru",
response.getCountry().getName());
} catch (Exception e) {
log.error("Failed to get country for IP: {}", ip, e);
return "UNKNOWN";