Skip to content

Commit

Permalink
Merge pull request #49 from crydotsnake/task/code-cleanup-tranlations
Browse files Browse the repository at this point in the history
TASK: Code Clean up & add missing backend translations
  • Loading branch information
daniellienert authored Sep 6, 2022
2 parents 54a7d1d + 4b35c7f commit dd0e30a
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ prototype(PunktDe.Form.Persistence:Backend.ExportDefinition.Index) < prototype(N
exportDefinitionEditorApp = Neos.Fusion:ResourceUri {
path = 'resource://PunktDe.Form.Persistence/Public/ExportDefinitionEditorApp/build/static/js/main.js'
}
exporterTypes =${Json.stringify(Array.keys(Configuration.setting('PunktDe.Form.Persistence.exporter')))}
exporterTypes = ${Json.stringify(Array.keys(Configuration.setting('PunktDe.Form.Persistence.exporter')))}


renderer = afx`
Expand All @@ -19,7 +19,7 @@ prototype(PunktDe.Form.Persistence:Backend.ExportDefinition.Index) < prototype(N
<div id="app" data-api-formdata={apiEndpoint.formData} data-api-exportdefinition={apiEndpoint.exportDefinition} data-exporter-types={props.exporterTypes}></div>
</div>
<div class="neos-footer">
<a class="neos-button neos-button-primary" title="Export definitions" href={props.backToFormDataLink}>Back to Form data export</a>
<a class="neos-button neos-button-primary" title="Export definitions" href={props.backToFormDataLink}>{I18n.translate('PunktDe.Form.Persistence:Backend.ExportDefinition:back.to.formdata.export')}</a>
</div>
</div>

Expand Down
24 changes: 12 additions & 12 deletions Resources/Private/Fusion/Controller/Backend/FormData/Index.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ prototype(PunktDe.Form.Persistence:Backend.FormData.Index) < prototype(Neos.Fusi
<Neos.Fusion.Form:Hidden field.name="siteName" attributes.value={formData.siteName}/>
<Neos.Fusion.Form:Hidden field.name="dimensionsHash" attributes.value={formData.dimensionsHash}/>
<Neos.Fusion.Form:Hidden field.name="hash" attributes.value={formData.hash}/>
<Neos.Fusion.Form:Button attributes.class="neos-button neos-button-primary">Download</Neos.Fusion.Form:Button>
<Neos.Fusion.Form:Button attributes.class="neos-button neos-button-primary">{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.download')}</Neos.Fusion.Form:Button>
</Neos.Fusion.Form:Form>
</td>
<td class="neos-action">
Expand All @@ -79,32 +79,32 @@ prototype(PunktDe.Form.Persistence:Backend.FormData.Index) < prototype(Neos.Fusi
renderer = afx`
<div class="neos-content neos-container-fluid">
<div class="neos-module-container">
<table class="neos-table" @if.savedFormData={props.tableRows}>
<table class="neos-table" @if.hasSavedFormData={props.tableRows}>
<thead>
<tr>
<th>
Site
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.site')}
</th>
<th>
Dimension
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.dimension')}
</th>
<th>
Form Identifier
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.form.identifier')}
</th>
<th>
Version
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.version')}
</th>
<th>
Count
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.count')}
</th>
<th>
Latest
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.latest')}
</th>
<th>
Scheduled
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.scheduled')}
</th>
<th>
Export definition
{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.export.definition')}
</th>
<th/>
</tr>
Expand All @@ -113,10 +113,10 @@ prototype(PunktDe.Form.Persistence:Backend.FormData.Index) < prototype(Neos.Fusi
{props.tableRows}
</tbody>
</table>
<div @if.noSavedFormData={!props.tableRows}>There is either no saved form data to display or your account is missing the required privileges.</div>
<div @if.hasNoSavedFormData={!props.tableRows}>{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.no.saved.form.data')}</div>
</div>
<div class="neos-footer">
<a class="neos-button neos-button-primary" title="Export definitions" href={props.exportDefinitionsLink}>Manage Export Definitions</a>
<a class="neos-button neos-button-primary" title="Export definitions" href={props.exportDefinitionsLink}>{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:index.manage.export.definitions')}</a>
</div>
</div>
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ prototype(PunktDe.Form.Persistence:Backend.FormData.Preview) < prototype(Neos.Fu
renderer = afx`
<div class="neos-module-container">
<br />
<h2>Data of this form is automatically exported and sent via mail to {scheduledExport.email}.</h2>
<h2>{I18n.translate('PunktDe.Form.Persistence:Backend.FormData:preview.scheduledExport.email.text')} {scheduledExport.email}.</h2>
<br />
</div>
`
Expand All @@ -66,8 +66,7 @@ prototype(PunktDe.Form.Persistence:Backend.FormData.Preview) < prototype(Neos.Fu
</table>
</div>
<div class="neos-footer">
<a class="neos-button neos-button-primary" title="Export definitions" href={props.backToFormDataLink}>Back
to Form data export</a>
<a class="neos-button neos-button-primary" title="Export definitions" href={props.backToFormDataLink}>{I18n.translate('PunktDe.Form.Persistence:Backend.ExportDefinition:back.to.formdata.export')}</a>
</div>
</div>
`
Expand Down
11 changes: 11 additions & 0 deletions Resources/Private/Translations/de/Backend/ExportDefinition.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="" product-name="PunktDe.Form.Persistence" source-language="en" datatype="plaintext" target-language="de">
<body>
<trans-unit id="back.to.formdata.export">
<source>Back to Form data export</source>
<target>Zurück zum Formulardatenexport</target>
</trans-unit>
</body>
</file>
</xliff>
55 changes: 55 additions & 0 deletions Resources/Private/Translations/de/Backend/FormData.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version='1.0' encoding='UTF-8'?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="" product-name="PunktDe.Form.Persistence" source-language="en" datatype="plaintext" target-language="de">
<body>
<trans-unit id="preview.scheduledExport.email.text">
<source>Data of this form is automatically exported and sent via mail to</source>
<target>Die Daten dieses Formulars werden automatisch exportiert und per E-Mail gesendet an</target>
</trans-unit>
<trans-unit id="index.site">
<source>Site</source>
<target>Seite</target>
</trans-unit>
<trans-unit id="index.dimension">
<source>Dimension</source>
<target>Dimension</target>
</trans-unit>
<trans-unit id="index.form.identifier">
<source>Form Identifier</source>
<target>Formular Kennung</target>
</trans-unit>
<trans-unit id="index.version">
<source>Version</source>
<target>Version</target>
</trans-unit>
<trans-unit id="index.count">
<source>Count</source>
<target>Anzahl</target>
</trans-unit>
<trans-unit id="index.latest">
<source>Latest</source>
<target>Aktuellste</target>
</trans-unit>
<trans-unit id="index.scheduled">
<source>Scheduled</source>
<target>Planmäßig</target>
</trans-unit>
<trans-unit id="index.export.definition">
<source>Export definition</source>
<target>Export Definition</target>
</trans-unit>
<trans-unit id="index.no.saved.form.data">
<source>There is either no saved form data to display or your account is missing the required privileges.</source>
<target>Es gibt entweder keine gespeicherten Formulardaten, die angezeigt werden können, oder Dein Konto verfügt nicht über die erforderlichen Berechtigungen.</target>
</trans-unit>
<trans-unit id="index.manage.export.definitions">
<source>Manage Export Definitions</source>
<target>Export Definitionen verwalten</target>
</trans-unit>
<trans-unit id="index.download">
<source>Download</source>
<target>Herunterladen</target>
</trans-unit>
</body>
</file>
</xliff>
10 changes: 10 additions & 0 deletions Resources/Private/Translations/en/Backend/ExportDefinition.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="" product-name="PunktDe.Form.Persistence" source-language="en" datatype="plaintext">
<body>
<trans-unit id="back.to.formdata.export">
<source>Back to Form data export</source>
</trans-unit>
</body>
</file>
</xliff>
43 changes: 43 additions & 0 deletions Resources/Private/Translations/en/Backend/FormData.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version='1.0' encoding='UTF-8'?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="" product-name="PunktDe.Form.Persistence" source-language="en" datatype="plaintext">
<body>
<trans-unit id="preview.scheduledExport.email.text">
<source>Data of this form is automatically exported and sent via mail to</source>
</trans-unit>
<trans-unit id="index.site">
<source>Site</source>
</trans-unit>
<trans-unit id="index.dimension">
<source>Dimension</source>
</trans-unit>
<trans-unit id="index.form.identifier">
<source>Form Identifier</source>
</trans-unit>
<trans-unit id="index.version">
<source>Version</source>
</trans-unit>
<trans-unit id="index.count">
<source>Count</source>
</trans-unit>
<trans-unit id="index.latest">
<source>Latest</source>
</trans-unit>
<trans-unit id="index.scheduled">
<source>Scheduled</source>
</trans-unit>
<trans-unit id="index.export.definition">
<source>Export definition</source>
</trans-unit>
<trans-unit id="index.no.saved.form.data">
<source>There is either no saved form data to display or your account is missing the required privileges.</source>
</trans-unit>
<trans-unit id="index.manage.export.definitions">
<source>Manage Export Definitions</source>
</trans-unit>
<trans-unit id="index.download">
<source>Download</source>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit dd0e30a

Please sign in to comment.