View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0020339||phpList 3 application||Internationalization (l18n)||public||16-03-21 17:06||26-04-21 20:36|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Summary||0020339: Problems with English translations|
|Description||In English, some phrases seem to have been given the wrong translation. Reported in the user forum https://discuss.phplist.org/t/lost-matomo-tracking-code-and-message-preview-now-say-rate-and-is-not-working/7219|
On the Settings page "Always add analytics tracking code to campaigns" is translated as "Always add Google tracking code to campaigns".
On the Finish tab "Add analytics tracking code" is translated as "Add Google Analytics tracking code".
I expected the translation of English phrases to be the same as the original.
|Tags||No tags attached.|
||I have just deleted all the English rows from the i19n table, then forced an update of the translations. The two phrases referred to above now do not appear in the table.|
||Hmm, yes, some strings are different in the English translation. The code may say one thing and the translation another. I think with the change to Weblate some of that may have got lost.|
Looking at the file which is downloaded when you update a language translation https://translate.phplist.org/download/phplist/phplist3/en/?format=po , this is one of the problematic ones
msgctxt "Add analytics tracking code"
msgid "Add Google Analytics tracking code"
msgstr "Add Google Analytics tracking code"
Does "fuzzy" mean that it is an automated translation in some way? Maybe disable that if it is.
Also, the use of msgctxt throughout the file doesn't look correct. It appears to be the source string in the php code, not some additional information for the translator. The php code to load the translations uses msgid and msgstr, assuming that msgid is the source string. So "Add analytics tracking code" does not appear in the i18n database table.
||Interesting. I hadn't come across msgctext before. I don't think we use it in the code. I'll try to track down where it comes from. Looks like it's something Weblate adds, but I think Weblate uses gettext, so it may be something new in gettext.|
I think that the problems with the "Add analytics tracking code" phrase is that Weblate treated it as a change to the source item, which is correct. I had replaced a message specific to Google with a more-general one.
I have been into weblate and changed those three items.
Regarding the download file, I found that using a lsightly different URL gives a file without the msgctxt field https://translate.phplist.org/download/phplist/phplist3/en
That imports into phplist successfully and updated the three changed items. I think that page titles were not being updated due to msgctxt being the source item, but with the different URL they are updated.
How is the translations.xml file, which contains the update URL for each language, created?
The translations.xml file is actually a php file that generates the XML on the fly.
But these two URLs are basically the same, afaict
Interesting, phpList ignores the msgctxt, so maybe we need to update the code a little to look at that when it's there.
I guess Weblate uses that for some purpose.