Page 1 of 1
translate files Jython
Posted: Tue Jan 11, 2011 2:56 pm
by stereo009
Html files to translate well, support UTF-8.
But I can not transfer files *.py. Translate and stored as UTF-8, the server loads without errors, but the client shows strange characters. How to translate Jython files? If it matters, I am translating into Russian.
Re: translate files Jython
Posted: Tue Jan 11, 2011 3:44 pm
by jurchiks
What exactly do you want to translate into russian there? There's very little actual text in those quest scripts that gets output.
Re: translate files Jython
Posted: Tue Jan 11, 2011 4:04 pm
by lion
especially in 333_BlackLionHunt

Re: translate files Jython
Posted: Tue Jan 11, 2011 4:18 pm
by jurchiks
Bah, the best example around

All of that should be html files...
Re: translate files Jython
Posted: Tue Jan 11, 2011 5:19 pm
by stereo009
662_AGameOfCards
REWARDS_TEXT = [
"Hmmm...? This is... No pair? Tough luck, my friend! Want to try again? Perhaps your luck will take a turn for the better...",
"Hmmm...? This is... One pair? You got lucky this time, but I wonder if it'll last. Here's your prize.",
"Hmmm...? This is... Three of a kind? Very good, you are very lucky. Here's your prize.",
"Hmmm...? This is... Four of a kind! Well done, my young friend! That sort of hand doesn't come up very often, that's for sure. Here's your prize.",
"Hmmm...? This is... Five of a kind!!!! What luck! The goddess of victory must be with you! Here is your prize! Well earned, well played!",
"Hmmm...? This is... Two pairs? You got lucky this time, but I wonder if it'll last. Here's your prize.",
"Hmmm...? This is... A full house? Excellent! you're better than I thought. Here's your prize."
]
I do not want to translation to a half - is not pretty. Who can help on the case, you can attach an example of a file.
Re: translate files Jython
Posted: Tue Jan 11, 2011 6:18 pm
by jurchiks
make html files containing those texts and modify the quest script accordingly.
Also, and more importantly, DON'T modify the original html files, make copies and put them in data/lang/ru/..
Re: translate files Jython
Posted: Tue Jan 11, 2011 7:09 pm
by MELERIX
better is use ncpstrings that are in client (like in MC_Show.java) instead of hardcoded text, so if a player is using L2RU client, he will see text in RU language automatically

Re: translate files Jython
Posted: Tue Jan 11, 2011 7:52 pm
by jurchiks
do you know how to put npcStrings in html?
Re: translate files Jython
Posted: Tue Jan 11, 2011 7:53 pm
by stereo009
No quick solution I see. only hemorrhagic (
It would seem that space ships travel through the cosmos, and we can not do normal UTF-8 in the script.
Re: translate files Jython
Posted: Tue Jan 11, 2011 8:56 pm
by _DS_
This is not needed.
Re: translate files Jython
Posted: Wed Jan 12, 2011 10:16 am
by tukune
native2ascii
Re: translate files Jython
Posted: Wed Jan 12, 2011 5:00 pm
by stereo009
tukune wrote:native2ascii
this WORK!
Create UTF-8 __init__in.py
RUN
native2ascii -encoding UTF-8 __init__in.py __init__out.py
REPLACE
htmltext = "<html><body>\u042d\u0442\u043e\u0442 \u043a\u0432\u0435\u0441\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0441\u043e\u043e\u043d\u0430\u0436\u0435\u0439 61 \u0443\u0440\u043e\u0432\u043d\u044f \u0438 \u0432\u044b\u0448\u0435.</body></html>"
TO
htmltext = u"<html><body>\u042d\u0442\u043e\u0442 \u043a\u0432\u0435\u0441\u0442 \u0434\u043b\u044f \u043f\u0435\u0440\u0441\u043e\u043e\u043d\u0430\u0436\u0435\u0439 61 \u0443\u0440\u043e\u0432\u043d\u044f \u0438 \u0432\u044b\u0448\u0435.</body></html>"