Skip to content

Commit d014d0b

Browse files
authored
[TASK] Use translation domain (#167)
Related: TYPO3-Documentation/Changelog-To-Doc#1370 Releases: main
1 parent d1ffee2 commit d014d0b

File tree

13 files changed

+129
-84
lines changed

13 files changed

+129
-84
lines changed

Classes/Controller/BackendController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ protected function initializeModuleTemplate(
216216
$this->modifyDocHeaderComponent($view, $context);
217217
$view->setFlashMessageQueue($this->getFlashMessageQueue());
218218
$view->setTitle(
219-
$this->getLanguageService()->sL('LLL:EXT:blog_example/Resources/Private/Language/Module/locallang_mod.xlf:mlang_tabs_tab'),
219+
$this->getLanguageService()->sL('blog_example.module.mod:mlang_tabs_tab'),
220220
$context,
221221
);
222222

@@ -241,7 +241,7 @@ private function addReloadButton(ButtonBar $buttonBar): void
241241
{
242242
$reloadButton = $buttonBar->makeLinkButton()
243243
->setHref($this->request->getAttribute('normalizedParams')->getRequestUri())
244-
->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.reload'))
244+
->setTitle($this->getLanguageService()->sL('core.core:labels.reload'))
245245
->setIcon($this->iconFactory->getIcon('actions-refresh', IconSize::SMALL));
246246
$buttonBar->addButton($reloadButton, ButtonBar::BUTTON_POSITION_RIGHT);
247247
}
@@ -250,7 +250,7 @@ private function addShortCutButton(ButtonBar $buttonBar): void
250250
{
251251
$shortcutButton = $buttonBar->makeShortcutButton()
252252
->setRouteIdentifier('blog_example')
253-
->setDisplayName($this->getLanguageService()->sL('LLL:EXT:blog_example/Resources/Private/Language/locallang.xlf:administration.menu.index'));
253+
->setDisplayName($this->getLanguageService()->sL('blog_example.messages:administration.menu.index'));
254254
$buttonBar->addButton($shortcutButton, ButtonBar::BUTTON_POSITION_RIGHT);
255255
}
256256

@@ -265,12 +265,12 @@ private function buildMenu(ModuleTemplate $view, string &$context): Menu
265265
'index' => [
266266
'controller' => 'Backend',
267267
'action' => 'index',
268-
'label' => $this->getLanguageService()->sL('LLL:EXT:blog_example/Resources/Private/Language/locallang.xlf:administration.menu.index'),
268+
'label' => $this->getLanguageService()->sL('blog_example.messages:administration.menu.index'),
269269
],
270270
'showAllComents' => [
271271
'controller' => 'Backend',
272272
'action' => 'showAllComments',
273-
'label' => $this->getLanguageService()->sL('LLL:EXT:blog_example/Resources/Private/Language/locallang.xlf:administration.menu.comments'),
273+
'label' => $this->getLanguageService()->sL('blog_example.messages:administration.menu.comments'),
274274
],
275275
];
276276

Configuration/FlexForms/PluginSettings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<sheets>
33
<sDEF>
44
<ROOT>
5-
<sheetTitle>Options</sheetTitle>
5+
<sheetTitle>LLL:blog_example.plugin:options</sheetTitle>
66
<type>array</type>
77
<el>
88
<settings.itemsPerPage>
9-
<label>Max. number of items to display per page</label>
9+
<label>LLL:blog_example.plugin:itemsPerPage</label>
1010
<config>
1111
<type>number</type>
1212
<size>2</size>

Configuration/TCA/Overrides/fe_users.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if (is_array($GLOBALS['TCA']['fe_users']['columns']['tx_extbase_type'])) {
1010
$GLOBALS['TCA']['fe_users']['types'][Administrator::class] = $GLOBALS['TCA']['fe_users']['types']['0'];
1111
$GLOBALS['TCA']['fe_users']['columns']['tx_extbase_type']['config']['items'][] = [
12-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:fe_users.tx_extbase_type.administrator',
12+
'label' => 'LLL:blog_example.db:fe_users.tx_extbase_type.administrator',
1313
'value' => Administrator::class,
1414
];
1515
}

Configuration/TCA/Overrides/tt_content.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77
defined('TYPO3') or die();
88

99
$GLOBALS['TCA']['tt_content']['columns']['CType']['config']['itemGroups']['blog']
10-
= 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:group.blog';
10+
= 'LLL:blog_example.db:group.blog';
1111

1212
/**
1313
* Registers a Plugin to be listed in the Backend.
1414
*/
1515
ExtensionUtility::registerPlugin(
1616
'blog_example',
1717
'BlogList',
18-
'List of Blogs (BlogExample)',
18+
'LLL:blog_example.plugin:blog_list.title',
1919
'blog_example_icon',
2020
'blog_example',
21-
'Display a list of blogs',
21+
'LLL:blog_example.plugin:blog_list.description',
2222
'FILE:EXT:blog_example/Configuration/FlexForms/PluginSettings.xml'
2323
);
2424
ExtensionUtility::registerPlugin(
2525
'blog_example',
2626
'BlogAdmin',
27-
'Admin Plugin (BlogExample)',
27+
'LLL:blog_example.plugin:blog_admin.title',
2828
'blog_example_icon',
2929
'blog_example',
30-
'Administrate the blog',
30+
'LLL:blog_example.plugin:blog_admin.description',
3131
'FILE:EXT:blog_example/Configuration/FlexForms/PluginSettings.xml'
3232
);

Configuration/TCA/tx_blogexample_domain_model_blog.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44
'ctrl' => [
5-
'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog',
5+
'title' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog',
66
'label' => 'title',
77
'tstamp' => 'tstamp',
88
'crdate' => 'crdate',
@@ -23,7 +23,7 @@
2323
],
2424
'columns' => [
2525
'title' => [
26-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.title',
26+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.title',
2727
'config' => [
2828
'type' => 'input',
2929
'size' => 20,
@@ -33,7 +33,7 @@
3333
],
3434
],
3535
'subtitle' => [
36-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.subtitle',
36+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.subtitle',
3737
'config' => [
3838
'type' => 'input',
3939
'size' => 20,
@@ -43,7 +43,7 @@
4343
],
4444
'description' => [
4545
'exclude' => true,
46-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.description',
46+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.description',
4747
'config' => [
4848
'type' => 'text',
4949
'enableRichtext' => true,
@@ -52,18 +52,18 @@
5252
],
5353
'logo' => [
5454
'exclude' => true,
55-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.logo',
55+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.logo',
5656
'config' => [
5757
'type' => 'file',
5858
'allowed' => 'common-image-types',
5959
'appearance' => [
60-
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
60+
'createNewRelationLinkTitle' => 'LLL:frontend:ttc:images.addFileReference',
6161
],
6262
],
6363
],
6464
'posts' => [
6565
'exclude' => true,
66-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.posts',
66+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.posts',
6767
'config' => [
6868
'type' => 'inline',
6969
'foreign_table' => 'tx_blogexample_domain_model_post',
@@ -77,8 +77,8 @@
7777
],
7878
'administrator' => [
7979
'exclude' => true,
80-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.administrator',
81-
'description' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.administrator.description',
80+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.administrator',
81+
'description' => 'LLL:blog_example.db:tx_blogexample_domain_model_blog.administrator.description',
8282
'config' => [
8383
'type' => 'select',
8484
'renderType' => 'selectSingle',
@@ -109,19 +109,19 @@
109109
],
110110
'types' => [
111111
'1' => ['showitem' => '
112-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
112+
--div--;LLL:core.form.tabs:general,
113113
title, description, logo,
114-
--div--;LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_blog.posts,
114+
--div--;LLL:blog_example.db:tx_blogexample_domain_model_blog.posts,
115115
posts,
116-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
116+
--div--;LLL:core.form.tabs:categories,
117117
category,
118-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
118+
--div--;LLL:core.form.tabs:access,
119119
administrator,
120120
--palette--;;paletteHidden,
121121
--palette--;;paletteAccess,
122-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
122+
--div--;LLL:core.form.tabs:language,
123123
--palette--;;paletteLanguage,
124-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
124+
--div--;LLL:core.form.tabs:extended,
125125
'],
126126
],
127127
'palettes' => [

Configuration/TCA/tx_blogexample_domain_model_comment.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44
'ctrl' => [
5-
'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_comment',
5+
'title' => 'LLL:blog_example.db:tx_blogexample_domain_model_comment',
66
'label' => 'date',
77
'label_alt' => 'author',
88
'label_alt_force' => true,
@@ -18,7 +18,7 @@
1818
'columns' => [
1919
'date' => [
2020
'exclude' => true,
21-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_comment.date',
21+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_comment.date',
2222
'config' => [
2323
'type' => 'datetime',
2424
'dbType' => 'datetime',
@@ -29,7 +29,7 @@
2929
],
3030
],
3131
'author' => [
32-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_comment.author',
32+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_comment.author',
3333
'config' => [
3434
'type' => 'input',
3535
'size' => 20,
@@ -39,7 +39,7 @@
3939
],
4040
],
4141
'email' => [
42-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_comment.email',
42+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_comment.email',
4343
'config' => [
4444
'type' => 'input',
4545
'size' => 20,
@@ -50,7 +50,7 @@
5050
],
5151
'content' => [
5252
'exclude' => true,
53-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_comment.content',
53+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_comment.content',
5454
'config' => [
5555
'type' => 'text',
5656
'rows' => 30,

Configuration/TCA/tx_blogexample_domain_model_info.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44
'ctrl' => [
5-
'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_info',
5+
'title' => 'LLL:blog_example.db:tx_blogexample_domain_model_info',
66
'label' => 'name',
77
'tstamp' => 'tstamp',
88
'crdate' => 'crdate',
@@ -21,7 +21,7 @@
2121
],
2222
'columns' => [
2323
'name' => [
24-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_info.name',
24+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_info.name',
2525
'config' => [
2626
'type' => 'input',
2727
'size' => 20,
@@ -31,7 +31,7 @@
3131
],
3232
],
3333
'bodytext' => [
34-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_info.bodytext',
34+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_info.bodytext',
3535
'config' => [
3636
'type' => 'text',
3737
'enableRichtext' => true,
@@ -45,13 +45,13 @@
4545
],
4646
'types' => [
4747
0 => ['showitem' => '
48-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
48+
--div--;LLL:core.form.tabs:general,
4949
name, bodytext,
50-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
50+
--div--;LLL:core.form.tabs:access,
5151
hidden,
52-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
52+
--div--;LLL:core.form.tabs:language,
5353
--palette--;;paletteLanguage,
54-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
54+
--div--;LLL:core.form.tabs:extended,
5555
'],
5656
],
5757
'palettes' => [

Configuration/TCA/tx_blogexample_domain_model_person.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44
'ctrl' => [
5-
'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_person',
5+
'title' => 'LLL:blog_example.db:tx_blogexample_domain_model_person',
66
'label' => 'lastname',
77
'label_alt' => 'firstname',
88
'label_alt_force' => true,
@@ -14,7 +14,7 @@
1414
'languageField' => 'sys_language_uid',
1515
'translationSource' => 'l10n_source',
1616
'origUid' => 't3_origuid',
17-
'prependAtCopy' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy',
17+
'prependAtCopy' => 'LLL:core.general.xlf:LGL.prependAtCopy',
1818
'delete' => 'deleted',
1919
'enablecolumns' => [
2020
'disabled' => 'hidden',
@@ -23,7 +23,7 @@
2323
],
2424
'columns' => [
2525
'firstname' => [
26-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_person.firstname',
26+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_person.firstname',
2727
'config' => [
2828
'type' => 'input',
2929
'size' => 20,
@@ -33,7 +33,7 @@
3333
],
3434
],
3535
'lastname' => [
36-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_person.lastname',
36+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_person.lastname',
3737
'config' => [
3838
'type' => 'input',
3939
'size' => 20,
@@ -43,7 +43,7 @@
4343
],
4444
],
4545
'email' => [
46-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_person.email',
46+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_person.email',
4747
'config' => [
4848
'type' => 'input',
4949
'size' => 20,
@@ -53,7 +53,7 @@
5353
],
5454
],
5555
'tags' => [
56-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_person.tags',
56+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_person.tags',
5757
'config' => [
5858
'type' => 'inline',
5959
'foreign_table' => 'tx_blogexample_domain_model_tag', // needed by Extbase
@@ -71,7 +71,7 @@
7171
],
7272
'tags_special' => [
7373
'exclude' => true,
74-
'label' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xlf:tx_blogexample_domain_model_person.tags_special',
74+
'label' => 'LLL:blog_example.db:tx_blogexample_domain_model_person.tags_special',
7575
'config' => [
7676
'type' => 'inline',
7777
'foreign_table' => 'tx_blogexample_domain_model_tag', // needed by Extbase
@@ -90,13 +90,13 @@
9090
],
9191
'types' => [
9292
'1' => ['showitem' => '
93-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
93+
--div--;LLL:core.form.tabs:general,
9494
firstname, lastname, email, avatar, tags, tags_special,
95-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
95+
--div--;LLL:core.form.tabs:access,
9696
hidden,
97-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
97+
--div--;LLL:core.form.tabs:language,
9898
--palette--;;paletteLanguage,
99-
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
99+
--div--;LLL:core.form.tabs:extended,
100100
'],
101101
],
102102
'palettes' => [

0 commit comments

Comments
 (0)