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

only every other nugget in messages.po is being translated #413

Closed
mrsuau627 opened this issue Dec 9, 2020 · 4 comments
Closed

only every other nugget in messages.po is being translated #413

mrsuau627 opened this issue Dec 9, 2020 · 4 comments

Comments

@mrsuau627
Copy link

I recently upgraded to the new version 2.1.16 which was released via NuGet and I think I found a bug with it. After updating, I'm seeing 2 strange, related issues:

  1. When I added a new nugget to my code and ran the project, i18n.Postbuild.exe erased every other existing translation from my existing messages.po. What I mean is that it kept the msgid, but set the msgstr to "" for every other msgid in the file.
  2. When I reverted my messages.po back to put back all of my existing translations, I ran my code and then it would only translate every entry from the messages.po. For example, I had a nugget for "Loading..." and it would not translate this no matter what. However, it would translate the next nugget no problem.

I confirmed that reverting back to 2.1.15, fixes the issue.

One thing that I suspect could be causing the issue is that we have i18n.DisableReferences set to "true". I haven't had a chance to test if we get the same results by setting it to false, but let me know if you need me to test that and I can.

@turquoiseowl
Copy link
Owner

If you would test that setting and report back, that would be helpful, thanks.

@mrsuau627
Copy link
Author

Ok I ran more tests. It does NOT have to anything to do with DisableReferences. This time I did the following:

  1. Started on 2.1.15 and confirmed everything was working
  2. Set DisableReferences to false. Ran again and confirmed everything was still working.
  3. Upgraded the project to 2.1.16 and ran it. I can immediately see that 1/2 of my translations were not working anymore.
  4. Added a new nugget so that postbuild.exe would modify the pot and po files. This updated my messages.po to remove 1/2 of my translations. Coincidentally, it was the other half so now none of my translations that I can see are working.

I've attached a screenshot from POEdit after postbuild ran so you can see how every other translation is blanked out:
Capture

@turquoiseowl
Copy link
Owner

Thank you for reporting that.

I've published a new version 2.1.17 to nuget which hopefully fixes the problem.

I'd appreciate knowing how you get on. Thanks.

@mrsuau627
Copy link
Author

I applied 2.1.17 and confirmed that it fixes the issues.
Thanks for the quick response!

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