Skip to content

Commit

Permalink
fix(translation): improve capitalization add missing menu.new (#307)
Browse files Browse the repository at this point in the history
* Improve capitalization in some cases, correct typos in English, add translation for menu.new, closes #306

* Update snapshots
  • Loading branch information
danyill committed Sep 13, 2021
1 parent 58bebc9 commit b5e2621
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 27 deletions.
52 changes: 43 additions & 9 deletions __snapshots__/BDA wizarding editing integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

## `defines a editBDaWizard to edit an existing BDA`

#### `looks like the latest snapshot`
#### `looks like the latest snapshot`

```html
<mwc-dialog defaultaction="close" heading="Edit BDA" open="">
<mwc-dialog
defaultaction="close"
heading="Edit BDA"
open=""
>
<div id="wizard-content">
<mwc-button fullwidth="" icon="delete" label="Remove" trailingicon="">
<mwc-button
fullwidth=""
icon="delete"
label="Remove"
trailingicon=""
>
</mwc-button>
<wizard-textfield
dialoginitialfocus=""
Expand Down Expand Up @@ -352,7 +361,11 @@
EntryID
</mwc-list-item>
</wizard-select>
<wizard-select fixedmenuposition="" helper="Type" label="type">
<wizard-select
fixedmenuposition=""
helper="Type"
label="type"
>
<mwc-list-item
aria-disabled="true"
class="Struct"
Expand Down Expand Up @@ -537,7 +550,12 @@
false
</mwc-list-item>
</wizard-select>
<wizard-select disabled="" helper="Default value" label="Val" nullable="">
<wizard-select
disabled=""
helper="Default value"
label="Val"
nullable=""
>
<mwc-list-item
aria-disabled="false"
aria-selected="false"
Expand Down Expand Up @@ -614,14 +632,19 @@
>
</mwc-button>
</mwc-dialog>

```

## `defines a createBDaWizard to create a new BDA element`

#### `looks like the latest snapshot`
#### `looks like the latest snapshot`

```html
<mwc-dialog defaultaction="close" heading="Edit BDA" open="">
<mwc-dialog
defaultaction="close"
heading="Edit BDA"
open=""
>
<div id="wizard-content">
<wizard-textfield
dialoginitialfocus=""
Expand Down Expand Up @@ -963,7 +986,11 @@
EntryID
</mwc-list-item>
</wizard-select>
<wizard-select fixedmenuposition="" helper="Type" label="type">
<wizard-select
fixedmenuposition=""
helper="Type"
label="type"
>
<mwc-list-item
aria-disabled="false"
class="Struct"
Expand Down Expand Up @@ -1135,7 +1162,12 @@
false
</mwc-list-item>
</wizard-select>
<wizard-select disabled="" helper="Default value" label="Val" nullable="">
<wizard-select
disabled=""
helper="Default value"
label="Val"
nullable=""
>
</wizard-select>
<wizard-textfield
disabled=""
Expand All @@ -1161,4 +1193,6 @@
>
</mwc-button>
</mwc-dialog>

```

56 changes: 45 additions & 11 deletions __snapshots__/DA wizarding editing integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

## `defines a editDaWizard to edit an existing DA`

#### `looks like the latest snapshot`
#### `looks like the latest snapshot`

```html
<mwc-dialog defaultaction="close" heading="Edit DA" open="">
<mwc-dialog
defaultaction="close"
heading="Edit DA"
open=""
>
<div id="wizard-content">
<mwc-button fullwidth="" icon="delete" label="Remove" trailingicon="">
<mwc-button
fullwidth=""
icon="delete"
label="Remove"
trailingicon=""
>
</mwc-button>
<wizard-textfield
dialoginitialfocus=""
Expand Down Expand Up @@ -352,7 +361,11 @@
EntryID
</mwc-list-item>
</wizard-select>
<wizard-select fixedmenuposition="" helper="Type" label="type">
<wizard-select
fixedmenuposition=""
helper="Type"
label="type"
>
<mwc-list-item
aria-disabled="true"
class="Struct"
Expand Down Expand Up @@ -581,7 +594,12 @@
false
</mwc-list-item>
</wizard-select>
<wizard-select disabled="" helper="Default value" label="Val" nullable="">
<wizard-select
disabled=""
helper="Default value"
label="Val"
nullable=""
>
<mwc-list-item
aria-disabled="false"
aria-selected="false"
Expand Down Expand Up @@ -643,7 +661,7 @@
</wizard-textfield>
<wizard-select
fixedmenuposition=""
helper="Function contraint"
helper="Function constraint"
label="fc"
required=""
>
Expand Down Expand Up @@ -866,14 +884,19 @@
>
</mwc-button>
</mwc-dialog>

```

## `defines a createDaWizard to create a new DA element`

#### `looks like the latest snapshot`
#### `looks like the latest snapshot`

```html
<mwc-dialog defaultaction="close" heading="Edit DA" open="">
<mwc-dialog
defaultaction="close"
heading="Edit DA"
open=""
>
<div id="wizard-content">
<wizard-textfield
dialoginitialfocus=""
Expand Down Expand Up @@ -1215,7 +1238,11 @@
EntryID
</mwc-list-item>
</wizard-select>
<wizard-select fixedmenuposition="" helper="Type" label="type">
<wizard-select
fixedmenuposition=""
helper="Type"
label="type"
>
<mwc-list-item
aria-disabled="false"
class="Struct"
Expand Down Expand Up @@ -1427,7 +1454,12 @@
false
</mwc-list-item>
</wizard-select>
<wizard-select disabled="" helper="Default value" label="Val" nullable="">
<wizard-select
disabled=""
helper="Default value"
label="Val"
nullable=""
>
</wizard-select>
<wizard-textfield
disabled=""
Expand All @@ -1438,7 +1470,7 @@
</wizard-textfield>
<wizard-select
fixedmenuposition=""
helper="Function contraint"
helper="Function constraint"
label="fc"
required=""
>
Expand Down Expand Up @@ -1658,4 +1690,6 @@
>
</mwc-button>
</mwc-dialog>

```

1 change: 1 addition & 0 deletions src/translations/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const de: Translations = {
showieds: 'Zeige IEDs im Substation-Editor',
},
menu: {
new: 'Neues projekt',
title: 'Menü',
viewLog: 'Protokoll anzeigen',
viewDiag: 'Daignose anzeigen',
Expand Down
9 changes: 5 additions & 4 deletions src/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export const en = {
sAddr: 'Short address',
valKind: 'Value kind',
valImport: 'Import value',
fc: 'Function contraint',
fc: 'Function constraint',
LNodeType: 'Logical Node Type',
lnClass: 'Logical node class',
lnClass: 'Logical Node Class',
accessControl: 'Access control',
transient: 'Transient data',
Val: 'Default value',
dchg: 'Triggre on data change',
dchg: 'Trigger on data change',
qchg: 'Trigger on quality change',
dupd: 'Trigger on data update',
fixedOffs: 'Fixed offset',
Expand All @@ -42,6 +42,7 @@ export const en = {
showieds: 'Show IEDs in substation editor',
},
menu: {
new: 'New project',
title: 'Menu',
viewLog: 'View log',
viewDiag: 'View diagnostics',
Expand Down Expand Up @@ -283,7 +284,7 @@ export const en = {
wizard: {
primary: 'Guess content',
title: 'Select control model (ctlModel)',
description: `IEDs often contain more controlable logical nodes than switch gear in the field. \n You can select the control model(s) used specific for switch gear.`,
description: `IEDs often contain more controllable logical nodes than switchgear in the field. \n You can select the control model(s) used specific for switchgear.`,
},
},
merge: {
Expand Down
2 changes: 1 addition & 1 deletion src/wizards/controlwithiedname.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export function selectExtRefsWizard(
title: cbId + ' - ' + iedName,
primary: {
icon: 'delete',
label: get('disconnect'), // FIXME: translate
label: get('disconnect'),
action: disconnect(sinkExtRefs),
},
secondary: {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/editors/templates/lnodetype-wizard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ describe('LNodeType wizards', () => {
)
).to.not.exist;
});
it('adds new lnodetype with corrrect id and lnClass', async () => {
it('adds new LNodeType with correct id and lnClass', async () => {
beh.value = ensId;
enaOpn.value = spsId;
enaCls.value = spsId;
Expand All @@ -331,7 +331,7 @@ describe('LNodeType wizards', () => {
)
).to.exist;
});
it('adds selected DOs to new lnodetype', async () => {
it('adds selected DOs to new LNodeType', async () => {
beh.value = ensId;
enaOpn.value = spsId;
enaCls.value = spsId;
Expand Down

0 comments on commit b5e2621

Please sign in to comment.