Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method i18next.setDefaultNamespace doesn't support array #2208

Closed
realgvard opened this issue Jun 26, 2024 · 4 comments
Closed

Method i18next.setDefaultNamespace doesn't support array #2208

realgvard opened this issue Jun 26, 2024 · 4 comments

Comments

@realgvard
Copy link

🐛 Bug Report

I believe the type in setDefaultNamespace method is wrong since a namespace could be string and readonly string[].

Expected behavior

From my point of view this method should support arrays.

  setDefaultNamespace(ns: string | readonly string[]): void;

Your Environment

  • Version 23.11.5
@adrai
Copy link
Member

adrai commented Jun 26, 2024

Would you like to send a Pull Request to address this?

@realgvard
Copy link
Author

Will do

@adrai
Copy link
Member

adrai commented Nov 21, 2024

fyi: #2259

@adrai
Copy link
Member

adrai commented Nov 22, 2024

included in v24

@adrai adrai closed this as completed Nov 22, 2024
alexandresoro pushed a commit to alexandresoro/ouca that referenced this issue Dec 23, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [i18next](https://www.i18next.com) ([source](https://github.com/i18next/i18next)) | dependencies | major | [`23.16.8` -> `24.2.0`](https://renovatebot.com/diffs/npm/i18next/23.16.8/24.2.0) |

---

### Release Notes

<details>
<summary>i18next/i18next (i18next)</summary>

### [`v24.2.0`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2420)

[Compare Source](i18next/i18next@v24.1.2...v24.2.0)

-   feat(typescript): Add strictKeyChecks option to enforce checking key existence when defaultValue is used [2274](i18next/i18next#2274), fixes [2043](i18next/i18next#2043)

### [`v24.1.2`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2412)

[Compare Source](i18next/i18next@v24.1.1...v24.1.2)

-   optimize fix: Bug Report: Unsafe Behavior in i18n.t Function Leading to Potential Code Execution [2273](i18next/i18next#2273)

### [`v24.1.1`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2411)

[Compare Source](i18next/i18next@v24.1.0...v24.1.1)

-   fix: Bug Report: Unsafe Behavior in i18n.t Function Leading to Potential Code Execution [2273](i18next/i18next#2273)

### [`v24.1.0`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2410)

[Compare Source](i18next/i18next@v24.0.5...v24.1.0)

-   try to address [2270](i18next/i18next#2270) by cloning the store data [2271](i18next/i18next#2271)

### [`v24.0.5`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2405)

[Compare Source](i18next/i18next@v24.0.4...v24.0.5)

-   remove extra log for [2268](i18next/i18next#2268)

### [`v24.0.4`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2404)

[Compare Source](i18next/i18next@v24.0.3...v24.0.4)

-   simplify fix: incorrect locale detected [2268](i18next/i18next#2268)

### [`v24.0.3`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2403)

[Compare Source](i18next/i18next@v24.0.2...v24.0.3)

-   fix: incorrect locale detected [2268](i18next/i18next#2268)
-   fix: Intl.getCanonicalLocales throws with custom regions [2267](i18next/i18next#2267)

### [`v24.0.2`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2402)

[Compare Source](i18next/i18next@v24.0.1...v24.0.2)

-   if no Intl api, log error and use dummy rule

### [`v24.0.1`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2401)

[Compare Source](i18next/i18next@v24.0.0...v24.0.1)

-   early return and log error, if no Intl api

### [`v24.0.0`](https://github.com/i18next/i18next/blob/HEAD/CHANGELOG.md#2400)

[Compare Source](i18next/i18next@v23.16.8...v24.0.0)

**This is a major breaking release:**

-   remove support for older environments
-   remove old i18next JSON formats
    -   To convert your existing v3 translations to the v4 format, have a look at [i18next-v4-format-converter](https://github.com/i18next/i18next-v4-format-converter) or this [web tool](https://i18next.github.io/i18next-v4-format-converter-web/).
-   remove support for compatibility to v1 API
-   Intl API is mandatory now and will not fallback anymore
-   possible compatibility layer for older formats: `test/compatibility/v4/v4Compatibility.js`
-   rename `initImmediate` to `initAsync`
-   fallback to `dev` language if plural rule not found
-   remove TypeScript v4 support. TypeScript v5 is now an optional peer dependency
-   addresses
    -   [2244](i18next/i18next#2244)
    -   [2184](i18next/i18next#2184)
    -   [2213](i18next/i18next#2213)
    -   [2206](i18next/i18next#2206)
    -   [2208](i18next/i18next#2208)
    -   [2148](i18next/i18next#2148)
    -   [2254](i18next/i18next#2254)

➡️ check out the [migration guide](https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41Ny40IiwidXBkYXRlZEluVmVyIjoiMzkuNzUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/384
Reviewed-by: Alexandre Soro <code@soro.dev>
Co-authored-by: renovate <renovate@git.tristess.app>
Co-committed-by: renovate <renovate@git.tristess.app>
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

No branches or pull requests

2 participants