bito-code-review[bot] commented on code in PR #40804:
URL: https://github.com/apache/superset/pull/40804#discussion_r3376379574


##########
superset-frontend/plugins/plugin-chart-point-cluster-map/src/utils/mapControls.ts:
##########
@@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { t } from '@apache-superset/core/translation';
+import {
+  getMapRendererOptions,
+  OSM_TILE_STYLE_URL,
+  type MapRendererOption,
+  type MapProvider,
+} from '@superset-ui/core/utils/mapStyles';
+import { hasMapboxApiKey } from './mapbox';
+
+export const POINT_CLUSTER_MAPLIBRE_STYLE_CHOICES = [
+  ['https://tiles.openfreemap.org/styles/liberty', t('Liberty (OpenFreeMap)')],
+  [
+    'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',
+    t('Light (Carto)'),
+  ],
+  [
+    'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
+    t('Dark (Carto)'),
+  ],
+  [
+    'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json',
+    t('Streets (Carto)'),
+  ],
+  [OSM_TILE_STYLE_URL, 'Streets (OSM)'],

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing translation wrapper on label</b></div>
   <div id="fix">
   
   The 'Streets (OSM)' label at line 43 is not wrapped with `t()`, while all 
other map style labels in the same array (lines 30, 33, 37, 41) use `t()` for 
internationalization. Per BITO.md rule [6516], all user-facing text must use 
translation functions to ensure multi-language support.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ```
    --- 
a/superset-frontend/plugins/plugin-chart-point-cluster-map/src/utils/mapControls.ts
    +++ 
b/superset-frontend/plugins/plugin-chart-point-cluster-map/src/utils/mapControls.ts
    @@ -40,6 +40,6 @@ export const POINT_CLUSTER_MAPLIBRE_STYLE_CHOICES = [
         t('Streets (Carto)'),
       ],
    -  [OSM_TILE_STYLE_URL, 'Streets (OSM)'],
    +  [OSM_TILE_STYLE_URL, t('Streets (OSM)')],
    ];
   ```
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #b84e1f</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to