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

[BUG] Duplicate message IDs with default messages #4794

Closed
zashary opened this issue Aug 22, 2023 · 2 comments · Fixed by #4805
Closed

[BUG] Duplicate message IDs with default messages #4794

zashary opened this issue Aug 22, 2023 · 2 comments · Fixed by #4805
Assignees
Labels
bug Something isn't working

Comments

@zashary
Copy link
Contributor

zashary commented Aug 22, 2023

Describe the bug

When running the extraction script errors appear for default messages with the same id dashboard.strings.dashboardEditTitle

To Reproduce
Steps to reproduce the behavior:

  1. Run ./scripts/use_node scripts/i18n_extract.js --output-dir plugins/dashboards-i18n/translations/
  2. Script errors out with:
    ERROR I18N ERROR Error in src/plugins/dashboard/public/application/utils/breadcrumbs.ts Error: There is more than one default message for the same id "dashboard.strings.dashboardEditTitle": "Editing {title}" and "Editing New Dashboard (unsaved)" ERROR I18N ERROR Error in src/plugins/dashboard/public/application/utils/breadcrumbs.ts Error: There is more than one default message for the same id "dashboard.strings.dashboardEditTitle": "Editing {title}" and "Editing New Dashboard" ERROR I18N ERROR Error in src/plugins/dashboard/public/application/utils/breadcrumbs.ts Error: There is more than one default message for the same id "dashboard.strings.dashboardViewTitle": "New Dashboard" and "{title}" ERROR I18N ERROR Error in src/plugins/dashboard/public/application/utils/breadcrumbs.ts Error: There is more than one default message for the same id "dashboard.strings.dashboardEditTitle": "Editing {title}" and "Editing {title} (unsaved)"

Expected behavior

OpenSearch Version
Using the OS snapshot 3.0.0

Dashboards Version
package.json is 3.0.0
commit 061e476 (HEAD, upstream/main, upstream/HEAD)
Author: Suyash Srivastava suyashsrivastava5053@gmail.com
Date: Sat Aug 19 02:48:52 2023 +0530

Plugins

None

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

@zashary zashary added bug Something isn't working untriaged labels Aug 22, 2023
@AMoo-Miki
Copy link
Collaborator

src/plugins/dashboard/public/application/utils/breadcrumbs.ts uses the same id for 4 different texts. We should have individual IDs for them.

@curq
Copy link
Collaborator

curq commented Aug 24, 2023

Hi @abbyhu2000, thanks for the PR, it fixed the error with 4 duplicate texts. I tried running the script and found that there are 2 additional errors unrelated to the one described in this issue. I believe that after we fix that we would be able to run the script without errors.

ERROR  I18N ERROR  Error in src/plugins/vis_type_vega/public/expressions/vega_fn.ts
      Error: There is more than one default message for the same id "visTypeVega.function.help":
      "Construct line vega spec" and "Vega visualization"

We could use different ids to fix it.


ERROR  I18N ERROR  Error in src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
      Error: expressions are not allowed in template literals ("visualizations.renderVisTitle").

We can pass the title through values attribute to fix this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants