BGforgeNet / msg2po

A set of helper tools to convert Fallout 1/2 MSG and WeiDU TRA into GNU gettext PO and back
https://forums.bgforge.net/viewforum.php?f=9
4 stars 4 forks source link

dir2msgstr removes female context from tra files and it doesn't add it to po files #7

Closed ALIENQuake closed 1 year ago

ALIENQuake commented 1 year ago

When new tra files for a certain language have a female translation that isn't already present inside the corresponding po file for the given language, dir2msgstr removes female context from tra files and doesn't add it to po files.

Can you add support for this?

burner1024 commented 1 year ago

Can you show a specific example? A reproducible case.

ALIENQuake commented 1 year ago

Using much simpler and cleaner repository:

  1. Added female variant: https://github.com/InfinityMods/WeiDU-Weblate-GitHub/commit/abe2cd2224b71a39e919e4e35ec5732dab999f80
  2. dir2msgstr doesn't detect it: https://github.com/InfinityMods/WeiDU-Weblate-GitHub/actions/runs/5059499463/jobs/9081122271
  3. Even if I run it manually using @dev: https://github.com/InfinityMods/WeiDU-Weblate-GitHub/actions/runs/5059522842
  4. Next, Hive is overwriting tra: https://github.com/InfinityMods/WeiDU-Weblate-GitHub/commit/23e7472fc1afad0fe9f8aea61037011caabdccf1
burner1024 commented 1 year ago

Hive does not overwrite anything. It works with PO files, and if it finds a conflict, it refuses to proceed until it's resolved.

This change should fix it, but you better test it on larger content, how adding, removing and changing multiple female lines works.

ALIENQuake commented 1 year ago

It seems that it works now, thank you!

  1. Added tra with new female strings: https://github.com/InfinityMods/Ascension/commit/5dc3dc3a54a4f013f18f2b146fc635f99197748f
  2. Action run: https://github.com/InfinityMods/Ascension/actions/runs/5060231290/jobs/9082824989
  3. New female strings are added into french.po: https://github.com/InfinityMods/Ascension/commit/582b432a3d4453d3cc5625a4fcf03b3e3778e336
  4. Weblate seems to have female context: image