fix: get bold tags to display correctly

This commit is contained in:
Tom French 2022-08-24 17:22:48 +01:00
parent dd9d32a6ed
commit 2d025d8b08
3 changed files with 15 additions and 9 deletions

View file

@ -90,7 +90,7 @@ 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'; import { Trans, useTranslation } from 'react-i18next';
function EmptyMessage({ onAdd }) { function EmptyMessage({ onAdd }) {
const { t } = useTranslation(); const { t } = useTranslation();
@ -114,7 +114,7 @@ function EmptyMessage({ onAdd }) {
}} }}
> >
<Text style={{ textAlign: 'center', lineHeight: '1.4em' }}> <Text style={{ textAlign: 'center', lineHeight: '1.4em' }}>
{t('account.needAccountMessage')} <Trans>{'account.needAccountMessage'}</Trans>
</Text> </Text>
<Button primary style={{ marginTop: 20 }} onClick={onAdd}> <Button primary style={{ marginTop: 20 }} onClick={onAdd}>
@ -175,11 +175,17 @@ function ReconcilingMessage({ balanceQuery, targetBalance, onDone }) {
) : ( ) : (
<View style={{ color: colors.n3 }}> <View style={{ color: colors.n3 }}>
<Text style={{ fontStyle: 'italic', textAlign: 'center' }}> <Text style={{ fontStyle: 'italic', textAlign: 'center' }}>
{t('account.clearedBalance', { <Trans
'cleared':(<strong>{format(cleared, 'financial')}</strong>), values={{
'diff': (<strong>{(targetDiff > 0 ? '+' : '') + format(targetDiff, 'financial')}</strong>), cleared: format(cleared, 'financial'),
'balance':(<Text style={{ fontWeight: 700 }}>{format(targetBalance, 'financial')}</Text>) diff:
})} (targetDiff > 0 ? '+' : '') +
format(targetDiff, 'financial'),
balance: format(targetBalance, 'financial')
}}
>
{'account.clearedBalance'}
</Trans>
</Text> </Text>
</View> </View>
)} )}

View file

@ -3,7 +3,7 @@
"addAccount": "Add account", "addAccount": "Add account",
"addAccountInFutureFromSidebar": "In the future, you can add accounts from the sidebar.", "addAccountInFutureFromSidebar": "In the future, you can add accounts from the sidebar.",
"allReconciled": "All reconciled!", "allReconciled": "All reconciled!",
"clearedBalance": "Your cleared balance {cleared} needs {diff} to match your bank's balance of {balance}", "clearedBalance": "Your cleared balance <strong>{{cleared}}</strong> needs <strong>{{diff}}</strong> to match your bank's balance of <strong>{{balance}}</strong>",
"doneReconciling": "Done Reconciling", "doneReconciling": "Done Reconciling",
"needAccountMessage": "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." "needAccountMessage": "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."
}, },

View file

@ -3,7 +3,7 @@
"addAccount": "Agregar cuenta", "addAccount": "Agregar cuenta",
"addAccountInFutureFromSidebar": "En el futuro puedes agregar cuentas desde la barra lateral.", "addAccountInFutureFromSidebar": "En el futuro puedes agregar cuentas desde la barra lateral.",
"allReconciled": "¡Todo conciliado!", "allReconciled": "¡Todo conciliado!",
"clearedBalance": "Su saldo compensado {cleared} necesita {diff} para coincidir con el saldo del banco de {balance}", "clearedBalance": "Su saldo compensado <strong>{{cleared}}</strong> necesita <strong>{{diff}}</strong> para coincidir con el saldo del banco de <strong>{{balance}}</strong>",
"doneReconciling": "Conciliación finalizada", "doneReconciling": "Conciliación finalizada",
"needAccountMessage": "Para que Actual sea útil, debe <strong>agregar una cuenta</strong>. Puedes vincular la cuenta para descargar transacciones automáticamente o administrala localmente." "needAccountMessage": "Para que Actual sea útil, debe <strong>agregar una cuenta</strong>. Puedes vincular la cuenta para descargar transacciones automáticamente o administrala localmente."
}, },