Skip to content

Crowdin Files Segmentation rules

Wilco Alsemgeest edited this page Jul 24, 2021 · 3 revisions

com_finder_commonwords.txt

https://github.com/joomla/core-translations/blob/main/joomla_v4/source/language/en-GB/com_finder.commonwords.txt

This segmentation makes sure that all lines starting with ; are a string and the whole block of words are also one string.

<?xml version="1.0" encoding="UTF-8"?>
<srx version="2.0" 
	xmlns="http://www.lisa.org/srx20"
	xsi:schemaLocation="http://www.lisa.org/srx20 srx20.xsd"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <header segmentsubflows="yes" cascade="yes">
        <formathandle type="start" include="no"/>
        <formathandle type="end" include="yes"/>
        <formathandle type="isolated" include="yes"/>
    </header>
    <body>
        <languagerules>
            <languagerule languagerulename="Default">
                <!-- Common rules for most languages -->
                <rule break="yes">
                    <beforebreak>^;.*</beforebreak>
                    <afterbreak>\s</afterbreak>
                </rule>
            </languagerule>
        </languagerules>
        <maprules>
            <languagemap languagepattern=".*" languagerulename="Default"/>
        </maprules>
    </body>
</srx>

localise.txt (php)

<?xml version="1.0" encoding="UTF-8"?>
<srx version="2.0" 
	xmlns="http://www.lisa.org/srx20"
	xsi:schemaLocation="http://www.lisa.org/srx20 srx20.xsd"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <header segmentsubflows="yes" cascade="yes">
        <formathandle type="start" include="no"/>
        <formathandle type="end" include="yes"/>
        <formathandle type="isolated" include="yes"/>
    </header>
    <body>
        <languagerules>
            <languagerule languagerulename="Default">
                <!-- Common rules for most languages -->
                <rule break="yes">
                    <beforebreak>^p?.*\n.*\n.*\n.*\n(.*)\n?(.*)LICENSE.txt\n?.*</beforebreak>
                    <afterbreak>\s</afterbreak>
                </rule>
                <rule break="yes">
                    <beforebreak>[d].*\n.*\n.*\n.*\n.*\n.*\n.\*.</beforebreak>
                    <afterbreak>\s</afterbreak>
                </rule>
            </languagerule>
        </languagerules>
        <maprules>
            <languagemap languagepattern=".*" languagerulename="Default"/>
        </maprules>
    </body>
</srx>