[Koha-bugs] [Bug 18688] Warnings about UTF-8 charset when creating a new language

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 16 10:02:30 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18688

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #96122|0                           |1
        is obsolete|                            |

--- Comment #2 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 96305
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96305&action=edit
Bug 18688: Warnings about UTF-8 charset when creating a new language

This patch removes some warnings when creating new languages,
those related with uft8 and two not related.

Tipical messages are:
>Warning: Can't determine original templates' charset, defaulting to UTF-8
>Warning: Charset Out defaulting to UTF-8
>...
>Removing empty file /../xx-YY-marc-NORMARC.po
>I UTF-8 O UTF-8 at /../kohaclone/misc/translator/tmpl_process3.pl line 365.
>Use of uninitialized value $pref_name in concatenation (.) or string at /.../misc/translator/LangInstaller.pm line 197.
>Created /../misc/translator/po/xx-YY-messages.po.

First four are 'normal' messages
The fifth one correspond to an unquoted preference string
The sixth one is a normal output message from msgint command
We will hide them unless verbose '-v' option is selected,
and fix the error.

To test:
1) Go to misc/translator
2) Create new language files
  $ perl translate create xx-YY
3) Check warnings and messages
4) Apply the patch
5) Remove created files, and create them again
   Ther must be no messages
6) Repeat 5) with verbose option '-v', check
   old messages

7) BONUS: without the patch update a language,
   for example de-DE:
   $ perl translate update de-DE
   Note (git status) a new file, po/de-DE-messages.po~
   This is a backup file from msgmerge command
   With the patch this backup is removed.

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list