Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lfeditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TYPO3
lfeditor
Commits
6f9ae903
Commit
6f9ae903
authored
Mar 23, 2015
by
damjan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] Using 'en' as language label instead of 'default'
parent
a7c68e15
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
Classes/Service/ConfigurationService.php
Classes/Service/ConfigurationService.php
+11
-7
Resources/Private/Templates/EditConstant/EditConstant.html
Resources/Private/Templates/EditConstant/EditConstant.html
+5
-3
Resources/Private/Templates/EditFile/EditFile.html
Resources/Private/Templates/EditFile/EditFile.html
+6
-6
Resources/Private/Templates/General/General.html
Resources/Private/Templates/General/General.html
+1
-1
No files found.
Classes/Service/ConfigurationService.php
View file @
6f9ae903
...
...
@@ -284,24 +284,28 @@ class ConfigurationService extends AbstractService {
$langData
,
$default
=
''
,
BackendUserAuthentication
$backendUser
=
NULL
,
$translatedLanguagesOnly
=
FALSE
)
{
// build languages
$languageArray
=
$this
->
getLangArray
(
$backendUser
);
$langList
=
array
();
foreach
(
$languageArray
as
$lang
)
{
$lang
uage
List
=
array
();
foreach
(
$languageArray
as
$lang
uage
)
{
$constCount
=
0
;
if
(
is_array
(
$langData
[
$lang
]))
{
$constCount
=
count
(
$langData
[
$lang
]);
if
(
is_array
(
$langData
[
$lang
uage
]))
{
$constCount
=
count
(
$langData
[
$lang
uage
]);
}
if
(
$translatedLanguagesOnly
&&
$constCount
<=
0
)
{
continue
;
}
$langList
[
$lang
]
=
$lang
.
' ('
.
$constCount
.
' '
.
$languageLabel
=
$language
;
if
(
$language
==
'default'
)
{
$languageLabel
=
'en'
;
}
$languageList
[
$language
]
=
$languageLabel
.
' ('
.
$constCount
.
' '
.
LocalizationUtility
::
translate
(
'const.consts'
,
'lfeditor'
)
.
')'
;
}
// add default value
if
(
!
empty
(
$default
))
{
$lang
List
=
array_merge
(
array
(
'###default###'
=>
$default
),
$lang
List
);
$lang
uageList
=
array_merge
(
array
(
'###default###'
=>
$default
),
$language
List
);
}
return
$langList
;
return
$lang
uage
List
;
}
/**
...
...
Resources/Private/Templates/EditConstant/EditConstant.html
View file @
6f9ae903
...
...
@@ -18,14 +18,16 @@
<f:form
id=
"contentForm"
action=
"editConstantSave"
>
<f:for
each=
"{languages}"
key=
"lang"
as=
"constValue"
iteration=
"iterator"
>
<fieldset
class=
"tx-lfeditor-fieldset bgColor5 {f:if(condition: iterator.isEven, then: 'tx-lfeditor-fright', else: 'tx-lfeditor-fleft')}"
>
<legend
class=
"bgColor3"
>
{lang}
</legend>
<legend
class=
"bgColor3"
>
{f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')}
</legend>
<lfe:extendedIf
condition=
"{lang} == {defaultLanguage}"
and=
"{defaultLanguagePermission} != 'TRUE'"
>
<f:then>
<f:form.textarea
cols=
"80"
rows=
"{numTextAreaRows}"
value=
"{constValue}"
name=
"editConstTextArea[{lang}][{constantSelection}]"
lang=
"{
lang
}"
lang=
"{
f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')
}"
additionalAttributes=
"{readonly: ''}"
class=
"tx-lfeditor-textarea"
/>
</f:then>
...
...
@@ -34,7 +36,7 @@
cols=
"80"
rows=
"{numTextAreaRows}"
value=
"{constValue}"
name=
"editConstTextArea[{lang}][{constantSelection}]"
lang=
"{
lang
}"
lang=
"{
f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')
}"
class=
"tx-lfeditor-textarea"
/>
</f:else>
</lfe:extendedIf>
...
...
Resources/Private/Templates/EditFile/EditFile.html
View file @
6f9ae903
...
...
@@ -46,7 +46,7 @@
<f:for
each=
"{constValues}"
key=
"constKey"
as=
"constValue"
iteration=
"iterator"
>
<fieldset
class=
"tx-lfeditor-fieldset bgColor5 {lfe:extendedIf(condition: iterator.isOdd, or: parallelEdit, then: 'tx-lfeditor-fleft', else: 'tx-lfeditor-fright')}"
>
<legend
class=
"bgColor3 tx-lfeditor-constantMaxWidth400"
title=
"{languageSelection}:{constKey}"
>
{
languageSelection
}:{constKey}
{
f:if(condition: '{languageSelection} == \'default\'', then: 'en', else: '{languageSelection}')
}:{constKey}
</legend>
<lfe:extendedIf
condition=
"{languageSelection} == {defaultLanguage}"
and=
"{defaultLanguagePermission} != 'TRUE'"
>
<f:then>
...
...
@@ -54,7 +54,7 @@
cols=
"80"
rows=
"{numTextAreaRows}"
value=
"{constValue.edit}"
name=
"editFileTextArea[{languageSelection}][{constKey}]"
lang=
"{
languageSelection
}"
lang=
"{
f:if(condition: '{languageSelection} == \'default\'', then: 'en', else: '{languageSelection}')
}"
additionalAttributes=
"{readonly: ''}"
class=
"tx-lfeditor-textarea"
/>
</f:then>
...
...
@@ -63,7 +63,7 @@
cols=
"80"
rows=
"{numTextAreaRows}"
value=
"{constValue.edit}"
name=
"editFileTextArea[{languageSelection}][{constKey}]"
lang=
"{
languageSelection
}"
lang=
"{
f:if(condition: '{languageSelection} == \'default\'', then: 'en', else: '{languageSelection}')
}"
class=
"tx-lfeditor-textarea"
/>
</f:else>
</lfe:extendedIf>
...
...
@@ -76,7 +76,7 @@
<f:if
condition=
"{parallelEdit}"
>
<fieldset
class=
"tx-lfeditor-fieldset bgColor5 tx-lfeditor-fright"
>
<legend
class=
"bgColor3 tx-lfeditor-constantMaxWidth400"
title=
"{referenceLanguageSelection}:{constKey}"
>
{
referenceLanguageSelection
}:{constKey}
{
f:if(condition: '{referenceLanguageSelection} == \'default\'', then: 'en', else: '{referenceLanguageSelection}')
}:{constKey}
</legend>
<lfe:extendedIf
condition=
"{referenceLanguageSelection} == {defaultLanguage}"
and=
"{defaultLanguagePermission} != 'TRUE'"
>
<f:then>
...
...
@@ -84,7 +84,7 @@
cols=
"80"
rows=
"{numTextAreaRows}"
value=
"{constValue.pattern}"
name=
"editFileTextArea[{referenceLanguageSelection}][{constKey}]"
lang=
"{
referenceLanguageSelection
}"
lang=
"{
f:if(condition: '{referenceLanguageSelection} == \'default\'', then: 'en', else: '{referenceLanguageSelection}')
}"
additionalAttributes=
"{readonly: ''}"
class=
"tx-lfeditor-textarea"
/>
</f:then>
...
...
@@ -93,7 +93,7 @@
cols=
"80"
rows=
"{numTextAreaRows}"
value=
"{constValue.pattern}"
name=
"editFileTextArea[{referenceLanguageSelection}][{constKey}]"
lang=
"{
referenceLanguageSelection
}"
lang=
"{
f:if(condition: '{referenceLanguageSelection} == \'default\'', then: 'en', else: '{referenceLanguageSelection}')
}"
class=
"tx-lfeditor-textarea"
/>
</f:else>
</lfe:extendedIf>
...
...
Resources/Private/Templates/General/General.html
View file @
6f9ae903
...
...
@@ -35,7 +35,7 @@
<tr>
<td
class=
"bgColor4"
>
<f:link.action
action=
"goToEditFile"
arguments=
"{language: langKey}"
>
{
langKey
}
{
f:if(condition: '{langKey} == \'default\'', then: 'en', else: '{langKey}')
}
</f:link.action>
</td>
<td
class=
"bgColor4"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment