User blog:JoshuaJSlone/New credits translation-y tool

So hey guys, I whipped something up that should help in information gathering both for here and DohBell. Since for that database I already have a big list of names in both kanji and romanized formats, I basically turned that into a big search/replace. I was originally thinking of it just for use at Tsunku.net, but really it's general enough it should work a lot of places--I've also been testing it on J Wikipedia. On top of this it also matches the kanji for a few simple words like Lyrics, Music, and Composition. I made it so that for all of these things it doesn't REPLACE them, but add the new information in (parentheses) afterward so it's still possible to double-check.

There are two flavors:

First, the simple version. Paste in a sample of text on the top, hit the button, and the results show up at the bottom. [http://joshuajamesslone.name/hpwiki/creditstranslate.php?starttext=2nd+Single%0D%0A%E5%8F%8B%E6%83%85%E3%80%9C%E5%BF%83%E3%81%AE%E3%83%96%E3%82%B9%E3%81%AB%E3%81%AF%E3%81%AA%E3%82%89%E3%81%AD%E3%81%87%EF%BC%81%E3%80%9C%0D%0A%E4%BD%9C%E8%A9%9E%2F%E4%BD%9C%E6%9B%B2%EF%BC%9A%E3%81%A4%E3%82%93%E3%81%8F%E3%80%80%E7%B7%A8%E6%9B%B2%EF%BC%9A%E9%88%B4%E6%9C%A8%E4%BF%8A%E4%BB%8B%0D%0Ac%2FwSay+Yeah%EF%BC%81%E3%83%BC%E3%82%82%E3%81%A3%E3%81%A8%E3%83%9F%E3%83%A9%E3%82%AF%E3%83%AB%E3%83%8A%E3%82%A4%E3%83%88%E3%83%BC%0D%0A%EF%BC%88%E3%83%A2%E3%83%BC%E3%83%8B%E3%83%B3%E3%82%B0%E5%A8%98%E3%80%82%E3%81%8A%E3%81%A8%E3%82%81%E7%B5%84Version%EF%BC%89%0D%0A%E4%BD%9C%E8%A9%9E%2F%E4%BD%9C%E6%9B%B2%EF%BC%9A%E3%81%A4%E3%82%93%E3%81%8F%E3%80%80%E7%B7%A8%E6%9B%B2%EF%BC%9A%E5%AE%88%E5%B0%BE%E5%B4%87%0D%0Ac%2Fw%E3%82%B5%E3%83%9E%E3%83%BC%E3%83%8A%E3%82%A4%E3%83%88%E3%82%BF%E3%82%A6%E3%83%B3%EF%BC%88%E3%83%A2%E3%83%BC%E3%83%8B%E3%83%B3%E3%82%B0%E5%A8%98%E3%80%82%E3%81%8A%E3%81%A8%E3%82%81%E7%B5%84Version%EF%BC%89%0D%0A%E4%BD%9C%E8%A9%9E%2F%E4%BD%9C%E6%9B%B2%EF%BC%9A%E3%81%A4%E3%82%93%E3%81%8F%E3%80%80%E7%B7%A8%E6%9B%B2%EF%BC%9A%E5%89%8D%E5%B6%8B%E5%BA%B7%E6%98%8E%0D%0A%0D%0A%E2%96%A0%E3%82%A2%E3%83%BC%E3%83%86%E3%82%A3%E3%82%B9%E3%83%88%EF%BC%9A%E3%83%A2%E3%83%BC%E3%83%8B%E3%83%B3%E3%82%B0%E5%A8%98%E3%80%82%E3%81%8A%E3%81%A8%E3%82%81%E7%B5%84%0D%0A%E2%96%A0%E7%99%BA%E5%A3%B2%E6%97%A5%EF%BC%9A2004-02-25%0D%0A%E2%96%A0%E3%82%B3%E3%83%BC%E3%83%89%EF%BC%9AEPCE-5268%0D%0A%E2%96%A0%E7%99%BA%E5%A3%B2%E5%85%83%EF%BC%9Azetima Example] with some text already filled in. The numbers in parentheses after the names are the DohBell ID numbers, mostly important to me to help in inputting credits.

Second, the live version. Pop in an URL, and it will do the same to a website. This is more likely to make things look messy or even screw up existing code on the page a little. The DohBell ID numbers are now also links to that person's page at DohBell. Here is an example of it in use at Tsunku.net where the page design gets messed up, and Here it is at J Wikipedia where the page holds together fairly well. You'll notice that since the parentheses come immediately after the original name, everyone whose name already linked somewhere will have that link extended to their romanized name. If you're feeling extra silly, you can even use it on [http://dohbell.local/backstage/creditstranslatelive.php?page=http%3A%2F%2Fja.helloproject.wikia.com%2Fwiki%2F%E3%83%97%E3%83%AA%E3%83%BC%E3%82%BA_%E3%83%9F%E3%83%8B%E3%82%B9%E3%82%AB_%E3%83%9D%E3%82%B9%E3%83%88%E3%82%A6%E3%83%BC%E3%83%9E%E3%83%B3! Japanese Hello! Project Wiki].

Negatives: My list isn't perfect. Some names aren't in there yet, others I'm sure have typos or other mistakes in at least one of the parts of their name. It's also a very simple one-to-one match. Aliases will slip by, as will alternate spellings. With hundreds and hundreds of searches/replaces being made, I wouldn't be surprised if some of them conflict or match too many incorrect things and should be deleted from the list. I had some trouble getting it to read URLs with kanji in it--I worked around it, but it may have caused problems for URLs with some other characters and could give an error about being unable to read them. I can take care of them once I know about them.

If you've got suggestions for ways to improve it or other simple words/phrases it should be made to match, please say.