剧本国际化调整

This commit is contained in:
joylink_cuiweidong 2019-10-12 13:04:56 +08:00
parent a24603aedf
commit 6adc8cdd5b
6 changed files with 30 additions and 13 deletions

View File

@ -78,5 +78,7 @@ export default {
modifyConversition: 'Modify Conversition',
modifyConversitionButton: 'modify',
drivingByPlan: 'Driving By Plan',
scriptBack: 'Back'
scriptBack: 'Back',
speakTo: 'to',
executeCommandTips: 'execute command: '
};

View File

@ -79,5 +79,7 @@ export default {
modifyConversitionButton: '修改',
drivingByPlan: '按计划行车',
scriptBack: '返回'
scriptBack: '返回',
speakTo: '对',
executeCommandTips: '执行指令: '
};

View File

@ -74,13 +74,13 @@ export default {
{ label: 'SHD四联段线', value: '19' }
],
roleType: [
{label: '管理员', value: 'Admin'},
{label: '教员', value: 'Instructor'},
{label: '行调', value: 'Dispatcher'},
{label: '行值', value: 'Attendant'},
{label: '观众', value: 'Audience'},
{label: '司机', value: 'Driver'},
{label: '通号', value: 'Repair'}
{label: '管理员', value: 'Admin', enLabel: 'Admin '},
{label: '教员', value: 'Instructor', enLabel: 'Instructor '},
{label: '行调', value: 'Dispatcher', enLabel: 'Dispatcher '},
{label: '行值', value: 'Attendant', enLabel: 'Attendant '},
{label: '观众', value: 'Audience', enLabel: 'Audience '},
{label: '司机', value: 'Driver', enLabel: 'Driver '},
{label: '通号', value: 'Repair', enLabel: 'Repair '}
],
SimulationType: [

View File

@ -67,6 +67,7 @@
</template>
<script>
import Vue from 'vue';
import Cookies from 'js-cookie';
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
// import CommandForm from "./commandForm";
import ConstConfig from '@/scripts/ConstConfig';
@ -181,7 +182,13 @@
let lastData=JSON.stringify(resp.data);
roleTypeList.forEach(function(element){
let rolename=element.value;
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
// lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
if(Cookies.get("user_lang")=="en"){
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
}else{
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
}
});
lastData=JSON.parse(lastData);
this.memberList=lastData;

View File

@ -13,6 +13,7 @@
</template>
<script>
import Vue from 'vue';
import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig';
import {getScriptPlayMember,getScriptMemberData,cancleScriptMembers,selectScriptMembers,modifyScriptMemberSex} from '@/api/simulation';
export default {
@ -63,7 +64,12 @@
let lastData=data.replace(new RegExp('id','g'),'key');
roleTypeList.forEach(function(element){
let rolename=element.value;
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
if(Cookies.get("user_lang")=="en"){
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
}else{
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
}
});
lastData=JSON.parse(lastData);
return lastData;

View File

@ -9,14 +9,14 @@
<span class="otherInfo" v-html="actionInfo.otherInfo"></span>
<span v-if="actionInfo.isCoversition">
<span class="roleClass">{{actionInfo.memberName}}</span>
<span></span>
<span>{{$t('scriptRecord.speakTo')}}</span>
<span class="roleClass">{{actionInfo.targetName}}</span>
<span>: </span>
<span>{{actionInfo.reply}}</span>
</span>
<span v-else>
<span class="roleClass">{{actionInfo.memberName}}</span>
<span>执行指令: </span>
<span>{{$t('scriptRecord.executeCommandTips')}}</span>
<span class="commandStyle">{{actionInfo.command}}</span>
</span>
</div>