diff --git a/nuxt.config.js b/nuxt.config.js index 5b3e9dd6..4ed682f9 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -105,14 +105,27 @@ export default { LOCALES: locales, FLAGS: buildDict(function *() { for (let flag of fs.readdirSync(__dirname + '/static/flags/')) { + let flagDisplay = flag + .replace(new RegExp('\.png$'), '') + .replace(new RegExp('_', 'g'), '') + .trim(); + if (flag.startsWith('.')) { continue; } + + if (flag.startsWith('-')) { + const tell = '-' + config.locale + '-'; + if (flag.startsWith(tell)) { + flagDisplay = flagDisplay.substring(tell.length); + } else { + continue; + } + } + yield [ flag.replace(new RegExp('\.png$'), ''), - flag.replace(new RegExp('\.png$'), '') - .replace(new RegExp('_', 'g'), '') - .trim() + flagDisplay, ]; } }), diff --git a/static/flags/-pl-Łoś.png b/static/flags/-pl-Łoś.png new file mode 100644 index 00000000..c62b303e Binary files /dev/null and b/static/flags/-pl-Łoś.png differ diff --git a/static/flags/Oriented Aroace.png b/static/flags/Oriented Aroace.png new file mode 100644 index 00000000..4743793e Binary files /dev/null and b/static/flags/Oriented Aroace.png differ