C# 클래스 Bloom.Book.RuntimeInformationInjector

stick in a json with various string values/translations we want to make available to the javascript
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop

공개 프로퍼티들

프로퍼티 타입 설명
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