Package org.zanata.common

Examples of org.zanata.common.BaseTranslationCount


        for (Object[] entry : data) {
            int count = ((BigDecimal) entry[0]).intValue();
            ContentState state = ContentState.values()[(int) entry[1]];
            LocaleId localeId = new LocaleId(entry[2].toString());

            BaseTranslationCount stats;
            if (localeStatistics.containsKey(localeId)) {
                stats = localeStatistics.get(localeId);
            } else {
                stats = new BaseTranslationCount(0,0,0,0,0);
            }
            stats.set(state, count);
            localeStatistics.put(localeId, stats);
        }

        ContributionStatistics result = new ContributionStatistics();
        result.put(username, localeStatistics);
View Full Code Here


        ContributionStatistics initialStats =
                statisticsService.getContributionStatistics(
                        "sample-project", "1.0", username, todayDate + ".."
                                + todayDate);

        BaseTranslationCount stats =
                initialStats.get(username).get(target.getLocaleId());

        // Should have no stats for user on today
        assertNull(stats);
View Full Code Here

        target2 = executeStateChangeTest(target2, "test1",
                newState, demoPerson, expectedStats);

        // approved -> needReview
        newState = ContentState.NeedReview;
        BaseTranslationCount localeStat = expectedStats.get(username)
                .get(target1.getLocaleId());
        localeStat.set(newState, localeStat.get(newState) + wordCount1);
        target1 = executeStateChangeTest(target1, "test2",
                newState, demoPerson, expectedStats);

        localeStat = expectedStats.get(username).get(target2.getLocaleId());
        localeStat.set(newState, localeStat.get(newState) + wordCount2);
        target2 = executeStateChangeTest(target2, "test2",
                newState, demoPerson, expectedStats);

    }
View Full Code Here

TOP

Related Classes of org.zanata.common.BaseTranslationCount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.