Opened 15 years ago
Closed 14 years ago
#6116 closed enhancement (fixed)
A localization patch fof libbluetooth
Reported by: | Karvjorm | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits | Version: | R1/alpha2 |
Keywords: | libbluetooth localization LocaleCatalog Singleton | Cc: | Karvjorm |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Here is a localization patch for libbluetooth. I have created a singleton class LocaleCatalog that includes public BCatalog class. TODO: For another library catalog than libbe there should be some other call than be_locale->GetAppCatalog(&fAppCatalog), I suppose.
This is a try to solve the Ticket #6113 problem: http://dev.haiku-os.org/ticket/6113
Attachments (3)
Change History (8)
by , 15 years ago
Attachment: | libbluetoothLocalization.patch added |
---|
comment:1 by , 15 years ago
patch: | 0 → 1 |
---|
by , 15 years ago
Attachment: | LocaleCatalog.h added |
---|
A header file for the Singleton LocaleCatalog class
follow-up: 4 comment:3 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Hello,
- Your patch doesn't seem to include your changes to the locale kit,
- Don't bother too much with that, I took it into account and will design the proper API during the summer. Please wait for two weeks so I can get out of school.
by , 15 years ago
Attachment: | LocaleCatalog.cpp added |
---|
Singleton LocaleCatalog class for libbluetooth (and other libraries)
comment:4 by , 15 years ago
Replying to pulkomandy:
Hello,
- Your patch doesn't seem to include your changes to the locale kit,
- Don't bother too much with that, I took it into account and will design the proper API during the summer. Please wait for two weeks so I can get out of school.
No, I do not the touch locale kit, don't panic. But after a slept night I realized that I made this Singleton class a bit wrong. I should have created first a super class named BLibLocaleCatalog, for example. Then I should have created a derived LocaleCatalog class from this super class for the libbluetooth library only. Then we could have one generic class for all libraries and derived library specific classes for each library. I'll try to refactor this libbluetoothLocalization patch by that way.
comment:5 by , 15 years ago
I am wondering if there is a better solution that a super class and a derived class for each library. I wonder, if the source message field can be used to identify the concerned library? Now source field is pointing to libbe, but could it point to other libraries? I'm just thinking how it could be tested...
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Applied in hrev37339.
However, you are using B_TRANSLATE_MARK and not calling B_TRANSLATE on the constants later on when they are used.
services[i] should be replaced with B_TRANSLATE(services[i]) so that the replacement of the string is actually done. B_TRANSLATE_MARK will only ensure that the strings themselves will get into the catalog file ; it will not (and cannot) replace them in the executable nor at runtime.
A localization patch for libbluetooth