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

[Feature] Global "utf8" action parameter #11

Closed ALIENQuake closed 7 months ago

ALIENQuake commented 10 months ago

Can you add a global "utf8" action parameter? Probably the easiest way to do it is to alter the get_enc function so it will ignore all encodings (also DOS_ENCODINGS since Russian players want setup.tra in English) and just save everything as utf8.

burner1024 commented 10 months ago

Did you try it with all paths? Text goes 3 ways, it's not just unpoify.

Did you try the encoding parameter?

Russian players want setup.tra in English

Don't know where you got that idea, seems like unfounded generalization. Anyway, if setup.tra is in ascii, then open encoding doesn't matter in the first place.

ALIENQuake commented 10 months ago
  1. Using my hack: Hive>po>tra works, editing .po file directly also works: https://github.com/InfinityMods/Ascension/commit/264da235beaff70e83c35c3957d51dcb3d86d3db https://github.com/InfinityMods/Ascension/actions/runs/7717817604 editing tra files works: https://github.com/InfinityMods/Ascension/commit/1f8727fece593381c6eff0cec8a50150aac1f329 https://github.com/InfinityMods/Ascension/actions/runs/7717848964

  2. Adding encoding: utf8 to .bgforge.yml didn't work: https://github.com/InfinityMods/WeiDU-Weblate-GitHub/actions/runs/7717692181/job/21037326982#step:3:238

  3. The idea comes from the report from Russian translators: some of them use Win XP, some Win 7 while others Win 10. They don't want to have a mess with console encoding so they asked for English setup.tra.

ALIENQuake commented 10 months ago

I've noticed that the name of the utf encoding is: utf-8 not utf8 (-). I've changed it but it also didn't work.

burner1024 commented 10 months ago

Added in dev branch.

ALIENQuake commented 10 months ago

@burner1024 It is nice to see those two choices separated. I've sent a minor PR with the all_utf8_yes_really_all > all_utf8_also_console change.

burner1024 commented 7 months ago

Released.