0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

#323: Replace " " with "_" when saving translations.

This commit is contained in:
Matias Lavik 2021-04-15 20:58:32 +02:00
parent 520d223956
commit 4ca5119dd2

View File

@ -223,7 +223,7 @@ void XMLWriter::saveTranslation(QString propertyName, QObject* item, QDomElement
translationsNode.setAttribute("Type","Translation"); translationsNode.setAttribute("Type","Translation");
Translations* translations = translationsContainer->translations(); Translations* translations = translationsContainer->translations();
foreach(QLocale::Language language, translations->keys()){ foreach(QLocale::Language language, translations->keys()){
QDomElement languageNode = m_doc->createElement(QLocale::languageToString(language)); QDomElement languageNode = m_doc->createElement(QLocale::languageToString(language).replace(' ', '_'));
languageNode.setAttribute("Value",QString::number(language)); languageNode.setAttribute("Value",QString::number(language));
translationsNode.appendChild(languageNode); translationsNode.appendChild(languageNode);
ReportTranslation* curTranslation = translations->value(language); ReportTranslation* curTranslation = translations->value(language);