-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
设置双语时不起作用,已找到解决方法(只治标不治本) #51
Comments
究其原因,是在加载js文件的时候,获取的dirs为undefined,没有获取到本来应该设置的opts["bilingual_localization_dirs"]字典值 |
把config.json里的“bilingual_localization_dirs”项删掉,然后重启设置下就行 |
尝试了 没成功,我上面写的dirs = '{"zh_CN": "extensions\stable-diffusion-webui-localization-zh_CN\localizations\zh_CN.json"}'应该是dirs = '{"zh_CN": "extensions\\stable-diffusion-webui-localization-zh_CN\\localizations\\zh_CN.json"}',应该是四个斜杠,不知道复制上去为啥就变成两个了,修改后可以成功 |
您好! 您的来信已收到,我会尽快给您回复!-------------------------------------------------------------以上是我设置的自动回复信息,表示您的邮件已投递成功。This is an automatic mail reply.Your message has been delivered successfully.
|
先点下双语旁边的刷新就可以了 |
|
试了很多遍结果都没有效果,然后看到楼下 @hoyelo 的格式,改成 / 斜杠才能用,我是 windows 11 系统 |
四个''才行,发到评论区后被吞了两个,我一开始没想到用'/',感谢@hoyelo的补充 |
…as the author has not updated for 8 months (as of April 6, 2024), so I had to make modifications independently, and additionally introduced some comfort optimization adjustments. For better English learning, improve comfort by: 1. Adjusting the priority relationship between languages in the upper and lower positions of the interface to enhance hierarchy (for learning English, please set English to the upper position) 2. Adding an option to translate the default placeholder text in the inputbox (because translating within the inputbox may affect the interface aesthetics)
我找到了治标的方法,并且已经提交修改 #53。 |
您好! 您的来信已收到,我会尽快给您回复!-------------------------------------------------------------以上是我设置的自动回复信息,表示您的邮件已投递成功。This is an automatic mail reply.Your message has been delivered successfully.
|
注意到,一个是{251行对应localization,364行对应bilingual...},另一个是{41行对应bilingual...,257行对应localization}。 |
您好! 您的来信已收到,我会尽快给您回复!-------------------------------------------------------------以上是我设置的自动回复信息,表示您的邮件已投递成功。This is an automatic mail reply.Your message has been delivered successfully.
|
在按照步骤,将User interface->Localization设置为None,Bilingual Localization->Localization file设置为zh_CN后,重启,双语设置依然无效。
在extensions/sd-webui-bilingual-localization/javascript/bilingual_localization.js文件中的112行(也就是if (!enabled || file === "None" || dirs === "None") return 该语句的下面一行)修改dirs如下:
dirs = '{"zh_CN": "extensions\\stable-diffusion-webui-localization-zh_CN\\localizations\\zh_CN.json"}'
其中”zh_CH“是下载的翻译的json字符串文件名,"extensions\\stable-diffusion-webui-localization-zh_CN\\localizations\\zh_CN.json"为该文件所在位置
由于我是直接在扩展中直接下载的,所以该json文件所在目录为extensions中,如果是在${根目录}/localizations,则修改为对应的目录即可(每尝试过)
修改完之后重启,双语有效了
The text was updated successfully, but these errors were encountered: