contrib/wix/locale.wxs
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sun, 06 Jun 2010 17:20:10 +0900
changeset 11297 d320e70442a5
parent 10930 230ab9a23594
child 13042 bd9bc4123920
permissions -rw-r--r--
replace Python standard textwrap by MBCS sensitive one for i18n text Mercurial has problem around text wrapping/filling in MBCS encoding environment, because standard 'textwrap' module of Python can not treat it correctly. It splits byte sequence for one character into two lines. According to unicode specification, "east asian width" classifies characters into: W(ide), N(arrow), F(ull-width), H(alf-width), A(mbiguous) W/N/F/H can be always recognized as 2/1/2/1 bytes in byte sequence, but 'A' can not. Size of 'A' depends on language in which it is used. Unicode specification says: If the context(= language) cannot be established reliably they should be treated as narrow characters by default but many of class 'A' characters are full-width, at least, in Japanese environment. So, this patch treats class 'A' characters as full-width always for safety wrapping. This patch focuses only on MBCS safe-ness, not on writing/printing rule strict wrapping for each languages MBCS sensitive textwrap class is originally implemented by ITO Nobuaki <daydream.trippers@gmail.com>.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10513
47838dee7d60 contrib/wix: switch *.wxs files to LF eol
Adrian Buehlmann <adrian@cadifra.com>
parents: 10502
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
47838dee7d60 contrib/wix: switch *.wxs files to LF eol
Adrian Buehlmann <adrian@cadifra.com>
parents: 10502
diff changeset
     2
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
10828
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     3
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     4
  <?define hglocales =
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     5
    da;de;el;fr;it;ja;pt_BR;sv;zh_CN;zh_TW
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     6
  ?>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     7
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     8
  <Fragment>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
     9
    <ComponentGroup Id="localeFolder">
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    10
      <?foreach LOC in $(var.hglocales) ?>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    11
        <ComponentRef Id="hg.locale.$(var.LOC)"/>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    12
      <?endforeach?>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    13
    </ComponentGroup>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    14
  </Fragment>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    15
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    16
  <Fragment>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    17
    <DirectoryRef Id="INSTALLDIR">
10930
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    18
      <Directory Id="localedir" Name="locale" FileSource="$(var.SourceDir)">
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    19
        <?foreach LOC in $(var.hglocales) ?>
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    20
          <Directory Id="hg.locale.$(var.LOC)" Name="$(var.LOC)">
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    21
            <Directory Id="hg.locale.$(var.LOC).LC_MESSAGES" Name="LC_MESSAGES">
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    22
              <Component Id="hg.locale.$(var.LOC)" Guid="*">
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    23
                <File Id="hg.mo.$(var.LOC)" Name="hg.mo" KeyPath="yes" />
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    24
              </Component>
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    25
            </Directory>
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    26
          </Directory>
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    27
        <?endforeach?>
230ab9a23594 wix updates
Adrian Buehlmann <adrian@cadifra.com>
parents: 10828
diff changeset
    28
      </Directory>
10828
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    29
    </DirectoryRef>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    30
  </Fragment>
1aa9464ce9ae wix: refactor and new guids.wxi
Adrian Buehlmann <adrian@cadifra.com>
parents: 10513
diff changeset
    31
10513
47838dee7d60 contrib/wix: switch *.wxs files to LF eol
Adrian Buehlmann <adrian@cadifra.com>
parents: 10502
diff changeset
    32
</Wix>