Skip to content

Commit fec2492

Browse files
#1143: Revert translation attempt
1 parent 1e7ed0d commit fec2492

File tree

6 files changed

+8
-36
lines changed

6 files changed

+8
-36
lines changed

packages/core/patternlab-config.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@
7575
"patternExportPatternPartials": [],
7676
"patternExportPreserveDirectoryStructure": true,
7777
"patternExportRaw": false,
78-
"patternTranslations": {
79-
"ViewAllSubGroup": "View all {sgName}",
80-
"viewAllGroup": "View All",
81-
"viewAllRoot": "All",
82-
"rootName": "Root"
83-
},
8478
"serverOptions": {
8579
"wait": 1000
8680
},

packages/core/src/lib/object_factory.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,7 @@ Pattern.prototype = {
237237
} else {
238238
// Im Not quite shure about that but its better than empty node
239239
// TODO: verify
240-
return pInfo.patternlab &&
241-
pInfo.patternlab.config.patternTranslations &&
242-
pInfo.patternlab.config.patternTranslations.rootName
243-
? _.kebabCase(pInfo.patternlab.config.patternTranslations.rootName)
244-
: 'root';
240+
return 'root';
245241
}
246242
},
247243

packages/core/src/lib/ui_builder.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,7 @@ const ui_builder = function() {
285285
newSubTypeItem = {
286286
patternPartial:
287287
'viewall-' + pattern.patternGroup + '-' + pattern.patternSubGroup,
288-
patternName:
289-
patternlab.config.patternTranslations &&
290-
patternlab.config.patternTranslations.viewAllGroup
291-
? patternlab.config.patternTranslations.viewAllGroup
292-
: `View all`,
288+
patternName: `View All`,
293289
patternPath: encodeURI(pattern.flatPatternPath + '/index.html'),
294290
patternType: pattern.patternType,
295291
patternSubtype: pattern.patternSubtype,
@@ -326,14 +322,7 @@ const ui_builder = function() {
326322
if (isViewAllVariant) {
327323
patternType.patternItems.push({
328324
patternPartial: `viewall-${pattern.patternGroup}-all`,
329-
patternName:
330-
patternlab.config.patternTranslations &&
331-
patternlab.config.patternTranslations.ViewAllSubGroup
332-
? patternlab.config.patternTranslations.ViewAllSubGroup.replace(
333-
'{sgName}',
334-
_.startCase(pattern.patternGroup)
335-
)
336-
: `View all ${_.startCase(pattern.patternGroup)}`,
325+
patternName: `View all ${_.startCase(pattern.patternGroup)}`,
337326
patternPath: encodeURI(pattern.patternGroup + '/index.html'),
338327
name: pattern.patternGroup,
339328
isDocPattern: true,

packages/edition-node/patternlab-config.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@
7575
"patternExportPatternPartials": [],
7676
"patternExportPreserveDirectoryStructure": true,
7777
"patternExportRaw": false,
78-
"patternTranslations": {
79-
"ViewAllSubGroup": "View all {sgName}",
80-
"viewAllGroup": "View All",
81-
"viewAllRoot": "All",
82-
"rootName": "Root"
83-
},
8478
"serverOptions": {
8579
"wait": 1000
8680
},

packages/uikit-workshop/src/scripts/components/pl-nav/src/NavLink.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export const NavLink = props => {
77
href={`patterns/${props.item.patternPath}`}
88
className={`pl-c-nav__link pl-c-nav__link--sublink
99
${
10-
props.item.patternName === 'View All'
10+
props.item.isDocPattern
1111
? 'pl-c-nav__link--overview'
1212
: 'pl-c-nav__link--subsublink'
1313
}
1414
`}
1515
onClick={e => props.elem.handleClick(e, props.item.patternPartial)}
1616
data-patternpartial={props.item.patternPartial}
1717
>
18-
{props.item.patternName === 'View All' && props.category
18+
{props.item.isDocPattern && props.category
1919
? `${props.category}`
2020
: props.item.patternName}
2121
{props.item.patternState && (

packages/uikit-workshop/src/scripts/components/pl-nav/src/NavList.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ export const NavList = props => {
88
const reorderedChildren = [];
99

1010
const nonViewAllItems = elem.noViewAll
11-
? children.filter(item => item.patternName !== 'View All')
11+
? children.filter(item => !item.isDocPattern)
1212
: children.filter(
13-
item =>
14-
item.patternName !== 'View All' && !item.patternName.includes(' Docs')
13+
item => !item.isDocPattern && !item.patternName.includes(' Docs')
1514
);
1615
const viewAllItems = elem.noViewAll
1716
? []
18-
: children.filter(item => item.patternName === 'View All');
17+
: children.filter(item => item.isDocPattern);
1918

2019
reorderedChildren.push(...viewAllItems, ...nonViewAllItems);
2120

0 commit comments

Comments
 (0)