Skip to content

Conversation

@Duncan-Brain
Copy link
Collaborator

@Duncan-Brain Duncan-Brain commented Jan 29, 2026

Description

Sorry for delay pnpm build caught some type errors that pre-commit did not, rebase did not work this time either.

Changes since a few months ago are only related to TFunction typings and reinstalling packages.

There might also be a bad merge too or something since api tests are failing... if you could still check to translations though. Legit test failure the buildTransactions test is not pure.

Notes:

  • Some formatting snuck through on on merge commit
  • Uses i18n configuration to create a default backend, as the namespaces are loaded it creates a fallback backend for the language of choice and English (our fallback for untranslated strings)
  • Updates deprecated xhr-backend to http-backend
  • Updates i18next packages (TFunction import updates)

Jira link: LF-4950

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Passes test case

  • UI components visually reviewed on desktop view

  • UI components visually reviewed on mobile view

  • Other (please explain):

    • uses pnpm run build and pnpm run preview and using the offline radio button in service workers area of devtools to simulate the bug.

    I also saw that two of each language file was downloaded on my branch:

Screenshot 2026-01-30 at 3 44 44 PM

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have ordered translation keys alphabetically (optional: run pnpm i18n to help with this)
  • I have added the GNU General Public License to all new files

queryStringParams: { v: APP_VERSION },
backends: [
HttpBackend,
resourcesToBackend((lng, ns) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the core change that should create desired behaviour

react: {
useSuspense: true,
},
ns: ['crop', 'expense', 'task', 'market_directory_info'],
Copy link
Collaborator Author

@Duncan-Brain Duncan-Brain Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are loaded on init... which now that there is a fallback available... the buildTransactions tests have mixed translation loaded state. I am thinking it would be ideal to not load any translations on init.. or all of them.

@Duncan-Brain Duncan-Brain marked this pull request as ready for review January 30, 2026 22:05
@Duncan-Brain Duncan-Brain requested review from a team as code owners January 30, 2026 22:05
@Duncan-Brain Duncan-Brain requested review from SayakaOno and kathyavini and removed request for a team January 30, 2026 22:05
@Duncan-Brain Duncan-Brain added the bug Something isn't working label Jan 30, 2026
@Duncan-Brain Duncan-Brain self-assigned this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants