Doesn’t update language when I select another one in the language dropdown

Not that often, but that’s just because I don’t care enough about the formal address Hungarian translation (hu-formal). ;)

It may not be easy to change the already altered HTML, but there’s a solution: you don’t alter the HTML using the wrong language in the first place. :) Actually, I think you don’t even have to check the URL parameter, you can just query the target language when processing the message, and you’ll get the right language, even if there are messages with multiple target languages on the page (I don’t think it’s possible right now, but who knows, maybe it’ll be one time). Assuming $element holds a jQuery object for the <span class="sourcemessage">, you can get the target language with

$element.parents( '.tux-message-editor .editcolumn' ).find( 'textarea' ).attr( 'lang' )
Tacsipacsi (talk)23:52, 28 November 2021

@Tacsipacsi: I've submitted gerrit:745997 to add a hook when the language changes, which should hopefully make this a lot easier. I've also made some preparatory changes to how the processSourcemessage() function in the script works, so that it shouldn't be a problem to process the source message even after it has been altered. (This was also done to make the script update the markup immediately after saving a change instead of just after a reload, as mentioned in the other thread.)

Jon Harald Søby (talk)23:29, 14 December 2021

This issue should be solved now, Tacsipacsi! Feel free to test it out. :-)

Jon Harald Søby (talk)02:07, 14 January 2022