[haiku-commits] haiku: hrev51401 - docs/user docs/user/locale src/data/mime_db/audio

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 6 Sep 2017 07:49:06 +0200 (CEST)

hrev51401 adds 2 changesets to branch 'master'
old head: 6cc6f047476161f341e5b6556f4bb7a31855c4b1
new head: defdefa89a75167b2c53acc6b5aaadf851ce56ee
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=defdefa89a75+%5E6cc6f0474761

----------------------------------------------------------------------------

19b3ca491b83: Add a MIME type and sniffing rule for Protracker mods.

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

defdefa89a75: 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.

                       [ Akshay Agarwal <agarwal.akshay.akshay8@xxxxxxxxx> ]

----------------------------------------------------------------------------

4 files changed, 22 insertions(+), 30 deletions(-)
docs/user/book.dox               | 22 ----------------------
docs/user/locale/Catalog.dox     | 12 +++++++++---
docs/user/locale/localeintro.dox |  5 -----
src/data/mime_db/audio/x-mod     | 13 +++++++++++++

############################################################################

Commit:      19b3ca491b834c9c437fc2b40fb1381c3ece1a3f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=19b3ca491b83
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun Sep  3 16:25:32 2017 UTC

Add a MIME type and sniffing rule for Protracker mods.

----------------------------------------------------------------------------

diff --git a/src/data/mime_db/audio/x-mod b/src/data/mime_db/audio/x-mod
new file mode 100644
index 0000000..9bcd022
--- /dev/null
+++ b/src/data/mime_db/audio/x-mod
@@ -0,0 +1,13 @@
+
+resource(0, "BEOS:TYPE") #'MIMS' "application/x-vnd.Be-meta-mime";
+
+resource(1, "META:TYPE") "audio/x-mod";
+
+resource(2, "META:S:DESC") #'MSDC' "Protracker module";
+
+resource(3, "META:EXTENS") message(234) {
+       "extensions" = "mod",
+       "type" = "audio/x-mod"
+};
+
+resource(5, "META:SNIFF_RULE") "0.2 [44] (0x0f00 & 0xf0c0) [74] (0x0f00 & 
0xf0c0) [104] (0x0f00 & 0xf0c0)";

############################################################################

Revision:    hrev51401
Commit:      defdefa89a75167b2c53acc6b5aaadf851ce56ee
URL:         http://cgit.haiku-os.org/haiku/commit/?id=defdefa89a75
Author:      Akshay Agarwal <agarwal.akshay.akshay8@xxxxxxxxx>
Date:        Tue Sep  5 15:18:39 2017 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Wed Sep  6 05:47:47 2017 UTC

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.

----------------------------------------------------------------------------

diff --git a/docs/user/book.dox b/docs/user/book.dox
index 7ad33fa..d518b9e 100644
--- a/docs/user/book.dox
+++ b/docs/user/book.dox
@@ -135,31 +135,9 @@
        \defgroup locale Locale Kit
        \brief Collection of classes for localizing applications.
 
-       The Locale Kit provides a set of tools for internationalizing,
-       localizing and translating your software. This includes not only
-       replacing string with their translations at runtime, but also more
-       complex tasks such as formatting numbers, dates, and times in a way
-       that match the locale preferences of the user.
-
-       The main way to access locale data is through the be_locale_roster.
-       This is a global instance of the BLocaleRoster class, storing the data
-       for localizing an application according to the user's preferred 
settings.
-       The locale roster also acts as a factory to instantiate most of the 
other
-       classes. However, there are some cases where you will need to 
instantiate
-       another class by yourself, to use it with custom settings. For example, 
you
-       may need to format a date with a fixed format in english for including 
in an
-       e-mail header, as it is the only format accepted there.
-
-       Unlike the other kits in Haiku, the Locale kit does not live in libbe.
-       When building a localized application, you have to link it to
-       liblocale.so. If you want to use the catalog macros, you also have to
-       link each of your images (that is, applications, libraries and add-ons)
-       to liblocalestub.a.
-
        \defgroup media Media Kit
        \brief Collection of classes that deal with audio and video.
 
-
        \defgroup midi1 The old MIDI Kit (libmidi.so)
        \brief The old MIDI kit.
 
diff --git a/docs/user/locale/Catalog.dox b/docs/user/locale/Catalog.dox
index 48f52f7..fc64a56 100644
--- a/docs/user/locale/Catalog.dox
+++ b/docs/user/locale/Catalog.dox
@@ -43,6 +43,7 @@
          associated with your script.
 
        \section macros Using the macros
+
        You don't have to do much in your program to handle catalogs. You must
        first set the B_TRANSLATION_CONTEXT define to a string that identifies 
which
        part of the application the strings you will translate are in. This 
allows
@@ -54,22 +55,27 @@
        allow to build the base catalog, the one that you will send to the
        translator team, from your sourcecode.
 
+       Note that each image (application, library or add-on) using these macros
+       must be linked with liblocalestub.a. This allows the Locale Kit to 
identify
+       it and locate the matching string catalogs for translation.
+
        \section chaining Chaining of catalogs
+
        The catalogs you get from the locale kit are designed to use a fallback
        system so that the user get strings in the language he's the most fluent
        with, depending on what catalogs are available.
 
-       For example, if the user sets his language preferences as 
french(France),
+       For example, if the user sets his language preferences as 
French(France),
        spanish, english, when an application loads a catalog, the following 
rules
        are used:
-       - Try to load a french(France) catalog. If it is found, this catalog
+       - Try to load a French(France) catalog. If it is found, this catalog
          will automatically include strings from the generic french catalog.
        - Try to load a generic french catalog.
        - Try to load a generic spanish catalog.
        - Try to load a generic english catalog.
        - If all of them failed, use the strings that are in the source code.
 
-       Note that french(France) will failback to french, but then directly to 
the
+       Note that French(France) will failback to French, but then directly to 
the
        language in the source code. This avoids mixing 3 or more languages in 
the
        same application if the catalogs are incomplete and avoids confusion.
 
diff --git a/docs/user/locale/localeintro.dox b/docs/user/locale/localeintro.dox
index 365b357..d878a8d 100644
--- a/docs/user/locale/localeintro.dox
+++ b/docs/user/locale/localeintro.dox
@@ -20,9 +20,4 @@ Note that creating a new format is a costly operation. The 
idea is that you
 create your format object once and reuse it accross your application to format
 all the stuff that needs it.
 
-Unlike the other kits in Haiku, the Locale kit does not live in libbe. When
-building a localized application, you have to link it to liblocale.so. If you
-want to use the catalog macros, you also have to link each of your images
-(that is, applications, libraries and add-ons) to liblocalestub.a.
-
 */


Other related posts:

  • » [haiku-commits] haiku: hrev51401 - docs/user docs/user/locale src/data/mime_db/audio - pulkomandy