New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

i18next-pseudo

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-pseudo

Pseudolocalization plugin for i18next

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35K
decreased by-13.7%
Maintainers
1
Weekly downloads
 
Created
Source

npm package

Example Website

i18next-pseudo

i18next-pseudo is a plugin for i18next that returns translated strings in Pseudolocalization format.

Pseudolocalization

Pseudolocalization

Pseudolocalization (or pseudo-localization) is a software testing method used for testing internationalization aspects of software. Instead of translating the text of the software into a foreign language, as in the process of localization, the textual elements of an application are replaced with an altered version of the original language.

About => ḀḀḀḅṓṓṓṵṵṵṭ

English in general is much shorter than other languages. This plugin will allow developers to design and develop without focusing on the length of an given word. Issues that arise during multilingual testing will be easily found at the time of development.

Getting Started

$ npm install --save i18next-pseudo

Usage

In your configuration for i18next, instantiate it as a new class and set the postProcess to pseudo in the init block.

import i18n from 'i18next';
import { reactI18nextModule } from 'react-i18next';
import Pseudo from 'i18next-pseudo';

i18n
  .use(new Pseudo())
  .use(reactI18nextModule)
  .init({
    ...
    postProcess: ['pseudo'],
    ...
  });

export default i18n;

Configuration

All configurations are optional.

optiondefaulttypedescription
languageToPseudoenstringThe locale that you would like to run through pseudolocalization
repeatedLetters['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y']array of stringsThe letters that will be repeated in a given string
letterMultiplier2numberThe amount of times you would like your repeatedLetter array to be multiplied
letters{ a: 'α', b: 'ḅ', c: 'ͼ', d: 'ḍ', e: 'ḛ', f: 'ϝ', g: 'ḡ', h: 'ḥ', i: 'ḭ', j: 'ĵ', : ḳ, l: 'ḽ', m: 'ṃ', n: 'ṇ', o: 'ṓ', p: 'ṗ', q: 'ʠ', r: 'ṛ', s: 'ṡ', t: 'ṭ', u: 'ṵ', v: 'ṽ', w: 'ẁ', x: 'ẋ', y: 'ẏ', z: 'ẓ', A: 'Ḁ', B: 'Ḃ', C: 'Ḉ', D: 'Ḍ', E: 'Ḛ', F: 'Ḟ', G: 'Ḡ', H: 'Ḥ', I: 'Ḭ', : 'Ĵ', K: 'Ḱ', L: 'Ḻ', M: 'Ṁ', N: 'Ṅ', O: 'Ṏ', P: 'Ṕ', Q: 'Ǫ', R: 'Ṛ', S: 'Ṣ', T: 'Ṫ', U: 'Ṳ', V: W: 'Ŵ', X: 'Ẋ', Y: 'Ŷ', Z: 'Ż',}objectThe letters in a string that will be replaced during pseudolocalization
wrappedfalsebooleanShould all strings be wrapped in to square brackets
enabledtruebooleanShould pseudolocalization be ran (useful for environment variables)
i18n
  .use(new Pseudo({
    enabled: true,
    languageToPseudo: 'es-US',
    letterMultiplier: 4,
    repeatedLetters: ['B', 'o', 'a', 't']
  }))
  .use(reactI18nextModule)
  .init({
    ...
    postProcess: ['pseudo'],
    ...
  });

Keywords

FAQs

Package last updated on 08 Feb 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc