[Koha-devel] Questions regarding localization

Katrin katrin.fischer.83 at web.de
Tue Nov 29 08:15:50 CET 2016


Hi Roger,

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.

Katrin

On 25.11.2016 10:38, Roger Grossmann wrote:
> Hi Kathrin,
>
> thank's a lot for the information regarding localization.
>
> > They are updated pre-release using the translation scripts - no 
> manual editing is required.
> Is there a documentation for the use of the translation scripts?
>
> Best regards,
> Roger
>
>> Am 21.11.2016 um 22:40 schrieb Katrin <katrin.fischer.83 at web.de 
>> <mailto:katrin.fischer.83 at web.de>>:
>>
>> Hi Roger,
>>
>> 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.
>>
>> 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.
>>
>> You can find additional information about the translation process on 
>> the wiki:
>>
>> https://wiki.koha-community.org/wiki/Translating_Koha
>> https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
>>
>> There are also some coding guidelines concerning translation:
>>
>> https://wiki.koha-community.org/wiki/Coding_Guidelines
>>
>> 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.
>>
>> Hope this helps,
>>
>> Katrin
>>
>> On 18.11.2016 16:12, Roger Grossmann wrote:
>>> 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
>>> eroger.grossmann at lmscloud.de
>>> wwww.lmscloud.de
>>>
>>> _______________________________________________
>>> Koha-devel mailing list
>>> Koha-devel at lists.koha-community.org
>>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>>> website :http://www.koha-community.org/
>>> git :http://git.koha-community.org/
>>> bugs :http://bugs.koha-community.org/
>>
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org 
>> <mailto:Koha-devel at lists.koha-community.org>
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : http://www.koha-community.org/
>> git : http://git.koha-community.org/
>> bugs : http://bugs.koha-community.org/
>
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20161129/e345e771/attachment-0001.html>


More information about the Koha-devel mailing list