C# Класс Bloom.Book.RuntimeInformationInjector

stick in a json with various string values/translations we want to make available to the javascript
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
TopicReversal string>.Dictionary

Открытые методы

Метод Описание
AddUIDictionaryToDom ( HtmlDom pageDom, CollectionSettings collectionSettings ) : void
AddUISettingsToDom ( HtmlDom pageDom, CollectionSettings collectionSettings, IFileLocator fileLocator ) : void

stick in a json with various settings we want to make available to the javascript

Приватные методы

Метод Описание
AddHtmlUiStrings ( string>.Dictionary d ) : void

For Bloom 2.0 this list is hard-coded

AddLanguagesUsedInPage ( XmlDocument xmlDocument, string>.Dictionary mapOriginalToLocalized ) : void

Add to the dictionary which maps original to Localized strings an entry for any language code that doesn't already have one. We have localizations for a few major languages that map e.g. de->German/Deutsch/etc, so they are functioning not just to localize but to expand from a language code to an actual name. For any other languages where we don't have localization information, we'd like to at least expand the cryptic code into a name. This method does that.

AddSomeCommonNationalLanguages ( string>.Dictionary d ) : void
AddTranslationToDictionaryUsingEnglishAsKey ( string>.Dictionary dictionary, string key, string defaultText ) : void
AddTranslationToDictionaryUsingKey ( string>.Dictionary dictionary, string key, string defaultText ) : void
CheckDynamicStrings ( ) : void
MakePageLabelLocalizable ( HtmlDom singlePageHtmlDom, string>.Dictionary d ) : void

Adds a script to the page that triggers i18n after the page is fully loaded.

SafelyAddLanguage ( string>.Dictionary d, string key, string name ) : void

Описание методов

AddUIDictionaryToDom() публичный статический Метод

public static AddUIDictionaryToDom ( HtmlDom pageDom, CollectionSettings collectionSettings ) : void
pageDom HtmlDom
collectionSettings Bloom.Collection.CollectionSettings
Результат void

AddUISettingsToDom() публичный статический Метод

stick in a json with various settings we want to make available to the javascript
public static AddUISettingsToDom ( HtmlDom pageDom, CollectionSettings collectionSettings, IFileLocator fileLocator ) : void
pageDom HtmlDom
collectionSettings Bloom.Collection.CollectionSettings
fileLocator IFileLocator
Результат void

Описание свойств

TopicReversal публичное статическое свойство

keeps track of the most recent set of topics we injected, mapping the localization back to the original.
public static Dictionary TopicReversal
Результат string>.Dictionary