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 0000000000000000000000000000000000000000..0d4f101c7a37a4c875e6999bee1a287fdb733380
--- /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 d616c78391e3980bb93aa4dc98af4da8793b99b7..e6543fbb7f7b9a2e55566ee9d1210bb32eceb467 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');