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 #1617

Merged
merged 4 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
31 changes: 26 additions & 5 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: 2021-04-06T22:21:56.698Z\n"
"PO-Revision-Date: 2021-04-06T22:21:56.698Z\n"
"POT-Creation-Date: 2021-04-14T12:28:35.610Z\n"
"PO-Revision-Date: 2021-04-14T12:28:35.610Z\n"

msgid "Choose one or more dates..."
msgstr ""
Expand Down Expand Up @@ -140,6 +140,9 @@ msgstr ""
msgid "Search for user"
msgstr ""

msgid "Complete event"
msgstr ""

msgid "Basic info"
msgstr ""

Expand Down Expand Up @@ -177,6 +180,9 @@ msgstr ""
msgid "Completed"
msgstr ""

msgid "Assigned to"
msgstr ""

msgid "Please add or cancel comment before saving the event"
msgstr ""

Expand Down Expand Up @@ -640,9 +646,6 @@ msgstr ""
msgid "Cancelled"
msgstr ""

msgid "Assigned to"
msgstr ""

msgid "Registering unit"
msgstr ""

Expand Down Expand Up @@ -807,6 +810,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 Down Expand Up @@ -842,6 +851,12 @@ msgstr ""
msgid "Results found"
msgstr ""

msgid "All accessible"
msgstr ""

msgid "Organisation unit scope"
msgstr ""

msgid "Search {{uniqueAttrName}}"
msgstr ""

Expand Down Expand Up @@ -896,6 +911,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 @@ -236,8 +236,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 @@ -275,7 +275,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 @@ -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 @@ -38,7 +38,7 @@ const getDefaultMainConfig = (stage: ProgramStage): Array<MainColumnConfig> => {
id: mainPropertyNames.ASSIGNEE,
visible: true,
type: 'ASSIGNEE',
header: 'Assigned to',
header: i18n.t('Assigned to'),
apiName: 'assignedUser',
});
}
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 @@ -151,7 +151,7 @@ const buildGeometrySettingsFn = () => ({
});

return createComponentProps(props, {
label: 'Coordinate',
label: i18n.t('Coordinate'),
valueConverter: value => pointDataElement.convertValue(value, valueConvertFn),
});
},
Expand All @@ -172,7 +172,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 @@ -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
3 changes: 2 additions & 1 deletion 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 { dataElementTypes, type DataElement } from '../metaData';
import { convertMomentToDateFormatString } from '../utils/converters/date';
Expand Down Expand Up @@ -68,7 +69,7 @@ const valueConvertersForType = {
[dataElementTypes.DATETIME]: convertDateTimeForListDisplay,
[dataElementTypes.TIME]: convertTimeForListDisplay,
[dataElementTypes.TRUE_ONLY]: () => 'Yes',
simonadomnisoru marked this conversation as resolved.
Show resolved Hide resolved
[dataElementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? 'Yes' : 'No'),
[dataElementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? i18n.t('Yes') : i18n.t('No')),
[dataElementTypes.COORDINATE]: MinimalCoordinates,
[dataElementTypes.AGE]: convertDateForListDisplay,
[dataElementTypes.FILE_RESOURCE]: convertResourceForDisplay,
Expand Down
3 changes: 2 additions & 1 deletion 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 { dataElementTypes, type DataElement } from '../metaData';
import { convertMomentToDateFormatString } from '../utils/converters/date';
Expand Down Expand Up @@ -52,7 +53,7 @@ const valueConvertersForType = {
[dataElementTypes.DATETIME]: convertDateTimeForView,
[dataElementTypes.TIME]: convertTimeForView,
[dataElementTypes.TRUE_ONLY]: () => 'Yes',
[dataElementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? 'Yes' : 'No'),
[dataElementTypes.BOOLEAN]: (rawValue: boolean) => (rawValue ? i18n.t('Yes') : i18n.t('No')),
[dataElementTypes.COORDINATE]: MinimalCoordinates,
[dataElementTypes.AGE]: convertDateForView,
[dataElementTypes.FILE_RESOURCE]: convertResourceForView,
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