<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Thanks for the clarification Debi.<br>
      <br>
      Like most Java applications, properties files are used for the
      key/value pairs.&nbsp; Can your team handle those?<br>
      <br>
      Stan<br>
      <br>
      On 10/12/2015 3:04 PM, Deborah Rieden wrote:<br>
    </div>
    <blockquote
      cite="mid:1112014579.30750358.1444676647629.JavaMail.zimbra@redhat.com"
      type="cite">
      <div style="font-family: times new roman, new york, times, serif;
        font-size: 12pt; color: #000000">
        <div>The translation team will expect the key/value pairs to be
          in a po file.<br>
        </div>
        <div>Developers push this to Zanata.<br>
        </div>
        <div>The translation is done by the globalization team in
          Zanata.<br>
        </div>
        <div>The translated po files are then incorporated into a build.<br>
        </div>
        <div><br>
          The I18N QE team takes the build which has the translated po
          file and does 2 things.<br>
        </div>
        <div>1. They verify that the translated string appears as
          expected.<br>
        </div>
        <div>2. They verify that the translation is appropriate in the
          context in which it is presented.<br>
        </div>
        <div><br>
        </div>
        <div>Hope this helps,<br>
        </div>
        <div>Debi<br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <hr id="zwchr">
        <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"
          data-mce-style="border-left: 2px solid #1010FF; margin-left:
          5px; padding-left: 5px; color: #000; font-weight: normal;
          font-style: normal; text-decoration: none; font-family:
          Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Stian
          Thorgersen" <a class="moz-txt-link-rfc2396E" href="mailto:sthorger@redhat.com">&lt;sthorger@redhat.com&gt;</a><br>
          <b>To: </b>"Stian Thorgersen" <a class="moz-txt-link-rfc2396E" href="mailto:stian@redhat.com">&lt;stian@redhat.com&gt;</a><br>
          <b>Cc: </b>"keycloak-dev"
          <a class="moz-txt-link-rfc2396E" href="mailto:keycloak-dev@lists.jboss.org">&lt;keycloak-dev@lists.jboss.org&gt;</a><br>
          <b>Sent: </b>Friday, October 9, 2015 7:57:54 AM<br>
          <b>Subject: </b>Re: [keycloak-dev] i18n/l10n: English text in
          java code<br>
          <div><br>
          </div>
          <div dir="ltr">Translation team that is</div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On 9 October 2015 at 13:57, Stian
              Thorgersen <span dir="ltr">&lt;<a moz-do-not-send="true"
                  href="mailto:sthorger@redhat.com" target="_blank"
                  data-mce-href="mailto:sthorger@redhat.com">sthorger@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"
                data-mce-style="margin: 0 0 0 .8ex; border-left: 1px
                #ccc solid; padding-left: 1ex;">
                <div dir="ltr">By the way I'm pretty sure our
                  translation theme will take our English bundle and
                  translate it to a language. They won't need to
                  start/stop the server and open the admin console to
                  check that they've translated all keys. They should
                  have a tool/script for that.</div>
                <div class="HOEnZb">
                  <div class="h5">
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On 9 October 2015 at
                        13:56, Stian Thorgersen <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:sthorger@redhat.com"
                            target="_blank"
                            data-mce-href="mailto:sthorger@redhat.com">sthorger@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"
                          data-mce-style="margin: 0 0 0 .8ex;
                          border-left: 1px #ccc solid; padding-left:
                          1ex;">
                          <div dir="ltr"><br>
                            <div class="gmail_extra"><br>
                              <div class="gmail_quote"><span><span>On 9
                                    October 2015 at 13:46, Stan Silvert
                                    <span dir="ltr">&lt;<a
                                        moz-do-not-send="true"
                                        href="mailto:ssilvert@redhat.com"
                                        target="_blank"
                                        data-mce-href="mailto:ssilvert@redhat.com">ssilvert@redhat.com</a>&gt;</span>
                                    wrote:<br>
                                  </span></span>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"
                                  data-mce-style="margin: 0 0 0 .8ex;
                                  border-left: 1px #ccc solid;
                                  padding-left: 1ex;">
                                  <div>
                                    <div>On 10/9/2015 7:32 AM, Stian
                                      Thorgersen wrote:<br>
                                    </div>
                                    <blockquote>
                                      <div dir="ltr">#1 You're not going
                                        to catch all missing keys this
                                        way - as I said there's 2 types,
                                        custom defined as well which
                                        could be missing from default
                                        bundle</div>
                                    </blockquote>
                                    It catches it at load time.&nbsp; As it
                                    loads each bundle, it checks against
                                    the previously loaded bundle.&nbsp; That
                                    will indeed catch all missing keys
                                    in any bundle you try to test.<br>
                                    <br>
                                    I don't know exactly what you mean
                                    by "custom defined".&nbsp; Somehow a
                                    third-party bundle must be merged
                                    with our default bundle.&nbsp; Unless I
                                    completely misunderstand, the code I
                                    wrote will still work.</div>
                                </blockquote>
                                <div><br>
                                </div>
                                <div>New keys can be defined by using
                                  keys in client descriptions, client
                                  names, etc, etc.. These won't be in
                                  our message bundle, but would be in
                                  the bundle in a customers theme. This
                                  is why message bundles inherit from
                                  the parent theme. Custom providers and
                                  themes can further introduce new keys.</div>
                                <div>&nbsp;</div>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"
                                  data-mce-style="margin: 0 0 0 .8ex;
                                  border-left: 1px #ccc solid;
                                  padding-left: 1ex;">
                                  <div><span><span><br>
                                      </span></span>
                                    <blockquote>
                                      <div dir="ltr">
                                        <div>#2 Rendering the whole
                                          bundle useless just because
                                          you're missing one key is just
                                          daft</div>
                                      </div>
                                    </blockquote>
                                    It is the correct thing to do.&nbsp; A
                                    missing key is like a null pointer.&nbsp;
                                    It deserves a RuntimeException.</div>
                                </blockquote>
                                <div><br>
                                </div>
                                <div>No it's not the correct thing to
                                  do.</div>
                                <div>&nbsp;</div>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"
                                  data-mce-style="margin: 0 0 0 .8ex;
                                  border-left: 1px #ccc solid;
                                  padding-left: 1ex;">
                                  <div><span><span><br>
                                      </span></span>
                                    <blockquote>
                                      <div dir="ltr">
                                        <div>#3 There will quite likely
                                          be separate teams that do
                                          translations to those that do
                                          development, which means stack
                                          traces and log output is not
                                          the solution</div>
                                      </div>
                                    </blockquote>
                                    I don't see what that has to do with
                                    anything.&nbsp; You start with a set of
                                    bundles containing all the correct
                                    keys.&nbsp; Then you translate each
                                    bundle.&nbsp; If you accidentally delete
                                    a key then you want to know that
                                    right away.&nbsp; But we should indeed
                                    ask the translation team what they
                                    want to see.</div>
                                </blockquote>
                                <div><br>
                                </div>
                                <div>Sure, go ahead and ask them if they
                                  want to look for RuntimeExceptions in
                                  the server log.</div>
                                <div>&nbsp;</div>
                                <blockquote class="gmail_quote"
                                  style="margin:0 0 0
                                  .8ex;border-left:1px #ccc
                                  solid;padding-left:1ex"
                                  data-mce-style="margin: 0 0 0 .8ex;
                                  border-left: 1px #ccc solid;
                                  padding-left: 1ex;">
                                  <div><span><span><br>
                                      </span></span>
                                    <blockquote>
                                      <div dir="ltr">
                                        <div>#4 Doing a check each time
                                          you pull a message bundle to
                                          compare with the base bundle
                                          is probably not that
                                          expensive, but still pretty
                                          daft thing to do</div>
                                      </div>
                                    </blockquote>
                                    You only load each bundle once.&nbsp; So
                                    the check only happens the first
                                    time you request the bundle.<span><span><br>
                                      </span></span>
                                    <blockquote>
                                      <div dir="ltr">
                                        <div>#5 A proper util that's
                                          used to translate bundles is
                                          much better - we can implement
                                          a page in the admin console
                                          that allows you to validate a
                                          bundle and print out all
                                          missing bundles. This is
                                          something that would be more
                                          developer friendly and also
                                          would be usable by
                                          non-developers (aka people
                                          with other language skills
                                          than Java)</div>
                                      </div>
                                    </blockquote>
                                    We should ask the translation team
                                    what they want to see and how they
                                    do their work.&nbsp; I'm sure that they
                                    don't expect a tool to be built into
                                    the product.&nbsp; None of our other
                                    products have that.</div>
                                </blockquote>
                                <div><br>
                                </div>
                                <div>I don't just care about our
                                  translation team, they will translate
                                  the built in keys, but they won't
                                  translate the ones introduced by
                                  users.</div>
                                <div>
                                  <div>
                                    <div><br>
                                    </div>
                                    <div>&nbsp;</div>
                                    <blockquote class="gmail_quote"
                                      style="margin:0 0 0
                                      .8ex;border-left:1px #ccc
                                      solid;padding-left:1ex"
                                      data-mce-style="margin: 0 0 0
                                      .8ex; border-left: 1px #ccc solid;
                                      padding-left: 1ex;">
                                      <div>
                                        <div>
                                          <div><br>
                                            <blockquote>
                                              <div dir="ltr">
                                                <div><br>
                                                </div>
                                              </div>
                                              <div class="gmail_extra"><br>
                                                <div class="gmail_quote">On
                                                  9 October 2015 at
                                                  13:24, Stan Silvert <span
                                                    dir="ltr">&lt;<a
                                                      moz-do-not-send="true"
href="mailto:ssilvert@redhat.com" target="_blank"
                                                      data-mce-href="mailto:ssilvert@redhat.com">ssilvert@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"
                                                    data-mce-style="margin:
                                                    0 0 0 .8ex;
                                                    border-left: 1px
                                                    #ccc solid;
                                                    padding-left: 1ex;">
                                                    <div>
                                                      <div>On 10/9/2015
                                                        6:21 AM, Marko
                                                        Strukelj wrote:<br>
                                                      </div>
                                                      <blockquote>
                                                        <div dir="ltr">And
                                                          we can always
                                                          log the
                                                          missing key
                                                          situation into
                                                          server log -
                                                          that should be
                                                          enough for
                                                          developers to
                                                          notice it, and
                                                          fix it.</div>
                                                      </blockquote>
                                                      This is basically
                                                      what happens with
                                                      the code I wrote
                                                      for the fix:<br>
                                                      <a
                                                        moz-do-not-send="true"
href="https://github.com/keycloak/keycloak/pull/1690" target="_blank"
                                                        data-mce-href="https://github.com/keycloak/keycloak/pull/1690">https://github.com/keycloak/keycloak/pull/1690</a><br>
                                                      <br>
                                                      You get an error
                                                      in the console and
                                                      then a stack trace
                                                      on the server.&nbsp;
                                                      The stack trace
                                                      tells you exactly
                                                      which key is
                                                      missing.&nbsp; But the
                                                      console doesn't
                                                      crash or anything
                                                      like that.&nbsp; You
                                                      just switch back
                                                      to your original
                                                      language and
                                                      everything works
                                                      fine.
                                                      <div>
                                                        <div><br>
                                                          <blockquote>
                                                          <div
                                                          class="gmail_extra"><br>
                                                          <div
                                                          class="gmail_quote">On
                                                          Fri, Oct 9,
                                                          2015 at 8:09
                                                          AM, Stian
                                                          Thorgersen <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:sthorger@redhat.com" target="_blank"
data-mce-href="mailto:sthorger@redhat.com">sthorger@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"
                                                          data-mce-style="margin:
                                                          0 0 0 .8ex;
                                                          border-left:
                                                          1px #ccc
                                                          solid;
                                                          padding-left:
                                                          1ex;">
                                                          <div dir="ltr">There's
                                                          two places
                                                          where keys can
                                                          be missing:
                                                          <div><br>
                                                          </div>
                                                          <div>* In a
                                                          translation -
                                                          this can be an
                                                          honest
                                                          mistake, or
                                                          the
                                                          translation
                                                          wasn't updated
                                                          when KC was
                                                          updated</div>
                                                          <div>* Custom
                                                          keys added -
                                                          for example
                                                          when keys are
                                                          used for
                                                          display names
                                                          of clients,
                                                          roles, etc..</div>
                                                          <div><br>
                                                          </div>
                                                          <div>Manually
                                                          having to go
                                                          through all
                                                          sorts of pages
                                                          to look for
                                                          missing keys
                                                          is very error
                                                          prone and time
                                                          consuming, so
                                                          will not be
                                                          the best
                                                          option for
                                                          developers.&nbsp;In
                                                          both cases
                                                          above the
                                                          correct way to
                                                          do this would
                                                          be to have a
                                                          way to verify
                                                          a message
                                                          bundle.&nbsp;We
                                                          need a tool
                                                          that can
                                                          quickly
                                                          identify if
                                                          there are
                                                          missing keys
                                                          and we could
                                                          expose that
                                                          through the
                                                          admin console.
                                                          We currently
                                                          have a student
                                                          looking at
                                                          providing a UI
                                                          for defining
                                                          locales and
                                                          she is also
                                                          going to look
                                                          at adding some
                                                          way of
                                                          identifying if
                                                          a locale is
                                                          missing keys
                                                          and also to
                                                          easily list
                                                          only missing
                                                          keys.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>For end
                                                          users as I've
                                                          said they will
                                                          have no clue
                                                          what ???key???
                                                          is, and even
                                                          worse if we
                                                          throw an
                                                          exception/error
                                                          just because a
                                                          missing key
                                                          we'll actually
                                                          break the
                                                          whole console
                                                          just because
                                                          of a missing
                                                          key. It's a
                                                          much better
                                                          option to look
                                                          for the key in
                                                          another
                                                          translation
                                                          and display
                                                          that. Chances
                                                          are they will
                                                          be able to
                                                          interpret one
                                                          or two English
                                                          words.
                                                          Certainly
                                                          higher chance
                                                          of that then
                                                          them being
                                                          able to
                                                          interpret
                                                          ???key???.</div>
                                                          <div><br>
                                                          </div>
                                                          </div>
                                                          <div>
                                                          <div>
                                                          <div
                                                          class="gmail_extra"><br>
                                                          <div
                                                          class="gmail_quote">On
                                                          9 October 2015
                                                          at 07:51,
                                                          Thomas
                                                          Raehalme <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:thomas.raehalme@aitiofinland.com"
                                                          target="_blank"
data-mce-href="mailto:thomas.raehalme@aitiofinland.com">thomas.raehalme@aitiofinland.com</a>&gt;</span>
                                                          wrote:<br>
                                                          <blockquote
                                                          class="gmail_quote"
                                                          style="margin:0
                                                          0 0
                                                          .8ex;border-left:1px
                                                          #ccc
                                                          solid;padding-left:1ex"
                                                          data-mce-style="margin:
                                                          0 0 0 .8ex;
                                                          border-left:
                                                          1px #ccc
                                                          solid;
                                                          padding-left:
                                                          1ex;">
                                                          <p dir="ltr">How
                                                          about
                                                          returning
                                                          something
                                                          noticeable
                                                          like ???key???
                                                          for example?</p>
                                                          <div>
                                                          <div>
                                                          <div
                                                          class="gmail_quote">On
                                                          Oct 9, 2015
                                                          8:10 AM,
                                                          "Stian
                                                          Thorgersen"
                                                          &lt;<a
                                                          moz-do-not-send="true"
href="mailto:sthorger@redhat.com" target="_blank"
                                                          data-mce-href="mailto:sthorger@redhat.com">sthorger@redhat.com</a>&gt;
                                                          wrote:<br>
                                                          <blockquote
                                                          class="gmail_quote"
                                                          style="margin:0
                                                          0 0
                                                          .8ex;border-left:1px
                                                          #ccc
                                                          solid;padding-left:1ex"
                                                          data-mce-style="margin:
                                                          0 0 0 .8ex;
                                                          border-left:
                                                          1px #ccc
                                                          solid;
                                                          padding-left:
                                                          1ex;">
                                                          <div dir="ltr">That's
                                                          not putting it
                                                          to rest at
                                                          all! Throwing
                                                          a
                                                          RuntimeException
                                                          and rendering
                                                          the whole
                                                          admin console
                                                          useless just
                                                          because
                                                          there's a
                                                          missing key is
                                                          a horrible
                                                          idea.</div>
                                                          <div
                                                          class="gmail_extra"><br>
                                                          <div
                                                          class="gmail_quote">On
                                                          8 October 2015
                                                          at 20:33, Stan
                                                          Silvert <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:ssilvert@redhat.com" target="_blank"
data-mce-href="mailto:ssilvert@redhat.com">ssilvert@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"
                                                          data-mce-style="margin:
                                                          0 0 0 .8ex;
                                                          border-left:
                                                          1px #ccc
                                                          solid;
                                                          padding-left:
                                                          1ex;">
                                                          <div>
                                                          <div>What if
                                                          English is the
                                                          bundle that
                                                          has a missing
                                                          key?<br>
                                                          <br>
                                                          Let's just put
                                                          this to rest
                                                          and solve it
                                                          once and for
                                                          all.&nbsp; The
                                                          simplest
                                                          solution I can
                                                          think of is to
                                                          just compare
                                                          keys when a
                                                          new bundle is
                                                          loaded.&nbsp; If
                                                          any bundle has
                                                          a missing key
                                                          or it has key
                                                          not found in
                                                          the previous
                                                          loaded bundle,
                                                          we throw a
                                                          RuntimeException.&nbsp;
                                                          I can submit a
                                                          patch for that
                                                          in just a few
                                                          minutes.
                                                          <div>
                                                          <div><br>
                                                          <br>
                                                          On 10/8/2015
                                                          1:28 PM, Stian
                                                          Thorgersen
                                                          wrote:<br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          <div>
                                                          <div>
                                                          <blockquote>
                                                          <div dir="ltr">I'm
                                                          not sure I'm
                                                          buying into
                                                          the argument
                                                          that
                                                          displaying the
                                                          key is better
                                                          for
                                                          developers.
                                                          Having English
                                                          suddenly
                                                          pop-up in a
                                                          German
                                                          translation is
                                                          just as
                                                          obvious as a
                                                          key. Besides
                                                          as Stan points
                                                          out you catch
                                                          missing keys
                                                          by comparing
                                                          missing keys
                                                          between
                                                          English and
                                                          German.
                                                          <div><br>
                                                          </div>
                                                          <div>However,
                                                          if there is a
                                                          mistake in a
                                                          translation
                                                          then a user
                                                          may quite
                                                          likely be able
                                                          to interpret
                                                          English text,
                                                          while a user
                                                          will not be
                                                          able to
                                                          interpret a
                                                          key. So if a
                                                          key is missing
                                                          in a
                                                          translation
                                                          (which is
                                                          obviously a
                                                          "bug") it's
                                                          better to
                                                          display
                                                          English than
                                                          to display the
                                                          key.</div>
                                                          </div>
                                                          <div
                                                          class="gmail_extra"><br>
                                                          <div
                                                          class="gmail_quote">On
                                                          8 October 2015
                                                          at 14:13, Stan
                                                          Silvert <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:ssilvert@redhat.com" target="_blank"
data-mce-href="mailto:ssilvert@redhat.com">ssilvert@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"
                                                          data-mce-style="margin:
                                                          0 0 0 .8ex;
                                                          border-left:
                                                          1px #ccc
                                                          solid;
                                                          padding-left:
                                                          1ex;">
                                                          <div>
                                                          <div>On
                                                          10/8/2015
                                                          12:48 AM,
                                                          Thomas
                                                          Raehalme
                                                          wrote:<br>
                                                          </div>
                                                          <blockquote>
                                                          <p dir="ltr"><br>
                                                          On Oct 8, 2015
                                                          6:53 AM,
                                                          "Stian
                                                          Thorgersen"
                                                          &lt;<a
                                                          moz-do-not-send="true"
href="mailto:sthorger@redhat.com" target="_blank"
                                                          data-mce-href="mailto:sthorger@redhat.com">sthorger@redhat.com</a>&gt;
                                                          wrote:<br>
                                                          &gt;<br>
                                                          &gt; With
                                                          regards to
                                                          internationalization
                                                          I have two
                                                          questions:<br>
                                                          &gt;<br>
                                                          &gt; * Should
                                                          we fallback to
                                                          English
                                                          messages if a
                                                          key is missing
                                                          in a
                                                          translation?
                                                          Alternative is
                                                          to show key,
                                                          but that's not
                                                          going to help
                                                          anyone</p>
                                                          <p dir="ltr">A
                                                          missing key is
                                                          a bug and
                                                          showing the
                                                          message in the
                                                          default locale
                                                          may hide the
                                                          problem.</p>
                                                          <p dir="ltr">Even
                                                          though showing
                                                          the key does
                                                          not help the
                                                          end user it
                                                          helps the
                                                          developer and
                                                          identifies the
                                                          problem. For
                                                          this reason I
                                                          think showing
                                                          the key would
                                                          be a good
                                                          idea.</p>
                                                          </blockquote>
                                                          For our
                                                          bundles, we
                                                          could catch
                                                          missing keys
                                                          at build
                                                          time.&nbsp; <br>
                                                          <br>
                                                          Failing that,
                                                          I agree that
                                                          displaying the
                                                          key is better
                                                          than falling
                                                          back to
                                                          English.&nbsp; This
                                                          is especially
                                                          true right now
                                                          while we
                                                          haven't
                                                          completed the
                                                          task of
                                                          converting
                                                          everything.&nbsp;
                                                          If we fall
                                                          back to
                                                          English we
                                                          won't know if
                                                          the problem is
                                                          a missing key
                                                          or if the text
                                                          just hasn't
                                                          been converted
                                                          yet.<span><span><br>
                                                          <br>
                                                          </span></span>
                                                          <blockquote>
                                                          <p dir="ltr">&gt;
                                                          * Should we
                                                          change message
                                                          bundles to
                                                          UTF-8? Or
                                                          is&nbsp;ISO 8859-1
                                                          going to work
                                                          for all
                                                          languages?</p>
                                                          <p dir="ltr">Depends
                                                          what those all
                                                          languages are
                                                          :-)</p>
                                                          <p dir="ltr">I
                                                          think UTF-8 is
                                                          the best
                                                          choice as it
                                                          will handle
                                                          practically
                                                          any character.</p>
                                                          <p dir="ltr">But
                                                          if you're
                                                          referring to
                                                          Java resource
                                                          bundles the
                                                          encoding for
                                                          .properties is
                                                          ISO-8859-1 but
                                                          there are
                                                          means to
                                                          handle any
                                                          UTF-8
                                                          character.</p>
                                                          </blockquote>
                                                          Yes, an UTF-8
                                                          character can
                                                          be encoded in
                                                          ISO-8859-1.&nbsp;
                                                          Java provides
                                                          a native2ascii
                                                          tool for
                                                          converting
                                                          entire files.&nbsp;
                                                          The resource
                                                          bundle tools
                                                          in most IDE's
                                                          do this for
                                                          you
                                                          automatically.&nbsp;
                                                          So you just
                                                          edit as UTF-8
                                                          and it saves
                                                          the bundle as
                                                          ISO-8859-1.<br>
                                                          <br>
                                                          We can read
                                                          our bundles as
                                                          UTF-8 if we
                                                          want to do
                                                          that.&nbsp; I'd
                                                          rather not,
                                                          because I'm
                                                          not sure what
                                                          we might run
                                                          into down the
                                                          road with Java
                                                          assuming
                                                          resource
                                                          bundles are
                                                          always
                                                          ISO-8859-1.<br>
                                                          <br>
                                                          But I'd like
                                                          to get the
                                                          perspective of
                                                          people who
                                                          have handled
                                                          resource
                                                          bundles in
                                                          languages that
                                                          are not fully
                                                          supported by
                                                          ISO-8859-1.&nbsp;
                                                          Is it too much
                                                          of a pain to
                                                          do a
                                                          conversion or
                                                          do the tools
                                                          make the
                                                          process
                                                          seamless?
                                                          <div>
                                                          <div><br>
                                                          <blockquote>
                                                          <p dir="ltr">Best
                                                          regards,<br>
                                                          Thomas<br>
                                                          </p>
                                                          <p dir="ltr">&gt;<br>
                                                          &gt; On 7
                                                          October 2015
                                                          at 18:42, Stan
                                                          Silvert &lt;<a
moz-do-not-send="true" href="mailto:ssilvert@redhat.com" target="_blank"
data-mce-href="mailto:ssilvert@redhat.com">ssilvert@redhat.com</a>&gt;
                                                          wrote:<br>
                                                          &gt;&gt;<br>
                                                          &gt;&gt; Marko
                                                          brought this
                                                          to my
                                                          attention
                                                          yesterday.&nbsp;
                                                          For some
                                                          things, we<br>
                                                          &gt;&gt;
                                                          dynamically
                                                          create UI.&nbsp; In
                                                          this case, the
                                                          java code
                                                          contains the
                                                          English<br>
                                                          &gt;&gt; text
                                                          and it needs
                                                          to be
                                                          localized.&nbsp;
                                                          Luckily, the
                                                          solution was
                                                          pretty<br>
                                                          &gt;&gt;
                                                          straightforward.&nbsp;
                                                          We just
                                                          replace the
                                                          English text
                                                          with a key
                                                          into the<br>
                                                          &gt;&gt;
                                                          message
                                                          bundle.&nbsp; The
                                                          html template
                                                          that displays
                                                          this text
                                                          already pulls<br>
                                                          &gt;&gt; from
                                                          an Angular
                                                          scope so we
                                                          just leave
                                                          that alone and
                                                          pass it
                                                          through<br>
                                                          &gt;&gt; the
                                                          |translate
                                                          filter.&nbsp; You
                                                          do need to
                                                          also add the
                                                          double-colon.<br>
                                                          &gt;&gt;<br>
                                                          &gt;&gt; One
                                                          nice side
                                                          effect is that
                                                          if the key is
                                                          not found in
                                                          the bundle
                                                          then<br>
                                                          &gt;&gt; the
                                                          output of the
                                                          translate
                                                          filter is the
                                                          unchanged
                                                          text.&nbsp; This
                                                          means<br>
                                                          &gt;&gt; that
                                                          any code which
                                                          has not
                                                          converted to
                                                          using bundle
                                                          keys will
                                                          still<br>
                                                          &gt;&gt; work
                                                          as expected.&nbsp;
                                                          &nbsp;And, any
                                                          third-party
                                                          providers can
                                                          just pass in<br>
                                                          &gt;&gt; plain
                                                          text if they
                                                          don't care
                                                          about l10n.&nbsp;
                                                          If they ever
                                                          do care about<br>
                                                          &gt;&gt; l10n
                                                          we will just
                                                          need to
                                                          provide a
                                                          means for them
                                                          to add
                                                          key/value<br>
                                                          &gt;&gt; pairs
                                                          to the
                                                          resource
                                                          bundles.<br>
                                                          &gt;&gt;<br>
                                                          &gt;&gt; Here
                                                          is an example
                                                          for anyone who
                                                          needs to
                                                          localize
                                                          English text<br>
                                                          &gt;&gt;
                                                          embedded in
                                                          java:<br>
                                                          &gt;&gt; <a
                                                          moz-do-not-send="true"
href="https://github.com/ssilvert/keycloak/commit/c9437595b70810c4472325373dd8833c37be8549"
target="_blank"
data-mce-href="https://github.com/ssilvert/keycloak/commit/c9437595b70810c4472325373dd8833c37be8549">https://github.com/ssilvert/keycloak/commit/c9437595b70810c4472325373dd8833c37be8549</a><br>
                                                          &gt;&gt;<br>
                                                          &gt;&gt; Stan<br>
                                                          &gt;&gt;
                                                          _______________________________________________<br>
                                                          &gt;&gt;
                                                          keycloak-dev
                                                          mailing list<br>
                                                          &gt;&gt; <a
                                                          moz-do-not-send="true"
href="mailto:keycloak-dev@lists.jboss.org" target="_blank"
                                                          data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
                                                          &gt;&gt; <a
                                                          moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-dev"
                                                          target="_blank"
data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
                                                          &gt;<br>
                                                          &gt;<br>
                                                          &gt;<br>
                                                          &gt;
                                                          _______________________________________________<br>
                                                          &gt;
                                                          keycloak-dev
                                                          mailing list<br>
                                                          &gt; <a
                                                          moz-do-not-send="true"
href="mailto:keycloak-dev@lists.jboss.org" target="_blank"
                                                          data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
                                                          &gt; <a
                                                          moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-dev"
                                                          target="_blank"
data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
                                                          </p>
                                                          </blockquote>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          </blockquote>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          <br>
_______________________________________________<br>
                                                          keycloak-dev
                                                          mailing list<br>
                                                          <a
                                                          moz-do-not-send="true"
href="mailto:keycloak-dev@lists.jboss.org" target="_blank"
                                                          data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
                                                          <a
                                                          moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-dev"
                                                          rel="noreferrer"
target="_blank"
                                                          data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          <br>
                                                          <fieldset></fieldset>
                                                          <br>
                                                          <pre>_______________________________________________
keycloak-dev mailing list
<a moz-do-not-send="true" href="mailto:keycloak-dev@lists.jboss.org" target="_blank" data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" target="_blank" data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a>
</pre>
                                                          </blockquote>
                                                          <br>
                                                        </div>
                                                      </div>
                                                    </div>
                                                    <br>
_______________________________________________<br>
                                                    keycloak-dev mailing
                                                    list<br>
                                                    <a
                                                      moz-do-not-send="true"
href="mailto:keycloak-dev@lists.jboss.org" target="_blank"
                                                      data-mce-href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
                                                    <a
                                                      moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/keycloak-dev"
                                                      rel="noreferrer"
                                                      target="_blank"
                                                      data-mce-href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
                                                  </blockquote>
                                                </div>
                                                <br>
                                              </div>
                                            </blockquote>
                                            <br>
                                          </div>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                </div>
                              </div>
                              <br>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
          <br>
          _______________________________________________<br>
          keycloak-dev mailing list<br>
          <a class="moz-txt-link-abbreviated" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
          <a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></blockquote>
        <div><br>
          <br>
        </div>
        <div><br>
        </div>
        <div>-- <br>
        </div>
        <div><span name="x"></span>Debi Rieden<br>
          <div><br>
          </div>
          Program Manager for JBoss Data Virtualization and JBoss
          Identity (Keycloak)<br>
          <div><br>
          </div>
          Westford (3S391)
          <a class="moz-txt-link-freetext" href="http://westford-map.itos.redhat.com/index.html#3S391">http://westford-map.itos.redhat.com/index.html#3S391</a><br>
          Office: 978-392-1023; Cell 617-669-2934<br>
          <a class="moz-txt-link-abbreviated" href="mailto:drieden@redhat.com">drieden@redhat.com</a><br>
          #program, #boston<span name="x"></span><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
keycloak-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>