String encoded as HTML when taken for translation

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

String encoded as HTML when taken for translation

Ari Jolma-2
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/

Hi,

In source code (python/plugins/processing/modeler/ModelerDialog.py)
there is a string which begins "Model doesn't". The same string appears
as "Model doesn't" as source in *.ts files. And thus it does not
translate.

Since the source is python code there is a tool (?) which copies the
string into temporary a c++ coded file
(python/plugins/processing/python-i18n.cpp) - or that is what I assume
since there is no such file in the repository.

I'm wondering who (python -> c++, c++ -> ts, ?) is the culprit and is
this expected? If it is, should the source code be changed or how this
could be fixed?

Best,

Ari


_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr
Reply | Threaded
Open this post in threaded view
|

Re: String encoded as HTML when taken for translation

Eva Willerslev
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/


Hi Ari

I think you sent this to the wrong person -?

Best regards :)
Eva

2018-03-09 11:04 GMT+01:00 Ari Jolma <[hidden email]>:
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/

Hi,

In source code (python/plugins/processing/modeler/ModelerDialog.py) there is a string which begins "Model doesn't". The same string appears as "Model doesn&apos;t" as source in *.ts files. And thus it does not translate.

Since the source is python code there is a tool (?) which copies the string into temporary a c++ coded file (python/plugins/processing/python-i18n.cpp) - or that is what I assume since there is no such file in the repository.

I'm wondering who (python -> c++, c++ -> ts, ?) is the culprit and is this expected? If it is, should the source code be changed or how this could be fixed?

Best,

Ari


_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr


_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr
Reply | Threaded
Open this post in threaded view
|

Re: String encoded as HTML when taken for translation

Ari Jolma-2
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/


On 09.03.2018 15:28, Eva Willerslev wrote:
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/



Hi Ari

I think you sent this to the wrong person -?

Yes, maybe this should go to the developers list.

Ari


Best regards :)
Eva

2018-03-09 11:04 GMT+01:00 Ari Jolma <[hidden email]>:
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/

Hi,

In source code (python/plugins/processing/modeler/ModelerDialog.py) there is a string which begins "Model doesn't". The same string appears as "Model doesn&apos;t" as source in *.ts files. And thus it does not translate.

Since the source is python code there is a tool (?) which copies the string into temporary a c++ coded file (python/plugins/processing/python-i18n.cpp) - or that is what I assume since there is no such file in the repository.

I'm wondering who (python -> c++, c++ -> ts, ?) is the culprit and is this expected? If it is, should the source code be changed or how this could be fixed?

Best,

Ari


_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr



_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr


_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr
Reply | Threaded
Open this post in threaded view
|

Re: String encoded as HTML when taken for translation

Jürgen E. Fischer
In reply to this post by Ari Jolma-2
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/


Hi Ari,

On Fri, 09. Mar 2018 at 12:04:04 +0200, Ari Jolma wrote:
> In source code (python/plugins/processing/modeler/ModelerDialog.py) there is
> a string which begins "Model doesn't". The same string appears as "Model
> doesn&apos;t" as source in *.ts files. And thus it does not translate.

Not really.  The string in the ts files was obsolete and the string in
ModelerDialog.py was untranslatable (moved from a message box to the message
bar and self.tr was dropped on the way - in QGIS 2.18 it's in the ts with
&apos; too and translated ok).


Jürgen


--
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de
QGIS release manager (PSC)  Germany                    IRC: jef on FreeNode

_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr

signature.asc (844 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: String encoded as HTML when taken for translation

Ari Jolma-2
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/


On 09.03.2018 22:51, Jürgen E. Fischer wrote:
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/



Hi Ari,

On Fri, 09. Mar 2018 at 12:04:04 +0200, Ari Jolma wrote:
In source code (python/plugins/processing/modeler/ModelerDialog.py) there is
a string which begins "Model doesn't". The same string appears as "Model
doesn&apos;t" as source in *.ts files. And thus it does not translate.
Not really.  The string in the ts files was obsolete and the string in
ModelerDialog.py was untranslatable (moved from a message box to the message
bar and self.tr was dropped on the way - in QGIS 2.18 it's in the ts with
&apos; too and translated ok).

Thanks. Does the dropping of a call to tr mean it is also dropped from ts?

And are you saying that a string with apostrophe character in source does translates if the apostrophe is replaced with HTML entity &apos; in ts?

Character encodings do seem to cause headaches in translations (re the email to this list earlier today) (they do cause headaches in other circumstances). There also does not seem to be much documentation for the Qt translation tools (pylupdate5, lrelease).

Best,

Ari



Jürgen




_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr


_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr
Reply | Threaded
Open this post in threaded view
|

Re: String encoded as HTML when taken for translation

Jürgen E. Fischer
Transifex Webtranslation page for QGIS is on https://www.transifex.com/qgis/


Hi Ari,

On Sat, 10. Mar 2018 at 09:29:17 +0200, Ari Jolma wrote:
> > Not really.  The string in the ts files was obsolete and the string in
> > ModelerDialog.py was untranslatable (moved from a message box to the message
> > bar and self.tr was dropped on the way - in QGIS 2.18 it's in the ts with
> > &apos; too and translated ok).
 
> Thanks. Does the dropping of a call to tr mean it is also dropped from ts?

Yes.

> And are you saying that a string with apostrophe character in source does
> translates if the apostrophe is replaced with HTML entity &apos; in ts?

Apparently that's just XML.


Jürgen

--
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de

_______________________________________________
QGIS-Translators mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-tr

signature.asc (844 bytes) Download Attachment