-
Notifications
You must be signed in to change notification settings - Fork 124
perf: Translate #5061
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
perf: Translate #5061
Conversation
:header-actions="headerActions" | ||
:table-config="tableConfig" | ||
:resource="$t('DetectTasks')" | ||
/> | ||
</template> | ||
|
||
<script> |
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.
The given code has some syntax errors which I will correct before discussing further. Here's the corrected code:
Before making changes, please review the new code snippet:
<template>
<GenericListTable ref="listTable" :header-actions="headerActions" :table-config="tableConfig" />
</template>
<script>
<script>
@@ -3,7 +3,7 @@ | |||
:create-drawer="createDrawer" | |||
:detail-drawer="detailDrawer" | |||
:header-actions="headerActions" | |||
:resource="$tc('AccountDiscoverTask')" | |||
:resource="$tc('DiscoverAccountTask')" | |||
:table-config="tableConfig" | |||
/> | |||
</template> |
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.
There appears to be an issue with the code snippet provided, which could impact how it's used across various contexts due to the incorrect capitalization of several key components like Account
, ${
etc.
Here is what I'm seeing:
- The line marked as
[...+]:create-drawer="....drawer" create-drawer": createDrawer
uses wrong double underscore_
formatting (as you can see in my example). In most programming languages and tools, this would need single underscores "_" instead. - Similarly, there should not have been space between colon (
:
) and each variable/option name. It usually indicates options on a commandline argument list where whitespace around these variables may cause some unexpected behaviors especially when using JSON.stringify method that will trim the whitespace before serialization. - Lastly, I did notice
$tc()
functions were being called directly under the template section without any context in relation to previous function calls. That might indicate it's part of another system's API call chain but since I am only looking at the current block from your question, I've assumed they are just placeholders.
However, please note - If you intended for them to serve as local translation keys then consider making sure all required $i18n properties get imported correctly and placed properly within your component logic rather than having external translation strings referenced directly into your JS file structure which introduces potential errors if those translations change outside scope, or worse scenario, if one misplaces them wrongly causing confusion.
For full compliance with best coding practices, always import your $i18n config first inside your main VueApp configuration object and include its default values in every place it gets used. This helps avoid runtime errors caused by missing locales, typos, or unintended global variable usage in your application.
Please confirm if any further adjustments needed, such as fixing typo, correct indentation, or other specific issues related to capitalization or variable names. Let me know about additional details or anything else you want me to verify more carefully.
@@ -1,5 +1,5 @@ | |||
<template> | |||
<GenericDetailPage :active-menu.sync="config.activeMenu" :object.sync="ticket" v-bind="config" v-on="$listeners"> | |||
<GenericDetailPage :title="ticket.title" :active-menu.sync="config.activeMenu" :object.sync="ticket" v-bind="config" v-on="$listeners"> | |||
<component :is="config.activeMenu" :object="ticket" /> | |||
</GenericDetailPage> | |||
</template> |
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.
No known issues found.
The code appears to be valid HTML with a template used inside it which defines a <GenericDetailPage>
component (for details page content), setting active menu (:activeMenu
) and object properties like title
and ticket
. No specific optimizations suggested without knowing the actual context of this project. The syntax is mostly correct, however, no external dependencies seem specified in this snippet.
|
perf: Translate