"I have no idea what I'm doing"

Fragment of a discussion from User talk:Kephir
Jump to navigation Jump to search

Make the script work when the translation table contains entries using {{ttbc}}. Fortunately, it worked as intended.

Keφr13:23, 22 June 2014

What about the undo feature? Also, we still haven't added support for those two proposed replacement templates...

CodeCat13:25, 22 June 2014

{{t-check}} seems to work fine without any changes. {{t-needed}}… I am yet to figure out. What undo feature?

Keφr13:29, 22 June 2014

The translation editor has an undo feature. When making changes you have to make sure it puts things back where they should be.

CodeCat13:39, 22 June 2014
 

Also, the editor needs to produce output using the new templates, while still understanding the old ones alongside the new. That's the part where I got stuck.

CodeCat13:43, 22 June 2014
Edited by author.
Last edit: 14:47, 22 June 2014

I think it works now. New translation requests will use {{t-needed}}, the script will recognise lines using {{ttbc}}, and will correctly remove correct usages of both {{trreq}} and {{t-needed}} (and some incorrect ones). I have kept {{trreq}} as the magic string the user has to type as the translation, not to break users' habits. I am still not quite sure what exactly my changes did. Please test.

I must say, that script is a giant pile of hacks, and needs to be rewritten from scratch. It simply cannot be maintained as it is for much longer.

Keφr14:27, 22 June 2014

I agree. My strategy is usually to rewrite parts over time, rather than to make everything new out of nothing. But if you can make it easier to maintain, that would be very nice.

Thank you for taking the time to do this anyway.

CodeCat14:39, 22 June 2014