Loading ...
Sorry, an error occurred while loading the content.

Re: [dxgettext] Backslash removed by dxgettext

Expand Messages
  • Lars Dybdahl
    ... Hash: SHA1 ... Not to my knowledge - could you please post this as a bug report at http://sourceforge.net/tracker/?group_id=74086&atid=539908 ? Lars. - --
    Message 1 of 7 , May 27, 2004
    View Source
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Torsdag den 27. maj 2004 22:11 skrev yahoo@...:
      > I am looking into using dxgettext with BCB6. I have an rc file with
      > text strings in. Some of them have a backslash to indicate an
      > escape sequence, for example "Line1\nLine2". But dxgettext converts
      > this to "Line1nLine2" where the backslash is removed. Is this by
      > intention?

      Not to my knowledge - could you please post this as a bug report at
      http://sourceforge.net/tracker/?group_id=74086&atid=539908 ?

      Lars.

      - --

      Dybdahl Engineering
      Tlf.: 70201241 (08:00-17:30)
      Fax.: 70201242
      Mobil: 20331241
      http://dybdahl.dk/
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.2.4 (GNU/Linux)

      iD8DBQFAtlan54sHDEeNGSIRAuf1AJ46IlQ9eAQOYcGghIs03GQz/W30QQCfVZft
      avq+44yzwmiCFf2c8c7/m88=
      =MHz6
      -----END PGP SIGNATURE-----
    • Rik Barker
      Hi, We re in the process of finishing off internationalising an application - it s going to be supported entirely from England, so I want to keep any potential
      Message 2 of 7 , Jun 3, 2004
      View Source
      • 0 Attachment
        Hi,

        We're in the process of finishing off internationalising an application - it's going to be supported entirely from England, so I want to keep any potential untrapped error messages in English.

        We always rename the mo file to match the name of the application.  In this case, I need some resource strings translated (Yes and No in message boxes for instance), but I don't want the entire inner workings of Delphi translated.

        What I've done is add the resource string translations that I do need into my MO file, and then call this in code:

           TextDomain('MyAppName');
           AddDomainForResourceString('MyAppName');

        I've checked the code and there doesn't seem to be any real reason not to do that, although there's obviously duplication.

        Is there any reason I shouldn't continue to do this?

        Cheers,
        Rik

      • Lars B. Dybdahl
        ... Hash: SHA1 ... Yes - the current text domain also applies to the resourcestrings - the AddDomainForResourceString is only there to make it possible to add
        Message 3 of 7 , Jun 4, 2004
        View Source
        • 0 Attachment
          -----BEGIN PGP SIGNED MESSAGE-----
          Hash: SHA1

          Torsdag den 3. juni 2004 16:07 skrev Rik Barker:
          > What I've done is add the resource string translations that I do
          > need into my MO file, and then call this in code:
          > TextDomain('MyAppName');
          > AddDomainForResourceString('MyAppName');
          > I've checked the code and there doesn't seem to be any real reason
          > not to do that, although there's obviously duplication.

          Yes - the current text domain also applies to the resourcestrings -
          the AddDomainForResourceString is only there to make it possible to
          add extra domains for resourcestring conversions.

          Lars.

          - --

          Mobil: 20331241
          Evt.: 70201241
          Fax.: 70201242

          My public GnuPG key: http://dybdahl.dk/lars/gpg/
          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1.2.4 (GNU/Linux)

          iD8DBQFAwGZD54sHDEeNGSIRArGAAJ0dG26CfbWjwzy1mz28ekv3QtokIwCfS2qp
          TNXxmgrvMJQ+2I8Z2OnvrgQ=
          =sXb4
          -----END PGP SIGNATURE-----
        • Rik Barker
          Hi, ... So you re saying that just TextDomain( NameOfMoFile ) would be enough to include the resource strings? That s not backed up by my tests - they were
          Message 4 of 7 , Jun 4, 2004
          View Source
          • 0 Attachment
            Hi,

            Yes - the current text domain also applies to the resourcestrings -
            the AddDomainForResourceString is only there to make it possible to
            add extra domains for resourcestring conversions.

            So you're saying that just TextDomain('NameOfMoFile') would be enough to include the resource strings? 

            That's not backed up by my tests - they were only translating resourcestrings once I also added used AddDomainForResourceString.



          • Lars B. Dybdahl
            ... Hash: SHA1 ... Well - basically try it out. I would have to consult the documentation or the source code to tell you for sure - and you have got both, too
            Message 5 of 7 , Jun 4, 2004
            View Source
            • 0 Attachment
              -----BEGIN PGP SIGNED MESSAGE-----
              Hash: SHA1

              Fredag den 4. juni 2004 14:16 skrev Rik Barker:
              > So you're saying that just TextDomain('NameOfMoFile') would be
              > enough to include the resource strings?

              Well - basically try it out. I would have to consult the documentation
              or the source code to tell you for sure - and you have got both,
              too :-)

              Lars.

              - --

              Mobil: 20331241
              Evt.: 70201241
              Fax.: 70201242

              My public GnuPG key: http://dybdahl.dk/lars/gpg/
              -----BEGIN PGP SIGNATURE-----
              Version: GnuPG v1.2.4 (GNU/Linux)

              iD8DBQFAwHgF54sHDEeNGSIRAtreAKCgTmvrN6uuxB98kGdLGkuXJx1GjACfZQH3
              2xbgePPoICGB3U+nzwIM24U=
              =iLXS
              -----END PGP SIGNATURE-----
            • Rik Barker
              ... I did and I have. I ve just noticed why you think it s one way and I think it s another... In the Initialization section of gnugettext.pas you have:
              Message 6 of 7 , Jun 4, 2004
              View Source
              • 0 Attachment
                Well - basically try it out. I would have to consult the documentation or the source code to tell you for sure - and you have got both, too :-)

                <g>  I did and I have.  I've just noticed why you think it's one way and I think it's another...

                In the Initialization section of gnugettext.pas you have:
                  ResourceStringDomainList.Add(DefaultTextDomain);

                So it will automatically include resource strings from a domain called "default", but since our Text domain is renamed to match the name of the product, that won't do it for us.

                So, if the domain is called 'default' it will check for resourcestrings in itself by default, whereas if the text domain is renamed, then it will need to be explicitly added with AddDomainForResourceString

                Oh, incidentally - we've got Delphi 7 here now, so I'll fix up the changes I made to ggdxgettext and check it in as a patch for your consideration.

                Cheers,
                Rik
              Your message has been successfully submitted and would be delivered to recipients shortly.