Skip to content

Layer commands labels are not internationalizedΒ #72

@pcdavid

Description

@pcdavid
πŸ†” Bugzilla ID πŸ“˜ Project πŸ—“ Created ❓ Status
#581801 Sirius / Diagram 2023-04-12T10:17:23Z ASSIGNED

Comment #0 on 2023-04-12T10:17:23.000Z:
When activating a layer, the related command label is not internationalized. Under some contexts like Capella, when right clicking under an aird they appear as "Redo Show %some_layer_id" instead of the translated label.


Comment #1 on 2023-04-12T10:27:50.000Z:
The issue seems to be in org.eclipse.sirius.diagram.tools.api.command.ChangeLayerActivationCommand

The constructor is implemented as follows:

public ChangeLayerActivationCommand(TransactionalEditingDomain domain, DDiagram dDiagram, Layer layer, IProgressMonitor monitor) {
super(domain, new DDiagramQuery(dDiagram).getAllActivatedLayers().contains(layer) ? Messages.ChangeLayerActivationCommand_hideLabel
: MessageFormat.format(Messages.ChangeLayerActivationCommand_showLabel, new IdentifiedElementQuery(layer).getLabel()));
this.dDiagram = dDiagram;
this.layer = layer;
this.monitor = monitor;
}

The command label is obtained with new IdentifiedElementQuery(layer).getLabel().

It should be encapsulated by a MessageTranslator call like:

MessageTranslator.INSTANCE.getMessage(layer,new IdentifiedElementQuery(layer).getLabel())


Comment #2 on 2023-04-13T12:38:27.000Z:
New Gerrit change created: https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/201206

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from the old Eclipse Bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions