Module talk:User:Suzukaze-c/02

Hello, you have come here looking for the meaning of the word Module talk:User:Suzukaze-c/02. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module talk:User:Suzukaze-c/02, but we will also tell you about its etymology, its characteristics and you will know how to say Module talk:User:Suzukaze-c/02 in singular and plural. Everything you need to know about the word Module talk:User:Suzukaze-c/02 you have here. The definition of the word Module talk:User:Suzukaze-c/02 will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule talk:User:Suzukaze-c/02, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

testing

  • {{ja-r|魔法使い|まほうつかい}}
  • {{ja-r|明けましておめでとう|あけまして おめでとう}}
  • {{ja-r|ソフトパワー|ソフト パワー}}


  • {{ja-r|らしい|らし.い}}
  • {{ja-r|厳しい|ーーーーー}}
{
	 = "きびしい",
	 = "いつくしい",
}
  • {{ja-r|無効|むこう}}
  • {{ja-r|背負う|せお.う}}


  • {{ja-r|柄|ーーーーー}}
{
	 = "え",
	 = "かび",
	 = "かい",
	 = "から",
	 = "がら",
	 = "つか",
	 = "つく",
	 = "ほぞ",
}
  • {{ja-r|柄|ーーーーー}}
{
	 = "え",
	 = "かび",
	 = "かい",
	 = "から",
	 = "がら",
	 = "つか",
	 = "つく",
	 = "ほぞ",
}
  • {{ja-r|linkto=柄|TITLE|から}}


  • {{ja-r|WWII|WWII}}
  • {{ja-r|还没有这个词条哦|还没有这个词条哦}}
  • {{ja-r|还没有这个词条哦|还没有这个词条哦}}


  • {{ja-r|魔法使い|まほうつかい}}
  • {{ja-r|背負う|せお.う}}
  • {{ja-r|明けましておめでとう|^あけまして おめでとう}}

Man, this stuff is powerful.

Wyang (talk) 07:28, 6 October 2016 (UTC)Reply

I just discovered the r function. I will definitely be using it. — Eru·tuon 04:40, 18 August 2017 (UTC)Reply

r function with nonexistent pages

Regarding this: Currently the r function returns {{ja-r}} with a repetition of the kanji in the second parameter (for instance, {{ja-r|明晦|明晦}}) if there's no Japanese entry. Because that causes a module error and because {{ja-r}} requires at least two parameters and requires the second one to have no kanji, I use {{ja-l}}. Is there a better option? — Eru·tuon 02:56, 6 September 2017 (UTC)Reply

I look up the word and add the ruby... —suzukaze (tc) 03:01, 6 September 2017 (UTC)Reply
Still, the function is hard to use with a long list of bare links, some of which are redlinked, are given faulty {{ja-r|kanji|kanji}} by the function, and have to be manually switched to {{ja-l}} or something else. If you don't want a red-link to result in {{ja-l}} and there isn't a better option, I'll have to make my own copy of your function. — Eru·tuon 04:31, 6 September 2017 (UTC)Reply
I think that a mixture of {{ja-l}} and {{ja-r}} is unhelpful (readings for only certain words) and really unaesthetic (lack of consistency). {{ja-r|kanji|kanji}} is intentional; I look up {{{1}}} in a different dictionary and copy+paste the reading into {{{2}}}. —suzukaze (tc) 04:36, 6 September 2017 (UTC)Reply
Well, I don't know how you make it work when it gives a module error. It's annoying. I'm making my own modified function. — Eru·tuon 03:43, 8 September 2017 (UTC)Reply
@Erutuon: It remains {{ja-r|kanji|kanji}} in the edit window, doesn't it? —suzukaze (tc) 03:45, 8 September 2017 (UTC)Reply
No... I'm substituting it. — Eru·tuon 03:47, 8 September 2017 (UTC)Reply
I mean, do you usually save it with all the module errors and then go through and add kana? — Eru·tuon 03:58, 8 September 2017 (UTC)Reply
Either one of these is how I work with it: , . ("【wt】ja-r" is part of my global.js stuff, and in the second recording I didn't close the Weblio tab from the first recording...) —suzukaze (tc) 04:06, 8 September 2017 (UTC)Reply
Hmm. Why not add a database for Japanese readings in the backend? This is uncopyrightable and there are many of these online (e.g. here). The reading for 冷徹 should be included in most of them: video. Wyang (talk) 04:34, 8 September 2017 (UTC)Reply
The function could definitely be much smarter but at the moment I consider it a quick hack and haven't really felt the need to add more functionality. —suzukaze (tc) 05:05, 8 September 2017 (UTC)Reply
@Wyang: That would be really useful, but I don't know how to convert the XML into a usable data module. — Eru·tuon 21:30, 11 September 2017 (UTC)Reply
@Erutuon I don't really work with XML files either - to me the easiest solution is to use the command line or write a script and analyse the file line by line. The Kanji and ruby readings are enclosed by various tags; something like grep -e "\<eb\>" -e "\<entry\>" would give the desired lines. Wyang (talk) 01:00, 12 September 2017 (UTC)Reply

proxy to inject japanese furigana into arbitrary templates

@Benwing2, Theknightwho Would a template like https://en.wiktionary.orghttps://en.wiktionary.org/w/index.php?title=Wiktionary:Sandbox&oldid=84532940 be acceptable at all, or is another solution planned in the future? —Fish bowl (talk) 04:12, 12 April 2025 (UTC)Reply

@Fish bowl Any approach that involves wrapping templates and hacking their params is going to be problematic as there are so many different ways that templates use params. I think a better solution would be to add a language-specific method to language objects that allows you to do arbitrary "normalizations" of the text in links, with access to the tr. You can see in Module:etymology languages/data at the bottom that I was at one point trying to add a preprocess_links method so that I could implement auto-scraping of Thai translit; basically, individual Thai words to be scraped would separated by single spaces, and actual spaces to be displayed would be entered as double spaces. Something like this is desired for Arabic, for example, where the tāʔ marbūṭa character (ة) has two pronunciations (either silent or as t) depending on its grammatical role, but it's impossible for the translit module to figure this out without help. So we'd want the ability for the user to enter an extra diacritic onto the character to force the t pronunciation (and otherwise it's silent), but not display that diacritic. This sort of hacking the display form is already done for Korean hyphens, but using special-purpose code inserted into Module:script utilities. The current blocker is how messy Module:links has gotten; @Theknightwho has talked about doing some cleanup of the code to make adding this normalization method easier, but hasn't been able to get to it for quite awhile now. Also cc @Catonif who has proposed a similar solution. Benwing2 (talk) 04:55, 12 April 2025 (UTC)Reply
@Benwing2 It would be much easier to fix Module:links by doing it in multiple stages. What I might do is implement a filter, where any inputs containing certain characters (e.g. : and unsupported titles) get filtered through to the pre-existing code for now, which means we can roll out new handling on the easy cases, and gradually expand coverage to the more difficult cases. Theknightwho (talk) 09:34, 12 April 2025 (UTC)Reply
@Theknightwho Sounds good. Anything you can do to clean up Module:links would be helpful, because it's currently a big mess and not having written the code I don't have a good idea of why most things being done are being done. As you write new code, please please take a bit of time to leave comments explaining why non-obvious things being done are the way they are, as it will help you and anyone else in the future trying to understand the code. Benwing2 (talk) 19:21, 12 April 2025 (UTC)Reply