
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@bricco/localization
Advanced tools
Create a localization file, ie: /src/locales/sv/common.[json|js|ts]
Create /src/locales/translations.ts
import { initServerTranslations } from '@bricco/localization';
import { Common as CommonSV } from '@/locales/sv/common';
const dictionaries = {
en: {},
sv: CommonSV,
};
const { t, getLang } = initServerTranslations(dictionaries);
export { dictionaries, getLang, t };
import '@bricco/localization';
import { Common as CommonSV } from '@/locales/sv/common';
declare module '@bricco/localization' {
interface CustomOptions {
dictionary: typeof CommonSV;
}
}
import { Localization } from '@bricco/localization';
import { dictionaries } from '@/locales/translations';
...
export default async function RootLayout({ children }: { children: React.ReactNode }): Promise<JSX.Element> {
...
<body ...>
<Localization dictionaries={dictionaries}>
{children}
</Localization>
</body>
...
}
<AdminLayout
menu={menu}
languages={[
{ id: 'en', label: 'English' },
{ id: 'sv', label: 'Svenska' },
]}
title={'Example'}
subTitle="@bricco/next-utils"
>
{children}
</AdminLayout>
import { t } from '@/locales/translations';
import { useTranslation } from '@bricco/localization';
const { t } = useTranslation();
// Will fail to compile TS if "String in english" is missing from @/locales/sv/common.
console.log(t('String in english'))
FAQs
Unknown package
The npm package @bricco/localization receives a total of 5 weekly downloads. As such, @bricco/localization popularity was classified as not popular.
We found that @bricco/localization demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.