i18n-pseudo - Pseudolocalization is an incredibly useful tool for localizing your apps.

i18n-pseudo

Pseudolocalization is an incredibly useful tool for localizing your apps. This module makes it easy to apply pseudo to any given string.

If the provided string is an ICU Message formatted string, it will parse and generate the ICU Message with proper pseudo.

Given string:             some_fun_string123
Pseudo Translated string: 世界ṧỗṃệ_ḟűņ_ṧẗříņĝ①②③à𝐉𝚠𝕎ĤẗȟĈŤ你好

Features

Conversion of alphanumeric characters: Alphanumeric characters are converted into a unicode counterpart.

Ignore brackets/tokens: Characters inside angle brackets and curly braces are ignored.

Given string:             The quick brown fox jumped over the lazy {animal}.
Pseudo Translated string: Ťȟệ ⓠűíċǩ ḃřỗ𝚠ņ ḟỗẍ ǰűṃṗệḋ ỗṿệř ẗȟệ ḻàẓẙ {animal}.ṃřà𝐉𝚠𝕎ĤẗȟĈŤĈṺàẌĤẌǩ你好

Ignore interpolation operator: The character following interpolation operator is ignored.

Given string:             Hello, my name is %s and I am %d years old.
Pseudo Translated string: 世界Ĥệḻḻỗ, ṃẙ ņàṃệ íṧ %s àņḋ Ĩ àṃ %d ẙệàřṧ ỗḻḋ.ṃřà𝐉𝚠𝕎ĤẗȟĈŤ你好

Expand Text Length: Append additional pseudo translated characters based current text length.

Challenge Characters: Prepends/appends unicode characters.

Installation

Go version 1.16 or higher is required (Downloads).

Build the dependency:

go get -u github.com/fetch-rewards/i18n-pseudo

Usage

>", ExpandChars: "++", PrependChars: "<<", PseudoChars: map[rune]rune{ 'a': 'ā', 'e': 'ē', 'i': 'ī', 'o': 'ō', 'u': 'ũ', }, TargetExpansion: 1.2, }) fmtStr = pseudoOptFmt.Format("my desired string") fmt.Println(fmtStr) }">
package main

import (
	"fmt"
	
	"github.com/fetch-rewards/i18n-pseudo/pseudo"
)

func main() {
	// Out of the box Pseudo Translator
	pseudoFmt := pseudo.New(pseudo.FormatOptions{})
	fmtStr := pseudoFmt.Format("my desired string")
	fmt.Println(fmtStr)

	
	// Using FormatOptions for Pseudo Translator
	pseudoOptFmt := pseudo.New(pseudo.FormatOptions{
		AppendChars: ">>",
		ExpandChars: "++",
		PrependChars: "<<",
		PseudoChars: map[rune]rune{
			'a': 'ā',
			'e': 'ē',
			'i': 'ī',
			'o': 'ō',
			'u': 'ũ',
		},
		TargetExpansion: 1.2,
	})

	fmtStr = pseudoOptFmt.Format("my desired string")
	fmt.Println(fmtStr)
}

FormatOptions

Property Default Description
AppendChars "世界" When provided, these characters will be appended to the output. This is helpful when you have certain characters that always seem to give your system trouble.
PreventExpansion false When true, will not expand the input. Expanding characters is useful to ensure your codebase accounts for move verbose languages.
ExpandChars Alphabetical characters, upper and lower case A string of characters that will be randomly selected to create an expansion of the input string.
PrependChars "你好" When provided, these characters will be prepended to the output. This is helpful when you have certain characters that always seem to give your system trouble.
PseudoChars Reference A hash map of the pseudo characters that will replace the ASCII characters. For default value, see the json value in the pseudo_chars.json file.
TargetExpansion 1.2 When provided, the length of the result will be appended with random characters based on the TargetExpansion.

TODO

  • Provide a CLI option to pseudo translate a string.

How To Contribute

You can create an issue or open a pull request.

Contributors

Avatar User
David Bacisin
Lam Doan
Aaron Presley

Inspired by i18n-pseudo-js.

Owner
Fetch Rewards
Turn your groceries into rewards
Fetch Rewards
Similar Resources

An incredibly fast proxy checker & IP rotator with ease.

An incredibly fast proxy checker & IP rotator with ease.

An incredibly fast proxy checker & IP rotator with ease.

Jan 7, 2023

Pty is a Go package for using unix pseudo-terminals.

PTY interface for Go

Jan 6, 2023

Fast, scalable pseudo random number generator based on xxh3

Fast, scalable pseudo random number generator based on xxh3

XXH3-Based Pseudorandom Number Generator This package contains an experimental implementation of a noise based pseudorandom number generator that scal

Nov 24, 2022

Random is a package written in Go that implements pseudo-random number generators for various distributions.

Random This package implements pseudo-random number generators for various distributions. For integers, there is a function for random selection from

Jul 11, 2022

A reward-based pseudo-currency system built exclusively for IIT Kanpur campus junta.

IITK Coin IITK Coin is a reward-based pseudo-currency system for the IIT Kanpur campus junta. Detailed vision and regulation rules of this currency ar

Nov 29, 2022

Package i18n provides internationalization and localization for your Go applications.

i18n Package i18n provides internationalization and localization for your Go applications. Installation The minimum requirement of Go is 1.16. go get

Nov 9, 2022

💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.

💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.

Beaver A Real Time Messaging Server. Beaver is a real-time messaging server. With beaver you can easily build scalable in-app notifications, realtime

Jan 1, 2023

i18n (Internationalization and localization) engine written in Go, used for translating locale strings.

go-localize Simple and easy to use i18n (Internationalization and localization) engine written in Go, used for translating locale strings. Use with go

Nov 29, 2022

String i18n utilities for the Go Programming Language

About polyglot polyglot is a String translation package and tool for Go. Setup Make sure you have a working Go installation. See Getting Started Now r

Dec 22, 2022

simple i18n support that relies on standard go libraries

The i18n package mainly includes a set of methods for managing the data. Start by creating a en.json file.

Jun 29, 2021

go-i18n is a Go package and a command that helps you translate Go programs into multiple languages.

go-i18n is a Go package and a command that helps you translate Go programs into multiple languages.

Jan 2, 2023

Package i18n is a middleware that provides internationalization and localization for Flamego

Package i18n is a middleware that provides internationalization and localization for Flamego

i18n Package i18n is a middleware that provides internationalization and localization for Flamego. Installation The minimum requirement of Go is 1.16.

Dec 14, 2022

app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files

app-services-go-linter app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files. A

Nov 29, 2021

i18n of golang

i18n i18n of golang 使用方法 下载i18n go get https://github.com/itmisx/i18n 定义 code 语言包 var langPack1 = map[string]map[interface{}]interface{}{ "zh-cn": {

Dec 11, 2021

An easy way to add useful startup banners into your Go applications

An easy way to add useful startup banners into your Go applications

Try browsing the code on Sourcegraph! Banner Add beautiful banners into your Go applications Table of Contents Motivation Usage API Command line flags

Jan 1, 2023

Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.

Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats.

Fortio Fortio (Φορτίο) started as, and is, Istio's load testing tool and now graduated to be its own project. Fortio is also used by, among others, Me

Jan 2, 2023

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • License • Join Discord Subfinder is a subdomain discovery tool that

Jan 4, 2023

miscellaneous useful commands, including 'gosh' the Go scripting tool

utilities Miscellaneous useful commands. gosh This is a tool for running Go code from the command line. See here. findCmpRm This finds files with copi

Oct 31, 2022

Cli tool to save useful links to read it later

Cli tool to save useful links to read it later

lnk - Cli tool to save useful links still in development Usage lnk new|list [url] - new: creates a new link url: required params, which i

Jun 23, 2022
Package i18n provides internationalization and localization for your Go applications.

i18n Package i18n provides internationalization and localization for your Go applications. Installation The minimum requirement of Go is 1.16. go get

Nov 9, 2022
i18n (Internationalization and localization) engine written in Go, used for translating locale strings.

go-localize Simple and easy to use i18n (Internationalization and localization) engine written in Go, used for translating locale strings. Use with go

Nov 29, 2022
i18n of golang

i18n i18n of golang 使用方法 下载i18n go get https://github.com/itmisx/i18n 定义 code 语言包 var langPack1 = map[string]map[interface{}]interface{}{ "zh-cn": {

Dec 11, 2021
Utilities for working with discrete probability distributions and other tools useful for doing NLP work

GNLP A few structures for doing NLP analysis / experiments. Basics counter.Counter A map-like data structure for representing discrete probability dis

Nov 28, 2022
Translate your Go program into multiple languages.

go-i18n go-i18n is a Go package and a command that helps you translate Go programs into multiple languages. Supports pluralized strings for all 200+ l

Jan 1, 2023
[UNMANTEINED] Extract values from strings and fill your structs with nlp.

nlp nlp is a general purpose any-lang Natural Language Processor that parses the data inside a text and returns a filled model Supported types int in

Nov 24, 2022
📖 Tutorial: An easy way to translate your Golang application
📖 Tutorial: An easy way to translate your Golang application

?? Tutorial: An easy way to translate your Golang application ?? The full article is published on April 13, 2021, on Dev.to: https://dev.to/koddr/an-e

Feb 9, 2022
Translate your Go program into multiple languages with similar fmt.Sprintf format syntax.

Loafer-i18n Loafer-i18n is a Go package and a command that helps you translate Go programs into multiple languages. Supports pluralized strings with =

Dec 22, 2021
A tool to find all duplicates in large sets of text documents.

⊧ dupi Dupi is an engine for identifying and exploring duplicative text in sets of documents. Status Dupi is in alpha/early beta development stage. Pl

Dec 23, 2022
Go-i18n - i18n for Golang

I18n for Go Installation go get -u github.com/fitv/go-i18n Usage YAML files ├──

Oct 18, 2022