Translation issues

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Translation issues

#1 Post by EternalHarvest »

Good for english, how about translations? Maybe make separate messages?

Code: Select all

TF("%s to attach %s.\n", ($args->{fail}) ? T("Failed") : T("Succeeded"), ($args->{index}) ? T("item: ").$char->inventory->getByServerIndex($args->{index}) : T("zeny"))

Code: Select all

TF("Mail window is now %s.\n", ($args->{flag}) ? T("closed") : T("opened"))
Variable extrapolation inside TF?

Code: Select all

	my $entityType = (Actor::get($sourceID)->{jobID} == 24) ? T("coin") : T("spirit");

 	if ($sourceID eq $accountID) {
		message TF("You have %s ".$entityType."(s) now\n", $entities), "parseMsg_statuslook", 1 if $entities != $char->{spirits};
 	} elsif (my $actor = Actor::get($sourceID)) {
		message TF("%s has %s ".$entityType."(s) now\n", $actor, $entities), "parseMsg_statuslook", 2 if $entities != $actor->{spirits};
h4rry84
Moderators
Moderators
Posts: 234
Joined: 04 Apr 2008, 09:30
Noob?: Yes
Location: My House

Re: Translation issues

#2 Post by h4rry84 »

preferable make separate. it's easier to maintain the translations
manticora
Documentation Writers
Documentation Writers
Posts: 29
Joined: 29 Jan 2010, 05:59
Noob?: No

Re: Translation issues

#3 Post by manticora »

I make ru-translation for OpenKore. I want to do this - diffs.zip.
You do not have the required permissions to view the files attached to this post.
manticora
Documentation Writers
Documentation Writers
Posts: 29
Joined: 29 Jan 2010, 05:59
Noob?: No

Re: Translation issues

#4 Post by manticora »

There is a problem. Not all of TF('...') and T('...') are in openkore.pot:
In source code is
src\Interface\Wx.pm Line 1321

Code: Select all

$self->writeOutput("message", TF("Moving to Portal %s, %s\n", $x, $y), "info");
but there is this line in openkore.pot?
openkore.pot

Code: Select all

#: ../Interface/Wx.pm:1298
#, perl-format
msgid "Mouse over: %s, %s"
msgstr ""

#WHERE IS LINE 1321???

#: ../Interface/Wx.pm:1345
#, perl-format
msgid "Moving to %s, %s\n"
msgstr ""
and
src\Network\Receive\kRO\Sakexe_0.pm Line 4236
src\Network\Receive\ServerType0.pm Line 4209

Code: Select all

message TF("%s: Type 'store' to start buying, or type 'sell' to start selling\n", $name), "npc";
openkore.pot

Code: Select all

#: ../Network/Receive/kRO/Sakexe_0.pm:4124
#: ../Network/Receive/ServerType0.pm:4097
#, perl-format
msgid "Minimap indicator at location %d, %d with the color %s cleared\n"
msgstr ""

#WHERE ARE Sakexe_0.pm Line 4236 and ServerType0.pm Line 4209 ??

#: ../Network/Receive/kRO/Sakexe_0.pm:4328
#: ../Network/Receive/ServerType0.pm:4301
#, perl-format
msgid "%s: Done talking\n"
msgstr ""
and
src\Task\Route.pm Line 260

Code: Select all

my $msg = TF("Stuck at %s (%d,%d), while walking from (%d,%d) to (%d,%d).",
openkore.pot

Code: Select all

#: ../Task/Route.pm:228
msgid "Destination reached.\n"
msgstr ""

#WHERE IS LINE 260?

#: ../Task/Route.pm:263
msgid " Teleporting to unstuck."
msgstr ""
Why?
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: Translation issues

#5 Post by kLabMouse »

manticora
May-be there are similar lines elsewhere.
So the duplication is not shown by default.

Or may-be? try to rebuild opnekore.pot
manticora
Documentation Writers
Documentation Writers
Posts: 29
Joined: 29 Jan 2010, 05:59
Noob?: No

Re: Translation issues

#6 Post by manticora »

I have checked, there is no similar lines in openkore.pot
Every time i translate OpenKore, i update the openkore.pot file.
manticora
Documentation Writers
Documentation Writers
Posts: 29
Joined: 29 Jan 2010, 05:59
Noob?: No

Re: Translation issues

#7 Post by manticora »

tables \ commanddescriptions.txt

Code: Select all

[auth]
(Un)authorize a user for using Kore chat commands.
<player name> <flag>	authorize <player name> if <flag> is 1, unauthorize if 0 
console

Code: Select all

help auth
------------ Help for 'auth' ------------
(Un)authorize a user for using Kore chat commands.
auth <player name> <flag>    authorize <player name> if <flag> is 1, 
                             if 0 
--------------------------------------------------
Where is "unauthorize"?

and

Code: Select all

[cart]
Cart management
				lists items in cart.
add <inventory item #> [<amount>]	add <amount> items from inventory to cart
get <cart item #> [<amount>]	get <amount> items from cart to inventory
desc <cart item #> [<amount>]	displays cart item description

Code: Select all

help cart
------------ Help for 'cart' ------------
Cart management
cart add <inventory item #> [<amount>]    add <amount> items from inventory to 
                                          
cart get <cart item #> [<amount>]         get <amount> items from cart to 
                                          
cart desc <cart item #> [<amount>]        displays cart item description
--------------------------------------------------
Fixed:
sub helpIndent {
....
foreach my $word (@words) {
if ($padsize + length($messageTmp) + length($word) + 1 > 79) {
$message .= $messageTmp . "\n$pad";
$messageTmp = "$word "; #was $messageTmp = '';
} else {
$messageTmp .= "$word ";
}
}
You do not have the required permissions to view the files attached to this post.
manticora
Documentation Writers
Documentation Writers
Posts: 29
Joined: 29 Jan 2010, 05:59
Noob?: No

Re: Translation issues

#8 Post by manticora »

File tables\commanddescriptions.txt

Code: Select all

[ai]
Enable/disable AI.
				toggles AI on/off
on				enables AI
off				disables AI
ai_v			displays the contents of the %ai_v hash, for debugging purposes
clear			clears AI sequences
print			displays detailed info about current AI sequence
Console log, where is toggles AI on/off?

Code: Select all

help ai
----------------- Help for 'ai' ------------------
Enable/disable AI.
ai on       enables AI
ai off      disables AI
ai ai_v     displays the contents of the %ai_v hash, for debugging purposes
ai clear    clears AI sequences
ai print    displays detailed info about current AI sequence
--------------------------------------------------
After this patch in src\FileParsers.pm:
sub parseCommandsDescription {
...
...
} elsif ($line =~ /^(.*?)\t+(.*)$/) {
push @{$r_hash->{$key}}, [$1, $2];

} elsif ($line !~ /\t/) { #if a console command is without any params
push @{$r_hash->{$key}}, ["", $line];
}
New console log:

Code: Select all

help ai
----------------- Help for 'ai' ------------------
Enable/disable AI.
ai          toggles AI on/off
ai on       enables AI
ai off      disables AI
ai ai_v     displays the contents of the %ai_v hash, for debugging purposes
ai clear    clears AI sequences
ai print    displays detailed info about current AI sequence
--------------------------------------------------
manticora
Documentation Writers
Documentation Writers
Posts: 29
Joined: 29 Jan 2010, 05:59
Noob?: No

Re: Translation issues

#9 Post by manticora »

Fixed (7460):
$y = $portal->{y};#{O}_{O}#
$self->writeOutput("message", TF("Moving to Portal %s, %s\n", $x, $y), "info");
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Translation issues

#10 Post by EternalHarvest »

http://openkore.svn.sourceforge.net/vie ... threv=7460
That's just a comment added or what?