Skip to content
Snippets Groups Projects
Commit 896ae726 authored by Julia Friesel's avatar Julia Friesel
Browse files

Merge branch...

Merge branch '127-extract-text-of-titles-and-subtitles-for-translation-and-or-modification' into 'master'

Resolve "Extract text of titles and subtitles for translation and/or modification."

Closes #127

See merge request bloodyhealth/drip!152
parents 644b1e1a 9fe19409
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
} from 'react-native' } from 'react-native'
import styles from '../../../styles' import styles from '../../../styles'
import { saveSymptom } from '../../../db' import { saveSymptom } from '../../../db'
import { bleeding as labels } from '../../../i18n/en/cycle-day' import { bleeding } from '../../../i18n/en/cycle-day'
import ActionButtonFooter from './action-button-footer' import ActionButtonFooter from './action-button-footer'
import SelectTabGroup from '../select-tab-group' import SelectTabGroup from '../select-tab-group'
import SymptomSection from './symptom-section' import SymptomSection from './symptom-section'
...@@ -25,17 +25,17 @@ export default class Bleeding extends Component { ...@@ -25,17 +25,17 @@ export default class Bleeding extends Component {
render() { render() {
const bleedingRadioProps = [ const bleedingRadioProps = [
{ label: labels[0], value: 0 }, { label: bleeding.labels[0], value: 0 },
{ label: labels[1], value: 1 }, { label: bleeding.labels[1], value: 1 },
{ label: labels[2], value: 2 }, { label: bleeding.labels[2], value: 2 },
{ label: labels[3], value: 3 }, { label: bleeding.labels[3], value: 3 },
] ]
return ( return (
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<ScrollView style={styles.page}> <ScrollView style={styles.page}>
<SymptomSection <SymptomSection
header="Heaviness" header={bleeding.heaviness.header}
explainer="How heavy is the bleeding?" explainer={bleeding.heaviness.explainer}
> >
<SelectTabGroup <SelectTabGroup
buttons={bleedingRadioProps} buttons={bleedingRadioProps}
...@@ -44,8 +44,8 @@ export default class Bleeding extends Component { ...@@ -44,8 +44,8 @@ export default class Bleeding extends Component {
/> />
</SymptomSection> </SymptomSection>
<SymptomSection <SymptomSection
header="Exclude" header={bleeding.exclude.header}
explainer="You can exclude this value if it's not menstrual bleeding" explainer={bleeding.exclude.explainer}
inline={true} inline={true}
> >
<Switch <Switch
......
...@@ -10,6 +10,7 @@ import { saveSymptom } from '../../../db' ...@@ -10,6 +10,7 @@ import { saveSymptom } from '../../../db'
import ActionButtonFooter from './action-button-footer' import ActionButtonFooter from './action-button-footer'
import SymptomSection from './symptom-section' import SymptomSection from './symptom-section'
import { noteExplainer } from '../../../i18n/en/cycle-day' import { noteExplainer } from '../../../i18n/en/cycle-day'
import { shared as sharedLabels } from '../../../i18n/en/labels'
export default class Note extends Component { export default class Note extends Component {
constructor(props) { constructor(props) {
...@@ -33,7 +34,7 @@ export default class Note extends Component { ...@@ -33,7 +34,7 @@ export default class Note extends Component {
<TextInput <TextInput
autoFocus={!this.state.currentValue} autoFocus={!this.state.currentValue}
multiline={true} multiline={true}
placeholder="Enter" placeholder={sharedLabels.enter}
onChangeText={(val) => { onChangeText={(val) => {
this.setState({ currentValue: val }) this.setState({ currentValue: val })
}} }}
......
...@@ -6,6 +6,7 @@ import { ...@@ -6,6 +6,7 @@ import {
} from 'react-native' } from 'react-native'
import { saveSymptom } from '../../../db' import { saveSymptom } from '../../../db'
import { pain as labels } from '../../../i18n/en/cycle-day' import { pain as labels } from '../../../i18n/en/cycle-day'
import { shared as sharedLabels } from '../../../i18n/en/labels'
import ActionButtonFooter from './action-button-footer' import ActionButtonFooter from './action-button-footer'
import SelectBoxGroup from '../select-box-group' import SelectBoxGroup from '../select-box-group'
import SymptomSection from './symptom-section' import SymptomSection from './symptom-section'
...@@ -49,7 +50,7 @@ export default class Pain extends Component { ...@@ -49,7 +50,7 @@ export default class Pain extends Component {
<TextInput <TextInput
autoFocus={this.state.focusTextArea} autoFocus={this.state.focusTextArea}
multiline={true} multiline={true}
placeholder="Enter" placeholder={sharedLabels.enter}
value={this.state.note} value={this.state.note}
onChangeText={(val) => { onChangeText={(val) => {
this.setState({note: val}) this.setState({note: val})
......
...@@ -6,7 +6,8 @@ import { ...@@ -6,7 +6,8 @@ import {
} from 'react-native' } from 'react-native'
import styles from '../../../styles' import styles from '../../../styles'
import { saveSymptom } from '../../../db' import { saveSymptom } from '../../../db'
import { sex as sexLabels, contraceptives as cLabels } from '../../../i18n/en/cycle-day' import { sex as sexLabels, contraceptives as contraceptivesLabels } from '../../../i18n/en/cycle-day'
import { shared as sharedLabels } from '../../../i18n/en/labels'
import ActionButtonFooter from './action-button-footer' import ActionButtonFooter from './action-button-footer'
import SelectBoxGroup from '../select-box-group' import SelectBoxGroup from '../select-box-group'
import SymptomSection from './symptom-section' import SymptomSection from './symptom-section'
...@@ -38,7 +39,7 @@ export default class Sex extends Component { ...@@ -38,7 +39,7 @@ export default class Sex extends Component {
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<ScrollView style={styles.page}> <ScrollView style={styles.page}>
<SymptomSection <SymptomSection
header="Activity" header={sexLabels.header}
explainer={sexLabels.explainer} explainer={sexLabels.explainer}
> >
<SelectBoxGroup <SelectBoxGroup
...@@ -48,11 +49,11 @@ export default class Sex extends Component { ...@@ -48,11 +49,11 @@ export default class Sex extends Component {
/> />
</SymptomSection> </SymptomSection>
<SymptomSection <SymptomSection
header="Contraceptives" header={contraceptivesLabels.header}
explainer={cLabels.explainer} explainer={contraceptivesLabels.explainer}
> >
<SelectBoxGroup <SelectBoxGroup
labels={cLabels.categories} labels={contraceptivesLabels.categories}
onSelect={this.toggleState} onSelect={this.toggleState}
optionsState={this.state} optionsState={this.state}
/> />
...@@ -62,7 +63,7 @@ export default class Sex extends Component { ...@@ -62,7 +63,7 @@ export default class Sex extends Component {
<TextInput <TextInput
autoFocus={this.state.focusTextArea} autoFocus={this.state.focusTextArea}
multiline={true} multiline={true}
placeholder="Enter" placeholder={sharedLabels.enter}
value={this.state.note} value={this.state.note}
onChangeText={(val) => { onChangeText={(val) => {
this.setState({ note: val }) this.setState({ note: val })
......
...@@ -15,7 +15,7 @@ import styles from '../../../styles' ...@@ -15,7 +15,7 @@ import styles from '../../../styles'
import { LocalTime, ChronoUnit } from 'js-joda' import { LocalTime, ChronoUnit } from 'js-joda'
import { temperature as labels } from '../../../i18n/en/cycle-day' import { temperature as labels } from '../../../i18n/en/cycle-day'
import { scaleObservable } from '../../../local-storage' import { scaleObservable } from '../../../local-storage'
import { shared } from '../../../i18n/en/labels' import { shared as sharedLabels } from '../../../i18n/en/labels'
import ActionButtonFooter from './action-button-footer' import ActionButtonFooter from './action-button-footer'
import config from '../../../config' import config from '../../../config'
import SymptomSection from './symptom-section' import SymptomSection from './symptom-section'
...@@ -81,11 +81,11 @@ export default class Temp extends Component { ...@@ -81,11 +81,11 @@ export default class Temp extends Component {
if (warningMsg) { if (warningMsg) {
Alert.alert( Alert.alert(
shared.warning, sharedLabels.warning,
warningMsg, warningMsg,
[ [
{ text: shared.cancel }, { text: sharedLabels.cancel },
{ text: shared.save, onPress: this.saveTemperature} { text: sharedLabels.save, onPress: this.saveTemperature}
] ]
) )
} else { } else {
...@@ -101,7 +101,7 @@ export default class Temp extends Component { ...@@ -101,7 +101,7 @@ export default class Temp extends Component {
<ScrollView style={styles.page}> <ScrollView style={styles.page}>
<View> <View>
<SymptomSection <SymptomSection
header="Temperature (°C)" header={labels.temperature.header}
explainer={labels.temperature.explainer} explainer={labels.temperature.explainer}
inline={true} inline={true}
> >
...@@ -112,7 +112,7 @@ export default class Temp extends Component { ...@@ -112,7 +112,7 @@ export default class Temp extends Component {
/> />
</SymptomSection> </SymptomSection>
<SymptomSection <SymptomSection
header="Time" header={labels.time}
inline={true} inline={true}
> >
<TextInput <TextInput
...@@ -136,13 +136,13 @@ export default class Temp extends Component { ...@@ -136,13 +136,13 @@ export default class Temp extends Component {
/> />
</SymptomSection> </SymptomSection>
<SymptomSection <SymptomSection
header="Note" header={labels.note.header}
explainer={labels.note.explainer} explainer={labels.note.explainer}
> >
<TextInput <TextInput
multiline={true} multiline={true}
autoFocus={this.state.focusTextArea} autoFocus={this.state.focusTextArea}
placeholder="Enter" placeholder={sharedLabels.enter}
value={this.state.note} value={this.state.note}
onChangeText={(val) => { onChangeText={(val) => {
this.setState({ note: val }) this.setState({ note: val })
...@@ -150,8 +150,8 @@ export default class Temp extends Component { ...@@ -150,8 +150,8 @@ export default class Temp extends Component {
/> />
</SymptomSection> </SymptomSection>
<SymptomSection <SymptomSection
header="Exclude" header={labels.exclude.header}
explainer={labels.excludeExplainer} explainer={labels.exclude.explainer}
inline={true} inline={true}
> >
<Switch <Switch
......
export const bleeding = ['spotting', 'light', 'medium', 'heavy']
export const mucusNFP = ['t', 'Ø', 'f', 'S', 'S+'] export const mucusNFP = ['t', 'Ø', 'f', 'S', 'S+']
export const intensity = ['low', 'medium', 'high'] export const intensity = ['low', 'medium', 'high']
export const bleeding = {
labels: ['spotting', 'light', 'medium', 'heavy'],
heaviness: {
header: "Heaviness",
explainer: "How heavy is the bleeding?",
},
exclude: {
header: "Exclude",
explainer: "You can exclude this value if it's not menstrual bleeding"
}
}
export const cervix = { export const cervix = {
opening: { opening: {
categories: ['closed', 'medium', 'open'], categories: ['closed', 'medium', 'open'],
...@@ -39,6 +50,7 @@ export const sex = { ...@@ -39,6 +50,7 @@ export const sex = {
solo: 'Solo', solo: 'Solo',
partner: 'Partner', partner: 'Partner',
}, },
header: "Activity",
explainer: 'Were you sexually active today?', explainer: 'Were you sexually active today?',
} }
...@@ -54,6 +66,7 @@ export const contraceptives = { ...@@ -54,6 +66,7 @@ export const contraceptives = {
none: 'None', none: 'None',
other: 'Other', other: 'Other',
}, },
header: "Contraceptives",
explainer: 'Did you use contraceptives?' explainer: 'Did you use contraceptives?'
} }
...@@ -76,12 +89,18 @@ export const temperature = { ...@@ -76,12 +89,18 @@ export const temperature = {
outOfAbsoluteRangeWarning: 'This temperature value is too high or low to be shown on the temperature chart.', outOfAbsoluteRangeWarning: 'This temperature value is too high or low to be shown on the temperature chart.',
saveAnyway: 'Save anyway', saveAnyway: 'Save anyway',
temperature: { temperature: {
header: "Temperature (°C)",
explainer: 'Take your temperature right after waking up, before getting out of bed' explainer: 'Take your temperature right after waking up, before getting out of bed'
}, },
time: "Time",
note: { note: {
header: "Note",
explainer: 'Is there anything that could have influenced this value, such as bad sleep or alcohol consumption?' explainer: 'Is there anything that could have influenced this value, such as bad sleep or alcohol consumption?'
}, },
excludeExplainer: "You can exclude this value if you don't want to use it for fertility detection" exclude: {
header: "Exclude",
explainer: "You can exclude this value if you don't want to use it for fertility detection"
}
} }
export const noteExplainer = "Anything you want to add for the day?" export const noteExplainer = "Anything you want to add for the day?"
......
...@@ -16,7 +16,8 @@ export const shared = { ...@@ -16,7 +16,8 @@ export const shared = {
cycleDayWithLinebreak: 'Cycle\nday', cycleDayWithLinebreak: 'Cycle\nday',
loading: 'Loading ...', loading: 'Loading ...',
more: 'more', more: 'more',
less: 'less' less: 'less',
enter: 'Enter'
} }
export const headerTitles = { export const headerTitles = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment