File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 246246 },
247247 "buttons" : {
248248 "viewResource" : " View resource"
249+ },
250+ "yaml" : {
251+ "copiedToClipboard" : " YAML copied to clipboard!"
249252 }
250253}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export default function ProjectsList() {
4848 display : 'flex' ,
4949 justifyContent : 'start' ,
5050 gap : '0.5rem' ,
51- alignItems : 'baseline ' ,
51+ alignItems : 'center ' ,
5252 width : '100%' ,
5353 cursor : 'pointer' ,
5454 } }
Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ import YAML from 'yaml';
88import { Button , FlexBox } from '@ui5/webcomponents-react' ;
99import styles from './YamlViewer.module.css' ;
1010import { useToast } from '../../context/ToastContext.tsx' ;
11+ import { useTranslation } from 'react-i18next' ;
1112type YamlViewerProps = { yamlString : string ; filename : string } ;
1213const YamlViewer : FC < YamlViewerProps > = ( { yamlString, filename } ) => {
1314 const toast = useToast ( ) ;
15+ const { t } = useTranslation ( ) ;
1416 const copyToClipboard = ( ) => {
1517 navigator . clipboard . writeText ( yamlString ) ;
16- toast . show ( 'YAML copied to clipboard!' ) ;
18+ toast . show ( t ( 'yaml.copiedToClipboard' ) ) ;
1719 } ;
1820 const downloadYaml = ( ) => {
1921 const blob = new Blob ( [ yamlString ] , { type : 'text/yaml' } ) ;
You can’t perform that action at this time.
0 commit comments