Code Monkey home page Code Monkey logo

Comments (5)

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

If it's the [Person] text that you're referring to, you can change this via the terminology keyword. For example:

workspace {

    model {
        user = person "用户1"
    }

    views {
        systemLandscape "MyDiagramKey" {
            include *
        }
        
        terminology {
            person "xxx"
        }
    }
    
}

Here's an example.

from export.

cgi avatar cgi commented on August 9, 2024

I think point is that userId (alias) is rendered with error: see "as 1" fragment in result.

I get same issue with russian names ob objects.
As I could understand reasons - thats from https://github.com/structurizr/export/blob/main/src/main/java/com/structurizr/export/plantuml/AbstractPlantUMLExporter.java#L159
filter function - it's delete any non [a-zA-Z_0-9] characters.
But - it's not realy nessesary in PlantUML to make so strict rules for Ids: see https://plantuml.com/ru/unicode

My suggest for patch is: change regexp puttern to unicode aware: from "\W" to "(?U)\W".
see for explanation: https://stackoverflow.com/questions/4304928/unicode-equivalents-for-w-and-b-in-java-regular-expressions

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

Do you have an example DSL that doesn't work?

from export.

cgi avatar cgi commented on August 9, 2024

Here is example:

workspace {

    model {
        user = person "Пользователь"
    }

    views {
        systemLandscape "MyDiagramKey" {
            include *
        }

        terminology {
            person "xxx"
        }
    }
}

command for export:
structurizr.bat export -workspace test\workspace.dsl -format plantuml -output .\export

result plantUML file:

@startuml
title System Landscape

top to bottom direction

skinparam {
  shadowing false
  arrowFontSize 10
  defaultTextAlignment center
  wrapWidth 200
  maxMessageSize 100
}

hide stereotype

skinparam rectangle<<>> {
  BackgroundColor #dddddd
  FontColor #000000
  BorderColor #9a9a9a
}

rectangle "==Пользователь\n<size:10>[Person]</size>" <<>> as 

@enduml

Take a note for empty alias and stereotype name in difinitions.

from export.

simonbrowndotje avatar simonbrowndotje commented on August 9, 2024

Thanks ... I think this is different from the original issue, so I've changed the title.

from export.

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.