MattiDragon / ExtendedDrawers

Adds drawers and more
Other
6 stars 14 forks source link

change patchouli book text into lang file #83

Open nageih opened 1 year ago

nageih commented 1 year ago

I'm a Chinese translator,and I am translating this mod,this can make translating patchouli book easier

MattiDragon commented 12 months ago

Did you check that this works? I don't see anything in the patchouli docs about using translation strings for page content. Also, if it does work, give the strings descriptive names. For example book.extended_drawers.patchouli.text1 could be book.extended_drawers.category.blocks.name as that describes what it actutally means. Another thing is that you seem to have only converted some text areas, not all of them. If we are going to move this book to translation strings I want to be able to delete the language specific pages, at least when the layout is the same.

nageih commented 12 months ago

ok,I`ll change them tomorrow, and you can see using translation string in here

nageih commented 12 months ago

@MattiDragon I have finished improving these key

MattiDragon commented 12 months ago

Seems good. One last thing to check: have you checked that patchouli macros work in translation strings? If they do you should see links and colors in some pages.

nageih commented 12 months ago

As I see, it works.

nageih commented 12 months ago

and I'm translating the mod,later I'll create a Chinese translation

MattiDragon commented 11 months ago

I was going to test this and noticed an issue. You can't use the $ in a lang file in extended drawers because the gradle templating I use for the dynamic version thinks it's a template string. You have to migrate all of the pages to use my @ based macros (which they should have been using from the start). You can view and edit the definitions in the book.json. Also I'd like if you removed the .text from translation keys for pages that aren't just text. If the page has multiple strings then you can do that, but for most it's enough to just have the text in the pages own string.

nageih commented 11 months ago

@MattiDragon I pushed a commit just now to try to fix $ problem,and because I don't know the macros in patchouli book well,I use a silly way to solve that,and tomorrow I will change the key name including text .Also I think <> is more aesthetically pleasing than @@, I can change it back if you prefer @@

MattiDragon commented 11 months ago

I'll have to let this wait for now. Patchouli hasn't been updated past 1.20.1 and I won't spend time trying to get your changes on older versions to test with before it updates.

nageih commented 11 months ago

that's good

nageih commented 3 months ago

I think this pr should be discussed now. @MattiDragon

MattiDragon commented 3 months ago

I don't see a 1.21 release anywhere. I probably won't be updating the 1.20.6 version due to lack of demand

MattiDragon commented 3 months ago

Tbh, I'll probably just switch to lavender at this point. Patchouli just updates too slowly

nageih commented 3 months ago

I apologize that this pr has been delayed due to my delays. I just realized that it seems that version 1.20.1 is no longer being maintained, so I can try to move this pr to a higher version if you want

MattiDragon commented 3 months ago

The PR hasn't been delayed by you, it's been delayed by patchouli not updating to versions before I drop support for them. I'm right now considering switching to lavender, although as far as I'm aware that doesn't support translations by lang file.