GpointChen / FFXIVChnTextPatch-GP

A tool to replace FFXIV in-game text.
GNU General Public License v3.0
629 stars 86 forks source link

关于机翻部分 能否增加选项是否使用机翻 #446

Closed Kitterato closed 1 month ago

HRFleur commented 1 month ago

是的,机翻很多新名字前后不统一容易摸不着头脑,有些对话意思看着也不太对。希望有7.0前内容汉化这样道具名称能对上就行了。

mokeling commented 1 month ago

可以把rawexd里quest文件夹删掉再重新汉化,但是这样会导致所有的任务对话文本都没了(你可以一个一个的自己汉化)(๑•̀ㅁ•́ฅ)

GpointChen commented 1 month ago

了解,我這週末不在,預計再找時間加。

一個暫時替代方案是可以寫個script清空所有CSV中包含星號的格子。

import os
import pandas as pd

def clear_character_in_csv(directory, char_to_clear):
    for root, _, files in os.walk(directory):
        for file in files:
            if file.endswith('.csv'):
                file_path = os.path.join(root, file)
                df = pd.read_csv(file_path)

                # Replace the specific character with an empty string
                df = df.applymap(lambda x: x.replace(char_to_clear, '') if isinstance(x, str) else x)

                # Save the modified DataFrame back to the CSV file
                df.to_csv(file_path, index=False)

directory_path = '/path/to/your/folder'
clear_character_in_csv(directory_path, '★')

By ChatGPT