Skip to content

Conversation

@alexandre-combemorel
Copy link
Contributor

When using the hook useTranslation, previously the first param was an array of string, but it was allowed to be undefined or empty array.

Before:
useTranslation(undefined, loadTranslationFunc)
useTranslation([], loadTranslationFunc)
After:
useTranslation(['myNamespace'], loadTranslationFunc)
useTranslation(['myNamespace', ...], loadTranslationFunc)

now it has to be passed with at least one element in the array.

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

🦋 Changeset detected

Latest commit: 50d5912

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@scaleway/use-i18n Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.85%. Comparing base (f2b47cb) to head (50d5912).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2831   +/-   ##
=======================================
  Coverage   68.85%   68.85%           
=======================================
  Files          44       44           
  Lines        1294     1294           
  Branches      181      181           
=======================================
  Hits          891      891           
  Misses        380      380           
  Partials       23       23           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@philibea philibea merged commit 4cb5fc4 into main Nov 19, 2025
7 checks passed
@philibea philibea deleted the fix/enforce-namespace-param-not-empty branch November 19, 2025 09:32
@github-actions github-actions bot mentioned this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants