Update Element Inspector string to "Toggle" (#41595)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41595

Instead of having to select between Enable/Hide the Element Inspector String, let's just use "Toggle".

Changelog:
[Internal] [Changed] - Update Element Inspector string to "Toggle"

Reviewed By: cipolleschi

Differential Revision: D51503403

fbshipit-source-id: 2ad24df8324eb789b0016fe7ac5d439cba6f5952
This commit is contained in:
Nicola Corti
2023-11-22 03:37:13 -08:00
committed by Facebook GitHub Bot
parent 2a4338d091
commit 0cbd2a345d
3 changed files with 3 additions and 7 deletions
@@ -283,8 +283,7 @@ RCT_EXPORT_MODULE()
[items addObject:[RCTDevMenuItem
buttonItemWithTitleBlock:^NSString * {
return devSettings.isElementInspectorShown ? @"Hide Element Inspector"
: @"Show Element Inspector";
return @"Toggle Element Inspector";
}
handler:^{
[devSettings toggleElementInspector];
@@ -414,9 +414,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
});
options.put(
mDevSettings.isElementInspectorEnabled()
? mApplicationContext.getString(R.string.catalyst_inspector_stop)
: mApplicationContext.getString(R.string.catalyst_inspector),
mApplicationContext.getString(R.string.catalyst_inspector_toggle),
new DevOptionHandler() {
@Override
public void onOptionSelected() {
@@ -11,8 +11,7 @@
<string name="catalyst_hot_reloading_stop" project="catalyst" translatable="false">Disable Fast Refresh</string>
<string name="catalyst_hot_reloading_auto_disable" project="catalyst" translatable="false">Disabling Fast Refresh because it requires a development bundle.</string>
<string name="catalyst_hot_reloading_auto_enable" project="catalyst" translatable="false">Switching to development bundle in order to enable Fast Refresh.</string>
<string name="catalyst_inspector" project="catalyst" translatable="false">Show Element Inspector</string>
<string name="catalyst_inspector_stop" project="catalyst" translatable="false">Hide Element Inspector</string>
<string name="catalyst_inspector_toggle" project="catalyst" translatable="false">Toggle Element Inspector</string>
<string name="catalyst_perf_monitor" project="catalyst" translatable="false">Show Perf Monitor</string>
<string name="catalyst_perf_monitor_stop" project="catalyst" translatable="false">Hide Perf Monitor</string>
<string name="catalyst_settings" project="catalyst" translatable="false">Settings</string>