From 8133826f7bfdec7ef04a792ac82203a1492054dc Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 22 Nov 2023 16:49:18 +0100 Subject: [PATCH] chore: adjust titles and labels Closes #801 --- .../add-input-output/components/AddInput.js | 2 +- .../add-input-output/components/AddOutput.js | 2 +- .../components/AddRuleFootComponent.js | 2 +- .../components/AllowedValuesEditing.js | 12 +++--- .../src/features/context-menu/ContextMenu.js | 42 +++++++++---------- .../components/CreateInputCell.js | 2 +- .../components/CreateInputHeaderCell.js | 4 +- .../DecisionRulesCellEditorComponent.js | 2 +- .../components/DecisionTableHead.js | 16 +++---- .../editor/components/InputCell.js | 8 ++-- .../editor/components/InputEditor.js | 2 +- .../editor/components/OutputCell.js | 8 ++-- .../editor/components/OutputEditor.js | 2 +- .../DecisionTablePropertiesComponent.js | 2 +- .../DecisionTablePropertiesEditorComponent.js | 2 +- .../src/features/description/Description.js | 4 +- .../expression-language/ExpressionLanguage.js | 6 +-- .../hit-policy/components/HitPolicy.js | 2 +- .../editor/components/EditableHitPolicy.js | 2 +- .../components/BooleanEdit.js | 4 +- .../src/features/simple-date-edit/Utils.js | 2 +- .../components/OutputDateEdit.js | 4 +- .../features/simple-date-time-edit/Utils.js | 2 +- .../components/InputDateTimeEdit.js | 4 +- .../components/OutputDateTimeEdit.js | 4 +- .../components/DurationInput.js | 4 +- .../components/InputNumberEdit.js | 2 +- .../components/OutputNumberEdit.js | 4 +- .../SimpleStringEditContextMenuComponent.js | 16 +++---- .../src/features/simple-time-edit/Utils.js | 2 +- .../components/OutputTimeEdit.js | 8 ++-- .../ExpressionLanguageSpec.js | 6 +-- .../features/simple-date-edit/UtilsSpec.js | 4 +- .../simple-date-time-edit/UtilsSpec.js | 4 +- .../features/simple-time-edit/UtilsSpec.js | 4 +- .../context-pad/ContextPadProvider.js | 28 +++++++------ .../DefinitionPropertiesView.js | 2 +- .../src/features/palette/PaletteProvider.js | 12 +++--- .../src/features/replace/ReplaceOptions.js | 4 +- .../LiteralExpressionPropertiesComponent.js | 6 +-- ...eralExpressionPropertiesEditorComponent.js | 6 +-- 41 files changed, 129 insertions(+), 125 deletions(-) diff --git a/packages/dmn-js-decision-table/src/features/add-input-output/components/AddInput.js b/packages/dmn-js-decision-table/src/features/add-input-output/components/AddInput.js index 96ea29abf..63bb20d0d 100644 --- a/packages/dmn-js-decision-table/src/features/add-input-output/components/AddInput.js +++ b/packages/dmn-js-decision-table/src/features/add-input-output/components/AddInput.js @@ -48,7 +48,7 @@ export default class AddInput extends Component {
+ title={ this.translate('Add rule') }> ]; diff --git a/packages/dmn-js-decision-table/src/features/allowed-values/components/AllowedValuesEditing.js b/packages/dmn-js-decision-table/src/features/allowed-values/components/AllowedValuesEditing.js index d409df6e6..a79a12edf 100644 --- a/packages/dmn-js-decision-table/src/features/allowed-values/components/AllowedValuesEditing.js +++ b/packages/dmn-js-decision-table/src/features/allowed-values/components/AllowedValuesEditing.js @@ -37,7 +37,7 @@ export default class AllowedValuesEditing extends Component { value, isCheckable: false, isRemovable: true, - group: this._translate('Predefined Values') + group: this._translate('Predefined values') }; }), inputValue: '' @@ -126,7 +126,7 @@ export default class AllowedValuesEditing extends Component { value, isCheckable: false, isRemovable: true, - group: this._translate('Predefined Values') + group: this._translate('Predefined values') }; }))); @@ -177,7 +177,7 @@ export default class AllowedValuesEditing extends Component { && !values.length &&
{ this._translate('No values') } @@ -190,13 +190,13 @@ export default class AllowedValuesEditing extends Component { &&

} { if (!parseString(value)) { - return this._translate('Strings must be in double quotes.'); + return this._translate('Strings must be in double quotes'); } } } value={ inputValue } /> diff --git a/packages/dmn-js-decision-table/src/features/context-menu/ContextMenu.js b/packages/dmn-js-decision-table/src/features/context-menu/ContextMenu.js index af0227d70..0571e3d1c 100644 --- a/packages/dmn-js-decision-table/src/features/context-menu/ContextMenu.js +++ b/packages/dmn-js-decision-table/src/features/context-menu/ContextMenu.js @@ -187,39 +187,39 @@ export default class ContextMenu {
handlers.copy(row) }> - { this._translate('Copy Rule') } + { this._translate('Copy rule') }
handlers.cut(row) }> - { this._translate('Cut Rule') } + { this._translate('Cut rule') }
handlers.pasteBefore(row) }> - { this._translate('Paste Rule Above') } + { this._translate('Paste rule above') }
handlers.pasteAfter(row) }> - { this._translate('Paste Rule Below') } + { this._translate('Paste rule below') }
,
handlers.addRuleAbove(row) }> - { this._translate('Add Rule Above') } + { this._translate('Add rule above') }
handlers.addRuleBelow(row) }> - { this._translate('Add Rule Below') } + { this._translate('Add rule below') }
handlers.removeRule(row) }> - { this._translate('Remove Rule') } + { this._translate('Remove rule') }
); @@ -240,39 +240,39 @@ export default class ContextMenu {
handlers.copy(actualElement) }> - { this._translate('Copy Input Column') } + { this._translate('Copy input column') }
handlers.cut(actualElement) }> - { this._translate('Cut Input Column') } + { this._translate('Cut input column') }
handlers.pasteBefore(actualElement) }> - { this._translate('Paste Input Column Left') } + { this._translate('Paste input column left') }
handlers.pasteAfter(actualElement) }> - { this._translate('Paste Input Column Right') } + { this._translate('Paste input column right') }
,
handlers.addInputLeft(actualElement) }> - { this._translate('Add Input Column Left') } + { this._translate('Add input column left') }
handlers.addInputRight(actualElement) }> - { this._translate('Add Input Column Right') } + { this._translate('Add input column right') }
handlers.removeInput(actualElement) }> - { this._translate('Remove Input Column') } + { this._translate('Remove input column') }
); @@ -293,39 +293,39 @@ export default class ContextMenu {
handlers.copy(actualElement) }> - { this._translate('Copy Output Column') } + { this._translate('Copy output column') }
handlers.cut(actualElement) }> - { this._translate('Cut Output Column') } + { this._translate('Cut output column') }
handlers.pasteBefore(actualElement) }> - { this._translate('Paste Output Column Left') } + { this._translate('Paste output column left') }
handlers.pasteAfter(actualElement) }> - { this._translate('Paste Output Column Right') } + { this._translate('Paste output column right') }
,
handlers.addOutputLeft(actualElement) }> - { this._translate('Add Output Column Left') } + { this._translate('Add output column left') }
handlers.addOutputRight(actualElement) }> - { this._translate('Add Output Column Right') } + { this._translate('Add output column right') }
handlers.removeOutput(actualElement) }> - { this._translate('Remove Output Column') } + { this._translate('Remove output column') }
); diff --git a/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputCell.js b/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputCell.js index 7bf074016..7bec88560 100644 --- a/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputCell.js +++ b/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputCell.js @@ -20,7 +20,7 @@ export default class CreateInputsCell extends Component { - + title={ this.translate('Add input') }>- ); } } diff --git a/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputHeaderCell.js b/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputHeaderCell.js index 581a76b64..8499a8257 100644 --- a/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputHeaderCell.js +++ b/packages/dmn-js-decision-table/src/features/create-inputs/components/CreateInputHeaderCell.js @@ -20,10 +20,10 @@ export default class CreateInputsHeaderCell extends Component { + title={ this.translate('Add input') }> { this.translate('Input') } ); diff --git a/packages/dmn-js-decision-table/src/features/decision-rules/components/DecisionRulesCellEditorComponent.js b/packages/dmn-js-decision-table/src/features/decision-rules/components/DecisionRulesCellEditorComponent.js index 274b3341e..1b551c5c8 100644 --- a/packages/dmn-js-decision-table/src/features/decision-rules/components/DecisionRulesCellEditorComponent.js +++ b/packages/dmn-js-decision-table/src/features/decision-rules/components/DecisionRulesCellEditorComponent.js @@ -233,7 +233,7 @@ class TableCellEditor extends Component { diff --git a/packages/dmn-js-decision-table/src/features/decision-table-head/components/DecisionTableHead.js b/packages/dmn-js-decision-table/src/features/decision-table-head/components/DecisionTableHead.js index 5a5c2150e..eccf82f43 100644 --- a/packages/dmn-js-decision-table/src/features/decision-table-head/components/DecisionTableHead.js +++ b/packages/dmn-js-decision-table/src/features/decision-table-head/components/DecisionTableHead.js @@ -145,13 +145,13 @@ function DefaultInputHeaderCell(props, context) { label ? (
+ title={ translate('Input label: ') + label }> { label }
) : (
+ title={ translate('Input expression: ') + inputExpression.text }> { inputExpression.text }
) @@ -160,8 +160,8 @@ function DefaultInputHeaderCell(props, context) {
{ inputValues && inputValues.text || inputExpression.typeRef } @@ -199,13 +199,13 @@ function DefaultOutputHeaderCell(props, context) { { label ? ( -
+
{ label }
) : (
+ title={ translate('Output name') }> { name }
) @@ -214,8 +214,8 @@ function DefaultOutputHeaderCell(props, context) {
{ outputValues && outputValues.text || typeRef } diff --git a/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputCell.js b/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputCell.js index 033152141..7a40d7e51 100644 --- a/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputCell.js +++ b/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputCell.js @@ -112,13 +112,13 @@ export default class InputCell extends Component { label ? (
+ title={ this._translate('Input label: ') + label }> { label }
) : (
+ title={ this._translate('Input expression: ') + inputExpression.text }> { inputExpression.text }
) @@ -127,8 +127,8 @@ export default class InputCell extends Component {
{ inputValues && inputValues.text || diff --git a/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputEditor.js b/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputEditor.js index cce280ea3..5992c747c 100644 --- a/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputEditor.js +++ b/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/InputEditor.js @@ -92,7 +92,7 @@ export default class InputEditor extends Component { + title={ this._translate('Output label: ') + label }> { label }
) : (
+ title={ this._translate('Output name: ') + name }> { name }
) @@ -120,8 +120,8 @@ export default class OutputCell extends Component {
{ outputValues && outputValues.text || this._translate(typeRef || '') } diff --git a/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/OutputEditor.js b/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/OutputEditor.js index 1fe106a83..0e34cf5d3 100644 --- a/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/OutputEditor.js +++ b/packages/dmn-js-decision-table/src/features/decision-table-head/editor/components/OutputEditor.js @@ -55,7 +55,7 @@ export default class OutputEditor extends Component {
diff --git a/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesComponent.js b/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesComponent.js index f31a5db1c..a529e2d62 100644 --- a/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesComponent.js +++ b/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesComponent.js @@ -28,7 +28,7 @@ export default class DecisionTablePropertiesComponent extends Component { return (
+ this._translate('Decision name: ') + name }> { name }
diff --git a/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesEditorComponent.js b/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesEditorComponent.js index 0cd10d331..b44894361 100644 --- a/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesEditorComponent.js +++ b/packages/dmn-js-decision-table/src/features/decision-table-properties/components/DecisionTablePropertiesEditorComponent.js @@ -108,7 +108,7 @@ class DecisionTableName extends EditableComponent { className={ className } data-element-id={ this.props.elementId } data-coords={ this.props.coords } - title={ this._translate('Decision Name: ') + name } + title={ this._translate('Decision name: ') + name } > { this.getEditor() }
diff --git a/packages/dmn-js-decision-table/src/features/description/Description.js b/packages/dmn-js-decision-table/src/features/description/Description.js index 7fa755605..1071fc52b 100644 --- a/packages/dmn-js-decision-table/src/features/description/Description.js +++ b/packages/dmn-js-decision-table/src/features/description/Description.js @@ -123,9 +123,9 @@ export default class Description { { isString(description) ? - this._translate('Remove Cell Description') + this._translate('Remove cell description') : - this._translate('Add Cell Description') + this._translate('Add cell description') }
); diff --git a/packages/dmn-js-decision-table/src/features/expression-language/ExpressionLanguage.js b/packages/dmn-js-decision-table/src/features/expression-language/ExpressionLanguage.js index 990c49810..61d472f1c 100644 --- a/packages/dmn-js-decision-table/src/features/expression-language/ExpressionLanguage.js +++ b/packages/dmn-js-decision-table/src/features/expression-language/ExpressionLanguage.js @@ -52,7 +52,7 @@ export default class ExpressionLanguage { className="context-menu-group-entry" onClick={ openMenu } > - { this._translate('Change Cell Expression Language') } + { this._translate('Change cell expression language') }
); @@ -89,7 +89,7 @@ export default class ExpressionLanguage {
- { this._translate('Expression Language') } + { this._translate('Expression language') }
diff --git a/packages/dmn-js-decision-table/src/features/hit-policy/components/HitPolicy.js b/packages/dmn-js-decision-table/src/features/hit-policy/components/HitPolicy.js index 0083bc31f..de215b62c 100644 --- a/packages/dmn-js-decision-table/src/features/hit-policy/components/HitPolicy.js +++ b/packages/dmn-js-decision-table/src/features/hit-policy/components/HitPolicy.js @@ -38,7 +38,7 @@ export default class HitPolicy extends Component { title={ this._translate(hitPolicyEntry.explanation) } > { this._translate(hitPolicyEntry.label) } diff --git a/packages/dmn-js-decision-table/src/features/hit-policy/editor/components/EditableHitPolicy.js b/packages/dmn-js-decision-table/src/features/hit-policy/editor/components/EditableHitPolicy.js index bff66f3cd..c5007d062 100644 --- a/packages/dmn-js-decision-table/src/features/hit-policy/editor/components/EditableHitPolicy.js +++ b/packages/dmn-js-decision-table/src/features/hit-policy/editor/components/EditableHitPolicy.js @@ -54,7 +54,7 @@ export default class EditableHitPolicy extends Component { return (
-

{this._translate('Edit Boolean')}

+

{this._translate('Edit boolean')}

-

{this._translate('Set Value')}

+

{this._translate('Set value')}

- { this._translate('Set date') } . + onClick={ this.onClick }>{ this._translate('Use today') }

diff --git a/packages/dmn-js-decision-table/src/features/simple-date-time-edit/Utils.js b/packages/dmn-js-decision-table/src/features/simple-date-time-edit/Utils.js index cf60e7219..7f886a4ad 100644 --- a/packages/dmn-js-decision-table/src/features/simple-date-time-edit/Utils.js +++ b/packages/dmn-js-decision-table/src/features/simple-date-time-edit/Utils.js @@ -16,7 +16,7 @@ const EXACT = 'exact', export function validateISOString(string) { if (!ISO_DATE_REGEX.test(string.trim())) { - return 'Date and time must match pattern yyyy-MM-ddTHH:mm:ss[time zone].'; + return 'Date and time must match pattern yyyy-MM-ddTHH:mm:ss[time zone]'; } } diff --git a/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/InputDateTimeEdit.js b/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/InputDateTimeEdit.js index e8e171c1f..b22f61f54 100644 --- a/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/InputDateTimeEdit.js +++ b/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/InputDateTimeEdit.js @@ -197,7 +197,7 @@ export default class InputDateEdit extends Component { className="use-today" onClick={ this.onSetStartDateTodayClick }> { this._translate('Use today') } - . +

@@ -227,7 +227,7 @@ export default class InputDateEdit extends Component { className="use-today" onClick={ this.onSetEndDateTodayClick }> { this._translate('Use today') } - . +

} diff --git a/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/OutputDateTimeEdit.js b/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/OutputDateTimeEdit.js index 52fc4ea3e..907dd4641 100644 --- a/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/OutputDateTimeEdit.js +++ b/packages/dmn-js-decision-table/src/features/simple-date-time-edit/components/OutputDateTimeEdit.js @@ -83,9 +83,9 @@ export default class OutputDateEdit extends Component {

- {this._translate('Use')} . + onClick={ this.onClick }>{this._translate('Use today')}

diff --git a/packages/dmn-js-decision-table/src/features/simple-duration-edit/components/DurationInput.js b/packages/dmn-js-decision-table/src/features/simple-duration-edit/components/DurationInput.js index 7af067bd3..64273396a 100644 --- a/packages/dmn-js-decision-table/src/features/simple-duration-edit/components/DurationInput.js +++ b/packages/dmn-js-decision-table/src/features/simple-duration-edit/components/DurationInput.js @@ -5,8 +5,8 @@ import ValidatedInput from 'dmn-js-shared/lib/components/ValidatedInput'; import { validateDuration } from '../Utils'; const ERROR_MESSAGE = { - yearMonthDuration: 'Must match PnYnM.', - dayTimeDuration: 'Must match PnDTnH.' + yearMonthDuration: 'Must match PnYnM', + dayTimeDuration: 'Must match PnDTnH' }; diff --git a/packages/dmn-js-decision-table/src/features/simple-number-edit/components/InputNumberEdit.js b/packages/dmn-js-decision-table/src/features/simple-number-edit/components/InputNumberEdit.js index 51c93dc41..cabd00c04 100644 --- a/packages/dmn-js-decision-table/src/features/simple-number-edit/components/InputNumberEdit.js +++ b/packages/dmn-js-decision-table/src/features/simple-number-edit/components/InputNumberEdit.js @@ -310,7 +310,7 @@ export default class InputNumberEdit extends Component { return (
-

{ this._translate('Edit Number') }

+

{ this._translate('Edit number') }

-

{ this._translate('Edit Number') }

+

{ this._translate('Edit number') }

-

{ this._translate('Set Value') }

+

{ this._translate('Set value') }

- { this._translate('Edit String') } + { this._translate('Edit string') }

{ @@ -312,10 +312,10 @@ export default class SimpleStringEditContextMenuComponent extends Component { { isInputClause ?

- { this._translate('Add Values') } + { this._translate('Add values') }

:

- { this._translate('Set Value') } + { this._translate('Set value') }

} @@ -341,7 +341,7 @@ export default class SimpleStringEditContextMenuComponent extends Component { type="text" validate={ value => { if (!parseString(value)) { - return this._translate('Strings must be in double quotes.'); + return this._translate('Strings must be in double quotes'); } } } value={ inputValue } /> diff --git a/packages/dmn-js-decision-table/src/features/simple-time-edit/Utils.js b/packages/dmn-js-decision-table/src/features/simple-time-edit/Utils.js index 9adb212f6..43cf1dc41 100644 --- a/packages/dmn-js-decision-table/src/features/simple-time-edit/Utils.js +++ b/packages/dmn-js-decision-table/src/features/simple-time-edit/Utils.js @@ -13,7 +13,7 @@ const EXACT = 'exact', export function validateISOString(string) { if (!ISO_TIME_REGEX.test(string.trim())) { - return 'Time must match pattern hh:mm:ss[time zone].'; + return 'Time must match pattern hh:mm:ss[time zone]'; } } diff --git a/packages/dmn-js-decision-table/src/features/simple-time-edit/components/OutputTimeEdit.js b/packages/dmn-js-decision-table/src/features/simple-time-edit/components/OutputTimeEdit.js index eb4aa39e6..4a65a5a52 100644 --- a/packages/dmn-js-decision-table/src/features/simple-time-edit/components/OutputTimeEdit.js +++ b/packages/dmn-js-decision-table/src/features/simple-time-edit/components/OutputTimeEdit.js @@ -67,9 +67,9 @@ export default class OutputTimeEdit extends Component { return (
-

{ this._translate('Edit Date') }

+

{ this._translate('Edit date') }

-

{ this._translate('Set Date') }

+

{ this._translate('Set date') }

- { this._translate('Set date') } . + onClick={ this.onClick }>{ this._translate('Use now') }.

diff --git a/packages/dmn-js-decision-table/test/spec/features/expression-language/ExpressionLanguageSpec.js b/packages/dmn-js-decision-table/test/spec/features/expression-language/ExpressionLanguageSpec.js index 76dedd402..a5e41edd5 100644 --- a/packages/dmn-js-decision-table/test/spec/features/expression-language/ExpressionLanguageSpec.js +++ b/packages/dmn-js-decision-table/test/spec/features/expression-language/ExpressionLanguageSpec.js @@ -108,7 +108,7 @@ describe('expression language', function() { // then const entries = domQueryAll('.context-menu-group-entry', testContainer); const entry = find(entries, entry => { - return entry.textContent === 'Change Cell Expression Language'; + return entry.textContent === 'Change cell expression language'; }); expect(entry).to.exist; @@ -141,7 +141,7 @@ describe('expression language', function() { // then const entries = domQueryAll('.context-menu-group-entry', testContainer); const entry = find(entries, entry => { - return entry.textContent === 'Change Cell Expression Language'; + return entry.textContent === 'Change cell expression Language'; }); expect(entry).not.to.exist; @@ -210,7 +210,7 @@ describe('expression language', function() { // then const entries = domQueryAll('.context-menu-group-entry', testContainer); const entry = find(entries, entry => { - return entry.textContent === 'Change Cell Expression Language'; + return entry.textContent === 'Change cell expression language'; }); expect(entry).to.exist; diff --git a/packages/dmn-js-decision-table/test/spec/features/simple-date-edit/UtilsSpec.js b/packages/dmn-js-decision-table/test/spec/features/simple-date-edit/UtilsSpec.js index 17e52b447..3f5ea3941 100644 --- a/packages/dmn-js-decision-table/test/spec/features/simple-date-edit/UtilsSpec.js +++ b/packages/dmn-js-decision-table/test/spec/features/simple-date-edit/UtilsSpec.js @@ -32,14 +32,14 @@ describe('simple date edit - utils', function() { // then expect(validateISOString('foo')) - .to.equal('Date must match pattern yyyy-MM-dd.'); + .to.equal('Date must match pattern yyyy-MM-dd'); }); it('empty string should not be ISO date string', function() { // then expect(validateISOString('')) - .to.equal('Date must match pattern yyyy-MM-dd.'); + .to.equal('Date must match pattern yyyy-MM-dd'); }); }); diff --git a/packages/dmn-js-decision-table/test/spec/features/simple-date-time-edit/UtilsSpec.js b/packages/dmn-js-decision-table/test/spec/features/simple-date-time-edit/UtilsSpec.js index 412786646..26948213f 100644 --- a/packages/dmn-js-decision-table/test/spec/features/simple-date-time-edit/UtilsSpec.js +++ b/packages/dmn-js-decision-table/test/spec/features/simple-date-time-edit/UtilsSpec.js @@ -60,7 +60,7 @@ describe('simple date edit - utils', function() { // then expect(validateISOString('foo')) - .to.equal('Date and time must match pattern yyyy-MM-ddTHH:mm:ss[time zone].'); + .to.equal('Date and time must match pattern yyyy-MM-ddTHH:mm:ss[time zone]'); }); @@ -68,7 +68,7 @@ describe('simple date edit - utils', function() { // then expect(validateISOString('')) - .to.equal('Date and time must match pattern yyyy-MM-ddTHH:mm:ss[time zone].'); + .to.equal('Date and time must match pattern yyyy-MM-ddTHH:mm:ss[time zone]'); }); }); diff --git a/packages/dmn-js-decision-table/test/spec/features/simple-time-edit/UtilsSpec.js b/packages/dmn-js-decision-table/test/spec/features/simple-time-edit/UtilsSpec.js index b3b25afc2..c35aae984 100644 --- a/packages/dmn-js-decision-table/test/spec/features/simple-time-edit/UtilsSpec.js +++ b/packages/dmn-js-decision-table/test/spec/features/simple-time-edit/UtilsSpec.js @@ -60,14 +60,14 @@ describe('simple time edit - utils', function() { // then expect(validateISOString('foo')) - .to.equal('Time must match pattern hh:mm:ss[time zone].'); + .to.equal('Time must match pattern hh:mm:ss[time zone]'); }); it('empty string should not be ISO time string', function() { // then expect(validateISOString('')) - .to.equal('Time must match pattern hh:mm:ss[time zone].'); + .to.equal('Time must match pattern hh:mm:ss[time zone]'); }); }); diff --git a/packages/dmn-js-drd/src/features/context-pad/ContextPadProvider.js b/packages/dmn-js-drd/src/features/context-pad/ContextPadProvider.js index 76fe173c1..690af750f 100644 --- a/packages/dmn-js-drd/src/features/context-pad/ContextPadProvider.js +++ b/packages/dmn-js-drd/src/features/context-pad/ContextPadProvider.js @@ -130,18 +130,13 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { * * @param {string} type * @param {string} className - * @param {string} [title] + * @param {string} title * @param {Object} [options] * * @return {Object} descriptor */ function appendAction(type, className, title, options) { - if (typeof title !== 'string') { - options = title; - title = translate('Append {type}', { type: type.replace(/^dmn:/, '') }); - } - function appendStart(event, element) { var shape = elementFactory.createShape(assign({ type: type }, options)); @@ -175,7 +170,11 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { if (is(businessObject, 'dmn:Decision')) { assign(actions, { - 'append.decision': appendAction('dmn:Decision', 'dmn-icon-decision') + 'append.decision': appendAction( + 'dmn:Decision', + 'dmn-icon-decision', + translate('Append decision') + ) }); } @@ -189,7 +188,8 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { assign(actions, { 'append.knowledge-source': appendAction( 'dmn:KnowledgeSource', - 'dmn-icon-knowledge-source' + 'dmn-icon-knowledge-source', + translate('Append knowledge source') ) }); } @@ -201,14 +201,19 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { assign(actions, { 'append.business-knowledge-model': appendAction( 'dmn:BusinessKnowledgeModel', - 'dmn-icon-business-knowledge' + 'dmn-icon-business-knowledge', + translate('Append business knowledge model') ) }); } if (isAny(businessObject, [ 'dmn:Decision', 'dmn:KnowledgeSource' ])) { assign(actions, { - 'append.input-data': appendAction('dmn:InputData', 'dmn-icon-input-data') + 'append.input-data': appendAction( + 'dmn:InputData', + 'dmn-icon-input-data', + translate('Append input data') + ) }); } @@ -224,8 +229,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) { group: 'connect', className: 'dmn-icon-connection-multi', title: translate( - 'Connect using Information/Knowledge' + - '/Authority Requirement or Association' + 'Connect using authority/information/knowledge requirement or association' ), action: { click: startConnect, diff --git a/packages/dmn-js-drd/src/features/definition-properties/DefinitionPropertiesView.js b/packages/dmn-js-drd/src/features/definition-properties/DefinitionPropertiesView.js index 8dae20c89..386eaa640 100644 --- a/packages/dmn-js-drd/src/features/definition-properties/DefinitionPropertiesView.js +++ b/packages/dmn-js-drd/src/features/definition-properties/DefinitionPropertiesView.js @@ -25,7 +25,7 @@ export default function DefinitionPropertiesView(eventBus, canvas, translate) { this.HTML_MARKUP = '
' + '
' + '
' + '
- + - + - + diff --git a/packages/dmn-js-literal-expression/src/features/literal-expression-properties/components/LiteralExpressionPropertiesEditorComponent.js b/packages/dmn-js-literal-expression/src/features/literal-expression-properties/components/LiteralExpressionPropertiesEditorComponent.js index 94c512a31..04c72ace1 100644 --- a/packages/dmn-js-literal-expression/src/features/literal-expression-properties/components/LiteralExpressionPropertiesEditorComponent.js +++ b/packages/dmn-js-literal-expression/src/features/literal-expression-properties/components/LiteralExpressionPropertiesEditorComponent.js @@ -62,7 +62,7 @@ export default class LiteralExpressionPropertiesComponent extends Component {
{ this._translate('Variable Name:') }{ this._translate('Variable name:') } { variable.name || '-' }
{ this._translate('Variable Type:') }{ this._translate('Variable type:') } { this._translate(variable.typeRef || '') || '-' }
{ this._translate('Expression Language:') }{ this._translate('Expression language:') } { literalExpression.expressionLanguage || '-' }
- + - + +
{ this._translate('Variable Name:') }{ this._translate('Variable name:') }
{ this._translate('Variable Type:') }{ this._translate('Variable type:') }
-
{ this._translate('Expression Language:') }{ this._translate('Expression language:') }