Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(translations): [DHIS2-8998] missing translation #1636

Merged
merged 2 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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-08-26T13:05:11.412Z\n"
"PO-Revision-Date: 2020-08-26T13:05:11.412Z\n"
"POT-Creation-Date: 2021-04-21T09:54:58.143Z\n"
"PO-Revision-Date: 2021-04-21T09:54:58.143Z\n"

msgid "Choose one or more dates..."
msgstr ""
Expand Down Expand Up @@ -377,6 +377,9 @@ msgstr ""
msgid "Write comment"
msgstr ""

msgid "Complete event"
msgstr ""

msgid "Basic info"
msgstr ""

Expand Down Expand Up @@ -563,6 +566,9 @@ msgid ""
"exists"
msgstr ""

msgid "Assigned to"
msgstr ""

msgid "New event"
msgstr ""

Expand Down Expand Up @@ -683,6 +689,12 @@ msgstr ""
msgid "You dont have access to edit this event"
msgstr ""

msgid "Event details"
msgstr ""

msgid "Event completed"
msgstr ""

msgid ""
"Leaving this page will discard any selections you made for a new "
"relationship"
Expand All @@ -709,6 +721,18 @@ msgstr ""
msgid "Add relationship"
msgstr ""

msgid "Open"
msgstr ""

msgid "All accessible"
msgstr ""

msgid "Selected"
msgstr ""

msgid "Organisation unit scope"
msgstr ""

msgid "Selected program"
msgstr ""

Expand Down Expand Up @@ -760,6 +784,12 @@ msgstr ""
msgid "tracked entity instance"
msgstr ""

msgid "Latitude"
msgstr ""

msgid "Longitude"
msgstr ""

msgid "Set coordinate"
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const buildCompleteFieldSettingsFn = () => {
const completeSettings = {
getComponent: () => completeComponent,
getComponentProps: (props: Object) => createComponentProps(props, {
label: 'Complete event',
label: i18n.t('Complete event'),
id: 'complete',
}),
getPropName: () => 'complete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ const buildGeometrySettingsFn = () => ({

return createComponentProps(props, {
width: props && props.formHorizontal ? 150 : 350,
label: 'Coordinate',
dialogLabel: 'Coordinate',
label: i18n.t('Coordinate'),
dialogLabel: i18n.t('Coordinate'),
required: false,
orientation: getOrientation(props.formHorizontal),
shrinkDisabled: props.formHorizontal,
Expand Down Expand Up @@ -278,7 +278,7 @@ const buildCompleteFieldSettingsFn = () => {
const completeSettings = {
getComponent: () => completeComponent,
getComponentProps: (props: Object) => createComponentProps(props, {
label: 'Complete event',
label: i18n.t('Complete event'),
id: 'complete',
}),
getPropName: () => 'complete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const getDefaultMainConfig = (stage: ProgramStage) => {
id: mainPropertyNames.ASSIGNEE,
type: 'ASSIGNEE',
apiName: 'assignedUser',
header: 'Assigned to',
header: i18n.t('Assigned to'),
visible: true,
isMainProperty: true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ const buildCompleteFieldSettingsFn = () => {
const completeSettings = {
getComponent: () => completeComponent,
getComponentProps: (props: Object) => createComponentProps(props, {
label: 'Complete event',
label: i18n.t('Complete event'),
id: 'complete',
}),
getPropName: () => 'complete',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class EventDetailsSection extends Component<Props> {
return (
<div className={classes.container}>
<ViewEventSection
header={<ViewEventSectionHeader text="Event details" icon={InfoIcon} />}
header={<ViewEventSectionHeader text={i18n.t('Event details')} icon={InfoIcon} />}
>
<div className={classes.content}>
{this.renderDataEntryContainer()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const buildGeometrySettingsFn = () => ({
});

return createComponentProps(props, {
label: 'Coordinate',
label: i18n.t('Coordinate'),
valueConverter: value => pointDataElement.convertValue(value, valueConvertFn),
});
},
Expand All @@ -175,7 +175,7 @@ const buildCompleteFieldSettingsFn = () => {
const completeSettings = {
getComponent: () => viewModeComponent,
getComponentProps: (props: Object) => createComponentProps(props, {
label: 'Event completed',
label: i18n.t('Event completed'),
id: dataElement.id,
valueConverter: value => dataElement.convertValue(value, valueConvertFn),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { Component } from 'react';
import { withStyles } from '@material-ui/core/styles';

import IconButton from '@material-ui/core/IconButton';
import i18n from '@dhis2/d2-i18n';
import { KeyboardArrowDown, KeyboardArrowUp } from '@material-ui/icons';

const styles = theme => ({
Expand Down Expand Up @@ -80,7 +81,7 @@ class SectionHeaderSimple extends Component<Props> {
if (onChangeCollapseState) {
return (
<IconButton
title={this.props.isCollapsed ? 'Åpne' : 'Lukk'}
title={this.props.isCollapsed ? i18n.t('Open') : i18n.t('Close')}
onClick={this.handleChangeCollapse}
>
{this.props.isCollapsed ? <KeyboardArrowDown /> : <KeyboardArrowUp />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ const selectionBoxesStyles = {

const options = [
{
name: 'All accessible',
name: i18n.t('All accessible'),
value: 'ACCESSIBLE',
},
{
name: 'Selected',
name: i18n.t('Selected'),
value: 'SELECTED',
},
];
Expand All @@ -77,7 +77,7 @@ class SearchOrgUnitSelector extends React.Component<Props> {
return (
<TeiSearchSelectionBoxes
options={options}
label="Organisation unit scope"
label={i18n.t('Organisation unit scope')}
styles={selectionBoxesStyles}
onSelect={this.onSelectOrgUnitScope}
value={selectedOrgUnitScope}
Expand Down
5 changes: 3 additions & 2 deletions src/core_modules/capture-core/converters/clientToList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React from 'react';
import i18n from '@dhis2/d2-i18n';
import { moment } from 'capture-core-utils/moment';
import elementTypes from '../metaData/DataElement/elementTypes';
import DataElement from '../metaData/DataElement/DataElement';
Expand Down Expand Up @@ -71,9 +72,9 @@ const valueConvertersForType = {
// $FlowFixMe[prop-missing] automated comment
[elementTypes.TIME]: convertTimeForListDisplay,
// $FlowFixMe[prop-missing] automated comment
[elementTypes.TRUE_ONLY]: () => 'Yes',
[elementTypes.TRUE_ONLY]: () => i18n.t('Yes'),
// $FlowFixMe[prop-missing] automated comment
[elementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? 'Yes' : 'No'),
[elementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? i18n.t('Yes') : i18n.t('No')),
// $FlowFixMe[prop-missing] automated comment
[elementTypes.COORDINATE]: MinimalCoordinates,
// $FlowFixMe[prop-missing] automated comment
Expand Down
5 changes: 3 additions & 2 deletions src/core_modules/capture-core/converters/clientToView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React from 'react';
import i18n from '@dhis2/d2-i18n';
import { moment } from 'capture-core-utils/moment';
import elementTypes from '../metaData/DataElement/elementTypes';
import DataElement from '../metaData/DataElement/DataElement';
Expand Down Expand Up @@ -62,9 +63,9 @@ const valueConvertersForType = {
// $FlowFixMe[prop-missing] automated comment
[elementTypes.TIME]: convertTimeForView,
// $FlowFixMe[prop-missing] automated comment
[elementTypes.TRUE_ONLY]: () => 'Yes',
[elementTypes.TRUE_ONLY]: () => i18n.t('Yes'),
// $FlowFixMe[prop-missing] automated comment
[elementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? 'Yes' : 'No'),
[elementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? i18n.t('Yes') : i18n.t('No')),
// $FlowFixMe[prop-missing] automated comment
[elementTypes.COORDINATE]: MinimalCoordinates,
// $FlowFixMe[prop-missing] automated comment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ type State = {
}

const coordinateKeys = {
LATITUDE: 'latitude',
LONGITUDE: 'longitude',
LATITUDE: i18n.t('Latitude'),
LONGITUDE: i18n.t('Longitude'),
};

export default class D2Coordinate extends React.Component<Props, State> {
Expand Down