OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.42k stars 2.39k forks source link

In the Chinese environment , when a Signal event is added to the workflow, any activities added later cannot be dragged #7248

Open hyzx86 opened 4 years ago

hyzx86 commented 4 years ago

When using the English environment, everything is normal, but it will not be able to drag in the Chinese environment

微信截图_20201011235043

Skrypt commented 4 years ago

You get any javascript error reported in your browser dev console?

hishamco commented 4 years ago

May be an encoding issue, but as Jasim said check whether errors has been reported in the browser console

hyzx86 commented 4 years ago

You get any javascript error reported in your browser dev console?

No , There is no exception in the console。 wf

hyzx86 commented 4 years ago

Press F12 and go to Console tab in Chrome dev tool.

As you can see on the right side of the screenshot above, my resource file was loaded locally, and there was no exception during the loading process. I tried it and it was normal in English.

Skrypt commented 4 years ago

Yeah sorry I did not see it first time because it was in chinese. All good then. Is there a difference in the HTML elements rendered for these signal "cards" when you create one with an english title and one with a chinese title?

hyzx86 commented 4 years ago

Yeah sorry I did not see it first time because it was in chinese. All good then. Is there a difference in the HTML elements rendered for these signal "cards" when you create one with an english title and one with a chinese title?

There was no abnormality. I even tried to debug the JS file, but no abnormality was found. But because it is compressed, I don't know much about it, so I didn't study it in depth.

The following is a demo in different languages

wfSignal2

Skrypt commented 4 years ago

Ok, so there is no "Title" added to the Signal event. So, it renders a chinese title meaning "Signal" because we made these things translatable or you did?

Ok, now I get it.

hyzx86 commented 4 years ago

image Just like this, even if the title is added, it won’t work

Skrypt commented 4 years ago

Ok, thanks, I will try to repro locally. I can't say it's because of an encoding issue as these are rendered correctly. Looks more like a javascript issue to me. But there is no console error reported. Really strange.

hyzx86 commented 4 years ago

The simplest example: I first add a signal named "s1", and then add a signal named "s2", at this time s2 or other subsequently added nodes cannot be dragged

image

Skrypt commented 4 years ago

Maybe it is something that @sfmskywalker fixed already in Elsa-Core?

hishamco commented 4 years ago

I may try this in Arabic, this will be a first time I will use Workflows in action ;)

hyzx86 commented 4 years ago

Maybe it is something that @sfmskywalker fixed already in Elsa-Core?

Multi-language is a feature in Orchardcore, I think this problem should come from the code in OrchardCore

hishamco commented 4 years ago

Multi-language is a feature in Orchardcore, I think this problem should come from the code in OrchardCore

Globalization & Localization is cool, but sometimes let you crazy ;) till now we didn't confirm if the issue caused from OC itself, we will try to reproduce the issue first

Skrypt commented 4 years ago

Multi-language is a feature in Orchardcore, I think this problem should come from the code in OrchardCore

Yeah, I know I did code a lot of that culture module but did not code anything related with Workflow much. I'm pretty sure Elsa-Core has also some localization features. And probably uses also the same javascript base libraries to render it's workflow elements. Basically it is https://jsplumbtoolkit.com/.

sfmskywalker commented 4 years ago

Maybe it is something that @sfmskywalker fixed already in Elsa-Core?

I wasn't aware of this issue, so probably the Elsa designer has the same bug 😅

justlucky commented 3 years ago

Reason found, translation file error.

https://github.com/OrchardCMS/OrchardCore.Translations/blob/dev/Localization/zh-CN/OrchardCore.Workflows.po

image

Skrypt commented 3 years ago

Someone fixed this? /cc @agriffard

hyzx86 commented 3 years ago

Hi @agriffard , I just updated the Chinese translation on Crowdin and fixed this problem. Could you update it to OrchardCore?

agriffard commented 3 years ago

I updated the .po files and built the translations. You can download them from Crowdin and install them locally to test (but the nuget package won't be updated, it is only updated after a Release).

hyzx86 commented 3 years ago

Will the po file in the source code repository be updated as well? I haven't seen its update yet. https://github.com/OrchardCMS/OrchardCore.Translations/blob/dev/Localization/zh-CN/OrchardCore.Workflows.po

hyzx86 commented 3 years ago

Although it seems that there are no white space characters, But in some cases it still cannot be dragged What's even stranger is that you can't switch prophecies now. . Even if I turn off the localization module