Skip to content

Commit

Permalink
fix(translations): [DHIS2-8998] translate strings
Browse files Browse the repository at this point in the history
* fix(translations): missing translation

* fix(translations): no string

* fix(translations): [DHIS2-8998] transalte more strings

* fix(translations): [DHIS2-8998] transalte more strings
  • Loading branch information
simonadomnisoru authored Apr 23, 2021
1 parent 60b3764 commit b92350c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
21 changes: 18 additions & 3 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-20T11:24:37.353Z\n"
"PO-Revision-Date: 2021-04-20T11:24:37.353Z\n"
"POT-Creation-Date: 2021-04-22T10:37:49.317Z\n"
"PO-Revision-Date: 2021-04-22T10:37:49.317Z\n"

msgid "Choose one or more dates..."
msgstr ""
Expand Down Expand Up @@ -198,6 +198,9 @@ msgstr ""
msgid "No write access"
msgstr ""

msgid "New"
msgstr ""

msgid "Switch to form view"
msgstr ""

Expand Down Expand Up @@ -492,7 +495,10 @@ msgstr ""
msgid "Selected program is invalid for selected registering unit"
msgstr ""

msgid "New"
msgid "New {{trackedEntityName}} in {{programName}}"
msgstr ""

msgid "Search for a {{trackedEntityName}} in {{programName}}"
msgstr ""

msgid "Clear selections"
Expand Down Expand Up @@ -709,6 +715,9 @@ msgstr ""
msgid "You can also choose a program from the top bar and create in that program"
msgstr ""

msgid "Save new"
msgstr ""

msgid "Save new {{trackedEntityTypeName}} and link"
msgstr ""

Expand Down Expand Up @@ -757,6 +766,9 @@ msgstr ""
msgid "Back"
msgstr ""

msgid "Search for "
msgstr ""

msgid "Search for"
msgstr ""

Expand Down Expand Up @@ -875,6 +887,9 @@ msgstr ""
msgid "An error has occured. See log for details"
msgstr ""

msgid "{{trackedEntityName}} in program"
msgstr ""

msgid "Program not found"
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const NewEventDataEntryWrapperPlain = ({
return (
<Paper className={classes.paper}>
<div className={classes.title} >
New {titleText}
${i18n.t('New')} {titleText}
</div>

<div className={classes.flexContainer}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ const ActionButtonsPlain = ({
>
<MenuItem
dataTest="new-menuitem-one"
label={`New ${trackedEntityName} in ${programName}`}
label={i18n.t('New {{trackedEntityName}} in {{programName}}', { trackedEntityName, programName })}
onClick={onNewClick}
/>
<MenuItem
dataTest="new-menuitem-two"
label="New..."
label={`${i18n.t('New')}...`}
onClick={onNewClickWithoutProgramId}
/>
</FlyoutMenu>
Expand Down Expand Up @@ -115,12 +115,12 @@ const ActionButtonsPlain = ({
>
<MenuItem
dataTest="find-menuitem-one"
label={`Search for a ${trackedEntityName} in ${programName}`}
label={i18n.t('Search for a {{trackedEntityName}} in {{programName}}', { trackedEntityName, programName })}
onClick={onFindClick}
/>
<MenuItem
dataTest="find-menuitem-two"
label="Search..."
label={`${i18n.t('Search')}...`}
onClick={onFindClickWithoutProgramId}
/>
</FlyoutMenu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const RegistrationDataEntryPlain = ({
!scopeType &&
<Paper className={classes.paper}>
<div className={classes.title} >
New
{i18n.t('New')}
</div>
<div className={classes.tetypeContainer}>
<TrackedEntityTypeSelector
Expand All @@ -129,7 +129,7 @@ const RegistrationDataEntryPlain = ({
scopeType === scopeTypes.TRACKER_PROGRAM &&
<Paper className={classes.paper}>
<div className={classes.title} >
New {titleText}
{i18n.t('New')} {titleText}
</div>

<div className={classes.registrationContainer}>
Expand All @@ -139,7 +139,7 @@ const RegistrationDataEntryPlain = ({
id={dataEntryId}
selectedScopeId={selectedScopeId}
enrollmentMetadata={registrationMetaData}
saveButtonText={'Save new'}
saveButtonText={i18n.t('Save new')}
onSave={onSaveWithEnrollment}
duplicatesReviewPageSize={resultsPageSize}
renderDuplicatesDialogActions={renderDuplicatesDialogActions}
Expand All @@ -166,7 +166,7 @@ const RegistrationDataEntryPlain = ({
scopeType === scopeTypes.TRACKED_ENTITY_TYPE &&
<Paper className={classes.paper}>
<div className={classes.title} >
New {titleText}
{i18n.t('New')} {titleText}
</div>

<div className={classes.tetypeContainer}>
Expand All @@ -184,7 +184,7 @@ const RegistrationDataEntryPlain = ({
id={dataEntryId}
selectedScopeId={selectedScopeId}
teiRegistrationMetadata={registrationMetaData}
saveButtonText={'Save new'}
saveButtonText={i18n.t('Save new')}
onSave={onSaveWithoutEnrollment}
duplicatesReviewPageSize={resultsPageSize}
renderDuplicatesDialogActions={renderDuplicatesDialogActions}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Index = ({
<Paper className={classes.paper}>
<div className={classes.maxWidth}>
<div className={classes.title} >
Search for {titleText}
{i18n.t('Search for ')} {titleText}
</div>
{
(selectedSearchScopeType !== searchScopes.PROGRAM) &&
Expand Down
4 changes: 3 additions & 1 deletion src/core_modules/capture-core/hooks/useScopeTitleText.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @flow
import i18n from '@dhis2/d2-i18n';
import { scopeTypes } from '../metaData';
import { useScopeInfo } from './useScopeInfo';

Expand All @@ -7,7 +8,8 @@ export const useScopeTitleText = (scopeId: ?string) => {

const text = {
[scopeTypes.EVENT_PROGRAM]: `${programName}`,
[scopeTypes.TRACKER_PROGRAM]: `${trackedEntityName} in program: ${programName}`,
[scopeTypes.TRACKER_PROGRAM]:
`${i18n.t('{{trackedEntityName}} in program', { trackedEntityName })}: ${programName}`,
[scopeTypes.TRACKED_ENTITY_TYPE]: `${trackedEntityName}`,
};

Expand Down

0 comments on commit b92350c

Please sign in to comment.