
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@cloak-app/i18n
Advanced tools
Localization conventions for Cloak + Craft.
yarn add @cloak-app/i18n
modules: ['@cloak-app/i18n']
@cloak-app/craft
.
@cloak-app/i18n
module in modules
so that their injected clients are available to the fetch-translations.coffee
plugin.@cloak-app/craft
is supportedthis.$nuxtI18nHead({ addSeoAttributes:true })
to your head, probably in your default layout, as described in the @nuxtjs/i18n docs
If using the generateJson
option, you'll need to support CORS requests for the JSON files. If using Netlify, add this to your static/_redirects
file:
# Allow access to i18n json files
/i18n/*
Access-Control-Allow-Origin: *
Set these properties within cloak: { i18n: { ... } }
in the nuxt.config:
currentCode
- The code
code (see the locales
object) of the current locale. Defaults to process.env.LOCALE_CODE
and then process.env.CMS_SITE
(which converts _
to -
to convert Craft handle to ISO code). See the @nuxtjs/i18n defaultLocale
option.locales
- An array of objects for defining the list of supported locales. This array is similar to the @nuxtjs/i18n locales
option. The objects look like:
{
code: 'en', // Should be an ISO code
domain: 'https://cloak-i18n.netlify.app', // Should be full origin
// @cloak-app/i18n additions
currency: 'USD', // Optional, used with $n()
}
generateJson
- Boolean to enable static generation of JSON files for each locale's static strings. You would enable this if you wanted to use the static strings outside of Nuxt, like as part of components that are used in a Shopify theme. The JSON is written to /dist/i18n/{code}.json
where {code}
comes from the locales
array.craft.categories
- An array of category titles from Translations Admin. If undefined, it's treated as ["site"]
by Translations Admin.This package uses @nuxtjs/i18n which, itself, consumes vue-i18n
. Thus, look to their docs for a deeper explanantion for how to translate text. The most common helper you'll use is $t()
. For example:
<button>{{ $t('articles.read_me') }}</button>
<cloak-i18n-locale-selector />
Renders a select-style menu for choosing a locale. This component can be configured with the following Stylus or CSS customer properties:
cloak-i18n-locale-selector-radius
- The radius of the select button and the menu background.cloak-i18n-locale-selector-padding-h
- The horizontal padding within the toggle button and in the select menu.cloak-i18n-locale-selector-toggle-height
- The height of the select button.cloak-i18n-locale-selector-options-padding-v
- The vertical padding within the select menu and the spacing between locale options within the menu.Run yarn dev
to open a Nuxt dev build of the demo directory.
FAQs
Localization conventions for Cloak + Craft.
The npm package @cloak-app/i18n receives a total of 106 weekly downloads. As such, @cloak-app/i18n popularity was classified as not popular.
We found that @cloak-app/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.