Bug report #20561
.qgs translation: ts-file empty
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Project Loading/Saving | ||
Affected QGIS version: | 3.5(master) | Regression?: | Yes |
Operating System: | Linux and Windows | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28381 |
Description
If there is a TS-File created, the only content is:
<!DOCTYPE TS>
<TS sourcelanguage="en_US"/>
It's because the translatable object cannot be collected. This connection is never set up.
if ( QgsApplication::instance() )
connect( QgsApplication::instance(), &QgsApplication::requestForTranslatableObjects, this, &QgsProject::registerTranslatableObjects );
Seems, like it cannot get an instance of the QgsApplication. Possible QgsProject is created before the QgsApplication, what it hasn't before?
Associated revisions
do not write logs before QgsApplication instace
because otherwise it creates a QgsProject without a QgsApplication
and translation won't work anymore because it cannot connect the signal to the slot
this fixes #20561
do not write logs before QgsApplication instace
because otherwise it creates a QgsProject without a QgsApplication
and translation won't work anymore because it cannot connect the signal to the slot
this fixes #20561
(partly copied from 8e7d37e37a035d7300663205ba9587f542f30732)
History
#1 Updated by David Signer almost 6 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|f3943f5877174778a0242640dc20478655bfe79a.