Coder Social home page Coder Social logo

zeljkox / react-native-pseudo-localization Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 194 KB

React Native Pseudo Localization is small package that enables pseudolocalization

License: MIT License

JavaScript 46.58% Python 13.11% Java 10.66% Objective-C 29.65%
pseudo-localization internationalization i18n i10n react-native pseudo chaos-engineering language

react-native-pseudo-localization's Introduction

React Native Pseudo Localization

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.

English Pseudo Language
English Pseudo Language

Inspiration

Inspired by Brian Holt talk on ReactRally and tryggvigy GitHub repository.

Why?

To catch localization problems like:

  • Translated text that is significantly longer than the source language, and does not fit within the UI constraints, or which causes text breaks at awkward positions.
  • Font glyphs that are significantly larger than, or possess diacritic marks not found in, the source language, and which may be cut off vertically.
  • Application code that assumes all characters fit into a limited character set, such as ASCII or ANSI, which can produce actual logic bugs if left uncaught.

Snack Example

Live example on Snack

Installation

yarn add react-native-pseudo-localization

or

npm install --save react-native-pseudo-localization

Quick Start

import {Text} from 'react-native'
import PseudoProvider from 'react-native-pseudo-localization'

export default class App extends Component {

  render() {
    return (
      <PseudoProvider>
        <Text>Test</Text>
      </PseudoProvider>
    )
  }
}

Props

key type Value Description
enabled boolean true Programaticaly enabla and disable pseudo localizations

TODO

  • React Context API failback for older versions
  • Bidi english pseudo strategy

Articles

Pseudo Localization @ Netflix

License

MIT License. © Željko Marković 2018

react-native-pseudo-localization's People

Contributors

zeljkox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

roshangm1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.