From afdaeba818a22860d835b6bebc029b51ed4ef019 Mon Sep 17 00:00:00 2001 From: io53 Date: Wed, 14 Aug 2024 22:30:30 +0300 Subject: [PATCH] changed sensor select translation keys #209 --- src/components/SensorPicker.js | 4 ++-- src/states/SensorCompare.js | 4 ++-- src/states/ShareCenter.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/SensorPicker.js b/src/components/SensorPicker.js index 09da8e6..e11cb10 100644 --- a/src/components/SensorPicker.js +++ b/src/components/SensorPicker.js @@ -4,7 +4,7 @@ import { MdArrowDropDown } from 'react-icons/md'; import i18next from 'i18next'; import { getSetting } from "../UnitHelper"; -export const SensorPicker = ({ sensors, canBeSelected, onSensorChange, normalStyle }) => { +export const SensorPicker = ({ sensors, canBeSelected, onSensorChange, normalStyle, buttonText }) => { const handleSensorChange = (selectedSensor) => { onSensorChange(selectedSensor); @@ -41,7 +41,7 @@ export const SensorPicker = ({ sensors, canBeSelected, onSensorChange, normalSty rightIcon={} > - {i18next.t("sensors")} + {buttonText || i18next.t("sensors")} diff --git a/src/states/SensorCompare.js b/src/states/SensorCompare.js index 9e359e3..14882c2 100644 --- a/src/states/SensorCompare.js +++ b/src/states/SensorCompare.js @@ -75,9 +75,9 @@ function SensorCompare(props) { } - const selectSensorTitle =
{i18next.t("select_sensor")}
+ const selectSensorTitle =
{i18next.t("sensors_select_label")}
const selectSensor = <> - setSelectedSensors([...selectedSensors, s])} /> + setSelectedSensors([...selectedSensors, s])} /> {selectedSensors.map((sensor, index) => ( diff --git a/src/states/ShareCenter.js b/src/states/ShareCenter.js index 48732fb..fe3cf4f 100644 --- a/src/states/ShareCenter.js +++ b/src/states/ShareCenter.js @@ -125,9 +125,9 @@ const ShareCenter = () => { let sensorsThatCanBeShared = mySensors.filter(x => x.sharedTo.length < pjson.settings.maxSharesPerSensor) sensorsThatCanBeShared = sensorsThatCanBeShared.filter(sensor => !selectedSensors.includes(sensor.sensor)); - const selectSensorTitle =
{i18next.t("select_sensor")}
+ const selectSensorTitle =
{i18next.t("sensors_select_label")}
const selectSensor = <> - setSelectedSensors([...selectedSensors, s])} /> + setSelectedSensors([...selectedSensors, s])} /> {selectedSensors.map((sensor, index) => (