AlphaKretin / ygo-data

A Node module to parse YGOPro card databases and other files into useful card data
GNU General Public License v3.0
11 stars 0 forks source link

Improve Korean Pendulum text formatting #19

Closed Ice-Pendragon closed 2 years ago

Ice-Pendragon commented 2 years ago

Since JSY1728's Korean CDB includes some more informations for EDOPro users (for official Korean version of Yu-Gi-Oh! has many mistranslations, and for Korean Windows, some symbols are hard to type, and therefore hard to search), I added regex for his/her Korean CDB, and told him/her to make borderline in literalDesc '━'s from '-'s.

Ice-Pendragon commented 2 years ago

Thanks for submitting this! This package is actually kind of deprecated, since we want to update Bastion to use more consistent data structures for card information. We'll accept this patch when it's ready though. If you know of any good Korean data sources, let us know!

Thanks for kind reply, and I'm sorry for my bad english. I wrote patch note "Korean CDB will be updated by JSY1728" as I made this regex first and told him/her to change CDB as it fits regex, and the CDB is now changed.

As I'm just a amateur, I hope you to check first with some examples before update the bot - you can check these cards:

D/D Gryphon (pendulum, tagged for search) D - Fortune (non-pendulum, tagged for search) Majespecter Cat - Nekomata (pendulum, no pendulum effect) Mild Turkey (pendulum, normal monster) Dark Doriado (pendulum)

If any of result is suspicious, don't mind to tell me that I can find the problem!

JSY1728 commented 2 years ago

um... sounds good. any others problem?

kevinlul commented 2 years ago

Here's how things will go in hopefully a few hours. The creator is unavailable at the moment and also in a different timezone to update this package. When available, this pull request will be merged and she will bump this package to 1.4.0. Then the old instance of Bastion will be updated to incorporate the changes.

kevinlul commented 2 years ago

@JSY1728 If you have foundational source of truth for Korean translations, as you maintain multiple CDBs, and you're willing to provide that to the Bastion project, please let me know! With a consistent, normalized database, we can do cool stuff like this on the new instance.

image

@Ice-Pendragon also, once I get DawnbrandBots/bastion-bot#46 and DawnbrandBots/bastion-bot#47 done, if you would like to help localize Bastion's interface to Korean too, it would be much appreciated!

Ice-Pendragon commented 2 years ago

@JSY1728 If you have foundational source of truth for Korean translations, as you maintain multiple CDBs, and you're willing to provide that to the Bastion project, please let me know! With a consistent, normalized database, we can do cool stuff like this on the new instance.

image

@Ice-Pendragon also, once I get DawnbrandBots/bastion-bot#46 and DawnbrandBots/bastion-bot#47 done, if you would like to help localize Bastion's interface to Korean too, it would be much appreciated!

That would be hopeful. What strings are to be translated, and where are they used for?

kevinlul commented 2 years ago

What strings are to be translated, and where are they used for?

I'll describe in those issues once I build out the system for the new instance 😁

Ice-Pendragon commented 2 years ago

Sorry for requesting again. I found an unexpected behavior. Could I change regex once more? I'm terribly sorry that I missed the problem on the screenshot.

Bug found: Last line of monster effects/lore text of Pendulum Monsters are not displayed

From:

const KOR_PEND_REG = /【(펜듈럼 효과|스킬 발동)】\s*[\r\n|\r|\n](?:없음)?([^━]*)(?:[\r\n|\r|\n]\s*━+)?/;
const KOR_MON_REG = /【(몬스터 효과|플레이버 텍스트|효과)】\s*[\r\n|\r|\n]([^━]*)(?:[\r\n|\r|\n]\s*━?)/;

To:

const KOR_PEND_REG = /【(펜듈럼 효과|스킬 발동)】\s*[\r\n|\r|\n](?:없음)?([^━]*)(?:\s*━+)?/;
const KOR_MON_REG = /【(몬스터 효과|플레이버 텍스트|효과)】\s*[\r\n|\r|\n]([^━]*)(?:\s*━?)/;
kevinlul commented 2 years ago

No need to apologize! Do you want to open another PR?

Ice-Pendragon commented 2 years ago

If needed, but I think regex fix above would be fine enough. Can you apply it to Galatea first and show me the result?

kevinlul commented 2 years ago

image image image image image

Ice-Pendragon commented 2 years ago

The result seems completely fine!

kevinlul commented 2 years ago

I committed this change in a0542098e537fee8458ba3f5c1b0c621243c17a0 and made it live in the old instance of Bastion.