Skip to content
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

Rename user define keys in the UI #680

Merged
merged 5 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/i18n/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,44 @@
"Settings": "Settings",
"Support": "Support"
},
"FlashingMethod": {
"BetaflightPassthrough": "Betaflight Passthrough",
"DFU": "DFU (Device Firmware Upgrade)",
"EdgeTxPassthrough": "EdgeTX Passthrough",
"Passthrough": "Passthrough",
"STLink": "STLink",
"Stock_BL": "Stock Bootloader",
"UART": "UART (Serial)",
"WIFI": "Wi-Fi",
"Zip": "Zip"
},
"UserDefineKey": {
"AUTO_WIFI_ON_INTERVAL": "Wi-Fi startup delay (in seconds)",
"BINDING_PHRASE": "Binding phrase",
"DEVICE_NAME": "Device name",
"DISABLE_ALL_BEEPS": "Mute all beeps",
"DISABLE_STARTUP_BEEP": "Disable startup beep",
"HOME_WIFI_PASSWORD": "Wi-Fi password",
"HOME_WIFI_SSID": "Wi-Fi name (SSID)",
"JUST_BEEP_ONCE": "Single beep only",
"LOCK_ON_FIRST_CONNECTION": "Lock after first connection",
"MY_STARTUP_MELODY": "My startup melody",
"RCVR_INVERT_TX": "Invert receiver TX pin",
"RCVR_UART_BAUD": "Receiver baud rate",
"REGULATORY_DOMAIN_AU_433": "433 MHz Australia",
"REGULATORY_DOMAIN_AU_915": "915 MHz Australia",
"REGULATORY_DOMAIN_EU_433": "433 MHz Europe",
"REGULATORY_DOMAIN_EU_868": "868 MHz Europe",
"REGULATORY_DOMAIN_FCC_915": "915 MHz FCC",
"REGULATORY_DOMAIN_IN_866": "868 MHz India",
"REGULATORY_DOMAIN_EU_CE_2400": "2.4 GHz LBT (Listen Before Talk)",
"REGULATORY_DOMAIN_ISM_2400": "2.4 GHz ISM (Standard)",
"RX_AS_TX": "Use receiver as a transmitter (TX) module",
"TLM_REPORT_INTERVAL_MS": "Telemetry reporting interval (ms)",
"UART_INVERTED": "Invert UART",
"UNLOCK_HIGHER_POWER": "Unlock higher power output",
"USE_R9MM_R9MINI_SBUS": "Enable R9MM/R9Mini SBUS"
},
"UserDefineDescription": {
"RegulatoryDomain915": "Consult <LoRaWANLink>LoRaWAN Frequency Plans and Regulations</LoRaWANLink> for a regulatory domain to use in your location.",
"Wiki": "Check our Wiki page for latest definition.",
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/FlashingMethodOptions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<>
{!targetMapping.flashingMethod
? targetMapping.name
: targetMapping.flashingMethod}
: t(`FlashingMethod.${targetMapping.flashingMethod}`)}
{targetMapping.flashingMethod !== null && (
<FlashingMethodDescription
flashingMethod={targetMapping.flashingMethod}
Expand All @@ -100,7 +100,7 @@
/>
);
},
[currentDevice?.wikiUrl]

Check warning on line 103 in src/ui/components/FlashingMethodOptions/index.tsx

View workflow job for this annotation

GitHub Actions / test (ubuntu-20.04)

React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array

Check warning on line 103 in src/ui/components/FlashingMethodOptions/index.tsx

View workflow job for this annotation

GitHub Actions / test (windows-2019)

React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array

Check warning on line 103 in src/ui/components/FlashingMethodOptions/index.tsx

View workflow job for this annotation

GitHub Actions / test (macos-latest)

React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array
);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/UserDefinesList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const UserDefinesList: FunctionComponent<UserDefinesListProps> = (props) => {
disableRipple
/>
</ListItemIcon>
<ListItemText>{item.key}</ListItemText>
<ListItemText>{t(`UserDefineKey.${item.key}`)}</ListItemText>
<ListItemSecondaryAction>
<UserDefineDescription userDefine={item.key} />
</ListItemSecondaryAction>
Expand Down
Loading