public Language(List <Translation> prioritizedTranslationList, decimal percentTranslated) { translations = prioritizedTranslationList; mainWindow = null; setupWizardWindow = null; setupWizardProxySettingsWindowLocalizator = null; searchTab = null; nonFictionSearchResultsTab = null; fictionSearchResultsTab = null; sciMagSearchResultsTab = null; commonDetailsTab = null; nonFictionDetailsTab = null; fictionDetailsTab = null; sciMagDetailsTab = null; import = null; exportPanel = null; nonFictionExporter = null; fictionExporter = null; sciMagExporter = null; synchronization = null; database = null; databaseError = null; sqlDebugger = null; downloadManager = null; applicationUpdate = null; settings = null; about = null; messageBox = null; errorWindow = null; Translation mainTranslation = prioritizedTranslationList.First(); Name = mainTranslation.General?.Name?.Trim() ?? String.Empty; LocalizedName = mainTranslation.General?.LocalizedName?.Trim() ?? String.Empty; if (!String.IsNullOrEmpty(Name) && !String.IsNullOrEmpty(LocalizedName)) { DisplayName = $"{Name} ({LocalizedName})"; } else { DisplayName = "Error"; } CultureCode = mainTranslation.General?.CultureCode?.Trim() ?? String.Empty; TranslatorName = mainTranslation.General?.TranslatorName ?? "unknown"; PercentTranslated = percentTranslated; Formatter = new LanguageFormatter(prioritizedTranslationList); }
public SciMagExportObject(ExportWriter exportWriter, Language currentLanguage) : base(exportWriter) { localization = currentLanguage.SciMagExporter; }