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

As an Integrator I can use language labels in EditorPreview #37

Open
4 tasks
mcmietz opened this issue Jan 24, 2021 · 1 comment
Open
4 tasks

As an Integrator I can use language labels in EditorPreview #37

mcmietz opened this issue Jan 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@mcmietz
Copy link
Collaborator

mcmietz commented Jan 24, 2021

As a Integrator, I can use language labels in EditorPreview, to give the editor more information about the data in contentBlock

Acceptance criteria

  • In content Block Extension I could create a Backend.xlf
  • I could use the label keys in EditorPreview.html

Acceptance tests

  • Add an f:translate view helper with key in EditorPreview.html
  • The label is shown in Backend Preview of the contentBlock
@mcmietz mcmietz changed the title As an *Integrator* I can *use language labels* in EditorPreview As an Integrator I can use language labels in EditorPreview Jan 24, 2021
@jonaseberle
Copy link
Collaborator

I haven't remembered when we talked earlier, but this is why we added a EditorLLL/FrontendLLL key to the cb settings - it contains the necessary prefix (LLL: + .xlf file path + vendor + contentBlock packagename) in order to be used with LanguageService / <f:translate>:

Backend:
<f:translate key="{cb.EditorLLL}.<fieldIdentifier>.label" />

Frontend:
<f:translate key="{cb.FrontendLLL}.<fieldIdentifier>.label" />

They contain the relevant prefix even if a Default.xlf is provided instead of EditorInterface.xlf/Frontend.xlf (https://github.com/TYPO3-Initiatives/content-block-registration-api/blob/master/Classes/Service/ConfigurationService.php#L135)

@typecat typecat added enhancement New feature or request and removed UserStory labels Feb 25, 2022
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

3 participants