<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 08/06/16 07:15, Stian Thorgersen
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAJgngAfYZ87ShjBAxC2w32QsdLhd2p0ih93Ht9T5nr=_CrE-2w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>I sent a separate mail to dev mailing list about moving
          translations out of the main repository.<br>
        </div>
        <div><br>
        </div>
        <div>Marek - having a tool would be great, but I'm worried about
          how much effort it would be, unless there's something out
          there already.</div>
      </div>
    </blockquote>
    Working with the property files and CRUD operations around
    properties is quite an easy task. <br>
    <br>
    A bit more challenging is checking git history. However I've tried
    some playing with jgit [1] and it works fine to read the git history
    of some file and see the diff of changes, which are newer than some
    particular timestamp. So the fact that translation messages will be
    in different repository than messages_en.properties is not an issue.
    Translator can then just run something like:<br>
    <br>
    mvn exec:java -Ptranslate
    -Dmessages_en.location=&lt;path_to_messages_en_inside_keycloak_sources&gt;
-Dmessages_es.location=&lt;path_to_messages_es_inside_translations_repository&gt;<br>
    <br>
    The disadvantage is, that translator will need sources of both
    keycloak repository with english locale and the translations
    repository, so tool is able to read git history. However I am not
    seeing very big issue, as currently all translators needs to have
    keycloak sources anyway to being able to send PRs.<br>
    <br>
    My guess to do some tool like that could be around 2 working days.<br>
    <br>
    [1] <a class="moz-txt-link-freetext" href="https://www.javacodegeeks.com/2015/12/getting-started-jgit.html">https://www.javacodegeeks.com/2015/12/getting-started-jgit.html</a><br>
    <br>
    Marek<br>
    <blockquote
cite="mid:CAJgngAfYZ87ShjBAxC2w32QsdLhd2p0ih93Ht9T5nr=_CrE-2w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thomas - for now you can send a PR to main repository with
          the translation if you are happy to be maintainer for the
          translation.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 7 June 2016 at 09:08, Marek Posolda
          <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Not directly related, but IMO we can potentially
                improve the experience for translators/maintainers and
                create some tool, which will simplify their work. This
                can result in better experience for them and hence more
                contributions for more languages.<br>
                <br>
                IMO it is currently a bit of pain to maintain the
                translation and manually check if there were some recent
                changes in english file "messages_en.properties" and
                then adding/updating them to my locale (assume it's
                messages_es.properties) . So I am wondering that we will
                have a tool (or maybe we can reuse some already existing
                tool), which will:<br>
                <br>
                - Check the last github revision of my
                "messages_es.properties" file. Let's assume this is
                revision XY<br>
                - Then check english locale file
                "messages_en.properties" and look for all the commits
                newer than XY<br>
                - The tool will automatically remove all the keys from
                "messages_es.properties", which were in the meantime
                removed from "messages_en.properties"<br>
                - Then tool will create/update the key/value pairs in
                "messages_es.properties" for all the keys, which were
                added or updated in the meantime in
                "messages_en.properties" . <br>
                <br>
                So assume that in messages_en.properties you added the
                key:<br>
                <br>
                greetings.key=hello<br>
                <br>
                then in messages_es.properties, the tool will generate
                something like:<br>
                <br>
                greetings.key=&lt;TRANSLATE_ME&gt; hello<br>
                <br>
                <br>
                So the translator will be just required to check the
                keys with &lt;TRANSLATE_ME&gt; and translate them to his
                language like:<br>
                <br>
                greetings.key=buenos dias<br>
                <br>
                Note that translator doesn't need to manually check what
                was added or updated in the meantime. He is also not
                required to continuously switch between
                messages_en.properties and messages_es.properties and
                compare what is the english translation for
                "greetings.key" etc.<br>
                <br>
                Having separate repositories will be good, on the other
                hand it may complicate things if we want to have some
                tool like I mentioned above (but maybe not, if it's able
                to work with times of commits).<span class="HOEnZb"><font
                    color="#888888"><br>
                    <br>
                    Marek</font></span>
                <div>
                  <div class="h5"><br>
                    <br>
                    On 06/06/16 08:14, Thomas Raehalme wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">
                      <p dir="ltr">How about making translations
                        deployable in a similar way as themes? The base
                        theme would define the required set of keys
                        which each translation should include. You could
                        even write tests to make sure the translation is
                        complete which would simplify maintenance.</p>
                      <p>Perhaps the main distribution could include
                        only English as it would now be simple for the
                        admins to deploy the needed translations. If the
                        translations are separated from the main
                        Keycloak repository, as you suggested, then the
                        main repository would not be dependant of
                        up-to-date translations (which could slow the
                        development down if they start lagging behind).
                        For the same reason it could also be beneficial
                        to be able to release translations independently
                        from each other.<br>
                      </p>
                      <p dir="ltr">Themes would still need a way to
                        include custom/override messages but they could
                        be included directly in the theme just like now.</p>
                      <p>Just an initial thought....</p>
                      <p dir="ltr">Best regards,<br>
                        Thomas </p>
                      <p dir="ltr"><br>
                      </p>
                      <div class="gmail_quote">On Jun 3, 2016 14:34,
                        "Stian Thorgersen" &lt;<a moz-do-not-send="true"
                          href="mailto:sthorger@redhat.com"
                          target="_blank">sthorger@redhat.com</a>&gt;
                        wrote:<br type="attribution">
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div dir="ltr">We need to find a way to share
                            translations that scales. We're not able to
                            maintain all these translations ourselves so
                            I'm considering adding some external
                            repository for the translations and have
                            elect a maintainer for each language.
                            <div><br>
                            </div>
                            <div>Does anyone have a good suggestion how
                              to deal with this?</div>
                          </div>
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">On 31 May 2016 at
                              12:01, Thomas Raehalme <span dir="ltr">&lt;<a
                                  moz-do-not-send="true"
                                  href="mailto:thomas.raehalme@aitiofinland.com"
                                  target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:thomas.raehalme@aitiofinland.com">thomas.raehalme@aitiofinland.com</a></a>&gt;</span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">
                                <div dir="ltr">Hi!
                                  <div><br>
                                  </div>
                                  <div>We need to translate Keycloak
                                    user interface (excluding admin
                                    console) to the Swedish language. I
                                    was wondering if anyone has already
                                    done the translation and would be
                                    willing to share it?</div>
                                  <div><br>
                                  </div>
                                  <div>We have already translated
                                    Keycloak to Finnish and hope to
                                    share the translation with the
                                    community in the near future.</div>
                                  <div><br>
                                  </div>
                                  <div>Best regards,</div>
                                  <div>Thomas</div>
                                </div>
                                <br>
_______________________________________________<br>
                                keycloak-user mailing list<br>
                                <a moz-do-not-send="true"
                                  href="mailto:keycloak-user@lists.jboss.org"
                                  target="_blank">keycloak-user@lists.jboss.org</a><br>
                                <a moz-do-not-send="true"
                                  href="https://lists.jboss.org/mailman/listinfo/keycloak-user"
                                  rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
keycloak-user mailing list
<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>