Make subtitles be extracted from XML files
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11612 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c80a9fe181
commit
b7bdacbefc
@ -16,7 +16,17 @@ def traverse(file, node, isChallenge, isGP, isKart, isTrack, level=0):
|
||||
comment = None
|
||||
if e.hasAttribute("I18N"):
|
||||
comment = e.getAttribute("I18N")
|
||||
|
||||
|
||||
if e.localName == "subtitle" and e.hasAttribute("text") and len(e.getAttribute("text")) > 0:
|
||||
#print "Label=", e.getAttribute("name"), " Comment=", comment
|
||||
line = ""
|
||||
if comment == None:
|
||||
line += "//I18N: Cutscene subtitle from " + file + "\n_(\"" + e.getAttribute("text") + "\")\n\n"
|
||||
else:
|
||||
line += "//I18N: Cutscene subtitle from " + file + "\n//I18N: " + comment + "\n_(\"" + e.getAttribute("text") + "\");\n\n"
|
||||
|
||||
f.write( line.encode( "utf-8" ) )
|
||||
|
||||
if isChallenge or isGP or isKart or isTrack:
|
||||
if e.hasAttribute("name") and len(e.getAttribute("name")) > 0:
|
||||
#print "Label=", e.getAttribute("name"), " Comment=", comment
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ./data/po/update_pot.sh
|
||||
|
||||
CPP_FILE_LIST="`find ./src -name '*.cpp' -print` `find ./src -name '*.hpp' -print`"
|
||||
XML_FILE_LIST="`find ./data -name 'track.xml' -print` `find ./data -name '*.challenge' -print` `find ./data -name '*.grandprix' -print`"
|
||||
XML_FILE_LIST="`find ./data -name 'track.xml' -print` `find ./data -name 'scene.xml' -print` `find ./data -name '*.challenge' -print` `find ./data -name '*.grandprix' -print`"
|
||||
OTHER_XML_FILES=`find ./data -name '*.stkgui' -print && find ./data -name '*.challenge' -print && find ./data -name '*.grandprix' -print && find ./data -name 'kart.xml' -print`
|
||||
|
||||
echo "--------------------"
|
||||
|
Loading…
x
Reference in New Issue
Block a user