Calling localization API on grid setting titles

Replaced opt.text with opt.title as opt.text could be undefined for some settings options, and calling the localization API on the titles to make them localizable.

Change-Id: I6d37140c0be909730172c86f0bf4c5342b24a315
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2424849
Reviewed-by: Patrick Brosset <[email protected]>
Reviewed-by: Alex Rudenko <[email protected]>
Commit-Queue: Christy Chen <[email protected]>
diff --git a/front_end/elements/LayoutSidebarPane.js b/front_end/elements/LayoutSidebarPane.js
index 3d1d9a8..2e411f3 100644
--- a/front_end/elements/LayoutSidebarPane.js
+++ b/front_end/elements/LayoutSidebarPane.js
@@ -109,10 +109,10 @@
           return {
             type: descriptor.settingType,
             name: descriptor.settingName,
-            title: descriptor.title,
+            title: ls(descriptor.title),
             value: setting.get(),
             options: descriptor.options.map(opt => ({
-                                              title: opt.text,
+                                              title: ls(opt.title),
                                               value: opt.value,
                                             }))
           };