Giter VIP home page Giter VIP logo

Comments (10)

KarryCharon avatar KarryCharon commented on August 11, 2024 1

@songispm 已修复, 你测测看

from aigodlike-comfyui-translation.

songispm avatar songispm commented on August 11, 2024

如果解决不了异步问题,看能不能想办法尽可能的提早get_translation访问的时机

或者想办法把get_translation的结果进行localStorage缓存,下一次刷新中文能生效也行

from aigodlike-comfyui-translation.

Layer-norm avatar Layer-norm commented on August 11, 2024

把main.js里的默认改成中文试试。如果部分插件翻译不完整就把ext常量里init(app)的async删掉。你可以参考一下我自用的版本main.js

from aigodlike-comfyui-translation.

Yorha4D avatar Yorha4D commented on August 11, 2024

@Layer-norm 俺们研究下

from aigodlike-comfyui-translation.

songispm avatar songispm commented on August 11, 2024

把main.js里的默认改成中文试试。如果部分插件翻译不完整就把ext常量里init(app)的async删掉。你可以参考一下我自用的版本main.js

用了你的仓库的版本,依然没能解决问题 @Layer-norm

from aigodlike-comfyui-translation.

songispm avatar songispm commented on August 11, 2024

其实中文翻译的数据,已经下载下来了,就是页面上流程图这个画布没有更新,

点开设置,其实设置里面是生效了的

image

from aigodlike-comfyui-translation.

songispm avatar songispm commented on August 11, 2024

先fork了改了一下,这样就生效了 songispm@986ea1a

把数据缓存了,虽然数据挺大的,但是localStorage也能塞下,

就是这样的话,如果翻译数据要更新的时候,要再手动切换一下语言,或者手动清理缓存,才能让新的翻译数据生效

from aigodlike-comfyui-translation.

songispm avatar songispm commented on August 11, 2024

@songispm 已修复, 你测测看

测试有效,请求异步变成了同步,赞

from aigodlike-comfyui-translation.

songispm avatar songispm commented on August 11, 2024

@KarryCharon 但是还有另一个小问题就是,已经在setting中被设置中文,但当第一次加载的时候(也就是localStorage中这一条还没有的时候),中文没有生效,再刷一次就生效了(下一次刷新的时候localStorage中就有了 zh-CN)

image

如何测试呢,就是你把AGL.Locale这条localStorage清掉就复现了

当然是属于另一个问题了,可以慢慢再解

from aigodlike-comfyui-translation.

KarryCharon avatar KarryCharon commented on August 11, 2024

@KarryCharon 但是还有另一个小问题就是,已经在setting中被设置中文,但当第一次加载的时候(也就是localStorage中这一条还没有的时候),中文没有生效,再刷一次就生效了(下一次刷新的时候localStorage中就有了 zh-CN)

image 如何测试呢,就是你把AGL.Locale这条localStorage清掉就复现了

当然是属于另一个问题了,可以慢慢再解

这个也修复了
@songispm 你试试

from aigodlike-comfyui-translation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.