elishacloud / Silent-Hill-2-Enhancements

A project designed to enhance Silent Hill 2 (SH2) graphics and audio for the PC. It also includes scripts to build or modify SH2 audio files (SFX, BGM and Dialog).
http://www.enhanced.townofsilenthill.com/SH2/
zlib License
566 stars 41 forks source link

Translation Pack Discussion - Ukrainian #710

Open Virake opened 1 year ago

Virake commented 1 year ago

Hi, I would like to offer my help in translating Silent Hill 2 into Ukrainian. Fan translations for the original PC version already exist – would it be okay to use them, provided I get their authors' permission? I'm willing to start from scratch, but it would be nice to save some time.

I will of course need the original English text, preferably in a spreadsheet format, but plain text will do. If there are game textures with text in them, it would be great if I could get them in an editable format. For the translation to work, the game must support Cyrillic characters, including those specific to the Ukrainian language (Іі, Її, Єє, Ґґ).

Polymega commented 1 year ago

Hi Virake,

Thanks for reaching out! We'd love to include a Ukrainian translation pack to the project.

would it be okay to use them, provided I get their authors' permission? I'm willing to start from scratch, but it would be nice to save some time.

Of course, so long as the original author is okay with this.

I will of course need the original English text, preferably in a spreadsheet format, but plain text will do.

To translate the game, you will actually need to edit the .mes (message) files. There exists a tool which converts these files to plain text format for editing purposes. Once edited, the same tool will convert them back to the format that the game understands.

If there are game textures with text in them, it would be great if I could get them in an editable format.

For the translation packs that we will offer on our project site, the only game texture that needs to be translated is the main menu choices. I can do this for you. I would need the following translated:

LOAD
CONTINUE
NEW GAME
OPTIONS
MOVIES
EXIT
ACTION LEVEL
RIDDLE LEVEL
HARD
NORMAL
EASY
BEGINNER
Main Scenario: LETTER FROM SILENT HEAVEN
Sub Scenario: BORN FROM A WISH

For the translation to work, the game must support Cyrillic characters, including those specific to the Ukrainian language (Іі, Її, Єє, Ґґ).

Understood. So what we will need to do is make a custom font sheet for the Ukranian translation pack. I took a look at the Ukrainian alphabet and it looks like most of the characters will need to be added in by replacing existing characters.

This means we will need to replace certain characters with the Ukrainian characters. I can do this for you once you decide on which characters to replace. But take a look at the font sheet to get an idea of what characters are available for possible replacement. (This is a transparent PNG with white characters. You may need to save the image and view it outside of your web browser.)

So, as an example, you could replace H h with Д д in the font sheet. If you did this, that would mean you need to use H h in the game's .mes files, and when the game pulls H h from the font sheet, it will display Д д instead.


Okay, so before all of this, let's ask the main questions: How do you start? What do you need to do? What tools do you need? What specific adjustments are required to be compliant with our project?

All of that is answered in this document. Please read it over. It is long, I know, but it is also very thorough and should answer almost all of your questions.

Virake commented 1 year ago

good news: I got the permission to use the existing translation. the author was kind enough to send me the source files, including the decoded .mes files, PSDs with textures, and fonts.

is it absolutely necessary to leave out the textures? it seems to me that the translation wouldn't be complete without them, as maps contain a lot of important information.

I'd also like to know if it's possible to just use the existing localized fonts instead of resorting to character replacement: SH2_Fonts_Ukrainian.zip

Polymega commented 1 year ago

good news: I got the permission to use the existing translation. the author was kind enough to send me the source files, including the decoded .mes files, PSDs with textures, and fonts.

That's great!!

is it absolutely necessary to leave out the textures? it seems to me that the translation wouldn't be complete without them, as maps contain a lot of important information.

Umm... Let me think on it, please. The Image Enhancement Pack is a living, breathing package that I continually work on whenever I have the spare time. This is the main reason why I prefer to keep the translation packs text-only (minus the main menu). The other concern is the more files added, the bigger the package size becomes, which puts further strain on the server. (The more popular the project becomes, the more of an issue this is.) I totally understand the importance of your question here, though!

I'd also like to know if it's possible to just use the existing localized fonts instead of resorting to character replacement: SH2_Fonts_Ukrainian.zip

It would be best for me to remake this. I will clean it up and give it back to you in PNG format. In the past, our project would only use TGA format for the font sheet. We have since revised the code to also accept PNG format. This makes the font sheet's file size noticeably smaller and may also help display the HD characters for people on older/weaker PCs.

I will get back to you soon with the Turkish Ukrainian font sheet remade and in PNG format.

Polymega commented 1 year ago

Here is the Ukrainian font sheet with just 10 rows and saved out in PNG format (right click > save as font000.png).

SH2 PC - HD Fonts 10 rows - UKRAINIAN https://user-images.githubusercontent.com/27395260/221427836-532a5bc4-3c9b-42ee-8a54-a9f17c55ff4b.png

You will need to keep the fontwdata.bin file with this new font sheet. I don't have any of the Ukrainian translated files on hand to test the new font sheet.

Also, I will need the following translated, please:

LOAD
CONTINUE
NEW GAME
OPTIONS
MOVIES
EXIT
ACTION LEVEL
RIDDLE LEVEL
HARD
NORMAL
EASY
BEGINNER
Main Scenario: LETTER FROM SILENT HEAVEN
Sub Scenario: BORN FROM A WISH
Virake commented 1 year ago
ЗАВАНТАЖИТИ
ПРОДОВЖИТИ
НОВА ГРА
НАЛАШТУВАННЯ
ВІДЕО
ВИЙТИ
РІВЕНЬ БОЮ
РІВЕНЬ ГОЛОВОЛОМОК
ВАЖКО
НОРМАЛЬНО
ЛЕГКО
ПОЧАТКІВЕЦЬ
Основна історія: ЛИСТ ІЗ САЙЛЕНТ-ГІЛЛУ
Доповнення: НАРОДЖЕНА З БАЖАННЯ

do I still need to replace something in the sheet? most of the letters are there, but Іі and Ґґ are missing.

here are the translated message files: SH2_MSG_Ukrainian.zip

Polymega commented 1 year ago

do I still need to replace something in the sheet? most of the letters are there, but Іі and Ґґ are missing.

Ah, those characters were placed elsewhere on their own in the font sheet and I missed them. They're included now in the font sheet below:

SH2 PC - HD Fonts 10 rows - UKRAINIAN https://user-images.githubusercontent.com/27395260/221432776-b7b9f6dc-933c-4cc9-83d5-af64b0a36e20.png

here are the translated message files:

Thanks. Do you have these in .mes format for me to test in the game? I just want to make sure the characters are all still lined up/spaced correctly using the new font sheet.

Here is the translated main menu:

Screenshot 2023-02-26 14-39-57

Change the x in the filename to whatever language you are replacing. For example, if you are replacing the German language you would rename the file to start01g.tex. (Remember: It is recommended to replace a Latin language besides English, as the game does not utilize subtitles for a few areas while using English.)

start01x.zip

Virake commented 1 year ago

yep, got them in .mes format too: SH2_MES_Ukrainian.zip this translation was created with the English localization as a base. does this mean some subtitles are just not displayed, or are they missing from the files?

Polymega commented 1 year ago

Thanks again. I've made some pixel-perfect adjustments to several of the Ukranian characters to try and line everything up nicely. Here is the newest one:

SH2 PC - HD Fonts 10 rows - UKRAINIAN https://user-images.githubusercontent.com/27395260/221436872-3497fc33-9561-4284-986c-2434c546723b.png

this translation was created with the English localization as a base. does this mean some subtitles are just not displayed, or are they missing from the files?

It just means the subtitles are not displayed. Specifically, there will be no subtitles during the UFO ending (when it shows the caption cards). To change the language being replaced, simply rename all of the *_e.mes files to either *_f.mes, *_g.mes, *_i.mes, or *_s.mes.

If you change which language the Ukrainian pack replaces, make sure you update the language string in options_msg_*.mes accordingly. For example, if you are now replacing the German language (options_msg_g.mes), you'd change "украї́нська мо́ва" back to "English" and instead change "Deutsch" to "украї́нська мо́ва", if that makes sense.

Polymega commented 1 year ago

I've went back and further touched up the font sheet. There were some other characters that were vertically off by a pixel. This should be the final fontsheet now: SH2 PC - HD Fonts 10 rows - UKRAINIAN

Virake commented 1 year ago

as instructed, I replaced a non-English localization (French). unfortunately, I can't convert the edited option_msg_f.txt to mes. it shows the following error: 2023-03-02 22 01 46 I presume this is because I didn't set up the character table, but I don't know which characters were replaced.

here's the file: option_msg_f.txt

the original Ukrainian mes file works, though. 2023-03-02 20 40 07

also, some main menu items should be changed:

Main Scenario: LETTER FROM SILENT HEAVEN
Основний сюжет: ЛИСТ ІЗ ТИХОГО РАЮ
Sub Scenario: BORN FROM A WISH
Доповнення: НАРОДЖЕНА БАЖАННЯМ
BEGINNER
НОВАЧОК
Polymega commented 1 year ago

as instructed, I replaced a non-English localization (French). unfortunately, I can't convert the edited option_msg_f.txt to mes. it shows the following error:

@IlDucci would you be able to offer Virake some advice on this issue?

also, some main menu items should be changed:

Here you are: start01x.zip

IlDucci commented 1 year ago

He needs to make a Cyrillic/Ukrainian character table file and add it to the command, as shown in the "Load an external character table" part of the SH2MSGConvert tool.

I suppose the Ukrainian translator did not work with SH2MSGConvert, so, @Virake , please read the instructions on how to use this tool for non-English/French/German/Italian/Spanish/Japanese languages (did we cover that part on the Word, @Polymega ?)

Take the existing table from here: https://github.com/loadwordteam/SH2MSGConvert/blob/main/sh2msg/table/data/table.txt , replace the needed characters, try again with the tool and the --table command.

Virake commented 1 year ago

never mind. turns out the original translator ran the text through a character replacement tool, then converted that to mes.

please apply one last revision to the menu items:

OPTIONS
ПАРАМЕТРИ

I checked the ending subtitles for the UFO ending, they work correctly. however, the pause menu is in French for some reason, even though r_menu_f.res is translated. here it is: r_menu_f.zip characters swapped as required, file encoded as ANSI w/o BOM, placed in sh2e\resources\, so I don't know what's wrong.

Polymega commented 1 year ago

please apply one last revision to the menu items:

Here you go: start01f.zip

however, the pause menu is in French for some reason, even though r_menu_f.res is translated. here it is: characters swapped as required, file encoded as ANSI w/o BOM, placed in sh2e\resources\, so I don't know what's wrong.

This was a typo/outdated information in the translation document. Sorry about that. Instead of it being sh2e\resources\ it should be sh2e\etc\resource\ (note that it's resource now instead of resources). I will update this in the document.

I have yet to also update this in the document, but for your translation work, move all of your language files from the sh2e folder to a new lang folder. See here for an explanation. Here is a sample language pack set up this way: https://enhanced.townofsilenthill.com/files/SH2EE/langpacks/SH2EE_LangPack_Brazilian_Portuguese.zip

Virake commented 1 year ago

alright, here's everything put together: SH2EE_LangPack_Ukrainian.zip I still strongly recommend including translated maps, but the decision is yours.

since I decided to test the translation on a clean install, I removed the game, then reinstalled it, then ran SH2EEsetup.exe, but now I'm getting this error: 2023-03-06 11 57 17

Polymega commented 1 year ago

Thanks, I will take a look after work today.

since I decided to test the translation on a clean install, I removed the game, then reinstalled it, then ran SH2EEsetup.exe, but now I'm getting this error:

We ran into an update issue with the tool on our latest update. Can you download the Setup Tool again from our project site, place the SH2EEsetup.exe file in the game's directory, and run the new one from there?

https://enhanced.townofsilenthill.com/SH2/install.htm#usingEE

Polymega commented 1 year ago

Thanks, Virake. I have a few notes for you:


Screenshot 2023-03-06 16-58-19

The save files will need to have their color codes changed. Please reference this file to see which text strings need to have their colors changed. There are various RED, BLUE, YELLOW, and WHITE color changes in this file.


Screenshot 2023-03-06 16-59-49

Some save names are too long and cut into the date/time. Can these strings be shortened? Press left/right while on this screen to cycle between save display information to see the date/time. There may be other text strings that are too long; the image above is just an example.


https://user-images.githubusercontent.com/27395260/223245339-68c93d58-ae0d-4d6e-b509-cc610dcfce9a.mp4

Pay attention to the text string at the very top and notice how it glitches out. Typically, this can be prevented by using 11 characters or less. It looks like you're using 10 characters, so I'm not sure what's going on here. Maybe some of the characters used count as 2-byte characters? Not sure... But I'd recommend shortening this word if you can. Maybe just use "Files" or "Folder"?


Screenshot 2023-03-06 17-05-14

This part of the text string should be blue. This is an error with the original game. Any text that is read from a source (such as written on paper) should be blue. See here for more info.

Screenshot 2023-03-06 17-07-47

This should also be blue.


Screenshot 2023-03-06 17-08-41

Several text strings are cut off when played in a 4:3 aspect ratio here. Can you shorten these? You will need to test that text strings throughout the game are not cut off while playing in 4:3.

Virake commented 1 year ago

installation issue persists. downloaded the setup executable, placed it in the game's root folder, got the exact same error message.

nevertheless, here are the updated files: SH2EE_LangPack_Ukrainian.zip

besides the examples that you've shown, is there a list of color code changes for stage text files? or do I just comb through each of them and see if anything is amiss?

Polymega commented 1 year ago

installation issue persists. downloaded the setup executable, placed it in the game's root folder, got the exact same error message.

Can you delete your web browser's image/file cache first then re-download the tool from the website and try again?

besides the examples that you've shown, is there a list of color code changes for stage text files? or do I just comb through each of them and see if anything is amiss?

I believe the only stage .mes files that need color changes are the "BAR Neely's" message and "the door that wakes in darkness."

I will check out these revisions in the coming days. Thanks, Virake.

Screenshot 2023-03-10 16-17-20 Screenshot 2023-03-10 16-18-40

Virake commented 1 year ago

deleted browser cache, still got the same error. I seriously regret not using that offline installation option when I had the chance.

update: SH2EE_LangPack_Ukrainian.zip

Polymega commented 1 year ago

Right click SH2EEsetup.exe and go to Properties then the Details tab. What does your version number show?

image

Virake commented 1 year ago

version 1.1.1 зображення

Polymega commented 1 year ago

Are you able to connect and access this file directly? https://files.townofsilenthill.com/SH2EE/_sh2ee_current.csv

Virake commented 1 year ago

yes

Virake commented 1 year ago

goddammit… I think I figured it out. it was the firewall all along! every time I ran the installer it created sh2eesetup.tmp inside of a semi-randomly named folder (so the path looks like D:\users\virake\appdata\local\temp\is-enqv3.tmp\sh2eesetup.tmp), and for some reason it was automatically getting blocked from connecting to the internet. removing the related entries from the rule list forced the firewall to show the permission dialog again, so now everything works.

Polymega commented 1 year ago

Glad you got it sorted! Sorry for the delay on my end; I've been a bit busy with other tasks for the project. I'll check out your newest langpack revisions as soon as I'm able!

Polymega commented 1 year ago

@Virake Thanks for being patient with me. My time was pulled in several different directions at once these past few weeks. We've pushed out a hotfix for our project so I can breathe a little bit again.

I used this build of your language pack, which I believe is the latest one, and noticed several of the control option text strings are still being cut in a 4:3 aspect ratio:

Screenshot 2023-04-06 16-40-08 Screenshot 2023-04-06 16-40-12 Screenshot 2023-04-06 16-40-14 Screenshot 2023-04-06 16-40-18

Besides that, everything else looked good to me. Note that I did not do a full playthrough with the language pack. So, if need be, I'd recommend you do one last full playthrough to ensure all of your translations are working as intended, including being contained within a 4:3 aspect ratio.

Oh, and this isn't required or anything, but I noticed the letter spacing for some of the Ukrainian characters are off by a pixel or two. If you'd like to adjust that, you can open the fontwdata.bin file with a hex editor and adjust the character spacing for each letter there.

To do this, I'd recommend temporarily changing a text string to the entire Ukrainian alphabet (both uppercase and lowercase) and see how they're spaced out from each other. Then, when editing the fontwdata.bin file, you can re-check this text string with the entire alphabet to see if it's spaced to your liking.

But again, this is going overkill for absolute precision and isn't a necessity or anything.

If you can fix those control option strings to be within a 4:3 aspect ratio and do one final round of testing, we would be happy to then host your language pack on the project site for other Ukrainians to download and enjoy!

Thanks

Virake commented 1 year ago

here's the build with fixed string length: SH2EE_LangPack_Ukrainian.zip (there were duplicated lines that I missed during the firewall incident)

fixing the letter spacing would be nice, but if it's not a critical issue, it'll have to wait.

I got word from the original translator, and it turns out that textures ap42.map_tex_012 and clock_name contain text related to a puzzle solution, which he adapted to make sense in Ukrainian. I know that we're not supposed to put textures in the package, but perhaps it's possible to make an exception just for these two?

in regards to testing, you're gonna have to count me out. properly testing everything would take too much time. it's unfortunate, but I have different priorities right now. I'll ask around and see if I can recruit someone from the community for this, though. the original translation was confirmed to work on Enhanced Edition, so it should be fine either way.

Virake commented 1 year ago

actually, never mind what I said about the textures! I was able to change the phrasing in the poem to use the original names. this means that the hint will make sense, it's just slightly less intuitive than before, as the first letter in Mildred doesn't correspond with Ukrainian word for minute – хвилина. here's the update: SH2EE_LangPack_Ukrainian.zip

this should conclude the adaptation of this translation for Enhanced Edition, with the only remaining issues being fonts and testing.

if you decide to host the translation it its current state, it should be credited as follows: (original translation) Віталій Данмер, snt, Кіндрат Книш (adaptation for EE) Virake

Polymega commented 1 year ago

this should conclude the adaptation of this translation for Enhanced Edition, with the only remaining issues being fonts and testing.

Great, thank you Virake. I would like to make an attempt at cleaning up the letter spacing between Ukrainian characters for you. Can you do me a favor? Can you edit and make a temporary .mes file that edits this line...

Screenshot 2023-04-08 15-22-03

...to instead be the entire Ukrainian alphabet (both uppercase and lowercase letters)? I believe this is found in stage_toilet_msg_*.mes.

if you decide to host the translation it its current state, it should be credited as follows:

Thanks for this. I can also include a link on each person's name. Would you like me to include specific links for each contributors' names? If so, let me know.

Polymega commented 1 year ago

Oh, I'll also need to test the letter spacing for the "small" font as well. Can you also make a temporary .mes file that edits Mary's Photo description to be the Ukrainian alphabet (upper & lowercase) as well?

Screenshot 2023-04-08 15-26-32

Virake commented 1 year ago

here are the files for testing: SH2_Ukrainian_AlphabetTest.zip (the lines were actually in stage_observation_msg_f.mes and item_x_msg_f.mes)

including links in the credits won't be necessary.

Polymega commented 1 year ago

@belek666 While I was editing the fontwdata.bin file I noticed that changing the values for certain offsets doesn't actually do anything. For example:

image

For the characters with the red arrow, changing their associated offsets in the fontwdata.bin doesn't change anything. Would you know why this is? To experiment with this yourself, you can use these files:

fontwdata.zip

ґ = Offset 0xCD є = Offset 0xA3 з = Offset 0x87 і = Offset 0xD2 ь = Offset 0xA2 я = Offset 0xA5

There might be other characters with this issue, but these were the ones I noticed.

Polymega commented 1 year ago

@Virake Can you also share the external character table you used with the SH2MSGConvert tool?

Virake commented 1 year ago

Would you know why this is?

nope. I don't know the first thing about fonts.

Can you also share the external character table you used with the SH2MSGConvert tool?

I don't have a character table for SH2MSGConvert, and for that reason I wasn't able to use it. instead, I was using the tool that the original translator gave me: shtxtconv.zip in conjunction with a "transliteration" tool: translit.zip (with its own "character table")

the workflow looks like this: edit the .txt → transliterate → convert to .mes

strangely, Notepad++ can't correctly decode/encode some of the .txt files after I edit them. no idea why.

Polymega commented 1 year ago

nope. I don't know the first thing about fonts.

No worries, that message was for Belek666. He's a team member who made custom/HD fonts possible.

I don't have a character table for SH2MSGConvert, and for that reason I wasn't able to use it. instead, I was using the tool that the original translator gave me:

Yeah, for some of the Ukrainian characters, their associated offsets in the fontwdata.bin don't match up. They're still there, but they're assigned to totally different offsets. Through a lot of trial and error I think I got it sorted out.

Please download the files below and replace them in your language pack:

fontwdata (2).zip

These are revised font000.png and fontwdata.bin files that should make the Ukrainian characters in the game look nicer than before. I fixed character heights for a few letters and hand-adjusted the letter spacing for the Ukrainian characters:

Lastly, while doing some tests, I found a few last-minute adjustments:

image

^ Is this correct?

image

^ A space should be added before the numbers start.

image

^ This text should be blue, since it was found from a note in the wallet. Also, the spacing seems inconsistent? I'd recommend # (space) >> (space) # (space) << (space) # (space) >> (space) #

NOTE: For the turn dial lock and carbon paper riddle, be sure to make these changes in both their respective stage.mes files and within the memos_x.mes file.

Virake commented 1 year ago

done: SH2EE_LangPack_Ukrainian.zip

Polymega commented 1 year ago

Great! Is there anyone fluent in Ukrainian wanting to do one final test or would you like for me to go ahead and publish it on the project site? (I can probably get it published tomorrow if there's no additional testing.)

Virake commented 1 year ago

I posted about it in the appropriate channels, but so far nobody has volunteered. maybe wait a few more days and release it by the weekend.

Virake commented 1 year ago

dammit, I forgot to change the colors. here's everything fixed: SH2EE_LangPack_Ukrainian.zip

Polymega commented 1 year ago

dammit, I forgot to change the colors. here's everything fixed:

No worries! Let me know what you'd like to do tomorrow (Saturday) and, if you're good to go, I'll get the Ukrainian pack uploaded to the site the next day (Sunday).

Virake commented 1 year ago

well, there's nothing else in the translation that needs fixing, at least as far as I know. it's as good as it's going to get.

Polymega commented 1 year ago

It's live! https://twitter.com/WhereAllBegins/status/1647687949528580097

Thank you, Virake!

Virake commented 1 year ago

where's it supposed to show up? I'm not seeing it on the website.

Polymega commented 1 year ago

Click the "I Understand" button on the page to see the language packs: https://enhanced.townofsilenthill.com/SH2/languagepacks.htm

image

Virake commented 1 year ago

never mind, turns out I also had to delete the cache for this site.

you went out of your way to make this language pack happen, and I appreciate this, as does the rest of our gaming community. thank you!

Polymega commented 1 year ago

I appreciate your kindness but that is far from the truth: YOU and the other fine Ukrainians made this happen. I simply provided some tips along the way.

We really appreciate you reaching out to us in order to make this happen. It's with absolute pleasure we host and let others know of your work so that many Ukrainians can play the game.

Thank you again!!