-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 53d95b3
Showing
2 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<configure | ||
xmlns="http://namespaces.zope.org/zope"> | ||
|
||
<!-- Setup language negotiation --> | ||
<utility | ||
provides="zope.i18n.interfaces.INegotiator" | ||
component="zope.i18n.negotiator.negotiator" | ||
/> | ||
|
||
<adapter factory="zope.app.publisher.browser.ModifiableBrowserLanguages" | ||
for="zope.publisher.interfaces.http.IHTTPRequest" | ||
provides="zope.i18n.interfaces.IModifiableUserPreferredLanguages" | ||
/> | ||
|
||
<class class="zope.publisher.http.HTTPRequest"> | ||
<implements interface="zope.app.annotation.IAttributeAnnotatable" /> | ||
</class> | ||
|
||
<!-- Setup charset negotiation --> | ||
<adapter factory="zope.publisher.http.HTTPCharsets" | ||
for="zope.publisher.interfaces.http.IHTTPRequest" | ||
provides="zope.i18n.interfaces.IUserPreferredCharsets" | ||
/> | ||
|
||
<!-- Register the Translation Domain as a content object --> | ||
<localUtility class=".translationdomain.TranslationDomain"> | ||
<factory | ||
id="zope.app.i18n.TranslationDomain" | ||
/> | ||
<allow interface="zope.i18n.interfaces.ITranslationDomain" | ||
/> | ||
<require permission="zope.ManageSite" | ||
interface="zope.app.container.interfaces.IContainer" | ||
/> | ||
<require permission="zope.ManageSite" | ||
interface=".interfaces.IWriteTranslationDomain" | ||
/> | ||
<require permission="zope.ManageSite" | ||
interface=".interfaces.ISyncTranslationDomain" | ||
/> | ||
</localUtility> | ||
|
||
<subscriber | ||
for=".interfaces.ILocalTranslationDomain | ||
..component.interfaces.registration.IRegistrationActivatedEvent" | ||
handler=".translationdomain.setDomainOnActivation" | ||
/> | ||
|
||
<subscriber | ||
for=".interfaces.ILocalTranslationDomain | ||
..component.interfaces.registration.IRegistrationDeactivatedEvent" | ||
handler=".translationdomain.unsetDomainOnDeactivation" | ||
/> | ||
|
||
<!-- Setup Message Catalogs --> | ||
<class class=".messagecatalog.MessageCatalog"> | ||
<factory id="zope.app.MessageCatalog" /> | ||
<implements | ||
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" /> | ||
|
||
<require permission="zope.View" | ||
interface="zope.i18n.interfaces.IMessageCatalog" /> | ||
<require permission="zope.ManageSite" | ||
attributes="setMessage getMessageIds" /> | ||
</class> | ||
|
||
|
||
<!-- Setup Export and Import Filters --> | ||
<adapter | ||
factory=".filters.GettextExportFilter" | ||
for=".interfaces.ILocalTranslationDomain" | ||
provides="zope.i18n.interfaces.IMessageExportFilter" | ||
/> | ||
|
||
<adapter | ||
factory=".filters.GettextImportFilter" | ||
for=".interfaces.ILocalTranslationDomain" | ||
provides="zope.i18n.interfaces.IMessageImportFilter" | ||
/> | ||
|
||
<include file="locales.zcml" /> | ||
<include package=".xmlrpc" /> | ||
<include package=".browser" /> | ||
|
||
</configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<configure | ||
xmlns="http://namespaces.zope.org/zope"> | ||
|
||
<class class="zope.i18n.format.NumberFormat"> | ||
<allow interface="zope.i18n.interfaces.INumberFormat" /> | ||
</class> | ||
|
||
<class class="zope.i18n.format.DateTimeFormat"> | ||
<allow interface="zope.i18n.interfaces.IDateTimeFormat" /> | ||
</class> | ||
|
||
|
||
<class class="zope.i18n.locales.LocaleIdentity"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleIdentity" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleVersion"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleVersion" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleDisplayNames"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleDisplayNames" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleTimeZone"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleTimeZone" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleFormat"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleFormat" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleFormatLength"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleFormatLength" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleCalendar"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleCalendar" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleDates"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleDates" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleCurrency"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleCurrency" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.LocaleNumbers"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocaleNumbers" /> | ||
</class> | ||
|
||
<class class="zope.i18n.locales.Locale"> | ||
<allow interface="zope.i18n.interfaces.locales.ILocale" /> | ||
</class> | ||
|
||
</configure> |