User talk:Ruakh/Tbot.js

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Specific language support[edit]

Is it possible to add some specific language support, like declension templates, with predictable languages? The editor would still check everything, but it would save a lot of time, I should think. —Μετάknowledgediscuss/deeds 03:00, 26 December 2012 (UTC)[reply]

Yes, absolutely. Do you have a predictable language to offer? —RuakhTALK 13:43, 26 December 2012 (UTC)[reply]
Well, the most foolproof one I was thinking of would be Yiddish adjectives, which simply requires getting the rightmost substring of the pagetitle being created, to a length of 1 character. Because MW is stupid, we need 5 templates for it: {{yi-adj-m}} if that substring happens to be ם, {{yi-adj-n}} for ן, {{yi-adj-final}} for the other finals, {{yi-adj-vowel}} for the vowels (i.e. ו וּ י יִ אַ אָ ע) and {{yi-adj-1}} for everything else. Documentation for all of them can be found at WT:AYI#Adjectives. Is this all possible? In the long run, is adding extra support like this a burden on execution time? Should this just go in my JS instead of the general pool (well, Wikitiki's too, but you get the point)? —Μετάknowledgediscuss/deeds 16:56, 26 December 2012 (UTC)[reply]
Unfortunately, someone ;-) seems to have decided that these templates don't need real documentation, apparently under the belief that “The headline should use {{yi-adj}}” is sufficient documentation for a template whose wikitext uses seven distinct parameters. And what documentation there is, is rather confusing. For example, Wiktionary:About Yiddish#Adjectives clearly implies that if an adjective's spelling ends in ם, then its declension will use {{yi-adj-m}} if its pronunciation ends in /m/, and {{yi-adj-final}} otherwise. (And similarly, m.m., for ן and {{yi-adj-n}} and /n/.) But I'll do my best.
Re: "In the long run, is adding extra support like this a burden on execution time?": In the long run, if this script becomes popular and people start customizing it for a lot of languages, then — yeah, I'll move language-specific logic onto specific pages; but for now I don't think it's a problem to keep it all on this page.
RuakhTALK 18:42, 26 December 2012 (UTC)[reply]
Possibly  done: you'll have to try it and see. :-) —RuakhTALK 20:12, 26 December 2012 (UTC)[reply]
Thanks! To my defense, I found that templates an inadequate mess written by Dick Laurent, and after I cleaned it up, I was too lazy to write detailed docs for each. But yeah, I didn't do a good job on that, and I'll probably rewrite it if I remember. Anyway, there's a fair amount more of stuff that could be automated, but I guess checking this should take priority. Now, to find some adjectives... —Μετάknowledgediscuss/deeds 20:29, 26 December 2012 (UTC)[reply]
It doesn't work, but I'm not sure why. The part that goes if(greenData.xlit) ret += '|tr=' + greenData.xlit; doesn't seem to be doing its job in {{yi-adj}}, and I can't explain that. The part I do understand is that you don't seem to have put the translit in as an argument for the template, AFAICT. I might be able to write that myself, but in fear of destroying everything and out of respect to you, I'm not going to touch it. —Μετάknowledgediscuss/deeds 01:43, 27 December 2012 (UTC)[reply]
Quite possibly  fixed. Please hard-refresh http://en.wiktionary.org/w/index.php?title=User:Ruakh/Tbot.js&action=raw&ctype=text/javascript and try it again. (Also, in the future, if you see something not working, please indicate where you see it not working. In this case, the problem occurred only in the last translation on the line, and only if there was no gender given for it. As it happened, that was the exact first case I tested, so I reproduced your problem; but with just a little bit of bad luck, I'd have been led down the garden-path of thinking we had some relevant browser or configuration difference or something.) —RuakhTALK 02:08, 27 December 2012 (UTC)[reply]
Now it's all good. Actually, that was the only case I was thinking of. Most of the time, there is only one translation per language, and most languages don't assign gender to adjectives (Yiddish certainly doesn't). In fact, if there is gender given for a Yiddish adjective, it ought to be removed. I'll give you a specific case next time. —Μετάknowledgediscuss/deeds 02:34, 27 December 2012 (UTC)[reply]
Re: "Actually, that was the only case I was thinking of": Well, but you had no way of knowing what cases would be affected, and no way of knowing what cases I would test. What if the problem had only appeared, say, on pages whose titles contained _? You should always give steps to reproduce. (Since this is a script that I'm actively working on, and since the problem showed up in the first case I tested, the only cost of not giving steps-to-reproduce is that it made a little bit more work for me: I wasn't aware of any pages with Yiddish-adjective-redlink-translations, so I had to create my own test case. Not a big deal. But in general, when asking a developer about a possible bug, the cost of not giving steps-to-reproduce is very likely to be that your request will be ignored or de-prioritized. So I'm making a specific request, but also giving you general advice.) —RuakhTALK 02:46, 27 December 2012 (UTC)[reply]
Of course, I'm not going to argue with you when you're right :) (But when I get errors, I fix the page in question (and then it's no longer a redlink), so it's better to have a test case anyway. That said, the best thing to do what have been to supply one myself.) —Μετάknowledgediscuss/deeds 02:55, 27 December 2012 (UTC)[reply]
New problem. Why doesn't it check for e.g. {{yi-noun}} before assuming {{head|yi|noun}}? —Μετάknowledgediscuss/deeds 02:44, 27 December 2012 (UTC)[reply]
It's not "assuming" {{head|yi|noun}}, it's defaulting to {{head|yi|noun}}, since no one has told it that it has any alternative. (I'm not sure what the purpose of "check[ing] for e.g. {{yi-noun}}" would be, since it would have no way of knowing how to use it.) —RuakhTALK 02:50, 27 December 2012 (UTC)[reply]
It's used just like {{head}} in this case, at least for the JS's purposes. So: why can't it check for the existence of {{xx-partofspeech}} before it deploys {{head|xx|partofspeech}}? —Μετάknowledgediscuss/deeds 02:55, 27 December 2012 (UTC)[reply]
Well, look. If you haven't configured the script to support a given language and part of speech, then obviously it's forced to fall back on a default behavior. (Well, or we could have it detect the lack of configuration before it even greenifies the link, and just not greenify it. If there were no sensible default behaviors we could fall back on, that's what we'd do.) So the question is, what's the best default behavior for an unconfigured language and part of speech? And I think the answer to that is: {{head}}. If I were to add auto-detection of {{xx-partofspeech}} (or {{xx-posabbrev}}, for {{yi-adj}} and {{he-adv}} and so on), that wouldn't really enable me to use the auto-detected template (for example, how am I supposed to guess that {{yi-adj}} takes the transliteration as its first argument, whereas {{yi-noun}} takes it as an argument named tr=?), unless we decide that the best default behavior is to make a bunch of guesses — which I really don't like, because the guesses would (almost by construction) be so plausible that people wouldn't even notice when they're wrong. (I mean, if the script plopped {{yi-adj|tr=foo}} into the edit-window, are you really telling me that you would take one look at it and instantly see that it's broken?) So about the only thing I could really see using the auto-detection for is adding something like {{attention|xx|This headword-line should probably use '{xx-partofspeech}'; and this script should probably be configured with explicit support for {{subst:xx}} partofspeechs.}} to the end of the headword-line. Which I'm O.K. with doing, if you think that's useful. —RuakhTALK 03:31, 27 December 2012 (UTC)[reply]

(back to margin) Erm, no, that's not ideal. But it seems ridiculous to tell you to specify that it ought to use {{yi-noun}}, {{yi-adverb}}, and {{yi-verb}} — but if that's how it has to be, then I'd like to request you put those in. Moreover, there's a lot of languages that use these, and the list will get annoyingly long. I still don't see why you can't check for the template's existence, and we can exclude odd cases like Yiddish adjectives, whuch already have special support anyway. —Μετάknowledgediscuss/deeds 04:23, 27 December 2012 (UTC)[reply]

Re: "if that's how it has to be", "I still don't see why you can't": I didn't say that "it has to be" that way, or that I "can't" do it differently. What I said is that we obviously have to have some default behavior, and that I think the best default is {{head}}, even when a specialized template exists. Certainly we can check for a specialized template, and we can have a different default behavior when we find one; I'm just saying that I think {{head|yi|noun}} is a better default than {{yi-noun}} even when {{yi-noun}} exists. (You write of "odd cases like Yiddish adjectives", but I'm not convinced that Yiddish adjectives are an odd case. In general, I'd hope that most language-specific headword templates have language-specific behavior, because if they don't, then they should just be deleted in favor of {{head}}.) —RuakhTALK 14:21, 27 December 2012 (UTC)[reply]
Actually, wait a sec, {{yi-adj}} actually supports the same head and tr parameters as the other Yiddish headword-templates; I got confused by the differences between it and the declension templates. (By the way, if you have time at some point to rename the declension templates — they should have decl or at least infl in their names.) So, yeah, I've added support for all the Yiddish headword-templates in a single lump. —RuakhTALK 14:43, 27 December 2012 (UTC)[reply]
OK, I guess we can't agree about that. I still think the specialized templates are always to be preferred (unless they really are identical to head). Well, one more thing is that for Tok Pisin verbs, if the verb ends in the substring im then the headword line should be {{tpi-verb|t}}, and otherwise it should be {{tpi-verb|i}}. —Μετάknowledgediscuss/deeds 17:54, 27 December 2012 (UTC)[reply]
The name of the specialized template is not always predictable, though. For example: {{fr-intj}}, but {{he-interj}}. Also, there can be important differences in usage. For example: {{fr-noun|m}}, but {{he-noun|g=m}}. --WikiTiki89 18:02, 27 December 2012 (UTC)[reply]
Re point 1: there should always be a redirect at xx-interjection. Re point 2: Then {{fr-noun}} needs an exemption, I guess. Sounds like loading up the exemptions, but they'll have to exist for Hebrew too. —Μετάknowledgediscuss/deeds 18:05, 27 December 2012 (UTC)[reply]
But you can't always predict which POS's of which languages will need exemptions, which is why you need a failsafe default. --WikiTiki89 18:12, 27 December 2012 (UTC)[reply]

Instead of using g1, g2, etc for {{yi-noun}}, could you please shove them together as g=mf (for example)? Test case can be found at bank, first trans-table. —Μετάknowledgediscuss/deeds 19:32, 27 December 2012 (UTC)[reply]

 Done. By the way, continuing the above discussion . . . I think that your phrase "Sounds like loading up the exemptions" might highlight a difference in our thought-processes here. I'm assuming that we'll want special-case code for almost every language that this is used for. —RuakhTALK 20:38, 27 December 2012 (UTC)[reply]
Yeah, I guess I'll have to go with that if you don't see a problem with it. At least for now, while we're operating under the assumption that we only need to add support for a specific language-POS combination when we know someone will use it (that is, no need to support Luganda yet). Next request: When Yiddish feminine nouns end in ע, they almost always take the argument pl=s. (I'm relying on the editor to remove it when that's not true.) —Μετάknowledgediscuss/deeds 21:42, 27 December 2012 (UTC)[reply]

A bunch of very minor points[edit]

A bunch of very minor points:

  • The script seems to check whether the browser supports querySelector, but does not check whether the browser supports getElementsByClassName, which is used in the script. IE8 supports qS but not gEBCN.
  • At the top of greenifyTranslinks, is it really necessary to put all the conditions in separate ifs? Couldn't there just be a || separating them?
  • var greenData = {}; greenData.lang = langcode; etc. instead of var greenData = { lang : langcode, ... etc.; Why?
  • Any particular reason for using all the regexps in splits instead of just strings? I'm pretty sure using regexps results in worse performance.

--Yair rand (talk) 14:06, 26 December 2012 (UTC)[reply]

  • Re: there being a browser that supports querySelector but not getElementsByClassName: Fascinating. In that case, I guess I'll just use querySelector for everything. :-)
  • Re: conditions being in separate ifs: Not necessary at all, but seeing as they're all unrelated, I don't know why I would combine them with ||.
  • Re: putting all the properties in a single object-literal:
    • Re: your literal question ("Why?"): That's just how the script evolved. Originally they weren't in such a nice compact blob ripe for object-literal-ization.
    • Re: what you seem to be getting at: Sure, I'll change that.
  • Re: splitting on regexes vs. strings: I couldn't remember if the behavior when you pass a string was browser-specific, and I was too lazy to check. :-P
RuakhTALK 15:43, 26 December 2012 (UTC)[reply]
Oh, and — thanks. :-)   —RuakhTALK 15:51, 26 December 2012 (UTC)[reply]

Yiddish nouns don't capture the gender[edit]

For an example, see [[flight]]. --WikiTiki89 20:27, 27 December 2012 (UTC)[reply]

Ok, thanks, it works now. --WikiTiki89 20:34, 27 December 2012 (UTC)[reply]
Yup, thanks. I missed that when I switched Yiddish nouns from {{head|yi|noun}} to {{head|yi-noun}}. —RuakhTALK 20:39, 27 December 2012 (UTC)[reply]

Latin support[edit]

Do you mind me always asking for things? Do you want me to explain how Latin declension works in terms of automated prediction of which template to use, or should I just try myself? I can't tell which you would prefer... —Μετάknowledgediscuss/deeds 21:41, 30 December 2012 (UTC)[reply]

You are welcome to modify the script yourself, or to ask me to make changes for you, as you prefer. If you do just modify the script yourself, then please be sure to use good edit-summaries so I (and others) can tell what's going on. —RuakhTALK 21:49, 30 December 2012 (UTC)[reply]
I don't trust myself to edit the master... I've made a carbon copy at User:Metaknowledge/Tbot.js, and I'll try experimenting with Latin over there. —Μετάknowledgediscuss/deeds 22:01, 30 December 2012 (UTC)[reply]
If I may suggest — since it seems that your fork merely adds a function, I think you should put this in User:Metaknowledge/vector.js:
importScript('User:Ruakh/Tbot.js');
importScript('User:Metaknowledge/Tbot.js');
and then pare User:Metaknowledge/Tbot.js down to just the function that you're adding. That way you can continue to get compatible changes to User:Ruakh/Tbot.js, without complicating the merging process.
RuakhTALK 23:04, 30 December 2012 (UTC)[reply]
I thought I might mess with something else, but that's unlikely, so I'll take you up on that. Thanks. —Μετάknowledgediscuss/deeds 23:08, 30 December 2012 (UTC)[reply]
Ah, thank you for all your edits! As you can see, rather than actually learning, I picked up simple JS from reading JS far past my comprehension. I really ought to get educated, because I make the most stupid mistakes, like after being told to shove semicolons after almost everything (and I don't even see why, because it seems to run right w/o semicolons if I've written it right). One of the few things you fixed that was not actually a careless error was that there was no default action if the gender was missing. That was intentional, because I figured it would force the user to fix the trans-table. Is that a bad way to think about this? —Μετάknowledgediscuss/deeds 17:26, 31 December 2012 (UTC)[reply]
Re: "there was no default action if the gender was missing. That was intentional, because I figured it would force the user to fix the trans-table": How would it do that? —RuakhTALK 18:17, 31 December 2012 (UTC)[reply]
... by making them notice the missing gender. Right? I mean, I guess I'll be the only one using it, but still. I'll try mucking my way through declension tables next. —Μετάknowledgediscuss/deeds 18:20, 31 December 2012 (UTC)[reply]
I don't think you can ever make someone notice something. (Also, backtracking a bit: the statement that "there was no default action if the gender was missing" is not really true. There was a default action: the gender would be given as undefined.) By the way, I've modified {{la-noun}} to detect if the gender is missing, and add its entry to Category:Latin nouns lacking gender. I think that's a better way of ensuring that these get taken care of. —RuakhTALK 18:27, 31 December 2012 (UTC)[reply]
I know that, but I don't consider undefined to a viable default, and I assume anybody would notice it. Funny, I assumed {{la-noun}} already had that feature. Anyway, I've just added code for the common declensional paradigms. Is it easier for you to just write this stuff or to fix my errors? —Μετάknowledgediscuss/deeds 18:38, 31 December 2012 (UTC)[reply]
Also: your edit to {{la-noun}} didn't work. —Μετάknowledgediscuss/deeds 18:41, 31 December 2012 (UTC)[reply]
Whoops, thanks for fixing that. —RuakhTALK 19:22, 31 December 2012 (UTC)[reply]

Underscores in multi-word entries[edit]

When the English entry is made up of multiple words, the script adds the definition with underscores instead of spaces. For example, at [[at the same time]], clicking one of the translations produces:

# [[at_the_same_time]] {{gloss|simultaneously}}

instead of:

# [[at the same time]] {{gloss|simultaneously}}

--WikiTiki89 18:29, 2 January 2013 (UTC)[reply]

Testing and making it work with other languages[edit]

Hi,

My testing went great (although I haven't created many entries, only a few) and I think you can start making it more public and available for other languages if you wish to enhance it. The templates for some languages maybe too complicated but a few languages can be covered easily with the same templates, I think. --Anatoli (обсудить/вклад) 01:06, 8 January 2013 (UTC)[reply]

Re: making it more public: Well, it's not really in a final form yet, and there will definitely be some breaking changes between now and when it's done. So if more people start using it, that just means that there will be more people that it won't work for. (I mean, that doesn't really hurt anything. If people want to start using it, they can. But it might cause some confusion and frustration.)
Re: making it available for other languages: It's always been available for all languages. I recommended Russian as the starting-point because I figured you'd be most familiar with it, but you can use it for any language you want. (Obviously we'll want to customize various things for various languages, but it has sensible language-agnostic default behaviors. Actually, you've already been seeing those behaviors: for Russian, only ===Noun=== has been customized. All other Russian POSes just use the default behaviors.)
RuakhTALK 04:10, 14 January 2013 (UTC)[reply]
Fair enough. Could you customise the tool for Russian verbs, please?
  1. Verbs don't get tr=, possibly when {{impf}} and {{pf.}}/{{pf}} are present. I was trying to create an entry from dazzle#Translations, the translation is "ослеплять" (first sense, first Russian translation)
  2. Optional {{impf}} and {{pf.}}/{{pf}} get added to verbs as "g=impf", which is undesirable. Instead of {{head|ru|verb|g=impf}}, could you make {{ru-verb|tr=oslepljátʹ|impf}}?
  3. As suggested by CodeCate below, could you please add request for inflection and pronunciation and add {{attention|ru}} to them? They are easy to remove but will help to get back to them when we start mass entry creation.
  4. For adjectives and adverbs, could you change {{head}} to {{ru-adjective}} and {{ru-adv}} , ie. {{head|ru|adjective|tr=populístskij}} to {{ru-adjective|tr=populístskij}}?
  5. No rush. Please let me know if it's feasible. I won't create entry ослеплять (dazzle) or популистский (populist adj.), let you experiment with above.
--Anatoli (обсудить/вклад) 22:31, 17 January 2013 (UTC)[reply]
{{attention|ru}} shouldn't be necessary if there is already a request template on the page for the same thing. —CodeCat 23:48, 17 January 2013 (UTC)[reply]
The reason I wanted {{attention|ru}} is that apart from pronunciation and inflection, there could be other issues - not the most common sense or a sense that might need clarification. Although the creator is in full control, when mass creating entries, there could be a few problems to fix before removing {{attention|ru}}. I have just created a bunch of entries from translations (with limited additional editing) but I have to remember to come back to them, so {{attention|ru}} would be useful. --Anatoli (обсудить/вклад) 01:12, 18 January 2013 (UTC)[reply]
Replies:
  1. Fixed, thanks.
  2. O.K., done. (The g=impf was actually intentional, but since we have {{ru-verb}}, we don't need it for Russian.)
  3. As I said to CodeCat, I think this one is editor-specific. Within the next month or two I hope to de-kinkify the system for allowing editors to customize specific behaviors, at which point I'll add this as something hookable. (Well, or that was my thought. If everyone wants this behavior — or rather, if no one doesn't want this behavior — then I guess it might as well be the behavior for now until things are customizable?)
  4. Done, -ish. I actually went with {{ru-adj}} rather than {{ru-adjective}}, because I think that must have been what you meant.
RuakhTALK 06:47, 18 January 2013 (UTC)[reply]
Does your script add the tbot template to entries? If so, then that might fulfill the need for {{attention|ru}} instead? —CodeCat 14:11, 18 January 2013 (UTC)[reply]
Absolutely not. A big part of why I made this a helper script that pre-populates the edit-window, rather than a bot that pre-saves entries, is so that humans will be creating these entries. Humans who genuinely know the word, who genuinely know the language. Humans sometimes need attention from other humans, but humans should never need to pretend that they're bots. —RuakhTALK 15:20, 18 January 2013 (UTC)[reply]

"Not working" for Vahag and Stephen[edit]

Not working in Chrome. --Vahag (talk) 08:40, 9 January 2013 (UTC)[reply]

Works for me in Chrome. --WikiTiki89 23:17, 9 January 2013 (UTC)[reply]
It's not working for Stephen either. Please help. --Anatoli (обсудить/вклад) 05:26, 10 January 2013 (UTC)[reply]
Can you be more specific? What happens? When you open the Console (in the Developer Tools), do you see any error-messages? —RuakhTALK 03:57, 14 January 2013 (UTC)[reply]
In Chrome and Firefox Russian translations are red, not green (IE is fine). The Console says "Uncaught ReferenceError: CookiePreferences is not defined". PS Yesterday one Russian translation was green for few minutes. When I clicked on it, the page was empty, even though the translation's link had additional elements. PPS Conrad's creation.js is working, English plurals are greenified. --Vahag (talk) 10:29, 14 January 2013 (UTC)[reply]
See User:Vahagn_Petrosyan/common.js?diff=19351525, and try again now? —RuakhTALK 14:32, 14 January 2013 (UTC)[reply]
OK, it's working now. How do I make the script create {{hy-noun| instead of {{head|hy|noun|? --Vahag (talk) 14:50, 14 January 2013 (UTC)[reply]

Adding inflection/pronunciation requests[edit]

Can the bot, as a rule, add requests for inflection and pronunciation to the pages it creates? It would probably need some kind of list of languages that need inflection for certain parts of speech. —CodeCat 03:46, 14 January 2013 (UTC)[reply]

It's not actually a bot, it's just JavaScript that people can run. So the question is — do the people who run it want it to include those requests? (Right now the script is not easily user-customizable, unfortunately, but I do aim to make that a bit easier . . .) —RuakhTALK 04:12, 14 January 2013 (UTC)[reply]
It could include a pronunciation section with {{rfp}} already in it, and invite the user of the script to replace it with something better if they're able. The idea is that people are unlikely to add {{rfp}} to the generated pages, but they probably would leave it in place if the script put it there? —CodeCat 04:24, 14 January 2013 (UTC)[reply]
I support including requests for inflection and pronunciation but I don't insist. That way a number of basic entries can be created first and improved later. In Russian, {{indeclinable}} or (indeclinable) would mean that a noun entry may have "decl=no" as in граффити (graffiti), no declension is required (only if it's not hard to implement such a change). In any case, for indeclinable entries one can just remove the request, so please do whatever is doable and functional. The tool is already pretty useful. --Anatoli (обсудить/вклад) 04:26, 14 January 2013 (UTC)[reply]
I treat {{rfinfl}} not so much as "this entry needs an inflection table" as "this entry needs to be checked whether it needs one". So I think adding it to an indeclinable entry is fine; it just calls for someone to make sure. —CodeCat 04:28, 14 January 2013 (UTC)[reply]
Yes, as I said (if it wasn't clear), I see no problem with adding {{rfinfl}} to all generated entries. --Anatoli (обсудить/вклад) 04:33, 14 January 2013 (UTC)[reply]

How to?[edit]

So, how exactly do we use this? --One angry dwarf (talk) 13:03, 21 January 2013 (UTC)[reply]

Russian proper nouns and "±" symbol in the gloss, flagging entries created with the tool[edit]

Hi,


Minor points, hopefully. Could you treat Russian proper nouns the same way as nouns, adjectives and adverbs, please - {{ru-proper noun}}?

Sometimes the gloss gets the initial "±" symbol from translation tables. It's not consistent and this issue is minor.

I do think that generated entries should have some kind of a flag, even if they are saved by humans and they are in full control. The reason being that this tool is for a quick entry creation, so that one could create quite a few in a short period of time, which I did on the 18 Jan. The creator or other editors may come back later to add more senses, inflection, etymology and pronunciation but I finding entries created with this method, especially if it's not just one person is not easy. --Anatoli (обсудить/вклад) 01:04, 22 January 2013 (UTC)[reply]

Re: Russian proper nouns:  Done. (I think you could have done it yourself, actually.)
Re: ±: Can you give an example?
Re: flag: Are you saying that you want a flag automatically included in entries that you create, or are you saying that you want a flag automatically included in entries that anyone creates?
RuakhTALK 06:28, 22 January 2013 (UTC)[reply]
Re: Russian proper nouns: Thanks!
Re: ±: I tried to replicate the error in some places but couldn't reproduce. Will let you know if it happens again.
Re: flag: I want a flag in entries anyone creates, including myself. Having inflection in entries is a bonus, IMHO. I want to be able to create entries and let others create entries without having to worry about complicated Russian inflection tables. I often prefer to come back later. As long as definitions (translations into English) are good, they are good or acceptable entries. We may share the work between myself, Wanjuscha, Stephen and Wikitiki89 (if he joins) and others. Wanjuscha and I have been adding infection to entries Stephen has created. Good translations may be a good source for good for entries if they are not SoP's), even if they lack inflection and other things. Please consider.
— This unsigned comment was added by Atitarev (talkcontribs) at 10:39, 22 January 2013‎ (UTC).[reply]
Re: flag: Well, adding a flag to script-assisted entries is not the best way — or even a good way — to find entries without inflection tables. The best way to find entries without inflection tables is to scan a database dump. —RuakhTALK 14:39, 22 January 2013 (UTC)[reply]
Re: ±. This diff captured the ± symbol that was originally copied from the gloss. I have removed the symbol. --Anatoli (обсудить/вклад) 12:00, 29 January 2013 (UTC)[reply]
Well, I haven't been able to reproduce it, but I've attempted a probable fix. Please let me know if you see the issue again. —RuakhTALK 15:04, 29 January 2013 (UTC)[reply]
Thanks again for looking after the tool. Maybe I shouldn't have created the entry to allow testing? Maybe the ";" and other symbols cause this? Anyway, it's a minor bug. And the tool is working OK for Russian. --Anatoli (обсудить/вклад) 22:09, 29 January 2013 (UTC)[reply]

translit not picking up[edit]

Hi,

Transliteration is not getting picked up. It happened, for example, when I have created соответствие from correspondence#Translations and other words. I left the second word соотношение green (after attempting to create an entry from a translation), so you can test. --Anatoli (обсудить/вклад) 04:55, 25 January 2013 (UTC)[reply]

Thanks for letting me know. It was a result of CodeCat's recent edit to {{t}} (and its siblings): she changed them to wrap the transliterations in (e.g.) <span lang="ru-Latn">…</span>, which this script did not expect. I've updated it now; if you hard-refresh http://en.wiktionary.org/w/index.php?title=User:Ruakh/Tbot.js&action=raw&ctype=text/javascript and try again, it should work for you. (The good news is, this should make for a more robust way of detecting transliterations. Previously we didn't mark our transliterations very clearly; we wrapped them in parentheses, but parentheses can mean a lot of different things. <span lang="ru-Latn">…</span>, on the other hand, is very unambiguous.) —RuakhTALK 05:39, 25 January 2013 (UTC)[reply]
Thanks, that's working now. --Anatoli (обсудить/вклад) 05:44, 25 January 2013 (UTC)[reply]
Do you think it would be better to use a special representation for transliterations, that isn't tied to anything else? Maybe class="translit" or something? It would avoid future breaking... —CodeCat 19:17, 27 January 2013 (UTC)[reply]
Not working again. "вещать" from broadcast#Translations produces this:
=={{subst:ru}}==

===Verb===
{{ru-verb|tr= (ru)}}

# [[broadcast]] {{gloss|to transmit a message or signal via radio waves or electronic means}}
--Anatoli (обсудить/вклад) 02:21, 28 January 2013 (UTC)[reply]
I'm creating вещать but you can test on other red links (or green if using Tbot). --Anatoli (обсудить/вклад) 02:22, 28 January 2013 (UTC)[reply]
Sorry. Fixed now. Thanks for letting me know. —RuakhTALK 03:14, 28 January 2013 (UTC)[reply]
Thanks, again! --Anatoli (обсудить/вклад) 03:18, 28 January 2013 (UTC)[reply]

gender of proper nouns[edit]

Hi,

The gender of proper nouns is no being picked up on the accelerated entry creation. I tried on Kerry#Translations and Bologna#Translations. Leaving as is. Could you have a look, please when you have time? No rush. --Anatoli (обсудить/вклад) 04:08, 2 February 2013 (UTC)[reply]

 Done, thanks. —RuakhTALK 04:39, 2 February 2013 (UTC)[reply]
Thanks! --Anatoli (обсудить/вклад) 06:07, 2 February 2013 (UTC)[reply]

Gender of nouns missing[edit]

Hi,

How are you? The gender of nouns did not load again when I created "сгусток" and "апокопа" but it worked on "холостяк". Not sure what the difference is. Happy for you temporarily delete the entries, if you need to test. --Anatoli (обсудить/вклад) 23:15, 5 March 2013 (UTC)[reply]

It's because of Mzajac (talkcontribs)'s changes to the gender and number templates today: they used to use <span>, now they use <abbr>. I've fixed it for now, but he plans to break it again: at [[Wiktionary:Grease pit/2013/February#How should Category:Gender and number templates be converted to Lua?]], he wrote:
The relevant classes are .gender, .number, and .noun-class. I agree that all of the more-specific ones can be removed, unless someone points out a use for them.
And indeed, this script is a use for them. You should post a comment in that discussion, asking him not to make that change.
RuakhTALK 06:31, 6 March 2013 (UTC)[reply]
Thank you again. Sorry, I don't understand (actually, didn't try to) the change Mzajac (talkcontribs) is doing or planning to do. --Anatoli (обсудить/вклад) 11:06, 6 March 2013 (UTC)[reply]
Oops. It still doesn't work, as in примечание, from note, sense 3. --Anatoli (обсудить/вклад) 23:21, 6 March 2013 (UTC)[reply]
What exactly is the use of having specific classes, if I may ask? —CodeCat 00:28, 7 March 2013 (UTC)[reply]
If the question is for me, then I don't know. I just use the tool Ruakh has created. The gender is automatically inserted. --Anatoli (обсудить/вклад) 00:42, 7 March 2013 (UTC)[reply]
No it was for Ruakh, sorry. —CodeCat 00:43, 7 March 2013 (UTC)[reply]
The script looks for e.g. class="number p" to figure out what template to use (namely {{p}}). Changing number to gender, as you did in your Lua module, is not a problem (the script considers number and gender and so on to be equivalent for this purpose), but removing the p would be a problem, because there is no other indication of the template name (unless I hard-code a mapping from the displayed text, namely pl, or from the title-text, namely plural). —RuakhTALK 06:30, 7 March 2013 (UTC)[reply]
That is kind of what I figured the script would do, though (looking in the body text of the element). On the other hand, maybe it is better to separate the interface from the way it displays, so I guess we can keep it. The extra classes will need to be added to the module though. —CodeCat 12:32, 7 March 2013 (UTC)[reply]
Re: first sentence: I don't understand what you're saying. Are you describing a mistaken guess about what the script currently does? Or are you advocating that the script take a certain approach? Because in the latter case, that doesn't really change the fact that Mzajac's proposed change would currently break this script . . .   Re: last sentence: Only for consistency. This script only cares about {{t}} and {{t+}} and so on, which don't use that module. —RuakhTALK 15:15, 7 March 2013 (UTC)[reply]
{{t}} will probably be Lua-fied too, eventually, and then it will also use this module I expect. —CodeCat 15:48, 7 March 2013 (UTC)[reply]
Unfortunately, you've designed the module to be incompatible with the approach of current templates. Current templates just take a sequence of gender/number codes, and apply a group of heuristics to determine which ones are joined with "and", which ones with commas, and which ones with spaces; whereas the module expects all of that information to be somewhat more explicit in its input. Plus, current templates use the word "and" in a semantically different way from how the module uses it. Given that the {{t}} templates are transcluded a bajillion times, and that we won't want to break existing uses, I think it's unlikely that we'll be able to Lua-ify {{t}} to use that module without significant further changes anyway, so right now it's probably premature to worry about minor easily-fixed details like CSS classes for individual codes. —RuakhTALK 15:54, 7 March 2013 (UTC)[reply]
I agree, it's not that important yet. But I created the incompatibility mainly because the new representation has less ambiguity. Also, the only time when any incompatibility in {{t}} does exist is when the second parameter is set to "s" or "p", I think. Because m|p will give different results in the two schemes. But those are probably fairly few in number so they should be able to be fixed fairly easily. (And technically, we don't even need {{s}} because everything is already understood to be singular by default) —CodeCat 16:10, 7 March 2013 (UTC)[reply]
Still, the transition would be easier if it could be made separately from the migration to Lua, for example if we created a legacy function that implemented the current logic. —RuakhTALK 04:27, 8 March 2013 (UTC)[reply]
@Ruakh, I think I didn't clear the cache. It's working. Sorry, no need to do anything at the moment. --Anatoli (обсудить/вклад) 00:47, 7 March 2013 (UTC)[reply]

The green colour is gone[edit]

Something happened in the last couple of days. There's no green colour and the tool can't be used. Please fix when you can. --Anatoli (обсудить/вклад) 04:25, 3 June 2013 (UTC)[reply]

Yeah, it looks like CodeCat (talkcontribs) changed the structure of {{t}}. Previously, the script template was inside the link-text, but now, the link is inside the script template. It might be a quick fix. —Ruakh 04:33, 3 June 2013 (UTC)[reply]
Fixed now, hopefully. (Not tested. In future, please link to an example.) —Ruakh 04:41, 3 June 2013 (UTC)[reply]
Thank you and sorry for not giving an example. :) --Anatoli (обсудить/вклад) 05:08, 3 June 2013 (UTC)[reply]
Some functionality is lost - gender, transliteration. Example: killing#Translations. --Anatoli (обсудить/вклад) 04:31, 7 June 2013 (UTC)[reply]
 Fixed. Thanks for including an example. —RuakhTALK 06:06, 7 June 2013 (UTC)[reply]
Nope, still not working (gender, transliteration) :). --Anatoli (обсудить/вклад) 06:17, 7 June 2013 (UTC)[reply]
Did you remember to do a hard refresh or clear your cache? —RuakhTALK 06:18, 8 June 2013 (UTC)[reply]
Sorry, I forgot. Thank you for fixing and reminding me! --Anatoli (обсудить/вклад) 06:40, 8 June 2013 (UTC)[reply]

Gender of nouns missing[edit]

Hi,

The gender is missing for some reason. Example: mercenary#Translations_2. Creating one but the second is good for experimenting. --Anatoli (обсудить/вклад) 02:14, 26 June 2013 (UTC)[reply]

CodeCat had changed the formatting of genders. That seems to be in a stable state now, so I've updated this script accordingly. Thanks for reporting, and for leaving an example I could test with. :-)   To pick up the changes, visit http://en.wiktionary.org/w/index.php?title=User:Ruakh/Tbot.js&action=raw&ctype=text/javascript and press F5. —RuakhTALK 22:54, 13 July 2013 (UTC)[reply]
Thanks very much! --Anatoli (обсудить/вклад) 07:13, 14 July 2013 (UTC)[reply]

Tbot for Chinese[edit]

@Ruakh Hi,

Can I ask you again for some work, please? I'd like your tool User:Ruakh/Tbot.js to work for Chinese. @Wyang has developed a number of accelerated enrty creation tools, among them is {{cmn-new}}, which is now heavily used. The basic input is very simple, the necessary changes are done by an editor on the fly. There's no need to provide transliteration, PoS and the definition are the main things.

At arsonist#Translations, your tool produces this for Mandarin:

=={{subst:#invoke:languages/templates|lookup|cmn|names}}==

===Noun===
{{head|cmn|noun}}

# [[arsonist]] {{gloss|one who has committed the act of arson, or illegally setting fire to property}}

Instead, could you modify to generate this:

{{subst:cmn-new|n|[[arsonist]] {{gloss|one who has committed the act of arson, or illegally setting fire to property}}}}

Where "n" is noun, and "arsonist (one who has committed the act of arson, or illegally setting fire to property)" is the definition (no quotes and no # symbol). It's quite simple, I hope but it would be great to have!

{{cmn-new}} lists the part of speech parameters, which don't actually match other standards, e.g. n=noun, v=verb, etc.

Please let me know if you agree to take it on. --Anatoli (обсудить/вклад) 06:04, 8 April 2014 (UTC)[reply]

I am not actively developing this script. —RuakhTALK 07:02, 9 April 2014 (UTC)[reply]
No worries. Thanks, anyway! --Anatoli (обсудить/вклад) 07:05, 9 April 2014 (UTC)[reply]

Add pronunciation[edit]

@Wikitiki89 Hi. Do you think you could have a go and add a pronunciation section for Russian, please? Something like this but I am not sure?: The parameter should include the stress mark, if it exists.

===Pronunciation===
* {{ru-IPA|{{subst:PAGENAME}}}}

--Anatoli T. (обсудить/вклад) 02:38, 16 December 2015 (UTC)[reply]