From 72322bbb2d4c69f23ddbaf8f2c56de9b3569b9dc Mon Sep 17 00:00:00 2001 From: pyoor Date: Fri, 23 Jun 2017 11:35:05 -0400 Subject: [PATCH] Expand make.text.language --- lib/make/text.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/make/text.js b/lib/make/text.js index 2882f30..9ebf77f 100644 --- a/lib/make/text.js +++ b/lib/make/text.js @@ -25,9 +25,19 @@ make.text = { ]) }, language: function () { - // https://gist.github.com/tonyhb/635401 return random.pick([ - 'en-US', 'en', 'de' + // special casing for i, I, dotted/dotless variants + ['tr', 'az'], + // special casing rules: https://developer.mozilla.org/en/CSS/text-transform + ['nl', 'gr'], + // special justification rules + ['ja', 'zh'], + // tend to be RTL + ['ar', 'he'], + // http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxAtomList.h + ['en', 'x-unicode', 'x-western', 'ja', 'ko', 'zh-cn', 'zh-hk', 'zh-tw', 'x-cyrillic', 'el', 'tr', 'he', 'ar', 'x-baltic', 'th', 'x-devanagari', 'x-tamil', 'x-armn', 'x-beng', 'x-cans', 'x-ethi', 'x-geor', 'x-gujr', 'x-guru', 'x-khmr', 'x-knda', 'x-mlym', 'x-orya', 'x-sinh', 'x-telu', 'x-tibt', 'ko-xxx', 'x-central-euro', 'x-symbol', 'x-user-def', 'az', 'ba', 'crh', 'tt'], + // Seen in mxr + ['en-US', 'fr', 'fra', 'de', 'ru', 'en-us', 'is-IS', 'xyzzy'] ]) }, layoutCharCodes: function () {