discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make_strings


From: Riccardo Mottola
Subject: Re: make_strings
Date: Wed, 13 Mar 2013 01:19:21 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:17.0) Gecko/20130221 Thunderbird/17.0.2

Hi,

On 03/12/13 09:12, Fred Kiefer wrote:

Here the localization happens inside of the macro MAKE_LOCALIZED_LABEL, you should pull the localization code out otherwise make_strings wont be able to extract the text.

agreed. I removed the Macro!

2013-03-10 21:56:11.250 make_strings[12862] unable to parse call to
'NSLocalizedString' at ../GWFunctions.m:307

Again no chance for make_strings to extract the actual string. This will make it very hard to port your application to other languages. The localization belongs into the caller.

Agreed. It did cost me several hours, but I replaced all occourences of that function with the standard calls so that the lcoalization happens in the caller.

make_strings: Uncaught exception NSRangeException, reason: in
substringWithRange:, range { 0, 2147483647 } extends beyond size (69)

Just run make_strings in gdb and set a breakpoint on [NSException raise], that is the only way to tell.
Now that is the only error that remains. It did not change.
make_strings: Uncaught exception NSRangeException, reason: in substringWithRange:, range { 0, 2147483647 } extends beyond size (69)

#0  -[NSException raise] (self=0xbb0b7c64, _cmd=0xbbb74528)
    at NSException.m:955
#1  0xbb89f797 in +[NSException raise:format:arguments:] (self=0xbbb74340,
    _cmd=0xbbb74510, name=0xbbb74688, format=0xbbb55150,
    argList=0xbfbfe488 "õö¼»") at NSException.m:849
#2  0xbb8a03dc in +[NSException raise:format:] (self=0xbbb74340,
_cmd=0xbbb54f40, name=0xbbb74688, format=0xbbb55150) at NSException.m:835
#3  0xbb80420b in -[GSCSubString substringWithRange:] (self=0xbb0b7664,
    _cmd=0xbbba7020, aRange=...) at GSString.m:3870
#4  0xbb94eefd in -[NSString substringToIndex:] (self=0xbb0b7664,
    _cmd=0x80516b0, index=2147483647) at NSString.m:1962
#5  0x0804e51b in -[StringsFile initWithFile:] (self=0xbb0b7424,
    _cmd=0x8050660, filename=0xbb0b73a4) at StringsFile.m:186
#6  0x0804a22d in UpdateTable (filename=0xbb0b73a4, source_table=0xbb0a0944)
    at make_strings.m:461
#7  HandleLanguage (source_entries=0xbb0486a4, language_name=0xbb097884)
    at make_strings.m:490
#8  gnustep_base_user_main (argc=-1157330956, argv=0xbfbfe6d0)
    at make_strings.m:612
#9  0xbb922ea0 in main (argc=19, argv=0xbfbfe6d0, env=0xbfbfe720)
    at NSProcessInfo.m:984
#10 0x08048fd3 in ___start ()
#11 0x08048e98 in _start ()

at frame 4,
#4  0xbb94eefd in -[NSString substringToIndex:] (self=0xbb0b7664,
    _cmd=0x80516b0, index=2147483647) at NSString.m:1962
1962      return [self substringWithRange: ((NSRange){0,index})];
(gdb) po self
 ----------------------- menu strings --------------------------- *\

at frame 5
(gdb) po user_comment
 Se que la traduccion es muy mejorable
 He revisado y actualizado la traduccion. Quique

(gdb) p pos
$1 = 2147483647

so the position is totally off.

a frame further up:
(gdb) po filename
Spanish.lproj/Localizable.strings

could it be that multi-line comments are not supported and a */ is expected at every line?? or perhaps I am interpreting the code wrong...

Riccardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]