Skip to content

Commit

Permalink
Merge pull request #2 from jonnitto/master
Browse files Browse the repository at this point in the history
Several optimizations
  • Loading branch information
cvette authored Dec 1, 2017
2 parents 356af8b + 11e219b commit 831b435
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 58 deletions.
3 changes: 1 addition & 2 deletions Configuration/NodeTypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
dataSourceIdentifier: 'geshiLanguages'

showLineNumbers:
type: boolean
defaultValue: true
Expand All @@ -55,4 +54,4 @@
reloadIfChanged: true
label: i18n
inspector:
group: 'codeBlock'
group: 'codeBlock'
10 changes: 1 addition & 9 deletions Resources/Private/Fusion/NodeTypes/CodeBlock.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,5 @@ prototype(Vette.CodeBlock:CodeBlock) {
showLineNumbers = ${q(node).property('showLineNumbers')}
startLinesAt = ${q(node).property('startLinesAt')}
highlightLines = ${String.split(q(node).property('highlightLines'), ',')}

@cache {
mode = 'cached'
entryIdentifier {
node = ${node}
editPreviewMode = ${node.context.currentRenderingMode.name}
}
}
}
}
}
25 changes: 25 additions & 0 deletions Resources/Private/Translations/de/NodeTypes/CodeBlock.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file original="" product-name="Vette.CodeBlock" source-language="de" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Code Block</source>
</trans-unit>
<trans-unit id="properties.code" xml:space="preserve">
<source>Source Code</source>
</trans-unit>
<trans-unit id="properties.language" xml:space="preserve">
<source>Sprache</source>
</trans-unit>
<trans-unit id="properties.startLinesAt" xml:space="preserve">
<source>Starte Liniennummerierung bei</source>
</trans-unit>
<trans-unit id="properties.showLineNumbers" xml:space="preserve">
<source>Zeige Zeilennummern</source>
</trans-unit>
<trans-unit id="properties.highlightLines" xml:space="preserve">
<source>Hebe Zeilen hervor (kommasepariert)</source>
</trans-unit>
</body>
</file>
</xliff>
36 changes: 18 additions & 18 deletions Resources/Private/Translations/en/NodeTypes/CodeBlock.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
<file original="" product-name="Vette.CodeBlock" source-language="en" datatype="plaintext">
<body>
<trans-unit id="ui.label" xml:space="preserve">
<source>Code Block</source>
</trans-unit>
<trans-unit id="properties.code" xml:space="preserve">
<source>Source Code</source>
</trans-unit>
<trans-unit id="properties.language" xml:space="preserve">
<source>Language</source>
</trans-unit>
<trans-unit id="properties.startLinesAt" xml:space="preserve">
<source>Start line numbers at</source>
</trans-unit>
<trans-unit id="properties.showLineNumbers" xml:space="preserve">
<source>Show line numbers</source>
</trans-unit>
<trans-unit id="properties.highlightLines" xml:space="preserve">
<source>Highlight lines (Comma separated)</source>
</trans-unit>
<source>Code Block</source>
</trans-unit>
<trans-unit id="properties.code" xml:space="preserve">
<source>Source Code</source>
</trans-unit>
<trans-unit id="properties.language" xml:space="preserve">
<source>Language</source>
</trans-unit>
<trans-unit id="properties.startLinesAt" xml:space="preserve">
<source>Start line numbers at</source>
</trans-unit>
<trans-unit id="properties.showLineNumbers" xml:space="preserve">
<source>Show line numbers</source>
</trans-unit>
<trans-unit id="properties.highlightLines" xml:space="preserve">
<source>Highlight lines (Comma separated)</source>
</trans-unit>
</body>
</file>
</xliff>
</xliff>
58 changes: 29 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"name": "cvette/neos-code-block",
"type": "neos-plugin",
"description": "This package includes a node type to add code blocks with syntax highlighting to your Neos CMS project.",
"license": "GPL-3.0+",
"authors": [
{
"name": "Christian Vette",
"email": "[email protected]",
"homepage": "https://www.christianvette.de",
"role": "Developer"
"name": "cvette/neos-code-block",
"type": "neos-plugin",
"description":
"This package includes a node type to add code blocks with syntax highlighting to your Neos CMS project.",
"license": "GPL-3.0+",
"authors": [
{
"name": "Christian Vette",
"email": "[email protected]",
"homepage": "https://www.christianvette.de",
"role": "Developer"
}
],
"require": {
"geshi/geshi": "~1.0",
"neos/neos": "~3.0"
},
"autoload": {
"psr-4": {
"Vette\\CodeBlock\\": "Classes"
}
},
"extra": {
"marketplace-account": "[email protected]",
"installer-name": "Vette.CodeBlock",
"neos": {
"package-key": "Vette.CodeBlock"
}
}
],
"require": {
"geshi/geshi": "~1.0",
"neos/neos": "~3.0",
"neos/nodetypes": "~3.0"
},
"autoload": {
"psr-4": {
"Vette\\CodeBlock\\": "Classes"
}
},
"extra": {
"marketplace-account": "[email protected]",
"installer-name": "Vette.CodeBlock",
"neos": {
"package-key": "Vette.CodeBlock"
}
}
}
}

0 comments on commit 831b435

Please sign in to comment.