Skip to content

Commit

Permalink
Merge pull request #2766 from DenverCoder544/publisher_sidebar_reacti…
Browse files Browse the repository at this point in the history
…fication

replace getMsg with Message
  • Loading branch information
ZakarFin authored Dec 19, 2024
2 parents 2a53cee + 2679b0a commit f9f85ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bundles/framework/publisher2/view/form/MapPreviewForm.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { Radio, TextInput } from 'oskari-ui';
import { Radio, TextInput, Message } from 'oskari-ui';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { CUSTOM_MAP_SIZE_ID, CUSTOM_MAP_SIZE_LIMITS } from '../../handler/PanelMapPreviewHandler';
Expand Down Expand Up @@ -29,11 +29,11 @@ const RowContainer = styled('div')`

const Label = (props) => {
const { option } = props;
let text = Oskari.getMsg(PUBLISHER_BUNDLE_ID, 'BasicView.sizes.' + option.id);
let extraInfo = '';
if (option.id !== CUSTOM_MAP_SIZE_ID && !isNaN(parseInt(option.width)) && !isNaN(parseInt(option.height))) {
text += ' (' + option.width + ' x ' + option.height + 'px)';
extraInfo = '(' + option.width + ' x ' + option.height + 'px)';
}
return <div>{text}</div>;
return <Message messageKey={ 'BasicView.sizes.' + option.id}>{ extraInfo }</Message>;
};

Label.propTypes = {
Expand Down

0 comments on commit f9f85ba

Please sign in to comment.