Skip to content

Conversation

@Raptor399
Copy link

Implements language support as described in #336.

- Using "vue-i18n" as basis.
- Introducing a language selector in the top right of the UI.
- Introducing a locale identifier in the URL, e.g. http://localhost:8080/#/en/connect
- Modifying "update-simulator-data.js" to generate labels and extract English descriptions to English locale files.
- Adding two demo languages German "de" and Chinese (simplified) "zh"

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 7, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • queue - adds this PR to the back of the merge queue
  • skip-queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…ue."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…lly fixing error "Unsafe call of an `error` typed value".

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…d value." linter error by using safe patterns.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
@Raptor399
Copy link
Author

I'm struggling to conquer the Codacy Static Code Analysis results. Part of the problem is that it seems to be using a different set of ESlint settings from what is available in the repo. When I run pnpm lint and pnpm vue-tsc locally, I do not get the same results as what Codacy comes up with.

Also, Codacy's output provides no detail on what exactly in the source is violating the "Unsafe call of an error type typed value" rule. I've tried to cast and narrow the types involved, but all to no avail.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
… path information."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…checks

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…t of an error typed value." error

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
This reverts commit 549e176.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…type typed value."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…on line 53

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…rror

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
… to a parameter of type `{}`."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…iteral variable in a util.format / console.log function."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…signed to a parameter of type `{}`."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…n Sink" error persists.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…rol data in `Object.assign` can cause web response to include data that it should not have or can lead to a mass assignment vulnerability."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
@Raptor399
Copy link
Author

I've brought the number of errors in the Codacy Static Code Analysis down to 10. All of which are in parts of the code that I did not touch. It feels like the code in this repo got security checks bolted on at some point in time, but it was never brought up to scratch accordingly. My pull request is the first non-bot pull request that is actually being validated, and therefore it gets all the violations that were embedded in the code already.

My suggestions:

  • Make it possible to locally run the exact production checks that Codacy runs, so you don't run into unexpected findings in a pull request. Something like pnpm lint:production.
  • Some checks seem overly strict to me. E.g. having to use switch and literal filenames instead of having them in an array constant in fs.readFileSync() in update-simulator-data.js seems over the top for a nightly build utility script, only introducing unnecessary complexity.
  • Verify to which files linter checks should apply. Cypress and Vite config files are likely irrelevant.
  • I noticed a difference in Codacy's output when using import { i18n } from "@/plugins/i18n"; versus import { i18n } from "../plugins/i18n"; using a relative path. It made "unsafe access" errors disappear. This was unexpected; maybe it indicates an error in Codacy's configuration?

I'll try to bring down the number of errors to 0 as best I can. That being said, these "Generic Object Injection Sink" and "Unsafe call of an error type typed value." errors are particularly nasty and difficult to resolve.

… the rule where safe.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…h to help Codacy's linting.

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…ped value."

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
…ess .interface on an `error` typed value." error

Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
Signed-off-by: Patrick Atoon <patrick.atoon@gmail.com>
@Raptor399 Raptor399 mentioned this pull request Dec 5, 2025
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

Successfully merging this pull request may close these issues.

1 participant