Talk:Tech/News

From Meta, a Wikimedia project coordination wiki

Hack to include recurring texts from templates[edit]

I’ve realized that {{TRANSLATIONLANGUAGE}}, which has recently become available outside of <translate> tags, could be used for a hack to translate recurring texts (greeting, headings etc.) from templates: if I write

{{safesubst:Template name/{{TRANSLATIONLANGUAGE}} }}

on the page, it doesn’t get substed on the translation original because replacing {{TRANSLATIONLANGUAGE}} with en happens after the pre-save transform and MediaWiki can’t substitute a template whose name contains another, not substituted template; but on translation pages, the replacement happens before the pre-save transform, so the substitution succeeds (and thus there is no template call in the distributed text). This is quite hackish, but maybe worth it to save time for translators and obsolete {{SALT}}? —Tacsipacsi (talk) 10:44, 29 March 2024 (UTC)[reply]

Interesting. Let us take a look at it and see! Johan (WMF) (talk) 22:51, 4 April 2024 (UTC)[reply]
@Johan (WMF): I’ve created a proof of concept on Tech/News/2024/16 because I didn’t want to mess with Tech/News/2024/15 (to be delivered in two days) anymore. (It’s a proof of concept in particular because markup for mixed-language text is missing in some cases. Adding the markup is doable, but it probably requires yet another template, which I don’t want to create until we know we need it.) It works as intended on the translatable page; you (or UOzurumba (WMF)) may want to mark the issue for translation (and encourage translation of Template:Tech news text) earlier than usual so that we can notice and fix any issues on time. (I’ve tested my concept in my local dev wiki before starting this topic, though, so I hope there won’t be any issues.) If there are any issues that can’t be fixed before delivery, or the person doing the delivery isn’t comfortable with it, feel free to revert. —Tacsipacsi (talk) 18:34, 6 April 2024 (UTC)[reply]
Also ping Trizek (WMF) and Quiddity (WMF). Johan (WMF) (talk) 22:46, 6 April 2024 (UTC)[reply]
I like the proposal, thank you @Tacsipacsi! It is certainly a more robust solution than SALT. I think you should drop a note to other translators, in particularly the ones using SALT! :) Trizek_(WMF) (talk) 19:20, 8 April 2024 (UTC)[reply]
@UOzurumba, could you, please, open the next issue for translation already now, to check the result? IKhitron (talk) 13:55, 10 April 2024 (UTC)[reply]
@IKhitron, done! Thank you. UOzurumba (WMF) (talk) 17:39, 10 April 2024 (UTC)[reply]
Great, thanks! IKhitron (talk) 17:40, 10 April 2024 (UTC)[reply]
Well, it took me about a minute to translate, which is very nice. But also, I think I found a problem. @Tacsipacsi, I believe you should do these things:
  1. Edit Template:Tech news text, such that in the parameter |next train standard= the text mw:MediaWiki 1.42/wmf.XX will be replaced by mw:MediaWiki {{{version}}}.
  2. Mark it for translation.
  3. Edit Tech/News/2024/16, such that {{safesubst:Tech news text/{{TRANSLATIONLANGUAGE}}|next train standard|group0=2024-04-16|group1=2024-04-17|group2=2024-04-18}} will be replaced by {{safesubst:Tech news text/{{TRANSLATIONLANGUAGE}}|next train standard|version=1.43.0-wmf.1|group0=2024-04-16|group1=2024-04-17|group2=2024-04-18}}
  4. Mark it for translation.
And congrats for your great idea. IKhitron (talk) 17:58, 10 April 2024 (UTC)[reply]
And also, there is something odd with noinclude tags. Instead of next Tue/Wed/Thu it shows April 16/17/11 on the template page. IKhitron (talk) 22:21, 10 April 2024 (UTC)[reply]
Thanks for the problem report! I’ve fixed it, although slightly differently (the whole page title is the parameter, which naturally avoids the dash vs slash confusion), plus introduced a parameter for the other link as well (which was also wrong, 1.42 instead of the brand new 1.43).
About the days, I wouldn’t care much about it. Yes, when rendered on a Wednesday, “next Tuesday” and “next Wednesday” mean the next week while “next Thursday” means tomorrow, but this affects only the template page itself, not the issue pages, and translators will probably mostly look at the page over weekends anyway, when it’s consistent. 🙂 —Tacsipacsi (talk) 23:56, 10 April 2024 (UTC)[reply]
You are welcome. Very well. But looks like there is one more problem, @Tacsipacsi, this time temporal one. If an issue translation was created before template translation, there is a mess, because subst already worked, I think. Look at gpa translation, I've translated a line from the template by myself, to test it, and it's still in English. From the same cause, see the result of the Franch translation in the "new Mediawiki" part. Maybe you should add a warning to this issue page "Do not translate before the template translation is ready." IKhitron (talk) 00:03, 11 April 2024 (UTC)[reply]
I think if you use next Mon+2/3/4 instead of next Tue/Wed/Thu, it should work, but I'm not sure. IKhitron (talk) 00:04, 11 April 2024 (UTC)[reply]
Indeed, a change in the translation doesn’t regenerate the issue page. However, the issue page is regenerated and all translation updates are incorporated if either the page is re-marked for translation (this usually happens anyway on Mondays to remove the deadline template), or any non-null edit is made to a translation unit. It’s still worth a note on Template:Tech news text/doc (I won’t write it right now, it’s getting really late), but nothing’s lost if one starts with the issue itself (worst case, they have to add and remove a word in the issue translation). —Tacsipacsi (talk) 00:56, 11 April 2024 (UTC)[reply]
@Tacsipacsi, I think the #switch-es with all values in code are not expected. Maybe due to “Mark up untranslated items”? -- Pols12 (talk) 00:08, 11 April 2024 (UTC)[reply]
No, due to a missing safesubst:. Fixed. (Something’s fishy around the untranslated item markup as well, as Module:Lang if different seems to mark up everything even if it’s translated, but it’s not that annoying, and I’ve run out of ideas for today.) —Tacsipacsi (talk) 00:56, 11 April 2024 (UTC)[reply]
Fishy things also fixed.Tacsipacsi (talk) 23:53, 14 April 2024 (UTC)[reply]
N3. Confirming that RSS feed is fine as well. IKhitron (talk) 09:20, 15 April 2024 (UTC)[reply]
NN3. @Tacsipacsi, I've calculated the right dates for the noinclude tags. Now it shows the current train at Sun-Thu and the next one at Fri-Sat. IKhitron (talk) 15:19, 15 April 2024 (UTC)[reply]
Tacsipacsi, I suggest to add to the top half of Tech/News/init empty lines with icons substitutions, like "advanced item". IKhitron (talk) 00:24, 17 April 2024 (UTC)[reply]
Quiddity (WMF) added them to Tech/News/Manual#Icons in the meantime, I think that’s enough. —Tacsipacsi (talk) 13:35, 21 April 2024 (UTC)[reply]
I'm just coming by to say this change may not seem that much important but it actually saves a lot of time to tech news translators. Thanks Tacsipacsi for the idea and thanks everyone else for contributing! Sakretsu (炸裂) 16:12, 21 April 2024 (UTC)[reply]
+1 --Matěj Suchánek (talk) 07:39, 23 April 2024 (UTC)[reply]

Template suggestion[edit]

Hi. There is a problem that makes me a lot of trouble for years in Tech News, navigation-wise. Can I, please, create a sketch for a new template to be added to the Tech News pages, hoping it will be accepted, and if yes, it will be created? IKhitron (talk) 19:21, 31 March 2024 (UTC)[reply]

Don't know exactly what the issue is, IKhitron, but please let us know what it is and suggest how we could solve it! Johan (WMF) (talk) 22:51, 4 April 2024 (UTC)[reply]
Very well. I'll make something simple to start with, thanks. IKhitron (talk) 23:12, 4 April 2024 (UTC)[reply]
Great. Something slightly more tangible would help us think about it. (: Johan (WMF) (talk) 23:20, 4 April 2024 (UTC)[reply]
I believe it's enough. If there will be a decision to create this, there is a lot of work to make it actually work, and not just look like. I suggest to add to every Tech News page on meta (not on talk pages publications), on all languages, a kind of "template:tech news navigation". This is how it looks for 2024, with 2023 to be on the left red link and 2025 to be on the right red link. It's a very rough draft, so ignore the code, just watch on the appearance. What do you think? IKhitron (talk) 23:53, 4 April 2024 (UTC)[reply]
Template:Tech news navigation <- 2024 -> Template:Tech news navigation
01 02 03 04 05 06 07 08 09 10 11 12
01 (01) 06 (05) 10 (04) 14 (01) 19 (06) 23 (03) 27 (01) 32 (05) 36 (02) 41 (07) 45 (04) 49 (02)
02 (08) 07 (12) 11 (11) 15 (08) 20 (13) 24 (10) 28 (08) 33 (12) 37 (09) 42 (14) 46 (11) 50 (09)
03 (15) 08 (19) 12 (18) 16 (15) 21 (20) 25 (17) 29 (15) 34 (19) 38 (16) 43 (21) 47 (18) 51 (16)
04 (22) 09 (26) 13 (25) 17 (22) 22 (27) 26 (24) 30 (22) 35 (26) 39 (23) 44 (28) 48 (25) 52 (23)
05 (29) 18 (29) 31 (29) 40 (30)
@IKhitron: I’m not sure if it’s really needed on all issue pages. We already have Tech/News/Archives, which lists all past (and some future) issues. On the other hand, making the dates (and not only the weeks numbers) visible is a good idea, which could be implemented on Tech/News/Archives. (Maybe in text rather than in table, though, e.g. 16 (15 April).) —Tacsipacsi (talk) 18:42, 6 April 2024 (UTC)[reply]
Could be, but there is no link on any issue on any language to the archive page. IKhitron (talk) 18:47, 6 April 2024 (UTC)[reply]
Tech/News does link to it fairly prominently (“Read old issues” link), isn’t that enough? —Tacsipacsi (talk) 21:33, 6 April 2024 (UTC)[reply]
Actually, I hoped that links on hindu translation from 2021 will lead to other hindu translations from that year. Here it will take four clicks instead of one. I know it's possible to go there, my suggestion is to go there instantly, exactly to the right place. There is not enough space on issue pages? IKhitron (talk) 22:22, 6 April 2024 (UTC)[reply]
@IKhitron: Yes, I do think that the issue headers are already huge and shouldn’t be made even larger. For example, on my 768px tall screen, using Vector 2022, a single line of the actual issue text (in fact of the introduction) is visible on Tech/News/2024/14/he. I’ve updated Tech/News/Archives to use {{pg}}, so now Tech/News/Archives/he links to Hebrew translations (if they exist) rather than to the English pages. —Tacsipacsi (talk) 13:46, 21 April 2024 (UTC)[reply]
"Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe • [[Tech/News/Archives/<lang>|Archives]]" will take a lot of place, @Tacsipacsi? Thank you for pg. IKhitron (talk) 13:53, 21 April 2024 (UTC)[reply]
@IKhitron: It doesn’t take a lot of place, but it has two caveats:
  • It’s distributed. Is it good to distribute the archive link? I’m not sure (which means neither am I sure that it’s bad).
  • What to substitute in the place of <lang>?
    • The current subpage name: this is what {{pg}} does, but if an issue is not translated, the readers are brought to the English page that week.
    • Special:MyLanguage: works consistently across weeks, but doesn’t work (=brings to the English page) if one hasn’t set their UI language on Meta (which is likely true for a great percentage of readers).
    • Something else?
So I don’t find this unacceptable, but I’d like to see the above two points resolved before making the change (and I’d love to hear a third opinion, especially on the first point). Tacsipacsi (talk) 16:33, 21 April 2024 (UTC)[reply]
  • Absolutely, it needs to be distributed.
  • Getting the language from a page where the translation is published is impossible? In this case, it's the first option, which works fine for translated issues.
IKhitron (talk) 16:40, 21 April 2024 (UTC)[reply]