Open Yovach opened 5 months ago
The following code can become heavy with multiple keys and usage of scopes: https://github.com/QuiiBz/next-international/blob/7887342c60f5cceaa8ed0456a8ef068db4b87909/packages/next-international/src/common/create-t.ts#L26-L30 I think we can store all the plural keys after the first iteration so that we don't need to iterate over the keys anymore
On the following code : https://github.com/QuiiBz/next-international/blob/7887342c60f5cceaa8ed0456a8ef068db4b87909/packages/next-international/src/app/client/create-i18n-provider-client.tsx#L27-L31
The Map.prototype.set is returning the Map so we don't to check if the localesCache has locale as a key because we already have this information with the localesCache.get
Map.prototype.set
localesCache
locale
localesCache.get
@Yovach is attempting to deploy a commit to the Tom Labs Team on Vercel.
A member of the Team first needs to authorize it.
The following code can become heavy with multiple keys and usage of scopes: https://github.com/QuiiBz/next-international/blob/7887342c60f5cceaa8ed0456a8ef068db4b87909/packages/next-international/src/common/create-t.ts#L26-L30 I think we can store all the plural keys after the first iteration so that we don't need to iterate over the keys anymore
On the following code : https://github.com/QuiiBz/next-international/blob/7887342c60f5cceaa8ed0456a8ef068db4b87909/packages/next-international/src/app/client/create-i18n-provider-client.tsx#L27-L31
The
Map.prototype.set
is returning the Map so we don't to check if thelocalesCache
haslocale
as a key because we already have this information with thelocalesCache.get