[PR #7179] [MERGED] [AI] Normalize apostrophe-dot thousandsSeparator for consistency #21350

Closed
opened 2026-04-14 22:02:14 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7179
Author: @StephenBrown2
Created: 3/12/2026
Status: Merged
Merged: 3/13/2026
Merged by: @jfdoming

Base: masterHead: push-uuttsyzxvnuk


📝 Commits (2)

  • 44e4bd3 Normalize apostrophe-dot thousandsSeparator for consistency
  • f4ff43c Also normalize keyboard apostrophes on the input path

📊 Changes

2 files changed (+20 additions, -6 deletions)

View changed files

📝 packages/loot-core/src/shared/util.ts (+14 -6)
upcoming-release-notes/7179.md (+6 -0)

📄 Description

Description

This PR normalizes the thousands separator for the apostrophe-dot number format (e.g. Swiss 1'234.56) so that the formatted output always uses the Unicode right single quotation mark (U+2019) instead of the ASCII apostrophe (U+0027).

Why

On some Node/ICU versions (see nodejs/node#61861), Intl.NumberFormat with de-CH can return U+0027 for the thousands separator. We previously set thousandsSeparator = "'" in the config, but the formatter’s output comes from Intl, so it can emit ' (U+0027) or (U+2019), making the 'number formatting works with apostrophe-dot format' test flaky. The change adds a normalization step in the format wrapper: when the current format is apostrophe-dot, we replace any ' (U+0027) in the formatted string with \u2019 (). That keeps display and parsing consistent across Node/ICU versions.

Relates to the change in Node/ICU behavior described in https://github.com/nodejs/node/issues/61861.

Previous test run that failed: https://github.com/actualbudget/actual/actions/runs/23007288098/job/66807626567

Testing

  • Existing tests in packages/loot-core/src/shared/util.test.ts cover number formatting; no new tests added as this is a normalization of existing behavior.
  • Manually: format numbers with the apostrophe-dot (Swiss) format on a system where Intl returns U+0027 and confirm the displayed separator is normalized to U+2019.

Checklist

  • Release notes added (see link above) — upcoming-release-notes/7167.md
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.92 MB → 14.92 MB (+244 B) +0.00%
loot-core 1 5.83 MB → 5.83 MB (+120 B) +0.00%
api 3 4.82 MB → 4.82 MB (+108 B) +0.00%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.92 MB → 14.92 MB (+244 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts 📈 +244 B (+2.56%) 9.31 kB → 9.55 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 9.57 MB → 9.57 MB (+244 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/ca.js 187.85 kB 0%
static/js/da.js 106.13 kB 0%
static/js/de.js 179.82 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 171.21 kB 0%
static/js/es.js 174.29 kB 0%
static/js/fr.js 179.34 kB 0%
static/js/it.js 170.91 kB 0%
static/js/nb-NO.js 156.74 kB 0%
static/js/nl.js 113.03 kB 0%
static/js/pl.js 89.61 kB 0%
static/js/pt-BR.js 182.82 kB 0%
static/js/th.js 181.54 kB 0%
static/js/uk.js 215.25 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.16 MB 0%
static/js/narrow.js 638.11 kB 0%
static/js/TransactionList.js 106.48 kB 0%
static/js/wide.js 164.15 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 11.57 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.83 MB → 5.83 MB (+120 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts 📈 +120 B (+1.52%) 7.7 kB → 7.81 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.CYweGG8f.js 0 B → 5.83 MB (+5.83 MB) -

Removed

Asset File Size % Changed
kcab.worker.BXPdB7lm.js 5.83 MB → 0 B (-5.83 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
3 4.82 MB → 4.82 MB (+108 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts 📈 +108 B (+1.58%) 6.69 kB → 6.8 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 4.53 MB → 4.53 MB (+108 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index-BKGP2w5F.js 285.56 kB 0%
multipart-parser-DwddZ4BH.js 9.33 kB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7179 **Author:** [@StephenBrown2](https://github.com/StephenBrown2) **Created:** 3/12/2026 **Status:** ✅ Merged **Merged:** 3/13/2026 **Merged by:** [@jfdoming](https://github.com/jfdoming) **Base:** `master` ← **Head:** `push-uuttsyzxvnuk` --- ### 📝 Commits (2) - [`44e4bd3`](https://github.com/actualbudget/actual/commit/44e4bd3e7398a70d90cac09356a47cfa8582af70) Normalize apostrophe-dot thousandsSeparator for consistency - [`f4ff43c`](https://github.com/actualbudget/actual/commit/f4ff43cf083a17a498e802bc561b734253b9b88a) Also normalize keyboard apostrophes on the input path ### 📊 Changes **2 files changed** (+20 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/shared/util.ts` (+14 -6) ➕ `upcoming-release-notes/7179.md` (+6 -0) </details> ### 📄 Description ## Description This PR normalizes the thousands separator for the `apostrophe-dot` number format (e.g. Swiss `1'234.56`) so that the formatted output always uses the Unicode right single quotation mark (U+2019) instead of the ASCII apostrophe (U+0027). ### Why On some Node/ICU versions (see [nodejs/node#61861](https://github.com/nodejs/node/issues/61861)), `Intl.NumberFormat` with `de-CH` can return U+0027 for the thousands separator. We previously set `thousandsSeparator = "'"` in the config, but the formatter’s output comes from `Intl`, so it can emit `'` (U+0027) or `’` (U+2019), making the `'number formatting works with apostrophe-dot format'` test flaky. The change adds a normalization step in the format wrapper: when the current format is `apostrophe-dot`, we replace any `'` (U+0027) in the formatted string with `\u2019` (`’`). That keeps display and parsing consistent across Node/ICU versions. ## Related issue(s) Relates to the change in Node/ICU behavior described in https://github.com/nodejs/node/issues/61861. Previous test run that failed: https://github.com/actualbudget/actual/actions/runs/23007288098/job/66807626567 ## Testing - Existing tests in `packages/loot-core/src/shared/util.test.ts` cover number formatting; no new tests added as this is a normalization of existing behavior. - Manually: format numbers with the apostrophe-dot (Swiss) format on a system where Intl returns U+0027 and confirm the displayed separator is normalized to U+2019. ## Checklist - [x] Release notes added (see link above) — `upcoming-release-notes/7167.md` - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.92 MB → 14.92 MB (+244 B) | +0.00% loot-core | 1 | 5.83 MB → 5.83 MB (+120 B) | +0.00% api | 3 | 4.82 MB → 4.82 MB (+108 B) | +0.00% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.92 MB → 14.92 MB (+244 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts` | 📈 +244 B (+2.56%) | 9.31 kB → 9.55 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 9.57 MB → 9.57 MB (+244 B) | +0.00% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% static/js/workbox-window.prod.es5.js | 5.64 kB | 0% static/js/ca.js | 187.85 kB | 0% static/js/da.js | 106.13 kB | 0% static/js/de.js | 179.82 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 171.21 kB | 0% static/js/es.js | 174.29 kB | 0% static/js/fr.js | 179.34 kB | 0% static/js/it.js | 170.91 kB | 0% static/js/nb-NO.js | 156.74 kB | 0% static/js/nl.js | 113.03 kB | 0% static/js/pl.js | 89.61 kB | 0% static/js/pt-BR.js | 182.82 kB | 0% static/js/th.js | 181.54 kB | 0% static/js/uk.js | 215.25 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.16 MB | 0% static/js/narrow.js | 638.11 kB | 0% static/js/TransactionList.js | 106.48 kB | 0% static/js/wide.js | 164.15 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 11.57 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.83 MB → 5.83 MB (+120 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts` | 📈 +120 B (+1.52%) | 7.7 kB → 7.81 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CYweGG8f.js | 0 B → 5.83 MB (+5.83 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BXPdB7lm.js | 5.83 MB → 0 B (-5.83 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 3 | 4.82 MB → 4.82 MB (+108 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/util.ts` | 📈 +108 B (+1.58%) | 6.69 kB → 6.8 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- index.js | 4.53 MB → 4.53 MB (+108 B) | +0.00% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index-BKGP2w5F.js | 285.56 kB | 0% multipart-parser-DwddZ4BH.js | 9.33 kB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-14 22:02:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#21350