From 9a61b0ef22eed244be422bfb24155656c4669044 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 5 Jan 2018 12:43:50 +0900 Subject: Fix RFC 5646 Regular Expression (#6190) --- config/webpack/translationRunner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/webpack/translationRunner.js b/config/webpack/translationRunner.js index d616c7839..e6543fbb7 100644 --- a/config/webpack/translationRunner.js +++ b/config/webpack/translationRunner.js @@ -2,7 +2,7 @@ const fs = require('fs'); const path = require('path'); const { default: manageTranslations } = require('react-intl-translations-manager'); -const RFC5646_REGEXP = /^[a-z]{2,3}(?:|-[A-Z]+)$/; +const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/; const rootDirectory = path.resolve(__dirname, '..', '..'); const translationsDirectory = path.resolve(rootDirectory, 'app', 'javascript', 'mastodon', 'locales'); -- cgit