Editing Ar Tonelico III

From Learning Languages Through Video Games
Jump to navigationJump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Lots and lots of text and lots of obscure kanji!
+
Lots and lots of text and lots of obscure kanji! Yeah! Done after Duke Nukem is out.
 
== Translations ==
 
== Translations ==
* [[/ja-en|Japanese to English]]
+
* [[/jp-en|Japanese to English]]
 
(or should I translate to German??)
 
(or should I translate to German??)
  
 
== Tips ==
 
== Tips ==
I used the Japanese IME "canna" under ubuntu, compiled from source, and changed kana-kanji dictionaries, so that kanji+furigana is written upon entering and converting Japanese te
+
I used Japanese IME canna under ubuntu compiled from source and changed kana-kanji dictionaries, so that kanji+furigana is written upon entering and converting Japanese text.
==Script==
+
I also made a ordner and a very simple script layout, which is then parsed and styled to wiki with a simple lua script.
Yeah, the script in Japanese with a complete English translation [http://www.2shared.com/file/6v-zJ7J4/joined.html][https://rapidshare.com/files/457743039/joined](3.2MB) :)
 
Oh, and btw, the AT3 script contains 1026643 characters : )
 
  
[[Category:Game pages]]
+
I am using the following script for creating wiki sytnax from more readable file:
[[Category:PS3 games]]
+
 
 +
<nowiki>
 +
root    = "/home/mad_gaksha/Documents/AT3 Script/"
 +
root_out = "/home/mad_gaksha/Documents/AT3 Script (wiki)/"
 +
 
 +
file = "Cosmosphere/Finnel/LV04/002"
 +
 
 +
furi_plain = false
 +
 
 +
hero = "アオと"
 +
 
 +
--speaker abbreviations
 +
abr = {}
 +
abr["ふぃる"] = "フィンネル"
 +
 
 +
-- do not change from here on
 +
spcl = false
 +
heroine = ""
 +
 
 +
if string.find(file,"Cosmosphere") or string.find(file,"Talk_Inn") then
 +
spcl = true
 +
if string.find(file,"Saki") then
 +
  heroine = "サキ"
 +
elseif string.find(file,"Finnel") then
 +
  heroine = "フィンネル"
 +
elseif string.find(file,"Tillia") then
 +
  heroine = "ティリア"
 +
end
 +
end
 +
 
 +
--add html ruby syntax for furigana
 +
function insert_ruby(line)
 +
cur_line = line
 +
while string.find(cur_line,"+") do
 +
  sta = string.find(cur_line,"+")
 +
  beg = string.find(cur_line,"<",sta)
 +
  ter = string.find(cur_line,">",sta)
 +
  text = string.sub(cur_line,sta+1,beg-1)
 +
  furi = string.sub(cur_line,beg+1,ter-1)
 +
  if furi_plain then
 +
  ruby = " " .. text .. "(" .. furi .. ")"
 +
  else
 +
  ruby = "<ruby><rb>" .. text .. "</rb><rp>(</rp><rt>" .. furi .. "</rt><rp>)</rp></ruby>" 
 +
  end
 +
  cur_line = string.sub(cur_line,1,sta-1) .. ruby .. string.sub(cur_line,ter+1)
 +
end
 +
return cur_line
 +
end
 +
 
 +
input  = root    .. file
 +
output = root_out .. file
 +
trans= io.open(input  .. "_trans")
 +
out  = io.open(output .. "_wiki","w")
 +
trans_line = ""
 +
 
 +
line_no = 0
 +
 
 +
for line in io.lines(input) do
 +
 
 +
line_no = line_no+1
 +
--for syntax error in source, make locating them easier
 +
print("Now processing line " .. line_no .. ".")
 +
 
 +
first_char = string.sub(line,1,3)
 +
secnd_char = string.sub(line,4,6)
 +
 
 +
if first_char == "*" then
 +
  if secnd_char == "*" then
 +
  --comment,language explanation
 +
  out:write("*" .. insert_ruby(string.sub(line,7)) .. "\n<br>\n")
 +
  else
 +
  --contextual comment
 +
  out:write("'''CONTEXT''': " .. insert_ruby(string.sub(line,4)) .. "\n<br>\n")
 +
  end
 +
elseif first_char=="(" then
 +
  --location,time,event
 +
  out:write("==" .. insert_ruby(string.sub(line,4,#line-3)) .. "==" .. "\n<br><br>\n")
 +
elseif #line>2 then --spoken line
 +
 
 +
--get translated line, if existing
 +
if trans then
 +
  repeat
 +
  trans_line = trans:read()
 +
  if not trans_line then
 +
    trans = false
 +
    trans_line = "???"
 +
    break
 +
  end
 +
  until #trans_line>2 --avoid accidental spaces and empty lines
 +
else
 +
  trans_line = "???"
 +
end
 +
 +
  --get speaker
 +
  speaker = ""
 +
  if first_char == " " then
 +
  speaker = heroine
 +
  line = string.sub(line,4)
 +
  elseif first_char == "_" then
 +
  speaker = hero
 +
  line = string.sub(line,4)
 +
  else
 +
  space = string.find(line," ")
 +
  if space then
 +
    speaker = string.sub(line,1,space-1)
 +
    line = string.sub(line,space+3)
 +
    if abr[speaker] then
 +
    speaker = abr[speaker]
 +
    end
 +
  else
 +
    speaker = "[N/A]"
 +
  end
 +
  end
 +
  --print(speaker .. ": " .. line)
 +
 
 +
  cur_line      = line
 +
  cur_line_furi = line
 +
  while string.find(cur_line,"+") do
 +
  sta      = string.find(cur_line    ,"+")
 +
  sta_furi = string.find(cur_line_furi,"+") 
 +
  beg      = string.find(cur_line    ,"<",sta    )
 +
  beg_furi = string.find(cur_line_furi,"<",sta_furi)
 +
  ter      = string.find(cur_line    ,">",sta    )
 +
  ter_furi = string.find(cur_line_furi,">",sta_furi)
 +
  text = string.sub(cur_line,sta+1,beg-1)
 +
  furi = string.sub(cur_line,beg+1,ter-1)
 +
  cur_line      = string.sub(cur_line    ,1,sta    -1) .. text .. string.sub(cur_line    ,ter    +1)
 +
  cur_line_furi = string.sub(cur_line_furi,1,sta_furi-1) .. furi .. string.sub(cur_line_furi,ter_furi+1)
 +
  end
 +
  if string.find(cur_line,"<hym>") then
 +
  --currently only whole dialogue lines implemented in wiki syntax...
 +
  cur_line = string.gsub(cur_line,"<hym>","")
 +
  cur_line = string.gsub(cur_line,"</hym>","")
 +
  out:write("{{Hy-r-en|speaker=" .. speaker .. "\n|" .. cur_line .. "\n|" .. trans_line  .. "}}" .. "\n<br>\n")
 +
  else
 +
  out:write("{{jp-r-en|speaker=" .. speaker .. "\n|" .. cur_line .. "\n|" .. cur_line_furi .. "\n|" .. trans_line  .. "}}" .. "\n<br>\n")
 +
  end
 +
end
 +
end
 +
 
 +
out:close()
 +
</nowiki>

Please note that all contributions to LLTVG are considered to be released under the wiki's copyright terms (see LLTVG:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that, unless you are providing the text from a video game, you wrote this yourself, or copied it from a public domain or similar free resource.

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

(You don't have JavaScript enabled. If you did, you'd be able to see the handy-dandy fixers we have for reformatting text.)

The below button runs the selected formatting fixers for you.

To run the fixer, first select the text in the edit box that you wish to reformat, then click the button. The handaku/dakuten fixer should be fine to run on an entire page, but for the rest, be careful that only Japanese text is selected.

The fixer does not work in IE (as of IE 8), but it should work in other popular browsers. However, it works better in Chrome than in Firefox, because Firefox scrolls back to the top after running the fixer, and Chrome doesn't. Hence, if you're running the fixer on many small bits of text, you might prefer to use Chrome.