Sort strings by locale language (#14533)

This commit is contained in:
Jaroslav Hanslík
2022-12-28 14:25:45 +01:00
committed by GitHub
parent 1198f983aa
commit e926091e54
45 changed files with 231 additions and 79 deletions

View File

@@ -231,7 +231,7 @@ export class HaDevicePicker extends SubscribeMixin(LitElement) {
return outputDevices;
}
return outputDevices.sort((a, b) =>
stringCompare(a.name || "", b.name || "")
stringCompare(a.name || "", b.name || "", this.hass.locale.language)
);
}
);