A local-first personal finance app
add Qatari Riyal currency symbol (#5456)
Matt Fiddaman48166952ce2f
diff --git a/packages/desktop-client/src/components/settings/Currency.tsx b/packages/desktop-client/src/components/settings/Currency.tsxindex 4fcd59ed29..dc6274a4ba 100644--- a/packages/desktop-client/src/components/settings/Currency.tsx+++ b/packages/desktop-client/src/components/settings/Currency.tsx@@ -49,6 +49,7 @@ export function CurrencySettings() {['SGD', t('Singapore Dollar')],['TRY', t('Turkish Lira')],['USD', t('US Dollar')],+ ['QAR', t('Qatari Riyal')],]);const currencyOptions: [string, string][] = currencies.map(currency => {diff --git a/packages/desktop-client/src/hooks/useFormat.ts b/packages/desktop-client/src/hooks/useFormat.tsindex d8a1e394f6..b5cf72ce69 100644--- a/packages/desktop-client/src/hooks/useFormat.ts+++ b/packages/desktop-client/src/hooks/useFormat.ts@@ -155,7 +155,7 @@ export function useFormat(): UseFormatResult {const styledAmount =position === 'after'? `${valueWithoutSign}${space}${currencySymbol}`- : `${currencySymbol}${space}${valueWithoutSign}`;+ : `\u202A${currencySymbol}\u202C${space}${valueWithoutSign}`;return sign + styledAmount;},diff --git a/packages/loot-core/src/shared/currencies.ts b/packages/loot-core/src/shared/currencies.tsindex bb7a133248..8422e330d5 100644--- a/packages/loot-core/src/shared/currencies.ts+++ b/packages/loot-core/src/shared/currencies.ts@@ -24,6 +24,7 @@ export const currencies: Currency[] = [{ code: 'SGD', name: 'Singapore Dollar', symbol: 'S$', decimalPlaces: 2 },{ code: 'TRY', name: 'Turkish Lira', symbol: '₺', decimalPlaces: 2 },{ code: 'USD', name: 'US Dollar', symbol: '$', decimalPlaces: 2 },+ { code: 'QAR', name: 'Qatari Riyal', symbol: 'QAR', decimalPlaces: 2 },];export function getCurrency(code: string): Currency {diff --git a/upcoming-release-notes/5456.md b/upcoming-release-notes/5456.mdnew file mode 100644index 0000000000..f81773c5e2--- /dev/null+++ b/upcoming-release-notes/5456.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [matt-fidd]+---++Add Qatari Riyal currency symbol