#
41853a8b |
|
25-Aug-2020 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
locale kit: allow creating a catalog without entry_ref The catalogs are loaded from separate files, so there is no need to have an app entry_ref to load them, just a MIME type is enough. The implementation is a bit simplified: only the default catalog format is allowed (unlike when loading from entry_ref, where extra catalog formats can be added in add-ons). Unrelated cleanup: remove unused code to load catalogs from attributes of an application. We considered this when designing the locale kit, but using resources or separate files works better. Use this in Cortex, where some strings are in a static library, so they don't have an associated executable or library or add-on to identify them. The code in Cortex is not complete localization, several parts should use StringForRate, BStringFormat, etc. Change-Id: I09be22b1f50891250c4497c51e1db8dcee279140 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3172 Reviewed-by: Kacper Kasper <kacperkasper@gmail.com>
|
#
541ff51a |
|
15-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Cleanup BCatalogAddOn. * rename BCatalogAddOn to BCatalogData, since it doesn't represent an add-on, but rather the catalog data provided by an add-on * move BCatalogData out of Catalog.{h,cpp} into its own header and implementation file * drop BCatalogData::MarkForTranslation() methods, they're not needed * drop BCatalog::GetNoAutoCollectString() methods, they're not being used anywhere * cleanup the B_TRANSLATE_... macros somewhat * add versions of the B_TRANSLATE_MARK_... macros that are meant to be used in void context (when the string isn't being used by the program, just meant to be picked up by collectcatkeys). * adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed * adjust users of BCatalogAddOn accordingly
|
#
5ac65b7f |
|
14-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
More cleanup in locale kit, this time regarding namespaces. * it's bad practice to do a 'using <namespace>' in a header, as that is very likely to have unintended effects, so drop those from a couple of private Locale headers * adjust files all over the locale kit in order to fix the problems (by explicitly importing the required classes in the implementation files)
|
#
1a5c1f9e |
|
01-Nov-2011 |
Adrien Destugues <pulkomandy@pulkomandy.ath.cx> |
* Use const references instead of pointers for the read from/write to attribute/resource method in locale kit catalogs * Only load the embedded catalog if nothing else was found, so it can easily be overridden * Change the resource type to 'CADA' (CAtalog DAta) for embedded catalogs, and use a hash of the language code as the resource ID. This allows multiple languages to be stored in the same file and does not interfere with the user storing his own BMessages as resources. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43057 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
54fad654 |
|
31-Oct-2011 |
Adrien Destugues <pulkomandy@pulkomandy.ath.cx> |
Rework the handling of catalog loading in locale kit : Instead of computing the mime signature and giving this to the catalog system, give an entry_ref instead. The default catalog add-on can thus look at the right place when searching local catalogs (embedded as resources, or stored as files next to the executable. * This allows different versions of the same app to each have their own catalog set, * And also make the embedded/local catalog searching work for add-ons and libs, instead it only worked for apps because of a getAppInfo call. Fix cpufrequency to make use of it properly (that wouldhave worked without the change, but nowit's mandatory, since loading a catlog by mimesignature is not possible anymore). Should fix #8037. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43021 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2a06b5bd |
|
02-Apr-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Closing #6721: avoid unescaping when linking catalogs together * add SetRawString() to both implementations of DefaultCatalog which sets the translated string as given * use SetRawString() in both (standard- and build-)versions of linkcatkeys git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41167 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
80254771 |
|
14-Apr-2010 |
Adrien Destugues <pulkomandy@pulkomandy.ath.cx> |
* Implement a function to get all the available languages for a given application * use it in readonlybootprompt instead of previous workaround code. This makes the readonlybootprompt faster and lighter as it doesn't open and parse all the catalogs anymore, but only checks for their existence. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36276 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d25dd4b9 |
|
12-Apr-2010 |
Jérôme Duval <korli@users.berlios.de> |
some copyright headers clean up git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36203 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
75f15221 |
|
18-Sep-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* reintegrated gsoc-locale-kit branch into trunk - there's more work to do, but it's about time to give this code more exposure. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33176 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
541ff51a6ef4c47f8ab105ba6ff895cdbba83aca |
|
15-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
Cleanup BCatalogAddOn. * rename BCatalogAddOn to BCatalogData, since it doesn't represent an add-on, but rather the catalog data provided by an add-on * move BCatalogData out of Catalog.{h,cpp} into its own header and implementation file * drop BCatalogData::MarkForTranslation() methods, they're not needed * drop BCatalog::GetNoAutoCollectString() methods, they're not being used anywhere * cleanup the B_TRANSLATE_... macros somewhat * add versions of the B_TRANSLATE_MARK_... macros that are meant to be used in void context (when the string isn't being used by the program, just meant to be picked up by collectcatkeys). * adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed * adjust users of BCatalogAddOn accordingly
|
#
5ac65b7f11e3cec39f7f1540558884427fec935d |
|
14-Apr-2012 |
Oliver Tappe <zooey@hirschkaefer.de> |
More cleanup in locale kit, this time regarding namespaces. * it's bad practice to do a 'using <namespace>' in a header, as that is very likely to have unintended effects, so drop those from a couple of private Locale headers * adjust files all over the locale kit in order to fix the problems (by explicitly importing the required classes in the implementation files)
|
#
1a5c1f9ed57fae37829befc007cd51c32205c1cd |
|
01-Nov-2011 |
Adrien Destugues <pulkomandy@pulkomandy.ath.cx> |
* Use const references instead of pointers for the read from/write to attribute/resource method in locale kit catalogs * Only load the embedded catalog if nothing else was found, so it can easily be overridden * Change the resource type to 'CADA' (CAtalog DAta) for embedded catalogs, and use a hash of the language code as the resource ID. This allows multiple languages to be stored in the same file and does not interfere with the user storing his own BMessages as resources. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43057 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
54fad654ce9986a2b0ce4849608e738907509292 |
|
31-Oct-2011 |
Adrien Destugues <pulkomandy@pulkomandy.ath.cx> |
Rework the handling of catalog loading in locale kit : Instead of computing the mime signature and giving this to the catalog system, give an entry_ref instead. The default catalog add-on can thus look at the right place when searching local catalogs (embedded as resources, or stored as files next to the executable. * This allows different versions of the same app to each have their own catalog set, * And also make the embedded/local catalog searching work for add-ons and libs, instead it only worked for apps because of a getAppInfo call. Fix cpufrequency to make use of it properly (that wouldhave worked without the change, but nowit's mandatory, since loading a catlog by mimesignature is not possible anymore). Should fix #8037. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43021 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2a06b5bdba1424eb32e9c06ea738bf35f7e626f7 |
|
02-Apr-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Closing #6721: avoid unescaping when linking catalogs together * add SetRawString() to both implementations of DefaultCatalog which sets the translated string as given * use SetRawString() in both (standard- and build-)versions of linkcatkeys git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41167 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
802547718913d68643d59533536ecb9ba4691dc4 |
|
14-Apr-2010 |
Adrien Destugues <pulkomandy@pulkomandy.ath.cx> |
* Implement a function to get all the available languages for a given application * use it in readonlybootprompt instead of previous workaround code. This makes the readonlybootprompt faster and lighter as it doesn't open and parse all the catalogs anymore, but only checks for their existence. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36276 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d25dd4b92033d7ee4e7640f7f8a08d98a8e24800 |
|
12-Apr-2010 |
Jérôme Duval <korli@users.berlios.de> |
some copyright headers clean up git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36203 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
75f152215517c2af1a93938f46d3156503329a5e |
|
18-Sep-2009 |
Oliver Tappe <zooey@hirschkaefer.de> |
* reintegrated gsoc-locale-kit branch into trunk - there's more work to do, but it's about time to give this code more exposure. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33176 a95241bf-73f2-0310-859d-f6bbb57e9c96
|