Skip to content
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

fix: The form node submission button has not been internationalized #2180

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

shaohuzhang1
Copy link
Contributor

fix: The form node submission button has not been internationalized

Copy link

f2c-ci-robot bot commented Feb 9, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@shaohuzhang1 shaohuzhang1 merged commit 44dd952 into main Feb 9, 2025
4 checks passed
Copy link

f2c-ci-robot bot commented Feb 9, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shaohuzhang1 shaohuzhang1 deleted the pr@main@fix_form_rander branch February 9, 2025 11:22
@@ -14,7 +14,7 @@
:type="is_submit ? 'info' : 'primary'"
:disabled="is_submit || disabled"
@click="submit"
>提交</el-button
>{{$t('common.submit')}}</el-button
>
</div>
</template>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't any major issues with this code snippet, but here are some general suggestions:

  1. Translation Placeholder: The v-t="'common.submit'" syntax suggests that you're using i18n translations from VitePress or Vue.js Internationalization (vuetifyjs.com). Ensure that the translations file (en.ts, etc.) contains an entry for 'common.submit'.

  2. Event Binding: The use of $t() within Vue components is generally correct and recommended when integrating internationalization.

  3. Code Formatting: There's no significant formatting issue beyond typical HTML/CSS/JavaScript spacing conventions.

Here's a few additional tips if needed:

  1. Conditional Logic Inside @click: If conditionals inside event handlers need to be updated based on reactive data properties like is_submit or disabled, ensure they re-evaluate properly when necessary.

  2. Accessibility Considerations: Check if there are accessibility enhancements required due to changes in button labels or states (e.g., aria-live).

  3. Performance Optimization: This component is straightforward and doesn't suggest any performance bottlenecks without knowing more about its overall usage or context.

Overall, the provided code seems well-structured and should function as intended, assuming proper configuration for i18n support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant