User:GrounderUK/page

From Wikifunctions
Amire80: I was translating https://www.wikifunctions.org/wiki/Wikifunctions:Introduction and ran into this problem: In the "Create tests" section, it says:
Click on "Select Function" under "Call"
Amire80: I figured out that "Select function" and "Call" are not translated in the extension, but in the labels of some ZObjects, although it was not a perfect experience. "Call" was already translated, and the translation was not great, so I had the opportunity to improve it. I found an object in which that string appeared, edited it, refreshed the "Create a new Test" page, and the new translation appeared there.
So it was good to see the fix immediately, but I was lucky that the search had very few results. What if it had a lot of results? When translating messages that appear in MediaWiki extensions, it's usually easy to find the precise message by using the `&uselang=qqx` trick.
It's not the most obvious or user-friendly trick, but it's documented, and at least some localizers are familiar with it.
So this raises several questions:
1. Is there something like uselang=qqx to find strings like "Select Function" and "Call"?
phab:T359898 No(?)
2. In Wikifunctions:Introduction, can the hardcoded words "Select Function" and "Call" be replaced with a transclusion, so that it would automatically load the correct translated text automatically? (For real extension messages, there's the “{{int:}}” magic word, but I guess it won't work here.)
Are they hardcoded? Why?
I think this is where “Call” comes from the Z20K2, as discussed after this log ended. “Function” should logically be coming from the Z20K1, but phab:T359936.
3. The form on the "Create a new Test" page uses a mix of messages from the WikiLambda extension and strings from ZObjects. Is there a list of all the ZObjects whose labels I have to translate to get a full user experience in my language? (Or —which is the same thing— if I want to review the current translation.)
phab:T359898 No. I have produced a list of all(?) the keys with multilingual labels from Z1 to Z99. I don’t see language names being entered on 900-odd Z60s so there should be a solution for that. For each type of object, we need a community-prioritized list of objects. Most lists will be short or empty. I have suggested that labels for functions, implementations and tests should be prioritized according to function. Built-in functions are a natural priority (with some having an especially low priority, perhaps).
GrounderUK: Interesting questions all! But the third is rather open-ended, in principle. The full list of objects whose labels might, in theory, appear is the list of all pages in the main namespace, which currently ends here: https://www.wikifunctions.org/w/index.php?title=Special:AllPages&from=Z1804. These are organized by type here: https://www.wikifunctions.org/wiki/Special:ListObjectsByType/Z1. (You have to look at each type separately, but there are only 32 at the moment. There is only one level beneath each type, listing all the objects of that type.)
This is how I might maintain a near 100% localization, but the improved filters ticket (phab:T359672) should cover this.
GrounderUK: For translations, Z4/type is the highest priority, in my opinion. Z20/test cases and Z14/implementations would be the lowest priority, and their priority would depend on the priority of the Z8/functions that they test or implement. A few of these functions are equivalent to types, so these would be the highest priority. Only one of these is currently supported: Z881/typed list. The others should be referenced in the glossary and function model. They will also be found at https://www.wikifunctions.org/wiki/Wikifunctions:Reserved_ZIDs.)
Focusing first on types has been added to Help:multilingual I can take the other thoughts there if no one thinks I shouldn’t
Amire80: I may be misunderstanding something, but I'm really surprised that something as basic as adding a test depends on content. Like, I'd think that adding a test to a function is a part of the platform, not of a particular site. If another site uses the WikiLambda extension, they will have to define a completely different test system or to import it from Wikifunctions. Will any other site want to define their own? And if most sites will want to import it, why not make it built into a platform, so that it will be convenient to translate without having to hunt for labels under Z items?(And if the assumption is that no other sites will be using the WikiLambda extension at all, then the conclusion is the same: build it into the platform to make it easy to translate.)
I’m still not inclined to comment further on this.
Amire80: Thanks for the tips about the important Z items. Do you happen to have answers to the other two questions?
Amire80: Also, is there a way to find those important items by examining the platform, without gaining experience and seeing the same ZIDs everywhere?
Amire80: I don't know how to do it on Wikidata either. For example, I happen to know that "instance of" (P31) is very common in Wikidata, but that's just because I often look at Wikidata and see it. So is there a way to see this frequency and importance on Wikidata and Wikifunctions without relying on experience and intuition?
Amire80: (If anyone wonders, on translatewiki, the same thing in the translation of "MediaWiki extensions used by Wikimedia" is managed by manually dividing them into severe groups. The most important ones are under "Main", and there are also "Advanced", "Fundraising", etc. It's curated by translatewiki server administrators, one of whom is myself. We use a mix of technical criteria and intuition to decide where each extension goes. We think it works well, but we welcome suggestions for improvement.)
A Wikidata digression, but it follows similar thinking to Wikifunctions:Catalogue etc.
GrounderUK: Sorry, I don’t, but I’m sure somebody does…
Sannita: I can ask them tomorrow when business resumes
Note question 2, for which there is no ticket.
GrounderUK: I’m not sure. I believe that translating all the objects apart from functions, implementations and tests gives you your basic lexicon. Translating all the functions with ZIDs less than 10000 gives you a working lexicon. Then you could specialize by looking at functions grouped thematically in https://www.wikifunctions.org/wiki/Wikifunctions:Catalogue. After that? I would see what is happening to phab:T359672 *but there is a community-led perspective in https://www.wikifunctions.org/wiki/Wikifunctions:WikiProject_Maintenance. The theory here is that there is some correlation between the number of tests and the importance or stability of the function. (That is not a very strong correlation today.)
Further thoughts for Help talk:multilingual
GrounderUK: Please see https://www.wikidata.org/wiki/Help:Frequently_used_properties and (linked from there) https://www.wikidata.org/wiki/Wikidata:List_of_properties (or go straight to https://www.wikidata.org/wiki/Wikidata:Database_reports/List_of_properties/all)
GrounderUK: 🤔Please make sure you avoid https://www.wikidata.org/wiki/Wikidata:Database_reports/List_of_properties/all/he initially, since that seems to include only those that have been translated.
Amire80: So I'm trying to do it and I have even more questions.
Amire80: https://tools-static.wmflabs.org/bridgebot/aca868c8/file_58458.jpg
Amire80: When I tap the pencil icon, nothing happens.
Amire80: Is it because there is a bug? Or because the page is protected or something?
Amire80: And what are those chips with text in the Bengali script? If I had to guess, it looks more like an alias than a translation, but an alias is supposed to be in English and not in Bengali.
Amire80: And why do I see this page in English even though my preferences define my UI language as Hebrew?
phab:T359772
GrounderUK: I’m surprised that you’re surprised, so perhaps I misunderstand your misunderstanding! The WikiLambda extension is for a wiki of functions. If someone wants to use it for their own collection of functions, then they would want some way of testing their functions, which is what the extension provides. The test cases are part of the content for testing the content. Different content implies different tests. If you don’t have different content, you don’t want the WikiLambda extension, you want a Wikifunctions service (I guess) 🤷‍♂️
No further comment.
GrounderUK: The pencil should be black and you should be able to edit in a limited way (like adding translations).
Browser caching issues?
Amire80: It's kind of like templates. It happened many times that people who know that I'm familiar with MediaWiki call me and ask for help, and the very common scenario is this: they install their MediaWiki because they want something similar to Wikipedia, but with their own topics. The install MediaWiki, they install extensions, and then they discover that for infoboxes, which are a central feature of Wikipedia, they also need templates, and templates are a thousand times harder to install. It's not even correct to call it "installation"—it's importing, and then fighting to make them actually work.
Amire80: I don't have statistics, but quite a lot of people give up at that point.
Amire80: A testing system sounds like a very central feature of a software development environment. Maybe not in 1994, but definitely in 2024. So why is it a part of the site and not a part of the extension?
Amire80: Both of them are a kind of code, but the extension is much easier to install and to localize.
Someone should answer this question ("out of the box", below).
Amire80: So is it a bug?
GrounderUK: It just worked for me. I am a mere “Functioneer”, but maybe you need that level of access. A user who is not logged on cannot edit it.
Amire80: Now it's black and editable. Did anything change, or was it just a glitch?
GrounderUK: Sorry, I don’t see how it can be part of the site today if it is not part of the extension. I’d better leave the question to someone who understands what you get “out of the box”.
GrounderUK: Just a glitch, I suppose 🤷‍♂️
Amire80: What I mean by "part of the site, but not the extension" is that it's defined on the wikifunctions.org site and not in the code of the WikiLambda extension.
GrounderUK: I understand the distinction you are making. I believe support for Z20/test cases is in the extension. The site provides an interface to the extension. It will be possible to use the extension without the interface, but then you only get what your own interface gives you.
Amire80: And why aren't the strings of that interface translated with the extension, but on the site? Like, some strings are translated in the extension, but some are translated on the site, and I don't understand why are they divided the way they are.
I don’t either, but a general explanation should suffice.
GrounderUK: In your place, I would raise a Phabricator ticket for the general defect and log each untranslated item in that ticket. Or you could list them in https://www.wikifunctions.org/wiki/Help_talk:Multilingual
Amire80: And why, when I edit Z4, is it called "labels" and "short descriptions"? Can there be several of each? I'd think that it's just one.
I mentioned Denny in some version of this on Talk:Z2.
Amire80: And can I see a history of that page on mobile web? I don't see a button for that.
Can you view history in mobile view? Well, you can view the history, but is there a link to it from the page? I see you can, now, but I couldn’t yesterday and the Z4 link just took me to a page with no history icon or terminal banner (which is sometimes grey and sometimes green)
phab:T360046
GrounderUK: One label and/or description per language, yes. I don’t know how you get to it in mobile view but history is https://m.wikifunctions.org/w/index.php?title=Z4&action=history (https://m.wikifunctions.org/w/index.php?title=Z4&action=history&uselang=he, say). (I use desktop view on my mobile.)
Amire80: I guess I can report Phabricator tasks about all these things, but... am I really the first one who sees them and wants to report a bug?
Amire80: And now I again see a gray pencil that does nothing when I tap it.
Amire80: And I see "type" as alias (or label?), but before I see it, I see a flash of some things in the Bengali script. Something is broken.
Amire80: https://tools-static.wmflabs.org/bridgebot/99867a08/file_58463.jpg
Amire80: @jhsoby , do you maintain the link bot here? Does it have to give links with /en in them?
jhsoby: yeah
Amire80: And what is that `/view/` part in the URL?
jhsoby: what's the alternative?
jhsoby: that you'll have to ask the wikifunctions developers 😊
GrounderUK: If you see the Bengali script on that object, I think it’s a browser problem. When I added “type” as an English alias that blocked the fallback to any (a feature or a bug, depending on your point of view). Just my best guess, of course…
Amire80: `https://www.wikifunctions.org/wiki/Z8` seems to work.
Amire80: It has `/wiki/` and not view, and it has no `/en`.
Amire80: If I just manually type `https://m.wikifunctions.org/wiki/Z8` on my phone, then:
Amire80: * Good: I get the mobile interface (although I'd expect it to be automatic when I type www and not explicit m).
Amire80: * Bad: I am not logged in.
Amire80: * Bad: I get those Bengali-script aliases.
Amire80: https://tools-static.wmflabs.org/bridgebot/ff551de6/file_58465.jpg
GrounderUK: I guess you are only logged in where you are logged in. Once you log in again, you should stay logged in (if you ticked that box). There are no English aliases on the Z8, so you fall back to any that exist. Like I said, that is either a feature or a bug, but I don’t think it is an accident!
GrounderUK: I think that is the more correct external url 🤔
A quick note on the url journey might be in order.
Amire80: Bengali (or is it Assamese?) is as cool as any other language, but I am pretty sure that I am not supposed to see aliases in one other language that is not my UI language or its fallback. Seeing a list of all languages, or the languages I specified in my Babel box, as it is on Wikidata, makes sense. But seeing just one random language doesn't.
Amire80: Hebrew had some aliases on that page, and they completely uh unrelated. I deleted them, and now I see Bengali there 🤦🏻‍♂️
jhsoby: oh, past me is actually smarter than i thought. The language it uses for links is the one set for the group. So for this group, the language is English, hence /view/en/ links. If we set the group language to Hebrew or Bengali, it would use /view/he/ and /view/bn/ instead.
jhsoby: You can also override this by using @langcode after the Z# thing. For example:
jhsoby: Z8@he
jhsoby: Z8@bn
GrounderUK: It is being called Bangla in that object. I think it just happens to be the first language it finds after the “en” fallback fails (because it begins with B, perhaps).

cvictorovich interlude

cvictorovich: I must say that the fallback system of WikiLambda is crappy
cvictorovich: When I set interface into one of the variants of Chinese, the fallback just prints other variants
cvictorovich: Can’t we just implement the language converter here?
cvictorovich: For instance, if I set my interface language to zh-tw, anything not localized into this variant would fallback to simplified Chinese (or another variant) rather than converting directly
GrounderUK: It is pretty pointless for aliases in particular, especially if you already have a label or description in a reasonably convenient language.
cvictorovich: (Did I make myself clear?
cvictorovich: The result is that we should make an alias for each variant everywhere
GrounderUK: We don’t want aliases unless they are useful, surely. We certainly don’t want to add aliases just to block fallback.
cvictorovich: I won’t do so; it’s unhelpful :cvictorovich: Each time I don’t know which variant of Chinese should I fill in when creating aliases
GrounderUK: Why is it not always the variant you are editing? Or do you mean variants under one Z60?
cvictorovich: I mainly create English alias
cvictorovich: For the second case… I chose zh (the default variant
cvictorovich: I write simplified Chinese while I use traditional for interface language
GrounderUK: Makes sense, so long as it is the “en” variant. That blocks the fallback to a random language.
cvictorovich: But here on WF I adopt English interface as variants listed here is confusing
Winston_Sung: https://t.me/wikifunctions_zh
Winston_Sung: FYI.
cvictorovich: Wikidata is an exception for me: I adopt French interface language there for manipulating French lexicon data
GrounderUK: If it confuses you, you could suggest ways to make it less confusing. I thought the intention was that you could use any language for the interface and then edit in a different language. It seems that you keep having to change the language you are editing in, is that right?
cvictorovich: To avoid that I stick to English here
GrounderUK: Probably something to do with phab:T344145 🤔
Amire80: https://phabricator.wikimedia.org/T359772
Amire80: I tried finding other bug reports about those aliases in random languages and couldn't, so I reported my own. I'm quite surprised that I'm the first one who is bothered by it.
Amire80: (And look, it's pretty famous that passion about all the languages and support for radical language equality is my brand, but showing essentially random languages is not just useless—it's harmful.)
Amire80: Of the three questions I've posted above, this is the one that I actually care about most immediately.
Amire80: If you look at https://www.wikifunctions.org/wiki/Z12?uselang=en , where do those English texts under "Contents" come from:
Amire80: * type
Amire80: * identity
Amire80: * keys
Amire80: * Item 1
Amire80: * value type
Amire80: And so on. How do I find where does each of these strings come from?
Amire80: On Wikidata, texts of this kind are usually links that lead to the relevant item or property, but here it's just plain text.
GrounderUK: Those labels (mostly) come from the definitions of the embedded objects’ types. The label “type”, for example, comes from the Z1@he, which declares that every object has a “key” (a key–value pair, more precisely) and in that key, there is a Z1K1, the label for which, in English, is “type”. I think “Item 1” may be an exception, thinking about it. A Z4@he has a list of keys, the definition of each of which is Z3@he, but the list itself doesn’t have labels for its elements 🤔 I’ll have to admit defeat on “Item”!
Amire80: It would be very useful to have a mode in which I can directly see the provenance of each of those labels.
qqx is just a hack. I don’t object to it, but just being able to toggle between labelized and basic key value string (and not necessarily for the whole page) might give a better experience for translators, general users and technical users too
Amire80: For MediaWiki core and extensions messages, we've had uselang=qqx for this since 2010 or so.
Amire80: Is Wikifunctions reinventing the wheel?
Amire80: Like, if you are familiar with the general idea of how a MediaWiki site works and how MediaWiki extensions are localized, but you are a beginner with Wikifunctions, how can you know this?
Amire80: _Without_ getting _very_ familiar with Wikifunctions, that is.
Amire80: I understand that Wikifunctions is special and more complicated than most other extensions, but this wheel reinvention looks exaggerated and unnecessary.
Amire80: It appears to give up on useful features that MediaWiki has provided to localizers for more than ten years.
Amire80: "Item 1" is an actual translatable message: https://translatewiki.net/w/i.php?title=Special:Translations&message=MediaWiki%3AWikilambda-list-item-label%2Fhe
GrounderUK: It is described in https://www.wikifunctions.org/wiki/Wikifunctions:Function_model. That doesn’t explain how the basic model maps more or less directly into the interface, however. In the earlier versions you could see a version of any object without the labels (a light rendering of the JSON objects). I guess the feeling was that this was “unfriendly” so now it’s only half visible in the diffs (and the aspiration is to hide it there too). I’m sure Denny et al. will reflect carefully on your suggestions and we shall make some progress.
I think there is an opportunity here. If we build on Wikifunctions:Introduction and connect it to the pure object definitions, not principally for the benefit of translators but for all users, so it’s not just about what you see and do but how this is represented (at decreasing levels of abstraction). I made a very preliminary start at the top of this page: this is what an object is, these are the labels, this is where you change them, these are the words we use and those are their definitions etc
Amire80: So it's one of the few things there that are easy to find using uselang=qqx :)
GrounderUK: Ah, that sort of makes sense. Thank you!
GrounderUK: That’s a great tip, thank you. I’m not going to rush off and do it now, but I don’t mind translating the objects into qqx if that will make for an easier workflow 🤷‍♂️