From 47c32e68cdec2414421b9f6f9fa4e876bb0a62b8 Mon Sep 17 00:00:00 2001 From: Kuzemko Aleksandr Date: Sun, 1 May 2022 14:35:18 +0300 Subject: [PATCH] [App] First part of fixing "Harcoded name for first new document and imported doc(without translation" https://github.com/FreeCAD/FreeCAD-translations/issues/124 --- src/App/Application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index fb1a57735692..c64918222c9d 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -435,9 +435,11 @@ void Application::renameDocument(const char *OldName, const char *NewName) Document* Application::newDocument(const char * Name, const char * UserName, bool createView, bool tempDoc) { + QString L10nName = QObject::tr("Unnamed"); // get a valid name anyway! if (!Name || Name[0] == '\0') - Name = "Unnamed"; + Name = qUtf8Printable(L10nName); +// Name = (L10nName.toStdString()).c_str(); string name = getUniqueDocumentName(Name, tempDoc); // return the temporary document if it exists