About dir path in twRo can't use chinese path

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

Moderator: Moderators

User avatar
howie50417
Developers
Developers
Posts: 8
Joined: 28 Feb 2013, 07:52
Noob?: Yes

About dir path in twRo can't use chinese path

#1 Post by howie50417 »

It would let the translation fail to work when I put the openkore into the chinese path

Then I modified \src\Translation.pm

in line 128

return "$podir/$locale.mo" if (-f "$podir/$locale.mo");

change to

return "src/po/$locale.mo" if (-f "src/po/$locale.mo");

And now the translation under the chinese path

Work successfully!!

(I guess it doesn't work because the file system of windows in taiwan is BIG5, so when I used the relative uri instead of absolute uri, the problem solved.)
fireway
Noob
Noob
Posts: 5
Joined: 29 Dec 2012, 14:03
Noob?: Yes

Re: About dir path in twRo can't use chinese path

#2 Post by fireway »

use encoding 'utf8';

change to

#use encoding 'utf8';

and

Code: Select all

sub _autodetect {
	my ($podir, $requested_locale) = @_;
change to

Code: Select all

sub _autodetect {
	use bytes;
	my ($podir, $requested_locale) = @_;
Work successfully!!