Japanese Template misuse by MewBot

Fragment of a discussion from User talk:Rua
Jump to navigation Jump to search

I suppose that rather than considering this an error, we could adjust the template so it handles the case where the first parameter is "kanji" properly?

CodeCat10:59, 19 July 2014

Why? {{ja-readascat}} and {{ja-readingcat}} do different things. If you want a template to do both, you don't need a parameter to tell which one- it's all there in the category name:

  1. "Japanese terms spelled with " + <character>:
    1. Nothing following: {{charactercat|ja|<character>}}
    2. Followed by " read as " + <hiragana>: {{ja-readingcat|<character>|<hiragana>}}
  2. "Japanese kanji read as " + <hiragana>: {{ja-readascat|<hiragana>}}

It would be nice to have something with a name like {{ja-readcat}}, having one optional parameter for the reading type, which would only be used in cases now covered by {{ja-readingcat}}. This would make it extremely easy for humans to use and require no decisions by bots beyond recognizing the categories that use it. Using the new name rather than either of the old ones would mean not having to allow for the old parameters.

The simplest thing would be to just have the new template behave as above, acting as a front end to call the correct template with the correct parameter(s). If you want to merge the templates, then incorporate the logic of the two ja templates in the new template, but don't mess with the charactercat part of it, for compatibility with all the other languages.

Chuck Entz (talk)18:14, 19 July 2014