diff --git a/packages/app/i18n/en.pot b/packages/app/i18n/en.pot index be19fc8416..dc0e9b3834 100644 --- a/packages/app/i18n/en.pot +++ b/packages/app/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2020-02-05T10:48:05.798Z\n" -"PO-Revision-Date: 2020-02-05T10:48:05.798Z\n" +"POT-Creation-Date: 2020-02-07T15:29:25.817Z\n" +"PO-Revision-Date: 2020-02-07T15:29:25.817Z\n" msgid "Rename successful" msgstr "" @@ -34,6 +34,9 @@ msgstr "" msgid "Update" msgstr "" +msgid "Add to {{axisName}}" +msgstr "" + msgid "" "'{{visualizationType}}' is intended to show a single data item. Only the " "first item will be used and saved." @@ -44,6 +47,15 @@ msgid "" "items. Only the first {{maxNumber}} items will be used and saved." msgstr "" +msgid "Main dimensions" +msgstr "" + +msgid "Other dimensions" +msgstr "" + +msgid "Your dimensions" +msgstr "" + msgid "Filter dimensions" msgstr "" @@ -119,12 +131,6 @@ msgstr "" msgid "{{dimensionName}} is locked to {{axisName}} for {{visTypeName}}" msgstr "" -msgid "Columns" -msgstr "" - -msgid "Rows" -msgstr "" - msgid "None selected" msgstr "" @@ -143,6 +149,23 @@ msgstr "" msgid "Viewing interpretation from {{interpretationDate}}" msgstr "" +msgid "Getting started" +msgstr "" + +msgid "" +"All dimensions that you can use to build visualizations are shown in the " +"left sidebar" +msgstr "" + +msgid "Add dimensions to the layout above" +msgstr "" + +msgid "Double click a dimension to add or remove items" +msgstr "" + +msgid "Your most viewed charts and tables" +msgstr "" + msgid "Aggregation type" msgstr "" @@ -459,31 +482,25 @@ msgid "" "you may not have access to it." msgstr "" -msgid "Series is empty" -msgstr "" - -msgid "Add at least one item to Series." +msgid "{{axisName}} is empty" msgstr "" -msgid "Category is empty" -msgstr "" - -msgid "Add at least one item to Category." +msgid "Add at least one item to {{axisName}}." msgstr "" msgid "No period set" msgstr "" -msgid "{{visType}} must have at least one period set in {{axes}}." +msgid "{{visualizationType}} must have at least one period set in {{axes}}." msgstr "" msgid "No data set" msgstr "" -msgid "{{visType}} must have at least one data item in {{axes}}." +msgid "{{visualizationType}} must have at least one data item in {{axes}}." msgstr "" -msgid "There is a problem with this {{visType}} visualization." +msgid "There is a problem with this {{visualizationType}} visualization." msgstr "" msgid "There was a problem getting the data from the server." @@ -504,24 +521,6 @@ msgstr "" msgid "or" msgstr "" -msgid "Add to series" -msgstr "" - -msgid "Add to category" -msgstr "" - -msgid "Add to filter" -msgstr "" - -msgid "series" -msgstr "" - -msgid "category" -msgstr "" - -msgid "filter" -msgstr "" - msgid "Today" msgstr "" diff --git a/packages/app/package.json b/packages/app/package.json index eceee34e95..cf96a3e37e 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -12,7 +12,7 @@ "redux-mock-store": "^1.5.3" }, "dependencies": { - "@dhis2/analytics": "^3.1.2", + "@dhis2/analytics": "^3.1.3", "@dhis2/d2-ui-core": "^6.5.3", "@dhis2/d2-ui-file-menu": "^6.5.3", "@dhis2/d2-ui-interpretations": "^6.5.3", diff --git a/packages/app/src/components/DimensionsPanel/Dialogs/AddToLayoutButton/AddToLayoutButton.js b/packages/app/src/components/DimensionsPanel/Dialogs/AddToLayoutButton/AddToLayoutButton.js index 9718b5f1ee..1568f00796 100644 --- a/packages/app/src/components/DimensionsPanel/Dialogs/AddToLayoutButton/AddToLayoutButton.js +++ b/packages/app/src/components/DimensionsPanel/Dialogs/AddToLayoutButton/AddToLayoutButton.js @@ -4,14 +4,18 @@ import { connect } from 'react-redux' import Button from '@material-ui/core/Button' import MenuItem from '@material-ui/core/Button' import { withStyles } from '@material-ui/core/styles' -import { getAvailableAxes } from '@dhis2/analytics' +import { + getAvailableAxes, + getAxisNameByLayoutType, + getLayoutTypeByVisType, +} from '@dhis2/analytics' import Menu from './Menu' import { sGetUiActiveModalDialog, sGetUiType } from '../../../../reducers/ui' import { acAddUiLayoutDimensions } from '../../../../actions/ui' -import { ADD_TO_LAYOUT_OPTIONS } from '../../../../modules/layout' import styles from './styles/AddToLayoutButton.style' +import i18n from '@dhis2/d2-i18n' export class AddToLayoutButton extends Component { constructor(props) { @@ -36,31 +40,27 @@ export class AddToLayoutButton extends Component { this.props.onClick() } - getAxisMeta = axisIdArray => - axisIdArray.map(axisId => - ADD_TO_LAYOUT_OPTIONS.find( - axisMetaObj => axisMetaObj.axisId === axisId - ) - ) - renderMenuItems = () => - this.getAxisMeta(getAvailableAxes(this.props.visType)) + getAvailableAxes(this.props.visType) .slice(1) - .map(axisMetaObj => ( + .map(axis => ( )) render() { - const availableAxisMeta = this.getAxisMeta( - getAvailableAxes(this.props.visType) - ) + const availableAxes = getAvailableAxes(this.props.visType) return (