Add i18n banner

This commit is contained in:
Yang Luo
2023-02-18 18:07:23 +08:00
parent 3f0a741e6c
commit edbd3d4018
10 changed files with 35 additions and 2 deletions

View File

@ -16,8 +16,8 @@ import React, {Component} from "react";
import "./App.less"; import "./App.less";
import {Helmet} from "react-helmet"; import {Helmet} from "react-helmet";
import * as Setting from "./Setting"; import * as Setting from "./Setting";
import {BarsOutlined, DownOutlined, LogoutOutlined, SettingOutlined} from "@ant-design/icons"; import {BarsOutlined, DownOutlined, InfoCircleFilled, LogoutOutlined, SettingOutlined} from "@ant-design/icons";
import {Avatar, Button, Card, ConfigProvider, Drawer, Dropdown, FloatButton, Layout, Menu, Result} from "antd"; import {Alert, Avatar, Button, Card, ConfigProvider, Drawer, Dropdown, FloatButton, Layout, Menu, Result} from "antd";
import {Link, Redirect, Route, Switch, withRouter} from "react-router-dom"; import {Link, Redirect, Route, Switch, withRouter} from "react-router-dom";
import OrganizationListPage from "./OrganizationListPage"; import OrganizationListPage from "./OrganizationListPage";
import OrganizationEditPage from "./OrganizationEditPage"; import OrganizationEditPage from "./OrganizationEditPage";
@ -671,6 +671,9 @@ class App extends Component {
return ( return (
<React.Fragment> <React.Fragment>
{
this.renderBanner()
}
<FloatButton.BackTop /> <FloatButton.BackTop />
<CustomGithubCorner /> <CustomGithubCorner />
{ {
@ -680,6 +683,27 @@ class App extends Component {
); );
} }
renderBanner() {
if (!Conf.IsDemoMode) {
return null;
}
return (
<Alert type="info" banner showIcon={false} closable message={
<div style={{textAlign: "center"}}>
<InfoCircleFilled style={{color: "rgb(87,52,211)"}} />
&nbsp;&nbsp;
{i18next.t("general:Found some texts still not translated? Please help us translate at")}
&nbsp;
<a target="_blank" rel="noreferrer" href={"https://crowdin.com/project/casdoor-site"}>
Crowdin
</a>
&nbsp;!&nbsp;🙏
</div>
} />
);
}
render() { render() {
return ( return (
<React.Fragment> <React.Fragment>

View File

@ -181,6 +181,7 @@
"First name": "First name", "First name": "First name",
"Forget URL": "URL vergessen", "Forget URL": "URL vergessen",
"Forget URL - Tooltip": "Unique string-style identifier", "Forget URL - Tooltip": "Unique string-style identifier",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Zuhause", "Home": "Zuhause",
"Home - Tooltip": "Application homepage", "Home - Tooltip": "Application homepage",

View File

@ -181,6 +181,7 @@
"First name": "First name", "First name": "First name",
"Forget URL": "Forget URL", "Forget URL": "Forget URL",
"Forget URL - Tooltip": "Forget URL - Tooltip", "Forget URL - Tooltip": "Forget URL - Tooltip",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Home", "Home": "Home",
"Home - Tooltip": "Home - Tooltip", "Home - Tooltip": "Home - Tooltip",

View File

@ -181,6 +181,7 @@
"First name": "Nombre", "First name": "Nombre",
"Forget URL": "URL de olvido", "Forget URL": "URL de olvido",
"Forget URL - Tooltip": "URL de olvido - Tooltip", "Forget URL - Tooltip": "URL de olvido - Tooltip",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Inicio", "Home": "Inicio",
"Home - Tooltip": "Inicio - Tooltip", "Home - Tooltip": "Inicio - Tooltip",

View File

@ -181,6 +181,7 @@
"First name": "First name", "First name": "First name",
"Forget URL": "Oublier l'URL", "Forget URL": "Oublier l'URL",
"Forget URL - Tooltip": "Unique string-style identifier", "Forget URL - Tooltip": "Unique string-style identifier",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Domicile", "Home": "Domicile",
"Home - Tooltip": "Application homepage", "Home - Tooltip": "Application homepage",

View File

@ -181,6 +181,7 @@
"First name": "First name", "First name": "First name",
"Forget URL": "URLを忘れた", "Forget URL": "URLを忘れた",
"Forget URL - Tooltip": "Unique string-style identifier", "Forget URL - Tooltip": "Unique string-style identifier",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "ホーム", "Home": "ホーム",
"Home - Tooltip": "Application homepage", "Home - Tooltip": "Application homepage",

View File

@ -181,6 +181,7 @@
"First name": "First name", "First name": "First name",
"Forget URL": "Forget URL", "Forget URL": "Forget URL",
"Forget URL - Tooltip": "Unique string-style identifier", "Forget URL - Tooltip": "Unique string-style identifier",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Home", "Home": "Home",
"Home - Tooltip": "Application homepage", "Home - Tooltip": "Application homepage",

View File

@ -181,6 +181,7 @@
"First name": "Имя", "First name": "Имя",
"Forget URL": "Забыть URL", "Forget URL": "Забыть URL",
"Forget URL - Tooltip": "Unique string-style identifier", "Forget URL - Tooltip": "Unique string-style identifier",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Домашний", "Home": "Домашний",
"Home - Tooltip": "Application homepage", "Home - Tooltip": "Application homepage",

View File

@ -181,6 +181,7 @@
"First name": "First name", "First name": "First name",
"Forget URL": "Forget URL", "Forget URL": "Forget URL",
"Forget URL - Tooltip": "Forget URL - Tooltip", "Forget URL - Tooltip": "Forget URL - Tooltip",
"Found some texts still not translated? Please help us translate at": "Found some texts still not translated? Please help us translate at",
"Go to writable demo site?": "Go to writable demo site?", "Go to writable demo site?": "Go to writable demo site?",
"Home": "Home", "Home": "Home",
"Home - Tooltip": "Home - Tooltip", "Home - Tooltip": "Home - Tooltip",

View File

@ -181,6 +181,7 @@
"First name": "名字", "First name": "名字",
"Forget URL": "忘记密码URL", "Forget URL": "忘记密码URL",
"Forget URL - Tooltip": "忘记密码URL", "Forget URL - Tooltip": "忘记密码URL",
"Found some texts still not translated? Please help us translate at": "发现有些文字尚未翻译?请移步这里帮我们翻译:",
"Go to writable demo site?": "跳转至可写演示站点?", "Go to writable demo site?": "跳转至可写演示站点?",
"Home": "首页", "Home": "首页",
"Home - Tooltip": "应用的首页", "Home - Tooltip": "应用的首页",