[i18n] Provide and use our own Catalog class for translatable strings
authorBertrand Lorentz <bertrand.lorentz@gmail.com>
Sun, 3 Oct 2010 15:13:08 +0000 (17:13 +0200)
committerBertrand Lorentz <bertrand.lorentz@gmail.com>
Sun, 31 Oct 2010 10:15:38 +0000 (11:15 +0100)
commitd4c88333a002d561f317c96e1cf5a85ba911c818
tree6509ac739658de92d499a1aac05b397d334da6b0
parent40dda483b0379fa524df91a4528bccf344b27bb0
[i18n] Provide and use our own Catalog class for translatable strings

The Catalog class provided by Mono.Unix only works for applications.
Libraries who have their own text domain need to use the dgettext and
dngettext functions, so that they don't step on the application's
default translation domain.

So we bring in a new Catalog class from Banshee, along with an
AssemblyCatalog attribute. Assemblies using Hyena.I18n.Catalog can
specify their translation domain using this attribute. If they don't,
the default translation will be used.

We should now support all i18n use cases : hyena with its own
translations, used by a third-party library with its translation
domain and/or used by an application using the default translation
domain. Catalog.GetString should just do the right thing.

Also adjust the using statements so that everything in Hyena uses the
new Catalog implementation. As a side effect, we can now drop most of
the references to Mono.Posix.
27 files changed:
Hyena.Data.Sqlite/Hyena.Data.Sqlite.csproj
Hyena.Data.Sqlite/Makefile.am
Hyena.Gui/Hyena.Data.Gui/Accessibility/ColumnHeaderCellTextAccessible.cs
Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs
Hyena.Gui/Hyena.Gui.Dialogs/VersionInformationDialog.cs
Hyena.Gui/Hyena.Gui.csproj
Hyena.Gui/Hyena.Query.Gui/DateQueryValueEntry.cs
Hyena.Gui/Hyena.Query.Gui/FileSizeQueryValueEntry.cs
Hyena.Gui/Hyena.Query.Gui/QueryBox.cs
Hyena.Gui/Hyena.Query.Gui/QueryLimitBox.cs
Hyena.Gui/Hyena.Query.Gui/RelativeTimeSpanQueryValueEntry.cs
Hyena.Gui/Hyena.Query.Gui/TimeSpanQueryValueEntry.cs
Hyena.Gui/Hyena.Widgets/RatingMenuItem.cs
Hyena.Gui/Makefile.am
Hyena/Hyena.Downloader/DownloadManagerJob.cs
Hyena/Hyena.I18n/AssemblyCatalogAttribute.cs [new file with mode: 0644]
Hyena/Hyena.I18n/Catalog.cs [new file with mode: 0644]
Hyena/Hyena.Query/DateQueryValue.cs
Hyena/Hyena.Query/EnumQueryValue.cs
Hyena/Hyena.Query/IntegerQueryValue.cs
Hyena/Hyena.Query/NullQueryValue.cs
Hyena/Hyena.Query/RelativeTimeSpanQueryValue.cs
Hyena/Hyena.Query/StringQueryValue.cs
Hyena/Hyena.Query/TimeSpanQueryValue.cs
Hyena/Hyena.csproj
Hyena/Makefile.am