Skip to content

Translations: Round source TS line numbers up to nearest 10 - #34613

Closed
shoogle wants to merge 2 commits into
musescore:mainfrom
shoogle:ts-line-numbers
Closed

Translations: Round source TS line numbers up to nearest 10#34613
shoogle wants to merge 2 commits into
musescore:mainfrom
shoogle:ts-line-numbers

Conversation

@shoogle

@shoogle shoogle commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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 lupdate once 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).

image image


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.

@shoogle shoogle changed the title Ts line numbers Translations: Round source TS line numbers up to nearest 10 Aug 17, 2026
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

shoogle commented Aug 18, 2026

Copy link
Copy Markdown
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:

@shoogle shoogle closed this Aug 18, 2026
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