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

Make core components translatable #43

Open
pinussilvestrus opened this issue Jun 2, 2021 · 1 comment
Open

Make core components translatable #43

pinussilvestrus opened this issue Jun 2, 2021 · 1 comment
Labels
backlog Queued in backlog enhancement New feature or request

Comments

@pinussilvestrus
Copy link
Contributor

What should we do?

Currently, every component that goes inside src/properties-panel is not translatable. We use the translate service inside the BPMN part, but the core parts are currently not an injectable didi service.

We could add a translate function to the props of the PropertiesPanel component..

Alternatively, we could make the whole thing a didi service as well, but that would break the concept of having the core as a generic component catalog only.

Why should we do it?

Our UI should be translatable altogether, not only the properties.

@pinussilvestrus pinussilvestrus added enhancement New feature or request backlog Queued in backlog labels Jun 2, 2021
@barmac
Copy link
Member

barmac commented Jun 2, 2021

Alternative: Any labels/placeholders could be passed via props.

import { useService } from './hooks';

function BpmnPropertyComponent(props) {
  const translate = useService('translate');

  return <TextInput placeholder={ translate('empty') } />;
}

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

No branches or pull requests

2 participants