Package org.zanata.common

Examples of org.zanata.common.LocaleId


        dontExpectTarget1a();
    }

    @Test
    public void generatedPoHeaders() throws Exception {
        LocaleId de_DE = new LocaleId("de");
        getZero();
        publishTranslations(); // push some translations (with no headers)
        // Get the translations with PO headers
        ClientResponse<TranslationsResource> response =
                transResource.getTranslations("my.txt", de_DE, new StringSet(
View Full Code Here


        }
    }

    @Test
    public void headersBeforeTranslating() throws Exception {
        LocaleId de_DE = new LocaleId("de");
        getZero();

        // Push a document with no translations
        createResourceWithContentUsingPut();
View Full Code Here

        }
    }

    @Test
    public void headersFromOriginalPush() throws Exception {
        LocaleId de_DE = new LocaleId("de");
        getZero();

        // Push a document and its translations
        createResourceWithContentUsingPut();
View Full Code Here

        }
    }

    @Test
    public void headersAfterTranslating() throws Exception {
        LocaleId de_DE = new LocaleId("de");
        getZero();

        // Push a document and its translations
        createResourceWithContentUsingPut();
View Full Code Here

    // TODO This test is randomly failing. It should be replaced with an
    // Arquillian integration test where
    // multiple transactions can be reliably tested.
    @Test(enabled = false)
    public void headersAfterWebtransEdit() throws Exception {
        LocaleId de_de = new LocaleId("de");
        getZero();

        // Push a document with no translations
        createResourceWithContentUsingPut();
View Full Code Here

    }

    @Test
    public void testGetAllSupportedLanguages() {
        List<HLocale> lan = new ArrayList<HLocale>();
        lan.add(new HLocale(new LocaleId("as-IN")));
        lan.add(new HLocale(new LocaleId("pt-BR")));
        when(localeDAO.findAll()).thenReturn(lan);
        List<HLocale> sup = testLocaleServiceImpl.getAllLocales();
        Assert.assertEquals(sup.size(), 2);
        String loc1 = sup.get(0).getLocaleId().getId();
        Assert.assertEquals(loc1, "as-IN");
View Full Code Here

        HTextFlowTarget target1 = textFlowTargetDAO.findById(5L);

        // Initial state = new (en-us)
        HTextFlowTarget target2 = textFlowTargetDAO.findById(6L);

        LocaleId localeId = target1.getLocaleId(); // same as target2

        int wordCount1 = target1.getTextFlow().getWordCount().intValue();
        int wordCount2 = target2.getTextFlow().getWordCount().intValue();

        // new -> approved
View Full Code Here

    }

    public void getStatisticTest() throws Exception {

        Long projectIterationId = 1L;
        LocaleId localeId = LocaleId.EN_US;
        VersionLocaleKey key = new VersionLocaleKey(projectIterationId, localeId);

        WordStatistic wordStatistic = new WordStatistic(0, 11, 100, 4, 500);

        // When:
View Full Code Here

        versionGroupServiceImpl = seam.autowire(VersionGroupServiceImpl.class);
    }

    @Test
    public void getLocaleStatisticTest1() {
        LocaleId localeId = LocaleId.DE;

        Map<VersionLocaleKey, WordStatistic> result =
                versionGroupServiceImpl.getLocaleStatistic(GROUP1_SLUG,
                        localeId);
View Full Code Here

        assertThat(result.size(), equalTo(3));
    }

    @Test
    public void getLocaleStatisticTest2() {
        LocaleId localeId = LocaleId.DE;

        Map<VersionLocaleKey, WordStatistic> result =
                versionGroupServiceImpl.getLocaleStatistic(GROUP2_SLUG,
                        localeId);
View Full Code Here

TOP

Related Classes of org.zanata.common.LocaleId

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.