Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"A duplicate msgid was detected" while that message id is in comments #287

Open
rduivenvoorde opened this issue Mar 20, 2020 · 3 comments
Open

Comments

@rduivenvoorde
Copy link

While uploading a .po file to transifex using tx push I receive errors like:

tx ERROR: Error received from server: Could not import file: A duplicate msgid was detected (**Default CRS for new projects**). Use a unique msgid or add a msgctxt to differentiate.
tx ERROR: Could not push translations. You can use --skip to ignore this error and continue the execution.

But investigating the .po file I found that that file does not really contain duplicate duplicates, but those duplicates are actually 'commented out' versions of older translations.

To check: search for Default CRS for new projects in this version:

https://github.com/qgis/QGIS-Documentation/blob/1f81c15c12d4430e9c63c15e0bb0762dfce53487/locale/ja/LC_MESSAGES/docs/user_manual/introduction/qgis_configuration.po

#: ../../source/docs/user_manual/introduction/qgis_configuration.rst:187
msgid "**Default CRS for new projects**"
msgstr ""

and further below in the file:

#~ msgid "**Default CRS for new projects**"
#~ msgstr ""

Some translation tools (qt-linguist??) do this (adding commented lines) to 'remember' some older or removed translations if I'm correct.

I can use --skip to make it push go on, but I think it would be better if we can see IF something went wrong and do without?

So in this case, I think tx should ignore msgid lines which are commented out?

Do you agree with that? Or do I miss something.

Thanks for all the work!

@pankav
Copy link

pankav commented Mar 23, 2020

Hello,

Thank you for reaching out to Transifex support.

First of all, I would like to thank you for sharing your feedback with us.
I would like to inform you that I will forward this case to the product team to see how we can address this. However, removing such entries from the file seems to be the only way to work around this.
Once I have an update I will let you know.

Kind regards,
Panagiotis

@rduivenvoorde
Copy link
Author

@pankav thanks for your answer, I indeed already removed those parts.
But I would think it would be better to handle this more intelligent during the parsing at your end?
So leave this open OK?

@pankav
Copy link

pankav commented Mar 31, 2020

OK, @rduivenvoorde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants