moves labels to copy folder
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ import symptomViews from './cycle-day/symptoms'
|
||||
import Chart from './chart/chart'
|
||||
import Settings from './settings'
|
||||
import Stats from './stats'
|
||||
import {headerTitles, menuTitles} from './labels'
|
||||
import {headerTitles, menuTitles} from '../copy/en/labels'
|
||||
import setupNotifications from '../lib/notifications'
|
||||
|
||||
// design wants everyhting lowercased, but we don't
|
||||
|
||||
@@ -11,7 +11,7 @@ import styles from './styles'
|
||||
import { scaleObservable } from '../../local-storage'
|
||||
import config from '../../config'
|
||||
import AppText from '../app-text'
|
||||
import { shared as labels } from '../labels'
|
||||
import { shared as labels } from '../../copy/en/labels'
|
||||
import DripIcon from '../../assets/drip-icons'
|
||||
import CycleDayIcon from '../../assets/home-circle'
|
||||
import nothingChanged from '../../db/db-unchanged'
|
||||
|
||||
@@ -15,7 +15,7 @@ import styles from '../../../styles'
|
||||
import { LocalTime, ChronoUnit } from 'js-joda'
|
||||
import { temperature as labels } from '../../../copy/en/cycle-day'
|
||||
import { scaleObservable } from '../../../local-storage'
|
||||
import { shared } from '../../labels'
|
||||
import { shared } from '../../../copy/en/labels'
|
||||
import ActionButtonFooter from './action-button-footer'
|
||||
import config from '../../../config'
|
||||
import SymptomSection from './symptom-section'
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { LocalDate, ChronoUnit } from 'js-joda'
|
||||
import Icon from 'react-native-vector-icons/Entypo'
|
||||
import { Surface } from 'react-native/Libraries/ART/ReactNativeART'
|
||||
import { secondaryColor, cycleDayColor, periodColor } from '../styles'
|
||||
import { home as labels, bleedingPrediction as predictLabels, shared } from './labels'
|
||||
import { home as labels, bleedingPrediction as predictLabels, shared } from '../copy/en/labels'
|
||||
import CycleDayIcon from '../assets/home-circle'
|
||||
import Drop from '../assets/home-drop'
|
||||
import cycleModule from '../lib/cycle'
|
||||
|
||||
@@ -4,7 +4,7 @@ import nodejs from 'nodejs-mobile-react-native'
|
||||
import { saveEncryptionFlag } from '../local-storage'
|
||||
import AppText from './app-text'
|
||||
import styles from '../styles'
|
||||
import { passwordPrompt as labels, shared } from './labels'
|
||||
import { passwordPrompt as labels, shared } from '../copy/en/labels'
|
||||
import { requestHash, deleteDbAndOpenNew, openDb } from '../db'
|
||||
|
||||
export default class PasswordPrompt extends Component {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Alert } from 'react-native'
|
||||
import { shared as sharedLabels } from '../labels'
|
||||
import { shared as sharedLabels } from '../../copy/en/labels'
|
||||
|
||||
export default function alertError(msg) {
|
||||
Alert.alert(sharedLabels.errorTitle, msg)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Share from 'react-native-share'
|
||||
import getDataAsCsvDataUri from '../../lib/import-export/export-to-csv'
|
||||
import alertError from './alert-error'
|
||||
import { settings as labels } from '../labels'
|
||||
import { settings as labels } from '../../copy/en/labels'
|
||||
|
||||
export default async function openShareDialogAndExport() {
|
||||
let data
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Alert } from 'react-native'
|
||||
import { DocumentPicker, DocumentPickerUtil } from 'react-native-document-picker'
|
||||
import rnfs from 'react-native-fs'
|
||||
import importCsv from '../../lib/import-export/import-from-csv'
|
||||
import { settings as labels, shared as sharedLabels } from '../labels'
|
||||
import { settings as labels, shared as sharedLabels } from '../../copy/en/labels'
|
||||
import alertError from './alert-error'
|
||||
|
||||
export default function openImportDialogAndImport() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
ScrollView,
|
||||
} from 'react-native'
|
||||
import styles from '../../styles/index'
|
||||
import { settings as labels } from '../labels'
|
||||
import { settings as labels } from '../../copy/en/labels'
|
||||
import AppText from '../app-text'
|
||||
import TempReminderPicker from './temp-reminder-picker'
|
||||
import PeriodReminderPicker from './period-reminder'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Alert } from 'react-native'
|
||||
import { openDb } from '../../../db'
|
||||
import { shared } from '../../labels'
|
||||
import { shared } from '../../../copy/en/labels'
|
||||
|
||||
export default async function checkPassword({hash, onCancel, onTryAgain }) {
|
||||
const connected = await openDb(hash)
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import nodejs from 'nodejs-mobile-react-native'
|
||||
import AppText from '../../app-text'
|
||||
import styles from '../../../styles'
|
||||
import { settings as labels } from '../../labels'
|
||||
import { settings as labels } from '../../../copy/en/settings'
|
||||
import { requestHash, changeEncryptionAndRestartApp } from '../../../db'
|
||||
import PasswordField from './password-field'
|
||||
import showBackUpReminder from './show-backup-reminder'
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import nodejs from 'nodejs-mobile-react-native'
|
||||
import AppText from '../../app-text'
|
||||
import styles from '../../../styles'
|
||||
import { settings as labels } from '../../labels'
|
||||
import { settings as labels } from '../../../copy/en/settings'
|
||||
import { requestHash, changeEncryptionAndRestartApp } from '../../../db'
|
||||
import PasswordField from './password-field'
|
||||
import showBackUpReminder from './show-backup-reminder'
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
hasEncryptionObservable
|
||||
} from '../../../local-storage'
|
||||
import styles from '../../../styles/index'
|
||||
import { settings as labels } from '../../labels'
|
||||
import { settings as labels } from '../../../copy/en/labels'
|
||||
|
||||
export default class PasswordSetting extends Component {
|
||||
constructor(props) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Alert } from 'react-native'
|
||||
import { settings as labels, shared } from '../../labels'
|
||||
import { settings as labels, shared } from '../../../copy/en/labels'
|
||||
|
||||
export default function showBackUpReminder(okHandler, isDelete) {
|
||||
let title, message
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import nodejs from 'nodejs-mobile-react-native'
|
||||
import AppText from '../../app-text'
|
||||
import styles from '../../../styles'
|
||||
import { settings as labels, shared } from '../../labels'
|
||||
import { settings as labels, shared } from '../../../copy/en/labels'
|
||||
import { requestHash, changeEncryptionAndRestartApp } from '../../../db'
|
||||
import PasswordField from './password-field'
|
||||
import showBackUpReminder from './show-backup-reminder'
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
savePeriodReminder
|
||||
} from '../../local-storage'
|
||||
import styles from '../../styles/index'
|
||||
import { settings as labels } from '../labels'
|
||||
import { settings as labels } from '../../copy/en/labels'
|
||||
|
||||
export default class PeriodReminderPicker extends Component {
|
||||
constructor(props) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
saveTempReminder
|
||||
} from '../../local-storage'
|
||||
import styles from '../../styles/index'
|
||||
import { settings as labels } from '../labels'
|
||||
import { settings as labels } from '../../copy/en/labels'
|
||||
import padWithZeros from '../helpers/pad-time-with-zeros'
|
||||
|
||||
export default class TempReminderPicker extends Component {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
saveTempScale,
|
||||
} from '../../local-storage'
|
||||
import { secondaryColor } from '../../styles/index'
|
||||
import { settings as labels } from '../labels'
|
||||
import { settings as labels } from '../../copy/en/labels'
|
||||
import config from '../../config'
|
||||
import alertError from './alert-error'
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
import styles from '../styles/index'
|
||||
import cycleModule from '../lib/cycle'
|
||||
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
||||
import {stats as labels} from './labels'
|
||||
import {stats as labels} from '../copy/en/labels'
|
||||
import AppText from './app-text'
|
||||
import { getCycleStartsSortedByDate } from '../db'
|
||||
|
||||
|
||||
@@ -16,70 +16,6 @@ export const shared = {
|
||||
less: 'less'
|
||||
}
|
||||
|
||||
export const settings = {
|
||||
export: {
|
||||
errors: {
|
||||
noData: 'There is no data to export',
|
||||
couldNotConvert: 'Could not convert data to CSV',
|
||||
problemSharing: 'There was a problem sharing the data export file'
|
||||
},
|
||||
title: 'My Drip data export',
|
||||
subject: 'My Drip data export',
|
||||
button: 'Export data',
|
||||
segmentExplainer: 'Export data in CSV format for backup or so you can use it elsewhere'
|
||||
},
|
||||
import: {
|
||||
button: 'Import data',
|
||||
title: 'Keep existing data?',
|
||||
message: `There are two options for the import:
|
||||
1. Keep existing cycle days and replace only the ones in the import file.
|
||||
2. Delete all existing cycle days and import cycle days from file.`,
|
||||
replaceOption: 'Import and replace',
|
||||
deleteOption: 'Import and delete existing',
|
||||
errors: {
|
||||
couldNotOpenFile: 'Could not open file',
|
||||
postFix: 'No data was imported or changed'
|
||||
},
|
||||
success: {
|
||||
message: 'Data successfully imported'
|
||||
},
|
||||
segmentExplainer: 'Import data in CSV format'
|
||||
},
|
||||
tempScale: {
|
||||
segmentTitle: 'Temperature scale',
|
||||
segmentExplainer: 'Change the minimum and maximum value for the temperature chart',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
loadError: 'Could not load saved temperature scale settings',
|
||||
saveError: 'Could not save temperature scale settings'
|
||||
},
|
||||
tempReminder: {
|
||||
title: 'Temperature reminder',
|
||||
noTimeSet: 'Set a time for a daily reminder to take your temperature',
|
||||
timeSet: time => `Daily reminder set for ${time}`,
|
||||
notification: 'Record your morning temperature'
|
||||
},
|
||||
periodReminder: {
|
||||
title: 'Next period reminder',
|
||||
reminderText: 'Get a notification 3 days before your next period is likely to start.',
|
||||
notification: daysToEndOfPrediction => `Your next period is likely to start in 3 to ${daysToEndOfPrediction} days.`
|
||||
},
|
||||
passwordSettings: {
|
||||
title: 'App password',
|
||||
explainerDisabled: "Encrypt the app's database with a password. You need to enter the password every time the app is started.",
|
||||
explainerEnabled: "Password protection and database encryption is currently enabled",
|
||||
setPassword: 'Set password',
|
||||
changePassword: 'Change password',
|
||||
deletePassword: 'Delete password',
|
||||
enterCurrent: "Please enter your current password",
|
||||
enterNew: "Please enter a new password",
|
||||
backupReminderTitle: 'Read this before making changes to your password',
|
||||
backupReminder: 'Just to be safe, please backup your data using the export function before making changes to your password.\n\nLonger passwords are better! Consider using a passphrase.\n\nPlease also make sure you do not lose your password. There is no way to recover your data if you do.\n\nMaking any changes to your password setting will keep your data as it was before and restart the app.',
|
||||
deleteBackupReminderTitle: 'Read this before deleting your password',
|
||||
deleteBackupReminder: 'Deleting your password means your data will no longer be encrypted.\n\nJust to be safe, please backup your data using the export function before deleting your password.\n\nMaking any changes to your password setting will keep your data as it was before and restart the app.',
|
||||
}
|
||||
}
|
||||
|
||||
export const headerTitles = {
|
||||
Home: 'Home',
|
||||
Calendar: 'Calendar',
|
||||
@@ -0,0 +1,63 @@
|
||||
export const settings = {
|
||||
export: {
|
||||
errors: {
|
||||
noData: 'There is no data to export',
|
||||
couldNotConvert: 'Could not convert data to CSV',
|
||||
problemSharing: 'There was a problem sharing the data export file'
|
||||
},
|
||||
title: 'My Drip data export',
|
||||
subject: 'My Drip data export',
|
||||
button: 'Export data',
|
||||
segmentExplainer: 'Export data in CSV format for backup or so you can use it elsewhere'
|
||||
},
|
||||
import: {
|
||||
button: 'Import data',
|
||||
title: 'Keep existing data?',
|
||||
message: `There are two options for the import:
|
||||
1. Keep existing cycle days and replace only the ones in the import file.
|
||||
2. Delete all existing cycle days and import cycle days from file.`,
|
||||
replaceOption: 'Import and replace',
|
||||
deleteOption: 'Import and delete existing',
|
||||
errors: {
|
||||
couldNotOpenFile: 'Could not open file',
|
||||
postFix: 'No data was imported or changed'
|
||||
},
|
||||
success: {
|
||||
message: 'Data successfully imported'
|
||||
},
|
||||
segmentExplainer: 'Import data in CSV format'
|
||||
},
|
||||
tempScale: {
|
||||
segmentTitle: 'Temperature scale',
|
||||
segmentExplainer: 'Change the minimum and maximum value for the temperature chart',
|
||||
min: 'Min',
|
||||
max: 'Max',
|
||||
loadError: 'Could not load saved temperature scale settings',
|
||||
saveError: 'Could not save temperature scale settings'
|
||||
},
|
||||
tempReminder: {
|
||||
title: 'Temperature reminder',
|
||||
noTimeSet: 'Set a time for a daily reminder to take your temperature',
|
||||
timeSet: time => `Daily reminder set for ${time}`,
|
||||
notification: 'Record your morning temperature'
|
||||
},
|
||||
periodReminder: {
|
||||
title: 'Next period reminder',
|
||||
reminderText: 'Get a notification 3 days before your next period is likely to start.',
|
||||
notification: daysToEndOfPrediction => `Your next period is likely to start in 3 to ${daysToEndOfPrediction} days.`
|
||||
},
|
||||
passwordSettings: {
|
||||
title: 'App password',
|
||||
explainerDisabled: "Encrypt the app's database with a password. You need to enter the password every time the app is started.",
|
||||
explainerEnabled: "Password protection and database encryption is currently enabled",
|
||||
setPassword: 'Set password',
|
||||
changePassword: 'Change password',
|
||||
deletePassword: 'Delete password',
|
||||
enterCurrent: "Please enter your current password",
|
||||
enterNew: "Please enter a new password",
|
||||
backupReminderTitle: 'Read this before making changes to your password',
|
||||
backupReminder: 'Just to be safe, please backup your data using the export function before making changes to your password.\n\nLonger passwords are better! Consider using a passphrase.\n\nPlease also make sure you do not lose your password. There is no way to recover your data if you do.\n\nMaking any changes to your password setting will keep your data as it was before and restart the app.',
|
||||
deleteBackupReminderTitle: 'Read this before deleting your password',
|
||||
deleteBackupReminder: 'Deleting your password means your data will no longer be encrypted.\n\nJust to be safe, please backup your data using the export function before deleting your password.\n\nMaking any changes to your password setting will keep your data as it was before and restart the app.',
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import {tempReminderObservable, periodReminderObservable} from '../local-storage
|
||||
import Notification from 'react-native-push-notification'
|
||||
import { LocalDate } from 'js-joda'
|
||||
import Moment from 'moment'
|
||||
import { settings as labels } from '../components/labels'
|
||||
import { settings as labels } from '../copy/en/labels'
|
||||
import { getBleedingDaysSortedByDate } from '../db'
|
||||
import cycleModule from './cycle'
|
||||
import nothingChanged from '../db/db-unchanged'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import getFertilityStatus from './sympto'
|
||||
import cycleModule from './cycle'
|
||||
import { fertilityStatus } from '../components/labels'
|
||||
import { fertilityStatus } from '../copy/en/labels'
|
||||
|
||||
export function getFertilityStatusForDay(dateString) {
|
||||
const status = getCycleStatusForDay(dateString)
|
||||
|
||||
Reference in New Issue
Block a user