private int GetNotTranslated(IProjectLanguage projectLanguage, StatType statType)
 {
     return(this.GetNativeCount(projectLanguage, statType)
            - this.GetStatValue(projectLanguage, LangStatus.BestGuess, statType, true)
            - this.GetStatValue(projectLanguage, LangStatus.AutoTranslated, statType, true)
            - this.GetStatValue(projectLanguage, LangStatus.Translated, statType, true)
            - this.GetStatValue(projectLanguage, LangStatus.ForReview, statType, true)
            - this.GetStatValue(projectLanguage, LangStatus.Completed, statType, true));
 }
        private LangCount GetLanguageCountByLanguageStatus(IProjectLanguage projectLanguage, LangStatus langStatus)
        {
            var langCount = projectLanguage.CountByStatus.FirstOrDefault(x => x.Item1 == langStatus);

            if (langCount != default)
            {
                return(langCount.Item2);
            }

            return(default);
Example #3
0
        private string ToXml(IProjectLanguage projectLanguage)
        {
            // ToDo: NotTranslated berechnen aus "Native" - alle anderen
            var stringBuilder = new StringBuilder();

            foreach (var(languageStatus, langCount) in projectLanguage.CountByStatus.OrderBy(x => x.Item1))
            {
                stringBuilder.AppendLine($"<language id=\"{projectLanguage.Language}\" status=\"{(int)languageStatus}\" statusText=\"{languageStatus}\" strings=\"{langCount.StringCount}\" words=\"{langCount.WordCount}\" invalidstrings=\"{langCount.InvalidStringCount}\" invalidwords=\"{langCount.InvalidWordCount}\" />");
            }

            return(stringBuilder.ToString());
        }
 private int GetNativeCount(IProjectLanguage projectLanguage, StatType statType)
 {
     return(statType == StatType.Strings ? projectLanguage.NativeStringCount : projectLanguage.NativeWordCount);
 }