Replace hyphens with underscores and fix build.

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
Adam Treat 2024-07-12 17:18:01 -04:00
parent 8f261d06db
commit 4996824ab1

View File

@ -581,7 +581,9 @@ QString MySettings::filePathForLocale(const QLocale &locale)
{
// Check and see if we have a translation for the chosen locale and set it if possible otherwise
// we return the filepath for the 'en' translation
const QStringList uiLanguages = locale.uiLanguages(QLocale::TagSeparator::Underscore);
QStringList uiLanguages = locale.uiLanguages();
for (int i = 0; i < uiLanguages.size(); ++i)
uiLanguages[i].replace('-', '_');
// Scan this directory for files named like gpt4all_%1.qm that match and if so return them first
// this is the model download directory and it can be used by translation developers who are