summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-13 19:12:56 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-13 19:12:56 +0200
commitba789678f9e8ed189413afb1446ad210df34e488 (patch)
tree23ac4ce3c3403438fa8e50985de2db3b11a924a8 /app/controllers/users_controller.rb
parent4072efdc912ecb3b79621fb1838434f792e3a531 (diff)
Make revision diffs locale-aware, defaulting to whichever locale changed
diff_against compared title/abstract/body under whatever I18n.locale happened to be ambient, with no concept of 'diff this translation specifically' -- so a change confined to one locale was invisible to Diff Head vs. Draft regardless of which locale you were looking at when you clicked it, exactly the 'yields nothing' complaint from earlier this session. Page#diff_against gains a locale: keyword, additive only -- nil preserves the exact original ambient-locale behavior every existing caller and test already depends on; passing a locale switches to reading each side's actual PageTranslation row directly, same fallback-free reasoning as Page#translation_summary. Page#locale_diff_summary reports one entry per locale present on either side, so an added or removed translation counts as a change even where content matches everywhere it exists on both. RevisionsController#diff now resolves a real locale before diffing -- defaulting to whichever locale actually changed, falling back to the default locale only when nothing did -- and the view carries that locale through every existing control (view toggle, layer-pair buttons, the revision-select form) so it and the view/layer-pair axis stay independently selectable rather than resetting each other.
Diffstat (limited to 'app/controllers/users_controller.rb')
0 files changed, 0 insertions, 0 deletions