Repository navigation
Always include source attributes & declarations in Editor base value - #4427
Merged
Merged
Conversation
mathjazz
approved these changes
Sep 1, 2026
mathjazz
left a comment
Collaborator
There was a problem hiding this comment.
Approving.
Verified the new test fails on main.
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.
Fixes #4414
Based on #4262 (comment), I presume that @havarh has submitted the translations we currently have for
nb-NOandnn-NOby manually craftingPOST /translations/create/requests. These end up rendering as apparently-correct in Pontoon, but don't include the placeholder declaration object that's required (a bit of a web extensions specialty).The original issue leading to that workaround has since been resolved by #4313. However, now that we do have these not-quite-right approved translations, editing them turns out to not work well, as we've been presuming that approved translations are a valid starting point for further translations, and this is not the case here. Attempting to edit those translations will now fail due to a parsing error.
This PR fixes the front-end's capability to edit partial translations like this, making it more robust in general -- though this particular error case should only have been possible to reach with webext translations, and by manually crafting the POST request.
After this is merged and deployed, it should be possible to edit the invalid translations by e.g. adding and removing a space character to trigger the translation re-parsing, which should enable the Save/Suggest button to submit a valid translation for what appears to be the same translation. Explicitly rejecting the current translations and re-entering them should also work already now, though I've not verified that.