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

Wrong access to translations keys #113

Open
Jym77 opened this issue Jun 1, 2022 · 1 comment
Open

Wrong access to translations keys #113

Jym77 opened this issue Jun 1, 2022 · 1 comment

Comments

@Jym77
Copy link

Jym77 commented Jun 1, 2022

Describe the bug
When trying to import an EARL report which is missing assertions, I get the error message:

Import failed:
TRANSLATED.NO_ASSERTIONS

It seems to come from this bit.

Ultimately, the root cause seems to be that the placeholder file refers to IMPORT.NO_ASSERTIONS_ERROR while the translation file for import calls it IMPORT.ERROR.NO_ASSERTIONS (seems to be consistent among all translations file).
I'm not super sure with how the translations work, however…

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://www.w3.org/WAI/eval/report-tool/evaluation/audit-sample'
  2. Click on 'Import data'
  3. Import a file with empty data, e.g. []
  4. See error

Expected behavior
The text alert should show the translated text "The file contained no recognizable assertions."

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 102

Additional context
Add any other context about the problem here.

@rvantonisse
Copy link
Contributor

Looks like the string 'TRANSLATED.NO_ASSERTIONS' instead of the variable got assigned to errorMessage. Removing the quotes and passing as a variable should fix this issue. Thus line 133 in AuditorImport.svelte should be:
errorMessage = TRANSLATED.NO_ASSERTIONS;

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

No branches or pull requests

2 participants