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

Layer commands labels are not internationalized #72

Open
pcdavid opened this issue Aug 16, 2023 · 0 comments Β· May be fixed by #86
Open

Layer commands labels are not internationalized #72

pcdavid opened this issue Aug 16, 2023 · 0 comments Β· May be fixed by #86
Labels
bugzilla Issues migrated from the old Eclipse Bugzilla

Comments

@pcdavid
Copy link
Member

pcdavid commented Aug 16, 2023

πŸ†” 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

@pcdavid pcdavid added the bugzilla Issues migrated from the old Eclipse Bugzilla label Aug 16, 2023
@pcdavid pcdavid added this to the v7.3.0 milestone Nov 16, 2023
@pcdavid pcdavid modified the milestones: v7.3.0, v7.4.0 Nov 24, 2023
@pcdavid pcdavid removed this from the v7.4.0 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from the old Eclipse Bugzilla
Projects
None yet
1 participant