about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-01-05 12:43:50 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-01-05 04:43:50 +0100
commit9a61b0ef22eed244be422bfb24155656c4669044 (patch)
tree8370740af89c3de4287b44c26a02d41fc8e22270
parentd872902997c29e228001b71a4a3ede589e346f5d (diff)
Fix RFC 5646 Regular Expression (#6190)
-rw-r--r--app/javascript/mastodon/locales/whitelist_sr-Latn.json2
-rw-r--r--config/webpack/translationRunner.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/locales/whitelist_sr-Latn.json b/app/javascript/mastodon/locales/whitelist_sr-Latn.json
new file mode 100644
index 000000000..0d4f101c7
--- /dev/null
+++ b/app/javascript/mastodon/locales/whitelist_sr-Latn.json
@@ -0,0 +1,2 @@
+[
+]
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');