From 7a93c41417468ad748a3a512972ed7f1daccbd1a Mon Sep 17 00:00:00 2001
From: Alex Chen <68627897+yongbing-chen@users.noreply.github.com>
Date: Tue, 17 Nov 2020 12:54:20 +0800
Subject: [PATCH] add locale in prebuiltPredictPage (#772)
* add local in prebuiltPredictPage
* change locales to Local
---
.../prebuiltPredict/prebuiltPredictPage.scss | 6 ++
.../prebuiltPredict/prebuiltPredictPage.tsx | 55 ++++++++++++++-----
2 files changed, 48 insertions(+), 13 deletions(-)
create mode 100644 src/react/components/pages/prebuiltPredict/prebuiltPredictPage.scss
diff --git a/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.scss b/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.scss
new file mode 100644
index 00000000..6e0ad3aa
--- /dev/null
+++ b/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.scss
@@ -0,0 +1,6 @@
+.formtype-section {
+ float: left;
+}
+.locales-section {
+ float: right;
+}
diff --git a/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.tsx b/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.tsx
index 50554d5d..672f929f 100644
--- a/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.tsx
+++ b/src/react/components/pages/prebuiltPredict/prebuiltPredictPage.tsx
@@ -38,10 +38,12 @@ import "../predict/predictPage.scss";
import PredictResult from "../predict/predictResult";
import {ILoadFileHelper, ILoadFileResult, LoadFileHelper} from "./LoadFileHelper";
import {ITableHelper, ITableState, TableHelper} from "./tableHelper";
+import "./prebuiltPredictPage.scss";
interface IPrebuiltTypes {
name: string;
servicePath: string;
+ useLocale?: boolean;
}
export interface IPrebuiltPredictPageProps extends RouteComponentProps {
@@ -66,6 +68,7 @@ export interface IPrebuiltPredictPageState extends ILoadFileResult, ITableState
highlightedField?: string;
imageAngle: number;
currentPrebuiltType: IPrebuiltTypes;
+ currentLocale: string;
}
function mapStateToProps(state: IApplicationState) {
@@ -87,7 +90,8 @@ export class PrebuiltPredictPage extends React.Component