Merged
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a duplicate property issue in the locales.js file where the hero.subtitle2 property was defined twice in the English translation object, causing the first value to be overwritten at runtime.
Changes:
- Removed the first occurrence of
subtitle2: "Transform Your Business with Artificial Intelligence"from the Englishheroobject, keeping the second (effective) value
Comments suppressed due to low confidence (1)
locales.js:155
- This property is overwritten by another property in the same object literal.
subtitle2: "Transformez Votre Entreprise avec l'Intelligence Artificielle",
| hero: { | ||
| subtitle1: "Your Digital Renaissance Starts Here", | ||
| subtitle2: "Transform Your Business with Artificial Intelligence", | ||
| subtitle2: "Specialists in AI, NoCode, Automation & Cybersecurity. We bring your digital projects to life", |
There was a problem hiding this comment.
The French translation (lines 155-156) also has a duplicate subtitle2 property that needs to be fixed. Just like the English version, the first occurrence should be removed to maintain consistency and prevent the same runtime issue where the second value overwrites the first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To fix the problem, the
heroobject should not contain two properties with the same name. We must keep the current external behavior unchanged, which means preserving whicheversubtitle2value is actually used at runtime today. Because JavaScript overwrites the first with the second, the effective value is the string on line 18:"Specialists in AI, NoCode, Automation & Cybersecurity. We bring your digital projects to life".The safest fix is to remove or rename the first
subtitle2property. Removing it preserves current behavior exactly; renaming it would change the shape of the translation object and require updates elsewhere. Since we are instructed not to assume or modify unrelated code, the minimal, behavior-preserving fix is to delete the firstsubtitle2line entirely.Concretely:
locales.js, within theheroobject oftranslations.en, delete the linesubtitle2: "Transform Your Business with Artificial Intelligence",(currently line 17 in the snippet).subtitle2(line 18) untouched, as that is the value currently in effect at runtime.Suggested fixes powered by Copilot Autofix. Review carefully before merging.