turquoiseowl / i18n

Smart internationalization for ASP.NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

only every other nugget in messages.po is being translated

mrsuau627 opened this issue · comments

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.

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

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

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.

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