Heegu-sama / Homm3BG

Repository for rewriting the rule book.
81 stars 14 forks source link

[HE] setup translation #604

Closed davidpodless closed 1 week ago

davidpodless commented 1 week ago

I've added what you asked, and now the PR is to main

  1. was fixed.
  2. we still have the problem of RTL/LTR: The numbers are all RTL :-/ image
DarthGandalf commented 1 week ago

luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "Times New Roman" not found.

Would the Liberation font we found for cyrillics work for Hebrew as well? See main_ru.tex how the font is setup

davidpodless commented 1 week ago

luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "Times New Roman" not found.

Would the Liberation font we found for cyrillics work for Hebrew as well? See main_ru.tex how the font is setup

It didn't work on my machine. I'll find something, is there a way to run the tests before sending PRs?

DarthGandalf commented 1 week ago

It didn't work on my machine.

Sad, I'll try to check it locally. Well, anyway...

is there a way to run the tests before sending PRs?

Don't worry about sending PRs before fixing all the tests - that's exactly what tests in CI are for!

But if you wish, just run build locally - the difference with CI is that you have "times new roman" available on your machine, while CI doesn't have it, whereas the font we use for Cyrillic is checked in to assets/ directory here, and referenced in main_ru.tex by path.

If you put the font files there too, it should work fine - please mind the font's license though, I don't think Times New Roman itself is free and can be used like that

davidpodless commented 1 week ago

It didn't work on my machine.

Sad, I'll try to check it locally. Well, anyway...

is there a way to run the tests before sending PRs?

Don't worry about sending PRs before fixing all the tests - that's exactly what tests in CI are for!

But if you wish, just run build locally - the difference with CI is that you have "times new roman" available on your machine, while CI doesn't have it, whereas the font we use for Cyrillic is checked in to assets/ directory here, and referenced in main_ru.tex by path.

If you put the font files there too, it should work fine - please mind the font's license though, I don't think Times New Roman itself is free and can be used like that

at least there is a way to update the same PR?

qwrtln commented 1 week ago

at least there is a way to update the same PR?

Yes, just push to the branch you're working on, the PR will be updated.

qwrtln commented 1 week ago

Well, without Times New Roman it builds 🎉 Now let's try to fix those RTL and graphics problems.

davidpodless commented 1 week ago

Well, without Times New Roman it builds 🎉 Now let's try to fix those RTL and graphics problems.

🎉 🎉 🎉 That's will be in a different PR. I want to upload all the sections I already translate first. but it will have to wait for sunday

qwrtln commented 1 week ago

@Heegu-sama, we need you to mark Hebrew checks as required.

qwrtln commented 1 week ago

Normally, in the setup PR, we take care of the title page and everything until table of contents. Without them working as intended, the document looks broken.

DarthGandalf commented 1 week ago

I've managed to fix numbers:

Выделение_584

and added a way to fix graphics, but it needs to be considered one by one.

See the diff at 3641753dc077b3209eb1868aee57abfc4dfa0b3c

TODO: tables became gray, probably they need similar treatment with wrapping something with explicit English

DarthGandalf commented 1 week ago

Hm, are the numbers supposed to be 123, or Hebrew characters? If Hebrew characters, some images will have to be updated - the green dots with digits 123 are baked in there

DarthGandalf commented 1 week ago

One more issue: in printable build the page number is in wrong place:

Выделение_585

davidpodless commented 1 week ago

I've managed to fix numbers:

Выделение_584

and added a way to fix graphics, but it needs to be considered one by one.

See the diff at 3641753

TODO: tables became gray, probably they need similar treatment with wrapping something with explicit English

Wow, it is amazing, you even managed to use the hebrew calendar. I love it :-)

davidpodless commented 1 week ago

Hm, are the numbers supposed to be 123, or Hebrew characters? If Hebrew characters, some images will have to be updated - the green dots with digits 123 are baked in there

123 is what most people are using. we can use Hebrew letters, similar to the 4a 4b etc using only letter is more traditional way for religious texts (like the bible(

davidpodless commented 1 week ago

Normally, in the setup PR, we take care of the title page and everything until table of contents. Without them working as intended, the document looks broken.

I agree, but working on fixing it isn't related to the translation itself, so I don't want it to be a gate for the translation

davidpodless commented 1 week ago

With a help from GPT, I've managed to make the page numbers to looks as they should

image

the numbers in the text aren't fixed, but it could be fixed locally with the translate itself, so it isn't much of an issue

last page picture looks off

image
DarthGandalf commented 1 week ago

I wrapped the first two pictures with \textenglish{...}, some more pictures (like that last page) needs that too.

If you wrap the setup image with it, it puts the green dots on correct places again.

DarthGandalf commented 1 week ago

The griffin on page 16 may need to be flipped instead... But we'll get to that when working on those chapters

DarthGandalf commented 1 week ago

afc52109cb9239991dd0e55c4beecddd886e99ed partially fixes printable

davidpodless commented 1 week ago

I fixed the cover picture, flipped the griffin in page 16 and the dots in page 9

image image image

everything else could be fixed the same way in future PRs

davidpodless commented 1 week ago

I have no idea why check_po4a failed. I'll appreciate any help in this regard

DarthGandalf commented 1 week ago

@qwrtln how do you think, the \textenglish wrapping should be done in the original, like what I prototyped for title page, or purely in the translation, like what's here for the back cover and setup image?

DarthGandalf commented 1 week ago

@davidpodless

There are uncommited changes to translations: M translations/back_cover.tex/he.po M translations/setup.tex/he.po M translations/title_page.tex/cs.po M translations/title_page.tex/de.po M translations/title_page.tex/es.po M translations/title_page.tex/fr.po M translations/title_page.tex/he.po M translations/title_page.tex/pl.po M translations/title_page.tex/ru.po M translations/title_page.tex/title_page.tex.pot M translations/title_page.tex/ua.po

This check checks that all translation files have the same original strings as the original .tex files, and that they are formatted properly.

title_page is in the list, because I modified original title_page.tex, but didn't run po4a to update the translations. back_cover.tex and setup.tex simply needs a run of po4a po4a.cfg, it will reformat it automatically. It can be run either from command line, or using a special bot in this repo, if someone comments "po4a check" or "po4a commit"

davidpodless commented 1 week ago

OK, now we are done 😄

davidpodless commented 1 week ago

Instead of making noises to all. I moved the title page chagnes into hebrew

@DarthGandalf I think that answer your question. The only downside I see for it to be inside hebrew is if someone will decide to do an Arabic translation as well (or any other RTL language as Persian, Urdu etc) but they will be able to use the same method we are using for hebrew

davidpodless commented 1 week ago

OK, NOW we are ready 😄

I would like to merge this if possible

@DarthGandalf @qwrtln @Heegu-sama

DarthGandalf commented 1 week ago

@DarthGandalf I think that answer your question.

I see certain benefits both ways, but okay.

Tables still look broken, but that can be fixed when the translation progress reaches one.

davidpodless commented 1 week ago

@DarthGandalf I think that answer your question.

I see certain benefits both ways, but okay.

Tables still look broken, but that can be fixed when the translation progress reaches one.

If you mean this one for example:

image

it is the same fix like the boxes. I'll add it to the first PR that will have a table

DarthGandalf commented 1 week ago

For example. Even the table on the back isn't supposed to be transparent

davidpodless commented 1 week ago
image

fixed

qwrtln commented 1 week ago

@qwrtln how do you think, the \textenglish wrapping should be done in the original, like what I prototyped for title page, or purely in the translation, like what's here for the back cover and setup image?

@DarthGandalf, not sure if it's still relevant, but I think both ways have their merits. If it can be easily contained within the po files (as I believe \textenglish can), then I think it should be in translations only. However, that trick with xscale IMO should be provided in metadata.tex as 1, while defined as -1 in main_he.tex, so that all the circles with coordinates don't have to be copied. Those are not musts, though. I believe those approaches will make the whole thing more DRY/KISS-like.

qwrtln commented 1 week ago

Or, actually, no need for that separate xscale definition. A simple if/else trick with right2left toggle will do.

DarthGandalf commented 1 week ago

I don't think xscale is correct solution for setup image and other images where the green dots are added by tikz: the numbers and "4k -> k4" are still reversed, from what I can see. Wrapping it by \textenglish would produce correct numbers there AND put dots on correct places without xscale

davidpodless commented 1 week ago

I don't think xscale is correct solution for setup image and other images where the green dots are added by tikz: the numbers and "4k -> k4" are still reversed, from what I can see. Wrapping it by \textenglish would produce correct numbers there AND avoid xscale

No, I actually want it to look like k4 for now, because in the translation it will be with hebrew letters and that should looks like that.

like this:

image image
davidpodless commented 1 week ago

BTW I still can't merge If someone can pls merge it - I'll be thankful

image
qwrtln commented 1 week ago

BTW I still can't merge If someone can pls merge it - I'll be thankful

Yes, it's me. Can you at least respond to my comments before I approve?

davidpodless commented 1 week ago

BTW I still can't merge If someone can pls merge it - I'll be thankful

Yes, it's me. Can you at least respond to my comments before I approve?

I thought I answered everything what did I miss?

qwrtln commented 1 week ago

BTW I still can't merge If someone can pls merge it - I'll be thankful

Yes, it's me. Can you at least respond to my comments before I approve?

I thought I answered everything what did I miss?

I'm on a train, so the broadband is 💩 haha. Your responses didn't load. Let me go through them.

DarthGandalf commented 1 week ago

@qwrtln if I understand your idea correctly, the ifelse would still need to be copied for every .po file, right? Just in the languages where "4a 4b 4c" don't need to be touched, the msgstr can stay empty, therefore simplifying the translation.

Right?

qwrtln commented 1 week ago

@qwrtln if I understand your idea correctly, the ifelse would still need to be copied for every .po file, right? Just in the languages where "4a 4b 4c" don't need to be touched, the msgstr can stay empty, therefore simplifying the translation.

Right?

Yes, exactly. It's not a must, though, it would just make the Hebrew translation a little simpler.

davidpodless commented 1 week ago

@qwrtln if I understand your idea correctly, the ifelse would still need to be copied for every .po file, right? Just in the languages where "4a 4b 4c" don't need to be touched, the msgstr can stay empty, therefore simplifying the translation. Right?

Yes, exactly. It's not a must, though, it would just make the Hebrew translation a little simpler.

it can help for a future Arabic translation as well. so it IS a better solution, I just don't know how to do it