bugGNUstep - Bugs: bug #30239, [NSBundle...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #30239: [NSBundle pathForResource:ofType:inDirectory:forLocalization:] does not find Localizable.strings

Submitted by:  David Wetzel <dwetzel>
Submitted on:  Thu 24 Jun 2010 03:06:44 AM UTC  
 
Category: Base/FoundationSeverity: 4 - Important
Item Group: BugStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon 26 Jul 2010 03:09:28 PM UTC, comment #4:

It seems this was tested and can be closed.

Thanks

Nicola Pero <nico>
Project Member
Fri 25 Jun 2010 07:53:04 PM UTC, comment #3:

I tried with gsweb/trunk/Testing/DynamicElements
and it seems to work as expected :-)

David Wetzel <dwetzel>
Project Member
Fri 25 Jun 2010 04:03:35 PM UTC, comment #2:

I changed the code to ignore the languages preference when asked for resources for a specific language.
That seems reasonable behavior.
It would still be good to have a testcaseto check this though.

Richard Frith-Macdonald <CaS>
Project Member
Fri 25 Jun 2010 10:59:48 AM UTC, comment #1:

Please provide a simple testcase to demonstrate the problem (we can then add it to the testsuite), as it's not clear that there is a bug.
I see in the code that NSBundle mimics OSX behavior in that it only checks languages which are set in the user defaults system ... so that might be an issue.

Richard Frith-Macdonald <CaS>
Project Member
Thu 24 Jun 2010 03:06:44 AM UTC, original submission:

The Localizable.strings file is not found.
my code works on OSX...
It seems like the bundle is is not checking the German.lproj subdirs.

There is testcode in SVN. just build gsweb, go to Testing/DynamicElements
and run the app.
then click on the image test.

dave@nbsd64>ls -l ./DynamicElements.gswa/Resources/German.lproj/
total 8
-rw-r--r-- 1 dave 80 83 Jun 23 19:51 Localizable.strings

Breakpoint 2, -[NSBundle pathForResource:ofType:inDirectory:forLocalization:] (self=0x7f7ffb5bd0f0, _cmd=0x7f7ffdcd5750,
name=0x7f7ffaf9e390, ext=0x7f7ffaf9e3c0, subPath=0x0, localizationName=0x7f7ffb271b50) at NSBundle.m:1854
1854 CREATE_AUTORELEASE_POOL(arp);
(gdb) po localizationName
German
(gdb) next
1855 NSString *result = nil;
(gdb)
1858 if ([ext length] == 0)
(gdb)
1866 array = [self pathsForResourcesOfType: ext
(gdb)
1870 if (array != nil)
(gdb)
1872 NSEnumerator *enumerator = [array objectEnumerator];
(gdb) po array
() <-------------- BUG
(gdb) po ext
strings
(gdb) po name
Localizable

David Wetzel <dwetzel>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nico (Posted a comment)
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by dwetzel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Jul 2010 03:09:28 PM UTCnicoOpen/ClosedIn Test=>Closed
    Fri 25 Jun 2010 07:53:04 PM UTCdwetzelStatusFixed=>Works For Me
    Fri 25 Jun 2010 04:03:35 PM UTCCaSStatusNeed Info=>Fixed
      Open/ClosedOpen=>In Test
    Fri 25 Jun 2010 10:59:48 AM UTCCaSStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1