更新英文相关文案
This commit is contained in:
parent
1e3f8dc3c6
commit
ab9e1b7e10
@ -7,6 +7,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"dev-test": "vite --host --mode=test",
|
||||
"dev-lang-en": "set APP_LANGUAGE=en-US && vite --host --mode=lang-en",
|
||||
"build": "tsc && vite build",
|
||||
"build-test": "tsc && vite build --mode=test",
|
||||
"build-relative": "tsc && vite build --mode=relative",
|
||||
|
@ -454,6 +454,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.lang-en-US{
|
||||
.page-action {
|
||||
button{
|
||||
@apply min-w-[140px];
|
||||
.text{
|
||||
text-align: center;
|
||||
}
|
||||
svg{
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 时间选择
|
||||
.timer-select-container {
|
||||
|
@ -145,7 +145,7 @@ export default function ArticleEditModal(props: Props) {
|
||||
onCancel={() => props.onClose?.()}
|
||||
okButtonProps={{loading: state.loading}}
|
||||
onOk={handleSave}
|
||||
okText={props.type == 'news' ? t('confirm') : t('news.edit_generate_video_again')}
|
||||
okText={props.type == 'news' ? t('confirm_text') : t('news.edit_generate_video_again')}
|
||||
>
|
||||
<div className="article-title mt-5">
|
||||
<input className={'input-box text-lg'} value={title} onChange={e => {
|
||||
@ -170,7 +170,7 @@ export default function ArticleEditModal(props: Props) {
|
||||
<div className="flex gap-10 ">
|
||||
{props.type == 'news' && props.id ? <button className="text-gray-400 hover:text-gray-800" onClick={handlePush2Video}>{t('news.edit_generate_video')}{state.generating?'推送中...':''}</button> : null}
|
||||
<button className="text-gray-400 hover:text-gray-800" onClick={() => props.onClose?.()}>{t('cancel')}</button>
|
||||
<button onClick={handleSave} className="text-gray-800 hover:text-blue-500">{props.type == 'news' ? t('confirm') : t('news.edit_generate_again')}</button>
|
||||
<button onClick={handleSave} className="text-gray-800 hover:text-blue-500">{props.type == 'news' ? t('confirm_text') : t('news.edit_generate_again')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>);
|
||||
|
@ -122,7 +122,7 @@ const TagSelect = (props: {
|
||||
set(!visible)
|
||||
}}
|
||||
>
|
||||
<span>{checkedAll || selectValues.length == 0 ? t('news.news_all_source') : t('news.source')}</span>
|
||||
<span>{(checkedAll || selectValues.length == 0) ? t('news.news_all_source') : t('news.source')}</span>
|
||||
<CaretUpOutlined className={`ml-2 arrow-icon ${visible ? 'rotate-0' : 'rotate-180'}`}/>
|
||||
</div>
|
||||
<div className={`options-list-container absolute ${visible ? 'block' : 'hidden'}`}>
|
||||
@ -131,7 +131,7 @@ const TagSelect = (props: {
|
||||
<li className="select-option-item relative">
|
||||
<div className="option-value whitespace-nowrap flex justify-between">
|
||||
<span className="text-center flex-1"
|
||||
onClick={() => handleAllChanged(!checkedAll)}>t('news.news_all_source')</span>
|
||||
onClick={() => handleAllChanged(!checkedAll)}>{t('news.news_all_source')}</span>
|
||||
<Checkbox className="ml-6" checked={checkedAll}
|
||||
onChange={e => handleAllChanged(e.target.checked)}/>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"AppTitle": "Metahuman Streaming platform",
|
||||
"AppTitle": "AI Livesteam",
|
||||
"Hello": "Hello",
|
||||
"close": "Close",
|
||||
"confirm": {
|
||||
@ -12,21 +12,21 @@
|
||||
"delete_success": "Delete success",
|
||||
"download": "Download",
|
||||
"generating": {
|
||||
"title": "Preview - Click video item to play"
|
||||
"title": "Preview - Click the video to play"
|
||||
},
|
||||
"history": {
|
||||
"delete_confirm": "Are you sure you want to delete this video?",
|
||||
"push_success": "Streaming success",
|
||||
"search_key": "Please enter keywords for video title",
|
||||
"text": "History video"
|
||||
"search_key": "Please enter title keywords",
|
||||
"text": "Video history"
|
||||
},
|
||||
"live": {
|
||||
"duration": "Duration",
|
||||
"edit_locked": "Disable to sort",
|
||||
"edit_locked": "Locked",
|
||||
"edit_unlock": "Unlock",
|
||||
"play_first": "Play first video",
|
||||
"playlist_count": "Current playlist total has {{count}} items",
|
||||
"title": "Live"
|
||||
"playlist_count": "{{count}} videos in total",
|
||||
"title": "Livestream"
|
||||
},
|
||||
"login": {
|
||||
"code_sending": "Sending...",
|
||||
@ -43,7 +43,7 @@
|
||||
"editing": "Editing",
|
||||
"generating": "Generating",
|
||||
"live": "Streaming",
|
||||
"materials": "News Materials"
|
||||
"materials": "News"
|
||||
},
|
||||
"news": {
|
||||
"delete_confirm": "Are you sure you want to delete this item?",
|
||||
@ -52,18 +52,19 @@
|
||||
"delete_empty": "Please select the items to delete",
|
||||
"download_empty": "Please select the news to download",
|
||||
"download_failed": "Download failed!",
|
||||
"edit_form_search": "Please enter keywords for news title",
|
||||
"edit_form_search": "Please enter title keywords",
|
||||
"editing": "Editing",
|
||||
"filter_all": "All",
|
||||
"filter_source": "News source",
|
||||
"generate_video": "Generating",
|
||||
"get_detail": "Get news details",
|
||||
"get_detail_error": "Get new details failed",
|
||||
"image_count": "image",
|
||||
"image_count": "Images",
|
||||
"word_count": "Words",
|
||||
"materials": {
|
||||
"title": "News Materials"
|
||||
},
|
||||
"news_all_source": "source",
|
||||
"news_all_source": "All",
|
||||
"push_empty": "please select the news to edit",
|
||||
"push_failed": "Failed to editing",
|
||||
"push_stream_empty": "please select the news to streaming",
|
||||
@ -72,41 +73,37 @@
|
||||
"push_success": "Push success",
|
||||
"push_to_edit": "Editing",
|
||||
"pushed": "Pushed",
|
||||
"search_key_title": "Please enter keywords",
|
||||
"search_key_title": "Please enter title keywords",
|
||||
"source": "source",
|
||||
"title": "News content",
|
||||
"title_image_count": "Number of pictures",
|
||||
"title_operate": "Operation",
|
||||
"title_operate": "",
|
||||
"title_time": "time",
|
||||
"title_word_count": "Wordcount",
|
||||
"word_count": "word",
|
||||
|
||||
"edit_digital_text": "MetaHuman materiel",
|
||||
"edit_other_text": "Other media materiel",
|
||||
"edit_digital_text": "MetaHuman Material",
|
||||
"edit_other_text": "Other media Material",
|
||||
"edit_generate_video_again": "Regenerate",
|
||||
"edit_generate_again": "Regenerate",
|
||||
"edit_generate_video": "Video generation",
|
||||
"edit_generate_video": "Generating",
|
||||
"edit_save_failed": "Save failed!",
|
||||
|
||||
"edit_notice_keep_1": "Keep at least one content block",
|
||||
"edit_notice_enter_text": "Please enter content",
|
||||
"edit_notice_enter_article_title": "Please enter title",
|
||||
"edit_notice_enter_article_title1": "Please enter news title",
|
||||
"edit_notice_enter_article_content": "Please enter content",
|
||||
|
||||
"edit_add_group": "Add Group",
|
||||
"edit_delete_group": "Delete Group",
|
||||
"edit_delete_group_confirm": "Are you sure delete the group?",
|
||||
"edit_delete_group_confirm": "Are you sure you want to delete the group?",
|
||||
"delete_the_picture": "Are you sure delete the picture?"
|
||||
},
|
||||
"upload": {
|
||||
"upload_failed": "Upload failed",
|
||||
"delete_confirm": "Are you sure delete the picture?",
|
||||
"upload_image": "Upload Picture"
|
||||
"upload_image": "Upload Image"
|
||||
},
|
||||
"delete": "Delete",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"confirm_text": "Confirm",
|
||||
"select": {
|
||||
"pushed": "Pushed: {{count}}",
|
||||
"select_all": "Select all",
|
||||
@ -116,7 +113,7 @@
|
||||
"total": "Total: {{count}}"
|
||||
},
|
||||
"time_filter": {
|
||||
"all": "All time",
|
||||
"all": "All",
|
||||
"last_week": "Last week",
|
||||
"past_24_hour": "Past 24 hour",
|
||||
"past_30_min": "Past 30 min",
|
||||
@ -144,9 +141,10 @@
|
||||
"sort_modify_success": "Video sequence changed",
|
||||
"title": "Title",
|
||||
"title_generated_time": "Time stamp",
|
||||
"title_operation": "Operation",
|
||||
"title_operation": "",
|
||||
"title_thumb": "Cover",
|
||||
"playing": "Playing",
|
||||
"generating": "Generating"
|
||||
}
|
||||
}
|
||||
},
|
||||
"history.pushed": "Streaming: {{count}}"
|
||||
}
|
||||
|
@ -80,20 +80,17 @@
|
||||
"title_time": "时间",
|
||||
"title_word_count": "字数",
|
||||
"word_count": "字数",
|
||||
|
||||
"edit_digital_text": "数字人主播台编辑区",
|
||||
"edit_other_text": "素材融合呈现编辑区",
|
||||
"edit_generate_video_again": "重新生成",
|
||||
"edit_generate_again": "重新生成",
|
||||
"edit_generate_video": "生成视频",
|
||||
"edit_save_failed": "保存失败,请重试!",
|
||||
|
||||
"edit_notice_keep_1": "至少保留一个内容块",
|
||||
"edit_notice_enter_text": "请先添加内容",
|
||||
"edit_notice_enter_article_title": "请输入文章标题",
|
||||
"edit_notice_enter_article_title1": "请输入标题内容",
|
||||
"edit_notice_enter_article_content": "请输入正文文本内容",
|
||||
|
||||
"edit_add_group": "新增分组",
|
||||
"edit_delete_group": "删除此分组",
|
||||
"edit_delete_group_confirm": "请确认删除此分组?",
|
||||
@ -106,7 +103,7 @@
|
||||
},
|
||||
"delete": "删除",
|
||||
"cancel": "取消",
|
||||
"confirm": "确定",
|
||||
"confirm_text": "确定",
|
||||
"select": {
|
||||
"pushed": "已推送: {{count}} 条",
|
||||
"select_all": "全选",
|
||||
@ -147,5 +144,6 @@
|
||||
"title_operation": "操作",
|
||||
"title_thumb": "缩略图",
|
||||
"playing": "播放中"
|
||||
}
|
||||
}
|
||||
},
|
||||
"history.pushed": "已推送 {{count}} 条"
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ export default function LibraryIndex() {
|
||||
<div className="flex items-center">
|
||||
<Space className="text-gray-400" size={20}>
|
||||
<span>{t('select.total',{count:data?.list?.length || 0})}</span>
|
||||
<span>{t('select.pushed',{count:state.pushedCount})}</span>
|
||||
<span>{t('history.pushed',{count:state.pushedCount})}</span>
|
||||
<span className={'text-blue-500'}>{t('select.selected_some',{count:checkedIdArray.length})}</span>
|
||||
</Space>
|
||||
<button className="hover:text-blue-300 text-gray-400 ml-4"
|
||||
|
@ -171,11 +171,11 @@ export default function VideoIndex() {
|
||||
<div className="live-control flex justify-between">
|
||||
<div className="pl-[70px]"></div>
|
||||
<div className="flex items-center">
|
||||
<Space>
|
||||
<span>{t('select.selected_some',{count:videoData.length || 0})}</span>
|
||||
<Space size={20}>
|
||||
<span>{t('select.total',{count:videoData.length || 0})}</span>
|
||||
<span className={'text-blue-500'}>{t('select.selected_some',{count:checkedIdArray.length})}</span>
|
||||
</Space>
|
||||
<button className="hover:text-blue-300 text-gray-400 ml-2"
|
||||
<button className="hover:text-blue-300 text-gray-400 ml-5"
|
||||
onClick={handleAllCheckedChange}>
|
||||
<span className="text-sm mr-2">{t("select.select_all")}</span>
|
||||
{/*<CheckCircleFilled className={clsx({'text-blue-500': state.checkedAll})}/>*/}
|
||||
|
@ -52,7 +52,7 @@ const AppRouter = () => {
|
||||
}}
|
||||
>
|
||||
<DocumentTitle title={t('AppTitle')}/>
|
||||
<App>
|
||||
<App className={`lang-${i18n.language}`}>
|
||||
<Suspense fallback={<Loader/>}>
|
||||
<RouterProvider future={{v7_startTransition: true}} router={router}/>
|
||||
</Suspense>
|
||||
|
@ -77,7 +77,7 @@ const NavigationUserContainer = () => {
|
||||
</div>)
|
||||
}
|
||||
export const BaseLayout: React.FC<LayoutProps> = ({children}) => {
|
||||
const {i18n,onChangeLocalization} = useConfig();
|
||||
const {i18n} = useTranslation();
|
||||
const [params] = useSearchParams();
|
||||
return (<div className={'dashboard-layout min-h-screen'}>
|
||||
<div className="min-h-screen w-full">
|
||||
@ -87,12 +87,12 @@ export const BaseLayout: React.FC<LayoutProps> = ({children}) => {
|
||||
</div>
|
||||
<DashboardNavigation/>
|
||||
<div className="flex items-center">
|
||||
{params.get('lang') || AppConfig.APP_LANG == 'multiple' && <div>
|
||||
{(params.get('lang') == 'yes' || AppConfig.APP_LANG == 'multiple') && <div>
|
||||
{
|
||||
i18n == 'zh-CN'?(
|
||||
<Button className="ml-2" onClick={()=>onChangeLocalization('en-US')}>Change To EN</Button>
|
||||
i18n.language == 'zh-CN'?(
|
||||
<Button className="ml-2" onClick={()=>i18n.changeLanguage('en-US')}>Change To EN</Button>
|
||||
):(
|
||||
<Button className="ml-2" onClick={()=>onChangeLocalization('zh-CN')}>显示中文</Button>
|
||||
<Button className="ml-2" onClick={()=>i18n.changeLanguage('zh-CN')}>显示中文</Button>
|
||||
)
|
||||
}
|
||||
</div>}
|
||||
|
@ -4,9 +4,17 @@ import {resolve} from "path";
|
||||
import AppPackage from './package.json'
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const DevServerList:{
|
||||
[key:string]:string
|
||||
} = {
|
||||
'test':'https://fm-admin.starbitech.com',
|
||||
'development':'http://192.168.0.231:9999',
|
||||
'lang-en':'https://mh.starbitech.com'
|
||||
}
|
||||
console.log('build-lang',process.env.APP_LANGUAGE)
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({mode}) => {
|
||||
const devServerHost = mode == 'test' ? 'https://fm-admin.starbitech.com' : 'http://192.168.0.231:9999'
|
||||
const devServerHost = DevServerList[mode] || 'http://192.168.0.231:9999'
|
||||
const AUTH_TOKEN_KEY = mode == 'production' ? 'digital-person-token' : `digital-person-token_${mode}`
|
||||
|
||||
if (mode !== 'production') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user