[App] Fix of untranslated first document's name (#7156)

* Change no need function newDocument("Unnamed") call to variant without parameter. "Unnamed" set in App newDocument function instead.
* Refactor New Document command to run without parameter.
* Translate new document's userName. Internal name = "Unnamed".
* Crowdin Add to updatets.py App.ts. Create new file App.ts
* Fix error where document name is set with one function parameter. In this situation set internal and user name to string variable. For default function call (without parameter) set internal name to Unnamed, userName = translate ("Unnamed")
This commit is contained in:
Kuzemko Alexsandr
2022-10-21 05:35:09 +03:00
committed by GitHub
parent 086de5430f
commit 2eb55d48c7
11 changed files with 43 additions and 11 deletions

View File

@@ -112,7 +112,7 @@ private:
mesh->read(EncodedName.c_str());
Base::FileInfo file(EncodedName.c_str());
// create new document and add Import feature
App::Document *pcDoc = App::GetApplication().newDocument("Unnamed");
App::Document *pcDoc = App::GetApplication().newDocument();
FemMeshObject *pcFeature = static_cast<FemMeshObject *>
(pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str()));
pcFeature->Label.setValue(file.fileNamePure().c_str());