File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 188188</template >
189189
190190<script lang="ts">
191- import { i18n , t } from ' @/i18n' ;
191+ import { t , te } from ' @/i18n' ;
192192 import { defineComponent , type PropType } from ' vue' ;
193193 import {
194194 agentWaitNotice ,
298298 },
299299 groupKind(kind : string ): string {
300300 const key = ` decisions.diff.groupKind.${kind } ` ;
301- return i18n . global . te (key ) ? t (key ) : kind ;
301+ return te (key ) ? t (key ) : kind ;
302302 },
303303 rangeLabel(base ? : string , head ? : string ): string {
304304 return ` ${base ?? ' ' }..${head ?? ' ' } ` ;
Original file line number Diff line number Diff line change 1- import { currentLocale , i18n , t } from '@/i18n' ;
1+ import { currentLocale , t , te } from '@/i18n' ;
22import type {
33 CardKind ,
44 CardLinkKind ,
@@ -9,7 +9,7 @@ import type {
99
1010export const kindLabel = ( kind : CardKind ) : string => {
1111 const key = `decisions.kind.${ kind } ` ;
12- return i18n . global . te ( key ) ? t ( key ) : kind ;
12+ return te ( key ) ? t ( key ) : kind ;
1313} ;
1414
1515export const isHttpUrl = ( value : string ) : boolean => {
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ export const i18n = createI18n({
3333
3434export const t = i18n . global . t ;
3535
36+ export const te = ( key : string ) : boolean =>
37+ ( i18n . global . te as ( key : string ) => boolean ) ( key ) ;
38+
3639export const currentLocale = ( ) : LocaleCode =>
3740 i18n . global . locale . value as LocaleCode ;
3841
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export const start = () => {
175175 ) ;
176176 sessionName = info . name ;
177177 renderLabels ( ) ;
178- const state = lastState ?? info . state ;
178+ const state = lastState ?? ( info . state as RunnerState ) ;
179179 lastState = state ;
180180 controller . handleFrame ( { type : 'state' , state } ) ;
181181 } ;
You can’t perform that action at this time.
0 commit comments