Translations: Round source TS line numbers up to nearest 10 - #34613
Closed
shoogle wants to merge 2 commits into
Closed
Translations: Round source TS line numbers up to nearest 10#34613shoogle wants to merge 2 commits into
shoogle wants to merge 2 commits into
Conversation
Source line numbers are only shown as a courtesy to human translators so they don't have to be exact. Rounding them reduces the diff when TS files are updated, which makes actual string changes more noticeable.
shoogle
force-pushed
the
ts-line-numbers
branch
from
August 18, 2026 04:41
3c4beac to
71304eb
Compare
Contributor
Author
|
Looking at lupdate PRs, I think rounding line numbers to the nearest 10 wouldn't make the diff much smaller. Rounding to the nearest 50 or 100 would help, but even this would still give a painfully large diff at times. Instead, I think the approach in this PR is better: |
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.
Source line numbers are only shown as a courtesy to human translators so they don't have to be exact. (And they're often slightly incorrect anyway because we only run
lupdateonce per week, not after every code change.)Rounding them reduces the diff when TS files are updated, which makes actual string changes more noticeable.
Here's an extract of the diff to the TS files as a result of this PR. Future diffs will be smaller because the line numbers will only change when they enter a new "decade" (i.e. when they round to a different multiple of 10).
It's only necessary to change line numbers in the source TS files (
*_en.ts). These will eventually be uploaded to Transifex, which will result in line numbers being rounded in the translated TS files too.