translate files Jython

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
stereo009
Posts: 8
Joined: Mon Dec 13, 2010 3:58 pm

translate files Jython

Post 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.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: translate files Jython

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Re: translate files Jython

Post by lion »

especially in 333_BlackLionHunt :P :mrgreen:
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: translate files Jython

Post by jurchiks »

Bah, the best example around :D
All of that should be html files...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
stereo009
Posts: 8
Joined: Mon Dec 13, 2010 3:58 pm

Re: translate files Jython

Post 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.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: translate files Jython

Post 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/..
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: translate files Jython

Post 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 ;)
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: translate files Jython

Post by jurchiks »

do you know how to put npcStrings in html?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
stereo009
Posts: 8
Joined: Mon Dec 13, 2010 3:58 pm

Re: translate files Jython

Post 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.
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: translate files Jython

Post by _DS_ »

This is not needed.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
User avatar
tukune
Posts: 533
Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan

Re: translate files Jython

Post by tukune »

native2ascii
stereo009
Posts: 8
Joined: Mon Dec 13, 2010 3:58 pm

Re: translate files Jython

Post 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>"
Post Reply