Skip to content
Mangle translatable strings to spot i18n bugs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
.gitignore
COPYING
README.md
bent.h
gettext-pseudolocale.c
meson.build

README.md

gettext-pseudolocale mangles English/ASCII text into something that makes internationalisation issues obvious, similarly to Android's pseudolocales feature.

This is implemented as an LD_PRELOAD shared library.

Office Runner Left-to-Right Office Runner Right-to-Left

Building

$ mkdir build
$ cd build
$ meson ..
$ ninja

Usage

PSEUDOLOCALE_MODE=rtl LD_PRELOAD=gettext-pseudolocale.so myapplication

PSEUDOLOCALE_MODE can be one of:

  • ltr: mangled and bracketed English looking text (default if PSEUDOLOCALE_MODE is omitted)
  • rtl: Right-to-left English text

Technical details

The shared library overrides libintl calls, which are usually part of the glibc DSO on Linux systems. This software has not been tested on anything but Linux.

License

This code is under the same license as the glibc itself (GNU Lesser General Public License v 2.1)

See the glibc license for details: http://www.gnu.org/software/libc/manual/html_mono/libc.html#Copying

The current mangle table is based on the “Bent” effect from Lunicode.js, see bent.h for details.

Copyright

Copyright Bastien Nocera <hadess@hadess.net> 2019

You can’t perform that action at this time.