Skip to content

Commit

Permalink
add german labels, de/en build config
Browse files Browse the repository at this point in the history
  • Loading branch information
marleenbarth committed Jun 8, 2022
1 parent 795ab56 commit bac3908
Show file tree
Hide file tree
Showing 15 changed files with 601 additions and 521 deletions.
989 changes: 505 additions & 484 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
],
"dependencies": {
"@bsi-cx/design-standard-library-web": "github:bsi-software/bsi-cx-design-standard-library-web#semver:^1.0.1"
"@bsi-cx/design-standard-library-web": "github:bsi-software/bsi-cx-design-standard-library-web#semver:^1.0.0"
},
"devDependencies": {
"@bsi-cx/design-build": "github:bsi-software/bsi-cx-design-build#semver:^1.0.0"
Expand Down
6 changes: 6 additions & 0 deletions properties-de.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const baseProperties = require('./properties');

module.exports = {
...baseProperties,
language: 'de'
}
6 changes: 6 additions & 0 deletions properties-en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const baseProperties = require('./properties');

module.exports = {
...baseProperties,
language: 'en'
}
2 changes: 2 additions & 0 deletions properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ module.exports = {
gridBreakpointXL: '1200px',
gridBreakpointXXL: '1400px',

// Allowed values: de, en
language: 'de'
}
2 changes: 2 additions & 0 deletions templates/landingpage/_layout.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>BSI CX Master Template</title>
{% include './../shared/html-header.twig' %}
</head>

Expand Down Expand Up @@ -31,6 +32,7 @@
</div>
{% endapply %}

<script>window.properties={{ properties|json_encode|raw }}</script>
<script src="{{ bsi_cx_js_module_runtime_href() }}" data-bsi-remove-if="draft" defer="defer"></script>
{{ bsi_cx_js_module_missing_chunks_import() }}
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div data-bsi-element="footer-nJDYZP" class="element-footer-nJDYZP d-block bg-primary bg-gradient text-light pt-5 pb-4">
<div data-bsi-dropzone="footer-dropzone-rR98ys">
{% include '@bsi-cx/design-standard-library-web/content-elements/layout/col-three/template.twig' %}
{% include '@bsi-cx/design-standard-library-web/content-elements/layout/col-two/template.twig' %}
</div>
</div>
9 changes: 6 additions & 3 deletions templates/landingpage/design.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ module.exports = cx.design
require('@bsi-cx/design-standard-library-web/content-elements/layout/spacer')),
cx.contentElementGroup
.withGroupId('headings-J9rRcv')
.withLabel('Headings')
/*.withLabel('Headings')*/
.withLabel('Überschriften')
.withContentElements(
require('@bsi-cx/design-standard-library-web/content-elements/base/h1'),
require('@bsi-cx/design-standard-library-web/content-elements/base/h2'),
require('@bsi-cx/design-standard-library-web/content-elements/base/h3')),
cx.contentElementGroup
.withGroupId('content-JFLFHv')
.withLabel('Content')
/*.withLabel('Content')*/
.withLabel('Inhalt')
.withContentElements(
require('@bsi-cx/design-standard-library-web/content-elements/base/text'),
require('@bsi-cx/design-standard-library-web/content-elements/base/figure'),
Expand All @@ -50,7 +52,8 @@ module.exports = cx.design
require('@bsi-cx/design-standard-library-web/content-elements/base/html')),
cx.contentElementGroup
.withGroupId('forms-NjbmnQ')
.withLabel('Forms')
/*.withLabel('Forms')*/
.withLabel('Formular')
.withContentElements(
require('@bsi-cx/design-standard-library-web/content-elements/form/form-container'),
require('@bsi-cx/design-standard-library-web/content-elements/form/multi-column'),
Expand Down
6 changes: 4 additions & 2 deletions templates/shared/content-elements/header-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ const contentElement = require('@bsi-cx/design-standard-library-web/content-elem
module.exports = contentElement(
require('./template.twig'),
'header-image-xC4085',
'Header image',
/*'Header image',*/
'Header Bild',
'',
'header-image-dropzone-Dt5Gll',
'header-image-part-MHZ8Gp',
'Header image'
/*'Header image'*/
'Header Bild'
);
6 changes: 4 additions & 2 deletions templates/shared/content-elements/logo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ module.exports = contentElement(
'logo-pm7eOT',
'Logo',
'logo-part-image-1rKWxD',
'Logo image',
/*'Logo image',*/
'Logo Bild',
'logo-part-text-ySZsrw',
'Logo text'
/*'Logo text'*/
'Logo Text'
).withStyleConfigs();
1 change: 0 additions & 1 deletion templates/shared/html-header.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<title>BSI CX Master Template</title>
<link rel="icon" type="image/svg+xml" href="{{ bsi_cx_asset('./static/logo.svg') }}" sizes="any">

<meta charset="utf-8"/>
Expand Down
3 changes: 3 additions & 0 deletions templates/website/_layout.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% verbatim %}{{ navigation.activePage.pageTitle }}{% endverbatim %}</title>
{% include './../shared/html-header.twig' %}
</head>

Expand All @@ -26,6 +27,8 @@
{% block footer %}{% endblock %}

{% endapply %}

<script>window.properties={{ properties|json_encode|raw }}</script>
<script src="{{ bsi_cx_js_module_runtime_href() }}" data-bsi-remove-if="draft" defer="defer"></script>
{{ bsi_cx_js_module_missing_chunks_import() }}
</body>
Expand Down
9 changes: 6 additions & 3 deletions templates/website/design.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ module.exports = cx.design
require('@bsi-cx/design-standard-library-web/content-elements/layout/spacer')),
cx.contentElementGroup
.withGroupId('headings-J9rRcv')
.withLabel('Headings')
/*.withLabel('Headings')*/
.withLabel('Überschriften')
.withContentElements(
require('@bsi-cx/design-standard-library-web/content-elements/base/h1'),
require('@bsi-cx/design-standard-library-web/content-elements/base/h2'),
require('@bsi-cx/design-standard-library-web/content-elements/base/h3')),
cx.contentElementGroup
.withGroupId('content-JFLFHv')
.withLabel('Content')
/*.withLabel('Content')*/
.withLabel('Inhalt')
.withContentElements(
require('@bsi-cx/design-standard-library-web/content-elements/base/text'),
require('@bsi-cx/design-standard-library-web/content-elements/base/figure'),
Expand All @@ -50,7 +52,8 @@ module.exports = cx.design
require('@bsi-cx/design-standard-library-web/content-elements/base/html')),
cx.contentElementGroup
.withGroupId('forms-NjbmnQ')
.withLabel('Forms')
/*.withLabel('Forms')*/
.withLabel('Formular')
.withContentElements(
require('@bsi-cx/design-standard-library-web/content-elements/form/form-container'),
require('@bsi-cx/design-standard-library-web/content-elements/form/multi-column'),
Expand Down
2 changes: 1 addition & 1 deletion templates/website/includes/footer/template.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set dropzoneId = dropzoneId ?: 'footer-dropzone-rR98ys' %}

<div class="d-block bg-primary bg-gradient text-light pt-5 pb-4" data-bsi-dropzone="{{ dropzoneId }}">
{% include '@bsi-cx/design-standard-library-web/content-elements/layout/col-three/template.twig' %}
{% include '@bsi-cx/design-standard-library-web/content-elements/layout/col-two/template.twig' %}
</div>
77 changes: 54 additions & 23 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,58 @@ const path = require('path');

const {BuildConfig, WebpackConfigBuilder, Version, DesignType, ModuleConfig} = require('@bsi-cx/design-build');

const landingpageBuildConfig = new BuildConfig()
.withName('master-template-cx-22.0-landingpage')
.withVersion('1.0.2')
.withDesignType(DesignType.LANDINGPAGE)
.withTargetVersion(Version.CX_22_0)
.withRootPath(path.resolve(__dirname, 'templates', 'landingpage'))
.withPropertiesFilePath(path.resolve(__dirname, 'properties.js'))
.withModulesRootPath('modules')
.withModules(
new ModuleConfig()
.withName('main')
.withPath('main.js'));

const websiteBuildConfig = new BuildConfig()
.withName('master-template-cx-22.0-website')
.withVersion('1.0.2')
.withDesignType(DesignType.WEBSITE)
.withTargetVersion(Version.CX_22_0)
.withRootPath(path.resolve(__dirname, 'templates', 'website'))
.withPropertiesFilePath(path.resolve(__dirname, 'properties.js'))
.withModulesRootPath('modules')
.withModules(
new ModuleConfig()
.withName('main')
.withPath('main.js'));

module.exports = WebpackConfigBuilder.fromConfigs(
new BuildConfig()
.withName('master-template-2.0-website')
.withVersion('1.0.0')
.withDesignType(DesignType.WEBSITE)
.withTargetVersion(Version.CX_22_0)
.withRootPath(path.resolve(__dirname, 'templates', 'website'))
.withPropertiesFilePath(path.resolve(__dirname, 'properties.js'))
.withModulesRootPath('modules')
.withModules(
new ModuleConfig()
.withName('main')
.withPath('main.js')),
new BuildConfig()
.withName('master-template-2.0-landingpage')
.withVersion('1.0.0')
.withTargetVersion(Version.CX_22_0)
.withRootPath(path.resolve(__dirname, 'templates', 'landingpage'))
.withPropertiesFilePath(path.resolve(__dirname, 'properties.js'))
.withModulesRootPath('modules')
.withModules(
new ModuleConfig()
.withName('main')
.withPath('main.js')));
websiteBuildConfig.clone()
.withName('master-template-cx-1.3-website-de')
.withTargetVersion(Version.CX_1_3)
.withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
websiteBuildConfig.clone()
.withName('master-template-cx-1.3-website-en')
.withTargetVersion(Version.CX_1_3)
.withPropertiesFilePath(path.resolve(__dirname, 'properties-en.js')),
websiteBuildConfig.clone()
.withName('master-template-cx-22.0-website-de')
.withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
websiteBuildConfig.clone()
.withName('master-template-cx-22.0-website-en')
.withPropertiesFilePath(path.resolve(__dirname, 'properties-en.js')),
landingpageBuildConfig.clone()
.withName('master-template-cx-1.3-landingpage-de')
.withTargetVersion(Version.CX_1_3)
.withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
landingpageBuildConfig.clone()
.withName('master-template-cx-1.3-landingpage-en')
.withTargetVersion(Version.CX_1_3)
.withPropertiesFilePath(path.resolve(__dirname, 'properties-en.js')),
landingpageBuildConfig.clone()
.withName('master-template-cx-22.0-landingpage-de')
.withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
landingpageBuildConfig.clone()
.withName('master-template-cx-22.0-landingpage-en')
.withPropertiesFilePath(path.resolve(__dirname, 'properties-en.js')));

0 comments on commit bac3908

Please sign in to comment.