Skip to content
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

Predefined labels can be translated via language themes #365

Closed
kirchsth opened this issue Oct 12, 2024 · 3 comments
Closed

Predefined labels can be translated via language themes #365

kirchsth opened this issue Oct 12, 2024 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@kirchsth
Copy link
Member

At the moment, many (legend) labels are predefined with English text. If a user wants to create a diagram in another language, such as Japanese, it is very difficult to translate all labels in the diagram code manually (some are even hard coded).

Therefore, it should be possible to include a corresponding language theme so that all predefined labels (not just the legend texts) are translated into the desired language.

For example, a diagram with the following code currently has only an English legend:

@startuml

' without language theme legend remains English  
' !theme C4Language_japanese from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

LAYOUT_LANDSCAPE()

Person(admin, "管理者")
System_Boundary(c1, 'サンプル') {
    Container(web_app, "ウェブアプリケーション", "C#, ASP.NET Core 2.1 MVC", "複数のTwitterタイムラインを比較することができます")
}
System(twitter, "Twitter")

Rel(admin, web_app, "使用する", "HTTPS")
Rel(web_app, twitter, "ツイートを取得する", "HTTPS")

SHOW_LEGEND()
@enduml

image

and if the theme is included like

...
!theme C4Language_japanese from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/themes
...

then it should look like

image

@kirchsth kirchsth added this to the v2.11.0 milestone Oct 13, 2024
@kirchsth kirchsth added the enhancement New feature or request label Oct 13, 2024
kirchsth added a commit that referenced this issue Oct 19, 2024
#364,#365 Add `UpdateLegendTitle(newTitle)` call and multilingual themes
@Potherca
Copy link
Member

@kirchsth This looks resolved by #366, should this issue be closed?

@kirchsth
Copy link
Member Author

Yes, the Github caching problem is solved in the meantime and all images are correct displayed

(I cleaned the Github chache with curl -X PURGE, I explained the details in a comment at the end of the forum entry )

@kirchsth
Copy link
Member Author

@Potherca: with the PlantUML-server I have sometimes also a problem with the cache itself, therefore I entered a similar request for the PlantUML-server in forum (but it doesn't have the high priority for me at the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants