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
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
} from 'react-native'
|
||||
import styles from '../../../styles'
|
||||
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 SelectTabGroup from '../select-tab-group'
|
||||
import SymptomSection from './symptom-section'
|
||||
@@ -25,17 +25,17 @@ export default class Bleeding extends Component {
|
||||
|
||||
render() {
|
||||
const bleedingRadioProps = [
|
||||
{ label: labels[0], value: 0 },
|
||||
{ label: labels[1], value: 1 },
|
||||
{ label: labels[2], value: 2 },
|
||||
{ label: labels[3], value: 3 },
|
||||
{ label: bleeding.labels[0], value: 0 },
|
||||
{ label: bleeding.labels[1], value: 1 },
|
||||
{ label: bleeding.labels[2], value: 2 },
|
||||
{ label: bleeding.labels[3], value: 3 },
|
||||
]
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<ScrollView style={styles.page}>
|
||||
<SymptomSection
|
||||
header="Heaviness"
|
||||
explainer="How heavy is the bleeding?"
|
||||
header={bleeding.heaviness.header}
|
||||
explainer={bleeding.heaviness.explainer}
|
||||
>
|
||||
<SelectTabGroup
|
||||
buttons={bleedingRadioProps}
|
||||
@@ -44,8 +44,8 @@ export default class Bleeding extends Component {
|
||||
/>
|
||||
</SymptomSection>
|
||||
<SymptomSection
|
||||
header="Exclude"
|
||||
explainer="You can exclude this value if it's not menstrual bleeding"
|
||||
header={bleeding.exclude.header}
|
||||
explainer={bleeding.exclude.explainer}
|
||||
inline={true}
|
||||
>
|
||||
<Switch
|
||||
|
||||
@@ -10,6 +10,7 @@ import { saveSymptom } from '../../../db'
|
||||
import ActionButtonFooter from './action-button-footer'
|
||||
import SymptomSection from './symptom-section'
|
||||
import { noteExplainer } from '../../../i18n/en/cycle-day'
|
||||
import { shared as sharedLabels } from '../../../i18n/en/labels'
|
||||
|
||||
export default class Note extends Component {
|
||||
constructor(props) {
|
||||
@@ -33,7 +34,7 @@ export default class Note extends Component {
|
||||
<TextInput
|
||||
autoFocus={!this.state.currentValue}
|
||||
multiline={true}
|
||||
placeholder="Enter"
|
||||
placeholder={sharedLabels.enter}
|
||||
onChangeText={(val) => {
|
||||
this.setState({ currentValue: val })
|
||||
}}
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
} from 'react-native'
|
||||
import { saveSymptom } from '../../../db'
|
||||
import { pain as labels } from '../../../i18n/en/cycle-day'
|
||||
import { shared as sharedLabels } from '../../../i18n/en/labels'
|
||||
import ActionButtonFooter from './action-button-footer'
|
||||
import SelectBoxGroup from '../select-box-group'
|
||||
import SymptomSection from './symptom-section'
|
||||
@@ -49,7 +50,7 @@ export default class Pain extends Component {
|
||||
<TextInput
|
||||
autoFocus={this.state.focusTextArea}
|
||||
multiline={true}
|
||||
placeholder="Enter"
|
||||
placeholder={sharedLabels.enter}
|
||||
value={this.state.note}
|
||||
onChangeText={(val) => {
|
||||
this.setState({note: val})
|
||||
|
||||
@@ -6,7 +6,8 @@ import {
|
||||
} from 'react-native'
|
||||
import styles from '../../../styles'
|
||||
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 SelectBoxGroup from '../select-box-group'
|
||||
import SymptomSection from './symptom-section'
|
||||
@@ -38,7 +39,7 @@ export default class Sex extends Component {
|
||||
<View style={{ flex: 1 }}>
|
||||
<ScrollView style={styles.page}>
|
||||
<SymptomSection
|
||||
header="Activity"
|
||||
header={sexLabels.header}
|
||||
explainer={sexLabels.explainer}
|
||||
>
|
||||
<SelectBoxGroup
|
||||
@@ -48,11 +49,11 @@ export default class Sex extends Component {
|
||||
/>
|
||||
</SymptomSection>
|
||||
<SymptomSection
|
||||
header="Contraceptives"
|
||||
explainer={cLabels.explainer}
|
||||
header={contraceptivesLabels.header}
|
||||
explainer={contraceptivesLabels.explainer}
|
||||
>
|
||||
<SelectBoxGroup
|
||||
labels={cLabels.categories}
|
||||
labels={contraceptivesLabels.categories}
|
||||
onSelect={this.toggleState}
|
||||
optionsState={this.state}
|
||||
/>
|
||||
@@ -62,7 +63,7 @@ export default class Sex extends Component {
|
||||
<TextInput
|
||||
autoFocus={this.state.focusTextArea}
|
||||
multiline={true}
|
||||
placeholder="Enter"
|
||||
placeholder={sharedLabels.enter}
|
||||
value={this.state.note}
|
||||
onChangeText={(val) => {
|
||||
this.setState({ note: val })
|
||||
|
||||
@@ -15,7 +15,7 @@ import styles from '../../../styles'
|
||||
import { LocalTime, ChronoUnit } from 'js-joda'
|
||||
import { temperature as labels } from '../../../i18n/en/cycle-day'
|
||||
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 config from '../../../config'
|
||||
import SymptomSection from './symptom-section'
|
||||
@@ -81,11 +81,11 @@ export default class Temp extends Component {
|
||||
|
||||
if (warningMsg) {
|
||||
Alert.alert(
|
||||
shared.warning,
|
||||
sharedLabels.warning,
|
||||
warningMsg,
|
||||
[
|
||||
{ text: shared.cancel },
|
||||
{ text: shared.save, onPress: this.saveTemperature}
|
||||
{ text: sharedLabels.cancel },
|
||||
{ text: sharedLabels.save, onPress: this.saveTemperature}
|
||||
]
|
||||
)
|
||||
} else {
|
||||
@@ -101,7 +101,7 @@ export default class Temp extends Component {
|
||||
<ScrollView style={styles.page}>
|
||||
<View>
|
||||
<SymptomSection
|
||||
header="Temperature (°C)"
|
||||
header={labels.temperature.header}
|
||||
explainer={labels.temperature.explainer}
|
||||
inline={true}
|
||||
>
|
||||
@@ -112,7 +112,7 @@ export default class Temp extends Component {
|
||||
/>
|
||||
</SymptomSection>
|
||||
<SymptomSection
|
||||
header="Time"
|
||||
header={labels.time}
|
||||
inline={true}
|
||||
>
|
||||
<TextInput
|
||||
@@ -136,13 +136,13 @@ export default class Temp extends Component {
|
||||
/>
|
||||
</SymptomSection>
|
||||
<SymptomSection
|
||||
header="Note"
|
||||
header={labels.note.header}
|
||||
explainer={labels.note.explainer}
|
||||
>
|
||||
<TextInput
|
||||
multiline={true}
|
||||
autoFocus={this.state.focusTextArea}
|
||||
placeholder="Enter"
|
||||
placeholder={sharedLabels.enter}
|
||||
value={this.state.note}
|
||||
onChangeText={(val) => {
|
||||
this.setState({ note: val })
|
||||
@@ -150,8 +150,8 @@ export default class Temp extends Component {
|
||||
/>
|
||||
</SymptomSection>
|
||||
<SymptomSection
|
||||
header="Exclude"
|
||||
explainer={labels.excludeExplainer}
|
||||
header={labels.exclude.header}
|
||||
explainer={labels.exclude.explainer}
|
||||
inline={true}
|
||||
>
|
||||
<Switch
|
||||
|
||||
Reference in New Issue
Block a user