-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support creating/editing array language variables with using new entries
field
#7011
base: v5/develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -449,7 +449,10 @@ | |||||
"language.variables.empty": "No translations yet", | ||||||
|
||||||
"language.variable.delete.confirm": "Do you really want to delete the variable for {key}?", | ||||||
"language.variable.entries": "Entries", | ||||||
"language.variable.entries.help": "This strings will be used for translations count. Each entry corresponds to a different case counter. For example: 0, 1, 2 and more", | ||||||
"language.variable.key": "Key", | ||||||
"language.variable.multiple": "Multiple", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Not so happy with this either. But I think the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absolutely. I'm not happy with the labels and help texts either. That's why I mentioned it in the PR description. It needs to be more descriptive and clear. |
||||||
"language.variable.notFound": "The variable could not be found", | ||||||
"language.variable.value": "Value", | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
<k-fieldset | ||
v-if="hasFields" | ||
:fields="fields" | ||
:value="value" | ||
:value="formValue" | ||
class="k-dialog-fields" | ||
@input="$emit('input', $event)" | ||
@submit="$emit('submit', $event)" | ||
|
@@ -45,6 +45,12 @@ export default { | |
mixins: [props], | ||
emits: ["input", "submit"], | ||
computed: { | ||
formValue() { | ||
return { | ||
...this.$helper.field.form(this.fields), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. For this line: Otherwise default value of Not sure this is a correct solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if we don't use 'value' => [
'multiple' => false
] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it seems to be working. What I'm wondering is; does this change I made really solve the problem of default values in dialogs? Maybe we can use it in other dialogs or in the future. If my solution is correct I would prefer the method where the fields work exactly as intended. Otherwise I'm fine with your solution 👍 |
||
...this.value | ||
}; | ||
}, | ||
hasFields() { | ||
return this.$helper.object.length(this.fields) > 0; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be more fitting with the existing
language.variable.value
: