Skip to content

Commit

Permalink
Remove I18n#availableLocales, as it's not used anywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed Feb 21, 2024
1 parent 5116a0f commit f49c86d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Prefix your message with one of the following:
All notable changes to this project will be documented in this file. This
project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

- [Removed] Remove `I18n#availableLocales`, as it's no used anywhere.

## v4.4.3 - Feb 15, 2024

- [Changed] Revert exports change back, as it has caused way too much friction.
Expand Down
8 changes: 0 additions & 8 deletions src/I18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import {

const DEFAULT_I18N_OPTIONS: I18nOptions = {
defaultLocale: "en",
availableLocales: ["en"],
locale: "en",
defaultSeparator: ".",
placeholder: /(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,
Expand Down Expand Up @@ -201,13 +200,6 @@ export class I18n {
*/
public interpolate: typeof interpolate;

/**
* Set the available locales.
*
* @type {string[]}
*/
public availableLocales: string[] = [];

constructor(translations: Dict = {}, options: Partial<I18nOptions> = {}) {
const {
locale,
Expand Down
7 changes: 0 additions & 7 deletions src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,6 @@ export interface I18nOptions {
*/
defaultLocale: string;

/**
* Set available locales. This will be used to load pluralizers automatically.
*
* @type {string[]}
*/
availableLocales: string[];

/**
* Set the default string separator. Defaults to `.`, as in
* `scope.translation`.
Expand Down

0 comments on commit f49c86d

Please sign in to comment.