<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Roger,</p>
    <p>I have included the information on updating the po files for new
      strings in the e-mail as I didn't find a documentation right away
      with that bit included. For everything else please refer to the
      links.</p>
    <p>Katrin<br>
    </p>
    <div class="moz-cite-prefix">On 25.11.2016 10:38, Roger Grossmann
      wrote:<br>
    </div>
    <blockquote
      cite="mid:912757DE-8292-4C2C-B040-EA4FBE587C56@lmscloud.de"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Hi Kathrin,
      <div class=""><br class="">
      </div>
      <div class="">thank's a lot for the information regarding
        localization.</div>
      <div class=""><span style="font-size: small;" class=""><br
            class="">
        </span></div>
      <div class="">> <span style="font-size: small;" class="">They
          are updated pre-release using the translation scripts - no
          manual editing is required.</span>
        <div class="">
          <div class="">Is there a documentation for the use of the <span
              style="font-size: small;" class="">translation scripts?</span></div>
          <div class=""><br class="">
            <div class="">Best regards,</div>
          </div>
        </div>
        <div class="">Roger</div>
        <div class=""><br class="">
        </div>
        <div>
          <blockquote type="cite" class="">
            <div class="">Am 21.11.2016 um 22:40 schrieb Katrin <<a
                moz-do-not-send="true"
                href="mailto:katrin.fischer.83@web.de" class="">katrin.fischer.83@web.de</a>>:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta content="text/html; charset=utf-8"
                http-equiv="Content-Type" class="">
              <div bgcolor="#FFFFFF" text="#000000" class="">
                <p class=""><font class="" size="-1">Hi Roger,</font></p>
                <p class=""><font class="" size="-1">strings in Koha are
                    either stored in the database (authorised values,
                    item type descriptions, MARC field and subfield
                    descriptions, etc.) or are part of the templates.<br
                      class="">
                  </font></p>
                <p class=""><font class="" size="-1">Strings in the
                    templates are translated via the po files you have
                    already seen. They are updated pre-release using the
                    translation scripts - no manual editing is required.
                    I think on the packages it works with: sudo
                    koha-translate -u <langcode>. Or in
                    koha-shell: cd misc translator, perl translate
                    update <langcode>. TT variables will be
                    automatically replaced by %s. For JavaScript there
                    is a special syntax you can use that has the same
                    effect.<br class="">
                  </font></p>
                <p class=""><font class="" size="-1">You can find
                    additional information about the translation process
                    on the wiki: <br class="">
                  </font></p>
                <p class=""><font class="" size="-1"><a
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext"
                      href="https://wiki.koha-community.org/wiki/Translating_Koha">https://wiki.koha-community.org/wiki/Translating_Koha</a><br
                      class="">
                    <a moz-do-not-send="true"
                      class="moz-txt-link-freetext"
href="https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client">https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client</a></font></p>
                <p class=""><font class="" size="-1">There are also some
                    coding guidelines concerning translation:</font></p>
                <p class=""><font class="" size="-1"><a
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext"
                      href="https://wiki.koha-community.org/wiki/Coding_Guidelines">https://wiki.koha-community.org/wiki/Coding_Guidelines</a><br
                      class="">
                  </font></p>
                <p class=""><font class="" size="-1">As you have written
                    the $type parameter is currently not used. The
                    different fines and fees are differentiated in the
                    database by their accounttype in accountlines. The
                    code is translated into a description in the
                    templates, which means there can be a translation
                    for every installed language.</font></p>
                <p class=""><font class="" size="-1">Hope this helps,</font></p>
                <p class=""><font class="" size="-1">Katrin<br class="">
                  </font></p>
                <div class="moz-cite-prefix"><font class="" size="-1">On
                    18.11.2016 16:12, Roger Grossmann wrote:</font><br
                    class="">
                </div>
                <blockquote
                  cite="mid:16CC5887-3414-4B4C-96FD-B408FDE39655@lmscloud.de"
                  type="cite" class="">
                  <pre class="" wrap="">Hi all,

as a Koha development newbie I am having a few questions especially with localization. 
I am developing enhancements which I plan to bring in to the community hopefully soon. Your answers will help to make progress with it.

1st question
----------------
After looking at much Koha code I did not find a solution to build server side localized strings to persist localized text in the database. 
What do you recommend to use here?

Background: 
As you know, fines and fees are a sensitive area. Borrowers like to know exactly why they are charged and for what exactly. 
Lets assume, you want to store good localized name for the type of an overdue fine. 
It was for instance planned for function "UpdateFine" in C4::Overdues but the parameter $type is never filled as originally planned.
If an additional type name would be passed here, it needed to be a localized string since borrowers want to read the charge reason in their language.
As this is just an example for the use of a localized server text, the question is, whether there is already an approach to manage localised server side texts.
Ideally, server side texts would support parameter replacement that is not dependent of the position in the text as for instance with %s using sprintf.

2nd question
-----------------
I want to build some new UI functionality. The procedure how to do that with templates in english first is clear to me.
As I am German, I would like to build during development a first German version of the template as well and would like to extend the related German .po file.
How can I add the texts for a specific language in my development environment? 
Is there a way to extract the new texts of templates and add them to an existing .po file with a script and use poedit to translate them?
How do you do that?

Thanks in advance for your help.

Best regards,
Roger


--
Roger Großmann
LMSCloud GmbH
Konrad-Zuse-Platz 8 - D-81829 München
t +49 (0)89 207042-620  m +49 (0)171-2194775 f +49 (0)89 207042-623
e <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:roger.grossmann@lmscloud.de">roger.grossmann@lmscloud.de</a>
w <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.lmscloud.de/">www.lmscloud.de</a>

_______________________________________________
Koha-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
                </blockquote>
                <br class="">
              </div>
              _______________________________________________<br
                class="">
              Koha-devel mailing list<br class="">
              <a moz-do-not-send="true"
                href="mailto:Koha-devel@lists.koha-community.org"
                class="">Koha-devel@lists.koha-community.org</a><br
                class="">
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br
                class="">
              website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a><br class="">
              git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a><br class="">
              bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
    </blockquote>
    <br>
  </body>
</html>