#199 Adding some translation to check if im doing right
This commit is contained in:
parent
fd0d30c07c
commit
9b3dbd187f
3 changed files with 33 additions and 19 deletions
|
@ -90,8 +90,11 @@ import {
|
||||||
} from 'loot-core/src/client/data-hooks/schedules';
|
} from 'loot-core/src/client/data-hooks/schedules';
|
||||||
import { getPayeesById } from 'loot-core/src/client/reducers/queries';
|
import { getPayeesById } from 'loot-core/src/client/reducers/queries';
|
||||||
import { useActiveLocation } from '../ActiveLocation';
|
import { useActiveLocation } from '../ActiveLocation';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
function EmptyMessage({ onAdd }) {
|
function EmptyMessage({ onAdd }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
@ -111,17 +114,15 @@ function EmptyMessage({ onAdd }) {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={{ textAlign: 'center', lineHeight: '1.4em' }}>
|
<Text style={{ textAlign: 'center', lineHeight: '1.4em' }}>
|
||||||
For Actual to be useful, you need to <strong>add an account</strong>.
|
{t('account.needAccountMessage')}
|
||||||
You can link an account to automatically download transactions, or
|
|
||||||
manage it locally yourself.
|
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Button primary style={{ marginTop: 20 }} onClick={onAdd}>
|
<Button primary style={{ marginTop: 20 }} onClick={onAdd}>
|
||||||
Add account
|
{t('account.addAccount')}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<View style={{ marginTop: 20, fontSize: 13, color: colors.n5 }}>
|
<View style={{ marginTop: 20, fontSize: 13, color: colors.n5 }}>
|
||||||
In the future, you can add accounts from the sidebar.
|
{t('account.addAccountInFutureFromSidebar')}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -129,6 +130,8 @@ function EmptyMessage({ onAdd }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function ReconcilingMessage({ balanceQuery, targetBalance, onDone }) {
|
function ReconcilingMessage({ balanceQuery, targetBalance, onDone }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
let cleared = useSheetValue({
|
let cleared = useSheetValue({
|
||||||
name: balanceQuery.name + '-cleared',
|
name: balanceQuery.name + '-cleared',
|
||||||
query: balanceQuery.query.filter({ cleared: true })
|
query: balanceQuery.query.filter({ cleared: true })
|
||||||
|
@ -167,27 +170,22 @@ function ReconcilingMessage({ balanceQuery, targetBalance, onDone }) {
|
||||||
marginRight: 3
|
marginRight: 3
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
All reconciled!
|
{t('account.allReconciled')}
|
||||||
</View>
|
</View>
|
||||||
) : (
|
) : (
|
||||||
<View style={{ color: colors.n3 }}>
|
<View style={{ color: colors.n3 }}>
|
||||||
<Text style={{ fontStyle: 'italic', textAlign: 'center' }}>
|
<Text style={{ fontStyle: 'italic', textAlign: 'center' }}>
|
||||||
Your cleared balance{' '}
|
{t('account.clearedBalance', {
|
||||||
<strong>{format(cleared, 'financial')}</strong> needs{' '}
|
'cleared':(<strong>{format(cleared, 'financial')}</strong>),
|
||||||
<strong>
|
'diff': (<strong>{(targetDiff > 0 ? '+' : '') + format(targetDiff, 'financial')}</strong>),
|
||||||
{(targetDiff > 0 ? '+' : '') + format(targetDiff, 'financial')}
|
'balance':(<Text style={{ fontWeight: 700 }}>{format(targetBalance, 'financial')}</Text>)
|
||||||
</strong>{' '}
|
})}
|
||||||
to match
|
|
||||||
<br /> your bank{"'"}s balance of{' '}
|
|
||||||
<Text style={{ fontWeight: 700 }}>
|
|
||||||
{format(targetBalance, 'financial')}
|
|
||||||
</Text>
|
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<View style={{ marginLeft: 15 }}>
|
<View style={{ marginLeft: 15 }}>
|
||||||
<Button primary onClick={onDone}>
|
<Button primary onClick={onDone}>
|
||||||
Done Reconciling
|
{t('account.doneReconciling')}
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
{
|
{
|
||||||
|
"account": {
|
||||||
|
"addAccount": "Add account",
|
||||||
|
"addAccountInFutureFromSidebar": "In the future, you can add accounts from the sidebar.",
|
||||||
|
"allReconciled": "All reconciled!",
|
||||||
|
"clearedBalance": "Your cleared balance {cleared} needs {diff} to match your bank's balance of {balance}",
|
||||||
|
"doneReconciling": "Done Reconciling",
|
||||||
|
"needAccountAdvice": "For Actual to be useful, you need to <strong>add an account</strong>. You can link an account to automatically download transactions, or manage it locally yourself."
|
||||||
|
},
|
||||||
"bootstrap": {
|
"bootstrap": {
|
||||||
"title": "Bootstrap this Actual instance",
|
"title": "Bootstrap this Actual instance",
|
||||||
"setPassword": "Set a password for this server instance",
|
"setPassword": "Set a password for this server instance",
|
||||||
"tryDemo": "Try Demo"
|
"tryDemo": "Try Demo"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,15 @@
|
||||||
{
|
{
|
||||||
|
"account": {
|
||||||
|
"addAccount": "Agregar cuenta",
|
||||||
|
"addAccountInFutureFromSidebar": "En el futuro puedes agregar cuentas desde la barra lateral.",
|
||||||
|
"allReconciled": "¡Todo conciliado!",
|
||||||
|
"clearedBalance": "Su saldo compensado {cleared} necesita {diff} para coincidir con el saldo del banco de {balance}",
|
||||||
|
"doneReconciling": "Conciliación finalizada",
|
||||||
|
"needAccountAdvice": "Para que Actual sea útil, debe <strong>agregar una cuenta</strong>. Puedes vincular la cuenta para descargar transacciones automáticamente o administrala localmente."
|
||||||
|
},
|
||||||
"bootstrap": {
|
"bootstrap": {
|
||||||
"title": "Bootstrap esta instancia de Actual",
|
"title": "Bootstrap esta instancia de Actual",
|
||||||
"setPassword": "Establecer una contraseña para esta instancia de servidor",
|
"setPassword": "Establecer una contraseña para esta instancia de servidor",
|
||||||
"tryDemo": "Probar Demo"
|
"tryDemo": "Probar Demo"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue