
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.
ember-pseudolocalize
Advanced tools
Ember-pseudolocalize is a tiny addon that helps you ensure that your app is fully localized. Designed to work with ember-i18n.
Ember-pseudolocalize should work with any verion of Ember 2.x (tested with 2.8 and beyond), and ember-i18n 5.x. Install with:
ember install ember-pseudolocalize
Pseudolocalization is the process of replacing characters in a string with accented versions, but in a way that it's still legible. Śōmȇŧĥĩňĝ ĺĩƙȇ ŧĥĩś, so that you can easily identify untranslated strings. It's often used in conjunction with techniques that lengthen strings to help spot UI/UX issues (non-English strings are often more than 30% longer).
Simply switch your locale to to en-XA
. There's a variety of browser addons available for Firefox and Chrome. Note that they usually change your Accept-Language
header, so if your language detection relies on navigator.language
or similar, you'll need to manually change the language of your browser.
Customize how the strings are pseudolocalized by editing your ember-cli-build and including an object at ember-pseudolocalize
(see examples below). Customization options are passed directly to pseudoloc. Some of the relevant options are listed below.
Specifies the strings that should surround the pseudolocalized strings. The prepended and appended strings help to locate strings that have been cut off or improperly concatenated together - localized strings should use tokens for data since different languages have different word orders.
Default is [!!
and !!]
.
// ember-cli-build.js
var app = new EmberApp({
'ember-pseudolocalized': {
prepend: '!~~',
append: '~~!',
}
});
// 'string with {{ token }}' -> '[## śťřīņğ ŵıţħ {{ token }}!!]'
Ember-i18n allows you to customize the way that tokens are interpolated in strings. By default ember-pseudolocalize supports double-stache ({{ foo }}
) notation. If you're using something else (including triple stache notation), you will need to manually edit the start and end delimiter.
// ember-cli-build.js
// For "triple-stache" notation
var app = new EmberApp({
'ember-pseudolocalized': {
startDelimiter: '{{{',
endDelimiter: '}}}',
}
});
Extends the width of the string by the specified percentage. Useful if you will be localizing into languages such as German which can be 30% longer than English.
Default is 0
.
// ember-cli-build.js
var app = new EmberApp({
'ember-pseudolocalized': {
extend: '0.3', // 30%
}
});
// 'string with {{ token }}' ->
//'[!!ŝťŕĩʼnğ ŵĩťħ {{ token}}. !!]'
While ember-pseudolocalize is a small library, you might still want to remove it from your production payload using Ember CLI's addon blacklist feature.
var environment = process.env.EMBER_ENV;
var pluginsToBlacklist = environment === 'production' ? ['ember-pseudolocalize'] : [];
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
addons: {
blacklist: pluginsToBlacklist
}
};
}
FAQs
A tiny addon that helps test your localization.
The npm package ember-pseudolocalize receives a total of 4 weekly downloads. As such, ember-pseudolocalize popularity was classified as not popular.
We found that ember-pseudolocalize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.