<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

    <?include variables.wxi ?>

    <Fragment Id="TranslationsFragment">

        <DirectoryRef Id='INSTALLDIR'>

            <!--
            Each language requires 6 *.qm files to work properly.
            
            The list of the required files:
                - qt_<language_code>.qm
                - qtbase_<language_code>.qm
                - qtmultimedia_<language_code>.qm
                - qtscript_<language_code>.qm
                - qtxmlpatterns_<language_code>.qm

            Notes:
                - Arabic is missing "qtxmlpatterns_ar.qm" but seems to work without a problem.

                - Chinese (China), Chinese (Taiwan), and Portuguese have only one file (qt_<language_code>.qm), so
                  the default buttons are not translated for these languages.

                - Turkish language doesn't have any *.qm files at all, so no default buttons translation also.
            -->

            <Directory Id="translations" Name="translations">

                <!-- Arabic -->
                <Component><File Source="$(var.QtPath)\translations\qt_ar.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_ar.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_ar.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_ar.qm" /></Component>

                <!-- Chinese (China) -->
                <Component><File Source="$(var.QtPath)\translations\qt_zh_CN.qm" /></Component>

                <!-- Chinese (Taiwan) -->
                <Component><File Source="$(var.QtPath)\translations\qt_zh_TW.qm" /></Component>

                <!-- Czech -->
                <Component><File Source="$(var.QtPath)\translations\qt_cs.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_cs.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_cs.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_cs.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_cs.qm" /></Component>

                <!-- English (United Kingdom) -->
                <Component><File Source="$(var.QtPath)\translations\qt_en.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_en.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_en.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_en.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_en.qm" /></Component>

                <!-- French -->
                <Component><File Source="$(var.QtPath)\translations\qt_fr.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_fr.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_fr.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_fr.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_fr.qm" /></Component>

                <!-- German -->
                <Component><File Source="$(var.QtPath)\translations\qt_de.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_de.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_de.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_de.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_de.qm" /></Component>

                <!-- Italian -->
                <Component><File Source="$(var.QtPath)\translations\qt_it.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_it.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_it.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_it.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_it.qm" /></Component>
                
                <!-- Japanese -->
                <Component><File Source="$(var.QtPath)\translations\qt_ja.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_ja.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_ja.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_ja.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_ja.qm" /></Component>

                <!-- Korean -->
                <Component><File Source="$(var.QtPath)\translations\qt_ko.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_ko.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_ko.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_ko.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_ko.qm" /></Component>

                <!-- Polish -->
                <Component><File Source="$(var.QtPath)\translations\qt_pl.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_pl.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_pl.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_pl.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_pl.qm" /></Component>

                <!-- Brazilian Portuguese -->
                <Component><File Source="$(var.QtPath)\translations\qt_pt_BR.qm" /></Component>

                <!-- Russian -->
                <Component><File Source="$(var.QtPath)\translations\qt_ru.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_ru.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_ru.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_ru.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_ru.qm" /></Component>

                <!-- Spanish -->
                <Component><File Source="$(var.QtPath)\translations\qt_es.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_es.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_es.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_es.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_es.qm" /></Component>

                <!-- Turkish -->

                <!-- Ukrainian -->
                <Component><File Source="$(var.QtPath)\translations\qt_uk.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtbase_uk.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtmultimedia_uk.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtscript_uk.qm" /></Component>
                <Component><File Source="$(var.QtPath)\translations\qtxmlpatterns_uk.qm" /></Component>

            </Directory>

        </DirectoryRef>

        <ComponentGroup Id="TranslationsGroup">

            <!-- Arabic -->
            <ComponentRef Id="qt_ar.qm" />
            <ComponentRef Id="qtbase_ar.qm" />
            <ComponentRef Id="qtmultimedia_ar.qm" />
            <ComponentRef Id="qtscript_ar.qm" />

            <!-- Chinese (China) -->
            <ComponentRef Id="qt_zh_CN.qm" />

            <!-- Chinese (Taiwan) -->
            <ComponentRef Id="qt_zh_TW.qm" />

            <!-- Czech -->
            <ComponentRef Id="qt_cs.qm" />
            <ComponentRef Id="qtbase_cs.qm" />
            <ComponentRef Id="qtmultimedia_cs.qm" />
            <ComponentRef Id="qtscript_cs.qm" />
            <ComponentRef Id="qtxmlpatterns_cs.qm" />

            <!-- English (United Kingdom) -->
            <ComponentRef Id="qt_en.qm" />
            <ComponentRef Id="qtbase_en.qm" />
            <ComponentRef Id="qtmultimedia_en.qm" />
            <ComponentRef Id="qtscript_en.qm" />
            <ComponentRef Id="qtxmlpatterns_en.qm" />

            <!-- French -->
            <ComponentRef Id="qt_fr.qm" />
            <ComponentRef Id="qtbase_fr.qm" />
            <ComponentRef Id="qtmultimedia_fr.qm" />
            <ComponentRef Id="qtscript_fr.qm" />
            <ComponentRef Id="qtxmlpatterns_fr.qm" />

            <!-- German -->
            <ComponentRef Id="qt_de.qm" />
            <ComponentRef Id="qtbase_de.qm" />
            <ComponentRef Id="qtmultimedia_de.qm" />
            <ComponentRef Id="qtscript_de.qm" />
            <ComponentRef Id="qtxmlpatterns_de.qm" />

            <!-- Italian -->
            <ComponentRef Id="qt_it.qm" />
            <ComponentRef Id="qtbase_it.qm" />
            <ComponentRef Id="qtmultimedia_it.qm" />
            <ComponentRef Id="qtscript_it.qm" />
            <ComponentRef Id="qtxmlpatterns_it.qm" />

            <!-- Japanese -->
            <ComponentRef Id="qt_ja.qm" />
            <ComponentRef Id="qtbase_ja.qm" />
            <ComponentRef Id="qtmultimedia_ja.qm" />
            <ComponentRef Id="qtscript_ja.qm" />
            <ComponentRef Id="qtxmlpatterns_ja.qm" />

            <!-- Korean -->
            <ComponentRef Id="qt_ko.qm" />
            <ComponentRef Id="qtbase_ko.qm" />
            <ComponentRef Id="qtmultimedia_ko.qm" />
            <ComponentRef Id="qtscript_ko.qm" />
            <ComponentRef Id="qtxmlpatterns_ko.qm" />

            <!-- Polish -->
            <ComponentRef Id="qt_pl.qm" />
            <ComponentRef Id="qtbase_pl.qm" />
            <ComponentRef Id="qtmultimedia_pl.qm" />
            <ComponentRef Id="qtscript_pl.qm" />
            <ComponentRef Id="qtxmlpatterns_pl.qm" />

            <!-- Brazilian Portuguese -->
            <ComponentRef Id="qt_pt_BR.qm" />

            <!-- Russian -->
            <ComponentRef Id="qt_ru.qm" />
            <ComponentRef Id="qtbase_ru.qm" />
            <ComponentRef Id="qtmultimedia_ru.qm" />
            <ComponentRef Id="qtscript_ru.qm" />
            <ComponentRef Id="qtxmlpatterns_ru.qm" />

            <!-- Spanish -->
            <ComponentRef Id="qt_es.qm" />
            <ComponentRef Id="qtbase_es.qm" />
            <ComponentRef Id="qtmultimedia_es.qm" />
            <ComponentRef Id="qtscript_es.qm" />
            <ComponentRef Id="qtxmlpatterns_es.qm" />

            <!-- Turkish -->

            <!-- Ukrainian -->
            <ComponentRef Id="qt_uk.qm" />
            <ComponentRef Id="qtbase_uk.qm" />
            <ComponentRef Id="qtmultimedia_uk.qm" />
            <ComponentRef Id="qtscript_uk.qm" />
            <ComponentRef Id="qtxmlpatterns_uk.qm" />

        </ComponentGroup>

    </Fragment>

</Wix>
