-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update several files #23
Conversation
Update the punctuation format of several files. Update the tp2 file to avoid installation errors and avoid garbled prompts.
But is this really enough to resolve the prompt thing you mention ? |
Just looking unhappy. It does not affect playing games. After converting setup-ee.tra to UTF-8, the mod installation is complete and there will be no garbled dialog.tlk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one looks fine. If you still want to update console prompts, please make a separated Pull Request and I will guide you how to update the prompt strings correctly without copying of the whole setup.tra file.
The prompt issue appear for others mods or only DarkHorizons ? Don't get me wrong, I want to understand why but if a workaround is needed it's ok. Thanks for your time. |
When using the latest version of weiduexe, if setup.tra is encoded with ANSI, the prompt will be garbled. But this mod needs to transcode setup.tra to UTF-8, but if I encode setup.tra using UTF-8, the transcoded setup.tra will be garbled. So I added setup-osx.tra, setup-unix.tra, and setup-win32.tra (all using UTF-8 encoding) to avoid garbled prompts. This method has been adopted in other mods, such as bg1ub. |
@0 = @890 = I think it's okay to separate the above content in setup osx.tra, setup unix.tra, and setup win32.tra. Of course, for Chinese, that's Chinese. |
Generally speaking, Windows 10 console is printing characters in UTF-8. So to have correct localized names of components, you need to have UTF-8 encoded setup.tra file. So the proposed workaround from @Lzw104522773 is to create a second setup file with only UTF-8 encoded lines related to installation. |
Yes,add setup-osx.tra, setup-unix.tra, and setup-win32.tra, It also does not affect the setup.tra of other languages. |
Yeah, I understand it's only for chinese. So the issue is only for BGT since EE always load Setup-ee.tra ?
And why three duplicated files are needed, only one can do the job, no ? And if I understand correctly this garbled issue arise for every mods that have vanilla and EE compatibility ? |
Unfortunately no, setup-ee.tra is loaded in later stage, after you click [Install] then weidu loads all components name from setup ee file.
Potentially osx or linux console could have different encoding from Windows and therefore there are dedicated files for each operating system.
I would say that for every mod that uses ANSI encoding and not UTF. This is not related to EE in fact. Also this workaround could be implemented for all other languages but we in Polish, for example, skip special characters to print only English letters. It is harder for Chinese alphabet. |
Add setup-osx.tra, setup-unix.tra, and setup-win32.tra, It is currently an effective method to solve the problem of garbled Chinese installation prompts. My friends: yoshimo0417 and MephistosataDevil, have already practiced on several mods. |
Oh, yes you right !
Hum, don't understand that part, since only UTF8 can deal with symbole in prompt windows, but I don't have good knowledge about this.
Ok, but this way is gonna be confusing for modders and translators, I think. |
For Linux, that depends on $LANG. UTF-8 is mostly commonplace by now, but some server-oriented distros might fall back to ANSI for legacy terminal support. |
Many mods do a separation from install prompts and translation of items, scripts needed from setup file nowadays. We can see sometime file named "instal.tra", this is basically the same idea what @Lzw104522773 is trying to implement. @Lzw104522773 if all three files are encoded in UTF-8 anyway, can you simple add a single new file like install.tra with all lines required for translation? |
Hello Graion !
Anyway we can do whatever we want for DarkHorizons but a method more common with other language could be nice. (I mean if this workaround is mandatory for most mod) |
That's why I suggested having only a single install.tra file, that is optional, and other languages could implement it as well in the future. |
Yes, if @Lzw104522773 is willing to try your way maybe we can try to adapt it for other languages too. And it will provide a template of the method (though looking into mods with install.tra is already an exemple) |
It's funny but no matter how many mods I work on, encodage has been a pain to deal with, for each of them. Every time I think I definitly understand how it works something new or odd arise ! |
If we don't consider the operating system, we just need to add an install.tra that includes installation prompts. |
In fact, this is a historical issue. Currently, when installing with the latest version of WeiDU, for the enhanced edition of the game, all tra files need to be encoded in UTF-8. Only for the original edition of the game, the game content part needs to be converted to ANSI encoding. Therefore, the simplest solution now is to convert all tra files to UTF-8 without any conversion, which will no longer cause encoding issues. As a result, but at the same time, we are not aware of the situation in other language communities, so we have adopted this method to avoid affecting other languages. In fact, for other languages, using UTF-8 encoding for everything should also be problem-free. Therefore, if everyone can agree to use only UTF-8 encoding, and even abandon support for the original edition, it would actually be the best. For mod authors, this would be a matter of reducing the burden on the code. The only cost that needs to be paid is simply giving up support for the original version. |
Yes, and I think we should not do this. There is large community that still use Original Baldur's Gate games and we don't want to cut them off from the latest updates of mods. Keeping multiple branches / repositories for EE and non-EE games are horrible for maintenance. So I am ok with a single optional install.tra file or event with the three setup-OS dependent files, unless it contains only the installation prompts. |
Perhaps using a setupEE.tra is indeed a very good option. or insstall.tra or whatever other name. Alternatively, we could set development standards where all tra files are encoded in UTF-8, and only use WeiDU to convert them to ANSI encoding when installing the original edition. This approach would maintain compatibility with both the enhanced and original editions while simplifying the development and maintenance process. |
A lot of new mods are created this way, or even some older one are updated to be exclusively in UTF-8. However, here we are talking about older mod, that would benefit a bit less to make it rearranged of the translation files. Of course, if someone is willing to do so, and would do it correctly for all languages, I will be glad to merge such change. However, there were such examples like here, where such conversion failed for some languages, and then it created critical issue for the people of that country. So I think that adding additional file that works for Chinese is fine, and it is fast for you as translators. But of course, it's up to you guys. |
Yeah, keeping vanilla compatibility is mandatory for me too.
This way is interesting but I didn't found the courage to look at it yet... And I may be wrong but both mentionned method (install.tra and native UTF8) will not help if players use an old or a legacy version of weidu, right ? (for EE or vanilla) So if we don't keep a version of prompt without symbol the mentionned players will always have garbled prompts ? |
So,can I submit the PR as I mentioned above? |
From my understanding, this is true. However if any mod uses a newer version of WeiDU.exe then all older ones are updated to the latest you have. So this is the case if someone tries to install an ancient mod alone with prehistorical weidu version. But hey - if you are implementing this patch here, the newer version of Dark Horizon will use the latest weidu installer so only UTF-8 prompts should be used no matter how old other mods are.
Yes please, we will look at it. |
It's probably unusual but until last year my computer was on windows XP so only legacy weidu was working to install mods. Anyway thanks for the discussion and explanation everybody ! |
For old computers and players of the original game, it may be necessary for them to perform some necessary manual operations, which would greatly simplify the difficulty of maintaining the mods. |
You're right, and probably not many players are in this situation. In the french communauty we still encourage translators to avoid accent and symbol in prompts, but for chinese it's more complicated. |
Yes, fortunately, the vast majority of Chinese players have now completely switched to the Enhanced Edition, so UTF-8 alone is perfectly normal. As a translator, as long as the mod code does not perform any special encoding conversions, there are no issues with the translation work. |
I think it is safe enough to assume that Linux and Mac consoles are UTF-8, whoever runs more exotic distros, or even BSD, can likely handle the charset issue.
Hell no. I'll sooner drop support for EEs. The main issue here, I think, is the lack of clarity from weidu side:
Ultimately, if weidu drops legacy version, then mods will have to follow suit. If it doesn't, then why even have the newer one, it seems to just complicate things. |
MephistoSatanDevil solved the problem of garbled prompts when installing several mods in a Chinese environment using setup -% WEIDU-OS%. Of course, it only worked very well on Windows and has not been tested on other operating systems.After all, in China, the majority of players use my Windows. |
@11jo @Roberciiik @GraionDilach I found that "Ding0's Quest Pack" is solved using setup -% WEIDUUOS%. tra. |
Yes, it is a working solution. Since all files are in the UTF-8, I think there is no need to have separated 3 files for the console prompts. |
OSX and UNIX have the same encodage, but win32 is in ANSI. Using %WEIDU_OS% requires us to add a file for each OS, even if they have the same encodage ? I was thinking but for chinese, if the So for chinese the only way to have regular prompt EDIT : At the end for my little understanding, the workaround with three setup-OS.tra is interesting but probably more for languages in ANSI. (By allowing to use prompt without accent or symbole for older system) Chinese and Russian for exemple will always be garbled on older weidu version whatever the file or encodage. And need to use another language for prompt. |
This is correct. Russian community has 3 different code pages for their consoles, and they agreed on using English names for components and to not translate any command prompts. Using setup-%WEIDU_OS%.tra or install.tra in UTF-8 is always partial solution.
Yes, this is also true. |
Ok, thanks Roberciik ! If one day some chinese players complain about prompt because they are on older system, we could use the setup-%WEIDU_OS%.tra workaround with prompt in english for setup-win32.tra. But according to Lzw104522773 and MephistoSatanDevil this is unlikely to be necessary. |
Compared to the issues with "installation problems on the old system", the questions we are being asked more frequently now are "how to install mods on the phone". So there's no need to worry too much. XD |
Update the punctuation format of several files.
Update the tp2 file to avoid installation errors and avoid garbled prompts.