Commit Graph

44 Commits

Author SHA1 Message Date
Adrien Destugues
41853a8bbf 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>
2020-09-01 18:14:57 +00:00
Niels Sascha Reedijk
a8081885d2 HaikuBook: fix warnings generated by Doxygen 1.18.16.
This version generates some warnings and identified some problems in our
documentation. It is also a bit more vigilant about undocumented elements, so
these are now decorated with a brief description. In the BNotification docs I
used a stray \p to create some whitespace between code and an image. This is
now fixed in the CSS instead.
2020-03-08 08:57:37 +00:00
Niels Sascha Reedijk
ff1ee776fe HaikuBook: fix part of the warnings marked by Doxygen
I spotted some warnings when I upgraded from Doxygen 1.18.13 to 1.18.17.
The new warnings are useful, they point out imbalances in grouping, as
well as unclosed comment blocks. Coincidentally, this fixes #13338
2020-03-01 09:50:49 +00:00
Adrien Destugues
70cdd7d4f5 BCountry: add SetTo and InitCheck.
Change-Id: I5fbc2a1c0e735d6edeb23672017bb64d1b3f4390
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1872
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-02 12:32:15 +00:00
John Scipione
6f6c9e0069 BDurationFormat::Format docs, update method params
Also a tiny style fix in the header, put const qualifier
on same line
2017-11-10 14:59:33 -08:00
John Scipione
021c2fec4f BNumberFormat docs: remove const qualifier 2017-11-10 14:45:39 -08:00
John Scipione
e08fce49e7 BDurationFormat docs: update ctor docs 2017-11-10 14:41:28 -08:00
Akshay Agarwal
defdefa89a docs/user: Update locale kit description.
- Delete the introduction from the kits list page, as it is already
under locale_intro.
- Update the description in locale_intro.
- Since the locale kit now lives in libbe, delete the paragraph about
libraries from the intro, and move the still relevant part about
liblocalestub to the catalog translation macros description in
Catalog.dox.
2017-09-06 07:47:47 +02:00
Adrien Destugues
a19a18f553 Rework BCollator API
- Strength is now set once, instead of at each comparison, to improve
  performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")
2017-05-29 08:52:43 +02:00
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
John Scipione
71f6259a0f Fix locale docs as suggested by Adrien, more work still needed 2014-12-15 21:12:54 -05:00
John Scipione
7ec9bf2f5a A few more small fixes, trying to go quick 2014-12-04 19:33:35 -05:00
John Scipione
9bd3dedfce Fix a bit of copy pasta in the locale docs 2014-12-04 19:23:47 -05:00
John Scipione
4a31c32620 Update locale docs to match new reality.
Created docs for NumberFormat, DateFormat, DateTimeFormat, and TimeFormat
and moved the docs from BLocale to the respective new file. Also
DurationFormat was updated as well.

doxygen once again compiles the docs without warnings.
2014-12-04 19:13:46 -05:00
John Scipione
edc845a323 Update Locale Kit docs.
Add \since to each method. This was pretty easy to figure out since
the whole kit exists only in Haiku.
2014-06-11 16:48:17 -04:00
Adrien Destugues
2d0e1ed2f3 be_locale_roster is gone.
Reference the proper method to get the global locale roster object.
2013-12-24 09:28:42 +01:00
Adrien Destugues
6ec9625a36 Fix mismatched prototypes in the Haiku Book. 2013-10-04 16:56:59 +02:00
John Scipione
bcd9244e4a Fix BCountry::GetName() method that was showing in BVolume::GetName() 2013-02-21 20:16:34 -05:00
John Scipione
131261d2b5 Remove remaining /trunk/ before file references. 2013-02-07 21:19:06 -05:00
John Scipione
820dca4df6 Big docs cleanup.
* Fixed headers including:
  - All rights reserved not All Rights Reserved.
  - name, email@domain.com not name <email@domain.com>
  - tabs and spaces
  - Authors: not Documented by:
* Renamed string.dox to String.dox
* Renamed midixxx.dox files to MidiXxx.dox
* Moved images into images subdirectories and updated Doxfile.
* Re-format all files with tabs instead of spaces.
* Fix many spelling mistakes.
* Added all files, classes, structs, and enums to libbe group.
2013-02-07 02:01:19 -05:00
John Scipione
400a2a1813 Fix warning in DurationFormat.dox 2013-01-30 19:50:41 -05:00
John Scipione
93ebe7637f Update BDurationFormat docs. Came for warnings, ended up fixing more. 2012-12-24 19:55:26 -05:00
John Scipione
89dfe27fc8 Update BCatalog docs to fix warnings and update.
Especially listing the status codes is useful. Some style fixes and
update \li to -.
2012-12-24 19:07:56 -05:00
Oliver Tappe
546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00
Adrien Destugues
5caae4d450 Fix documentation of Collator: Greater and GreaterOrEqual are not commutative (that would mean Greater(s1, s2) is the same as
Greater(s2, s1), and adding a negation in front of them is not enough either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-11 09:19:19 +00:00
John Scipione
f69cadd0e9 Update the BCollator class documentation to fix a number of spelling errors and make the text clearer and easier to read. Also add a bunch of details, a few warnings and notes and other small typographical changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-11 03:55:09 +00:00
John Scipione
90a55c448a Copy paste mistype, B_WEEKDAY_FRIDAY instead of B_WEEKDAY_THURSDAY twice.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 08:40:28 +00:00
John Scipione
6ac7032dc6 Update the style of the Haiku Book to resemble the User Guide.
If you have never seen this before you are in for a bit of a shock.
Update the Doxyfile to 1.7.3 (the version that gets auto-generated).

Update the book.dox front page with some nice introductory text.

Add new documentation for the following classes:
BCheckBox
BClipboard
BColorControl
BControl
BEntryList
BView (preliminary)

Remove redundant documentation from src/kits/storage/EntryList.cpp

Minor documentation update for the following classes:
BAlert
BApplication
BArchivable
BBox
BButton
BCatalog
BFindDirectory
BHandler
BUnarchiver
BString

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 08:36:02 +00:00
John Scipione
740ae7fef6 Return B_ERROR if a locking error occurs in while locking the BLocale object, return B_BAD_VALUE if an ICU error occurs or the passed in value is NULL. Update BLocale API documentation to reflect this and also add some more documentation fixes. Closes #7901 pending confirmation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-11-02 06:02:36 +00:00
Adrien Destugues
c647837666 * Add some details on how the Locale and the formater classes relate and which
one one should use.
 * Add documentation for BDurationFormat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-29 19:56:05 +00:00
Adrien Destugues
a33f8fbdec Merge work by John Scipione on the Haiku Book.
* Some new classes documented
 * Screenshots for the interface kit controls
 * A lot of typo fixes
 * Some css tweaks

This has some backporting to the current version of Doxygen, since 
there are experiments to get coloring similar to the one in the Be 
Book that will hopefully be upstreamed in Doxygen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-09 21:46:13 +00:00
Jonas Sundström
7485fe842b Typo correction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40722 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-27 11:17:18 +00:00
Alex Wilson
7e8daebe34 Fix a few typos in Locale kit documentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-15 20:26:52 +00:00
Oliver Tappe
b0c3ed0447 * fix a couple of typos
* removed a sentence that's no longer true

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-20 17:32:29 +00:00
Oliver Tappe
6f43fabafb * some cleanup in BLocaleRoster
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-20 09:23:06 +00:00
Adrien Destugues
0d858bd391 Add documentation for the BTimeZone class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 07:23:42 +00:00
Adrien Destugues
7ea3a2b029 Add note about the fact that locale kit is not part of libbe
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 12:39:29 +00:00
Adrien Destugues
a8a3468a80 * Add documentation for the UnicodeChar class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 12:33:47 +00:00
Adrien Destugues
cae874d384 * Lots of fixes and proofreading to the locale api reference
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 08:09:12 +00:00
Adrien Destugues
e82e8f365e * Update locale kit documentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 12:39:48 +00:00
Adrien Destugues
5393193d0a * Fix some typos in the API reference for BLocale and BCatalog.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-07 14:08:05 +00:00
Adrien Destugues
0a4e27c50b * Fixed the main page entry for locale kit
* Also parse the actual code to get the methods shown in the classes, inheritance diagrams, and all that stuff
 * Add some docs on date formatting to BLocale


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 12:09:20 +00:00
Adrien Destugues
c6247544ed * Add the locale kit to the main page
* Complete and correct some parts of locale and catalog classes reference
 * Ensure the methods are prefixed with the class name so doxygen knows where they belong.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 12:01:38 +00:00
Adrien Destugues
e9fd63ec7c * Fix some outdated information in documentation files
* Add a very small part of documentation about the Locale Kit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 16:02:55 +00:00