Template talk:Purge

From OpenStreetMap Wiki
Jump to navigation Jump to search

MediaWiki interface messages for performance and intelligibility

{{Purge/sandbox}} replaces the {{LangSwitch}} mechanism with MediaWiki interface messages for better performance and intelligibility. For the tooltip text, MediaWiki:Confirm-purge-title already existed on this wiki as part of MediaWiki core. For the link text, MediaWiki:Purge-purge is normally part of the Purge extension, which isn't installed here. I imported MediaWiki:Purge-purge from Translatewiki.net (where MediaWiki and its extensions are translated), preserving history, and copied any remaining missing translations from {{Purge}}.

I started with external translations instead of the ones on this wiki, because most of the translations on this wiki are suspect, having been added by a single user who apparently doesn't speak those languages. I speak Vietnamese, one of the languages he added. While it isn't gibberish, it's a mistranslation on a couple levels. He assumed incorrectly that Vietnamese borrows the Chinese term for "purge", using a tool like Google Translate to do a transliteration. But the Chinese translation is apparently wrong too, meaning "to achieve" or "to bring to fruition". I did copy some of his other translations over to the MediaWiki namespace, but only where MediaWiki had gaps in language coverage.

The comparison below is for a page that contains only {{Purge}} versus a page that contains only {{Purge/sandbox}}:

NewPP limit report

Cached time: 20190622012813 Cache expiry: 86400 Dynamic content: false CPU time usage: 0.038 seconds Real time usage: 0.073 seconds Preprocessor visited node count: 250/1000000 Preprocessor generated node count: 4162/1000000 Post‐expand include size: 397/2097152 bytes Template argument size: 40/2097152 bytes Highest expansion depth: 9/40 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes Lua time usage: 0.020/15.000 seconds Lua virtual size: 15.85 MB/50 MB Lua estimated memory usage: 0 bytes

Transclusion expansion time report (%,ms,calls,template) 100.00% 64.131 1 Template:Purge 100.00% 64.131 1 -total 95.71% 61.382 2 Template:LangSwitch 87.41% 56.058 4 Template:Langcode
+
NewPP limit report

Cached time: 20190622012915 Cache expiry: 86400 Dynamic content: false CPU time usage: 0.009 seconds Real time usage: 0.010 seconds Preprocessor visited node count: 14/1000000 Preprocessor generated node count: 57/1000000 Post‐expand include size: 380/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 3/40 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 0/5000000 bytes

Transclusion expansion time report (%,ms,calls,template) 100.00% 2.987 1 Template:Purge/sandbox 100.00% 2.987 1 -total

While it isn't a huge difference in absolute terms, changing highly used templates to use interface messages instead of {{LangSwitch}}, {{Langcode}}, and {{TranslateThis}} does add up to a significant portion of page load time.

The tradeoff is that, going forward, a user has to ask administrators to add a translation using {{Edit request}}. By starting with existing MediaWiki messages, this template has better translation coverage of these messages than before, so hopefully the tradeoff will be worth it.

I'm sure other templates need to be reviewed for bogus translations too. There's nothing more effective at pushing away potential contributors than seeing their language get butchered everywhere.

 – Minh Nguyễn 💬 02:00, 22 June 2019 (UTC)

MediaWiki:Purge-purge/nb imported from Translatewiki says “gjenoppfrisk” but MediaWiki:Purge-purge/no copied from the old template says “aktualisere”. Unless a Norwegian speaker thinks differently they should be the same. --Andrew (talk) 11:09, 22 June 2019 (UTC)
Good catch, I copied MediaWiki:Purge-purge/nb to MediaWiki:Purge-purge/no, since Norwegian is assumed to be Bokmål by default. – Minh Nguyễn 💬 22:18, 22 June 2019 (UTC)

Yes check.svg – Minh Nguyễn 💬 08:51, 8 August 2019 (UTC)