translate files Jython
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 8
- Joined: Mon Dec 13, 2010 3:58 pm
translate files Jython
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.
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.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: translate files Jython
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: translate files Jython
especially in 333_BlackLionHunt



- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: translate files Jython
Bah, the best example around 
All of that should be html files...

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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 8
- Joined: Mon Dec 13, 2010 3:58 pm
Re: translate files Jython
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.
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.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: translate files Jython
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/..
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: translate files Jython
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 

- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: translate files Jython
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 8
- Joined: Mon Dec 13, 2010 3:58 pm
Re: translate files Jython
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.
It would seem that space ships travel through the cosmos, and we can not do normal UTF-8 in the script.
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: translate files Jython
This is not needed.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
- tukune
- Posts: 533
- Joined: Sun Mar 29, 2009 2:35 pm
- Location: Japan
Re: translate files Jython
native2ascii
-
- Posts: 8
- Joined: Mon Dec 13, 2010 3:58 pm
Re: translate files Jython
this WORK!tukune wrote:native2ascii
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>"