Opened 13 years ago

Closed 12 years ago

#8037 closed bug (fixed)

The application cannot find/load localization catalog from resource

Reported by: diger Owned by: pulkomandy
Priority: normal Milestone: R1
Component: Kits/Locale Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev42790 gcc4

I use the following command to bind the localization catalog into the application resource

linkcatkeys -tr -o objects.x86-gcc4-release/ClipUp \
-l ru -s application/x-vnd.pecora-clipup2 locales/ru.catkeys

The resulting program does not find a Russian locale But everything is fine if I install to ~/config/data/locale/catalogs

 listres objects.x86-gcc4-release/ClipUp
File: objects.x86-gcc4-release/ClipUp
  Type         ID     Size                 Name
-----------  -----  --------  -------------------------------
     'MSGG'      1        18  "BEOS:FILE_TYPES"
       Icon    101      1024  "BEOS:L:STD_ICON"
  Mini Icon    101       256  "BEOS:M:STD_ICON"
MIME String      1        33  "BEOS:APP_SIG"
     'APPV'      1       680  "BEOS:APP_VERSION"
     'APPF'      1         4  "BEOS:APP_FLAGS"
     'BBMP'      0       403  "object"
     'BBMP'      1       403  "object_big"
     'BBMP'      2       403  "unknown_clip"
     'BBMP'      3       403  "empty"
     'BBMP'      4       403  "maximum"
     'BBMP'      5       336  "locked"
     'BBMP'      6       336  "unlocked"
     'BBMP'      8       336  "unlocked1"
     'BBMP'      9       336  "locked1"
     'BBMP'     10       336  "trash"
     'BBMP'     11       336  "trash1"
     'BBMP'     12       403  "deskbaricon"
     'BBMP'     13       276  "pointer_r"
     'BBMP'     14       276  "pointer_rb"
     'BBMP'     15       276  "pointer_b"
     'BBMP'     17      4947  "arrowbutton_hg"
     'MSGG'  51930      3679  "embedded catalog"

15903 bytes total in resources.

Change History (9)

comment:1 by pulkomandy, 13 years ago

Should be fixed in hrev42950. Please test.

comment:2 by diger, 13 years ago

hrev42973 program does not find a locale...

comment:3 by pulkomandy, 12 years ago

Seems to work for me. I added the frnech catalog as a resource to AboutSystem then deleted the fr.catalog, and I get a french AboutSystem.

May I have a look at your file and sourcecode ?

comment:4 by pulkomandy, 12 years ago

Ok, please try again with hrev43021 or later. The problem was because you're trying to do it from an add-on, and the code would only work when doing it from an app. Should be fixed now.

comment:5 by siarzhuk, 12 years ago

Hm, I have observed some strange results with latest Haiku revisions. Yes, the catalog I bind to the program binary is used, but it is used independently from the current selected locale and only the last one. For example I bind FR resources and set French locale - all is OK, I switch the Locale to English - the program uses anyway Frensh messages. I bind EN catalogs - the program start using English messages but shows the messages in English after restart with French locale on.

Note that I have started the test app form the Terminal - probably it inherits the locale settings and do not update them on the locale change.

comment:6 by pulkomandy, 12 years ago

That's a "feature" of the former embedded catalog system. Due to the way the resource is added,

  • Language information is lost
  • You can only ever have one single catalog as a resource.

And as this is the highest priority one, it will override everything else. Not so good design here. I'll move it a bit lower in the priority list so it can be overridden with plain files. And make it work with multiple languages, too :)

comment:7 by pulkomandy, 12 years ago

Please try hrev43057+. Remember to relink the catalogs to the application, as the resource identifier was changed to allow for multiple languages.

comment:8 by diger, 12 years ago

hrev43091 It works for me. Great job!

comment:9 by pulkomandy, 12 years ago

Resolution: fixed
Status: newclosed

Thanks for reporting :)

Note: See TracTickets for help on using tickets.