Browse Source

chore: Cleanup unused labels (#2682)

Lipis 4 years ago
parent
commit
6f82a88b79
3 changed files with 4 additions and 11 deletions
  1. 0 5
      src/charts.ts
  2. 2 1
      src/components/PasteChartDialog.tsx
  3. 2 5
      src/locales/en.json

+ 0 - 5
src/charts.ts

@@ -12,11 +12,6 @@ const BAR_GAP = 12;
 const BAR_HEIGHT = 256;
 const GRID_OPACITY = 50;
 
-export const CHART_LABELS = {
-  bar: "labels.chartTypeBar",
-  line: "labels.chartTypeLine",
-};
-
 export interface Spreadsheet {
   title: string | null;
   labels: string[] | null;

+ 2 - 1
src/components/PasteChartDialog.tsx

@@ -2,6 +2,7 @@ import oc from "open-color";
 import React, { useLayoutEffect, useRef, useState } from "react";
 import { ChartElements, renderSpreadsheet, Spreadsheet } from "../charts";
 import { ChartType } from "../element/types";
+import { t } from "../i18n";
 import { exportToSvg } from "../scene/export";
 import { AppState, LibraryItem } from "../types";
 import { Dialog } from "./Dialog";
@@ -98,7 +99,7 @@ export const PasteChartDialog = ({
     <Dialog
       maxWidth={500}
       onCloseRequest={handleClose}
-      title={"Paste chart"}
+      title={t("labels.pasteCharts")}
       className={"PasteChartDialog"}
       autofocus={false}
     >

+ 2 - 5
src/locales/en.json

@@ -1,6 +1,7 @@
 {
   "labels": {
     "paste": "Paste",
+    "pasteCharts": "Paste charts",
     "selectAll": "Select all",
     "multiSelect": "Add element to selection",
     "moveCanvas": "Move canvas",
@@ -90,9 +91,7 @@
     "centerVertically": "Center vertically",
     "centerHorizontally": "Center horizontally",
     "distributeHorizontally": "Distribute horizontally",
-    "distributeVertically": "Distribute vertically",
-    "chartTypeBar": "Bar",
-    "chartTypeLine": "Line"
+    "distributeVertically": "Distribute vertically"
   },
   "buttons": {
     "clearReset": "Reset the canvas",
@@ -224,8 +223,6 @@
   },
   "stats": {
     "angle": "Angle",
-    "charts": "Charts",
-    "current": "Current",
     "element": "Element",
     "elements": "Elements",
     "height": "Height",