<html>
  <head>
    <meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Dear Jean-Christophe Fillion-Robin!<br>
      <br>
      Thank you very much for your attention. But I do not have a
      problem with CREATE. I have problem with UPDATE, actually with
      QTx_CREATE_TRANSLATION. QTx_CREATE_TRANSLATION uses
      add_custom_command which forces to delete the original updated
      SOURCE ts file during clean:<br>
      <br>
      - get sources<br>
      - change sources<br>
      - build (build calls lupdate to update ts files)<br>
      - add translation to existing ts files<br>
      - "make clean" deletes all ts files with your translations<br>
      <br>
      Have you understood the core of problem? <br>
      <br>
      Here <a class="moz-txt-link-freetext" href="https://bugreports.qt-project.org/browse/QTBUG-31860">https://bugreports.qt-project.org/browse/QTBUG-31860</a> and here
      <a class="moz-txt-link-freetext" href="http://cmake.3232098.n2.nabble.com/How-to-not-delete-generated-files-on-make-clean-td4425991.html">http://cmake.3232098.n2.nabble.com/How-to-not-delete-generated-files-on-make-clean-td4425991.html</a>
      you can find details. <br>
      <br>
      Thank you for your time!<br>
      <br>
      BR, <br>
      Anatoly Shirokov.<br>
      <br>
      27.02.2014 9:01, Jean-Christophe Fillion-Robin пишет:<br>
    </div>
    <blockquote
cite="mid:CANLz8R4pHQijRooOWBt-JXjcKR0UM+VjaDs8+oqhf=xB8Km7KQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Hi Anatoly, <br>
                <br>
              </div>
              Within Slicer [1], we addressed the creation / updates of
              the translation files by introducing a variable named
              Slicer_UPDATE_TRANSLATION  [2]<br>
              <br>
            </div>
            Then, within a macro named 'SlicerMacroTranslation.cmake'
            [3], depending on the value of Slicer_UPDATE_TRANSLATION, we
            either call <br>
            <br>
               (1) QT4_CREATE_TRANSLATION<br>
            <br>
          </div>
             or (2) QT4_ADD_TRANSLATION<br>
        </div>
        <div><br>
        </div>
        The convenience macro is then called for each executables and
        libraries we want to translate. See [4] and [5]<br>
        <div><br>
        </div>
        <div>These pointers should help you moving forward. <br>
          <br>
        </div>
        <div>The documentation of the Qt macros is available here [6]<br>
          <br>
          Note also that the translations file are created/updated
          within the source tree. That way, it is easy to commit them.<br>
        </div>
        <div><br>
        </div>
        <div>Hth<br>
        </div>
        <div>Jc<br>
        </div>
        <div>
          <div>
            <div>
              <div><br>
                [1] <a moz-do-not-send="true"
href="http://wiki.slicer.org/slicerWiki/index.php/Documentation/Labs/I18N">http://wiki.slicer.org/slicerWiki/index.php/Documentation/Labs/I18N</a><br>
                <br>
                [2] <a moz-do-not-send="true"
href="https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/CMakeLists.txt#L247">https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/CMakeLists.txt#L247</a><br>
                <br>
                [3] <a moz-do-not-send="true"
href="https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/CMake/SlicerMacroTranslation.cmake#L21-38">https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/CMake/SlicerMacroTranslation.cmake#L21-38</a><br>
                <br>
                [4] <a moz-do-not-send="true"
href="https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/Applications/SlicerApp/CMakeLists.txt#L77-98">https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/Applications/SlicerApp/CMakeLists.txt#L77-98</a><br>
                <br>
                [5] <a moz-do-not-send="true"
href="https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/CMake/SlicerMacroBuildBaseQtLibrary.cmake#L175-193">https://github.com/Slicer/Slicer/blob/0dc6eab31c69f859db46a57d3c12ef6a2119f188/CMake/SlicerMacroBuildBaseQtLibrary.cmake#L175-193</a><br>
                <br>
                [6] <a moz-do-not-send="true"
                  href="http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:FindQt4">http://www.cmake.org/cmake/help/v2.8.12/cmake.html#module:FindQt4</a><br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">
          On Wed, Feb 26, 2014 at 11:24 PM, Anatoly Shirokov <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:shirokov_a@mail.ru" target="_blank">shirokov_a@mail.ru</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div style="font-family:-moz-fixed;font-size:14px"
                lang="x-unicode">Please see my comments below <br>
                <br>
                27.02.2014 1:08, Stephen Kelly пишет: <br>
                <div class="">
                  <blockquote type="cite" style="">Anatoly Shirokov
                    wrote: <br>
                    <br>
                    <blockquote type="cite" style="">The translation
                      file is usual source file, it is not binary
                      artifact. <br>
                    </blockquote>
                    I didn't say it was a binary artifact. It's a
                    buildsystem artifact created <br>
                    by your buildsystem. <br>
                  </blockquote>
                </div>
                This is source which can be updated by build system. But
                initially this is source file was made by myself for
                each supported languages and put it to repository. <br>
                <div class="">
                  <blockquote type="cite" style="">
                    <blockquote type="cite" style="">The only difference
                      is that I have to support them in up to date state
                      <br>
                      with the lupdate utility. <br>
                    </blockquote>
                    Yes. <br>
                    <br>
                    <blockquote type="cite" style="">I want to invoke
                      lupdate automatically during <br>
                      build and after that commit updated translation
                      files to use them by <br>
                      translator group. <br>
                    </blockquote>
                    That seems fine. <br>
                    <br>
                    <blockquote type="cite" style="">What's wrong with
                      such approach? <br>
                    </blockquote>
                    Maybe the details of your approach are too simple.
                    If you commit the <br>
                    translation files resulting from your build to your
                    repo, then how did you <br>
                    lose work? <br>
                  </blockquote>
                </div>
                1. get sources <br>
                2. update sources <br>
                3. build to update translation files <br>
                4. translate new items extracted during the last build
                (we can translate to several languages ourself) <br>
                5. make clean to build whole system (and I lose all
                translated items) <br>
                6. commit <br>
                ... <br>
                N. get sources <br>
                N+1. ops, where are my translated items? <br>
                <br>
                Actually it was several times. <br>
                <br>
                BR, <br>
                Anatoly Shirokov <br>
                <br>
              </div>
            </div>
            <br>
            --<br>
            <br>
            Powered by <a moz-do-not-send="true"
              href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
            <br>
            Please keep messages on-topic and check the CMake FAQ at: <a
              moz-do-not-send="true"
              href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
            <br>
            Kitware offers various services to support the CMake
            community. For more information on each offering, please
            visit:<br>
            <br>
            CMake Support: <a moz-do-not-send="true"
              href="http://cmake.org/cmake/help/support.html"
              target="_blank">http://cmake.org/cmake/help/support.html</a><br>
            CMake Consulting: <a moz-do-not-send="true"
              href="http://cmake.org/cmake/help/consulting.html"
              target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
            CMake Training Courses: <a moz-do-not-send="true"
              href="http://cmake.org/cmake/help/training.html"
              target="_blank">http://cmake.org/cmake/help/training.html</a><br>
            <br>
            Visit other Kitware open-source projects at <a
              moz-do-not-send="true"
              href="http://www.kitware.com/opensource/opensource.html"
              target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
            <br>
            Follow this link to subscribe/unsubscribe:<br>
            <a moz-do-not-send="true"
              href="http://www.cmake.org/mailman/listinfo/cmake"
              target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        +1 919 869 8849<br>
      </div>
    </blockquote>
    <br>
  </body>
</html>