Bug 247946 - LoKalize does not identify the code of the language in the po file headers
Summary: LoKalize does not identify the code of the language in the po file headers
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 1.0
Platform: Ubuntu Linux
: VHI wishlist
Target Milestone: ---
Assignee: Nick Shaforostoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-15 12:41 UTC by Javier Viñal
Modified: 2010-11-30 19:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Viñal 2010-08-15 12:41:51 UTC
Version:           1.0 (KDE 4.3) (using KDE 4.5.0) 
OS:                Linux

Wish of automatic inclussion of "Language" header in .po files by Lokalize.

The presence of the language header would be useful for tools, like pology, that manage .po file. I include some fragments of an email interchange between me and Chusslove Illich:

Language: is since recently a standard PO header field, and therefore current and future parts of Pology and other tools are going to take note of it.

Language: header field should indeed be added to the catalog by the PO
editor, based on project configuration. Also, when merging with templates,
msgmerge since 0.18 will try to guess the language code from Language-Team:
header field (which usually contains human-readable language name in
English), and add Language: header field if it succeeds.

Reproducible: Didn't try


Actual Results:  
# translation of kontact.po to Spanish
# Translation of kontact to Spanish
# translation of kontact.po to
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
#
# Juan Manuel Garcia Molina <juanma@superiodico.net>, 2003, 2004, 2005.
# Pablo de Vicente <p.devicente@wanadoo.es>, 2005.
# Juan Manuel García Molina <juanma@superiodico.net>, 2006.
# Enrique Matias Sanchez (aka Quique) <cronopios@gmail.com>, 2007.
# Franco Mariluis <fmariluis@gmail.com>, 2008.
# Eloy Cuadra <ecuadra@eloihr.net>, 2008, 2009.
# Dario Andres Rodriguez <andresbajotierra@gmail.com>, 2009.
# Dario Andres Rodriguez <andrebajotierra@gmail.com>, 2009.
# Javier Vinal <fjvinal@gmail.com>, 2009, 2010.
# Javier Viñal <fjvinal@gmail.com>, 2010.

Expected Results:  
# translation of kontact.po to Spanish
# Translation of kontact to Spanish
# translation of kontact.po to
# Language:es
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
#
# Juan Manuel Garcia Molina <juanma@superiodico.net>, 2003, 2004, 2005.
# Pablo de Vicente <p.devicente@wanadoo.es>, 2005.
# Juan Manuel García Molina <juanma@superiodico.net>, 2006.
# Enrique Matias Sanchez (aka Quique) <cronopios@gmail.com>, 2007.
# Franco Mariluis <fmariluis@gmail.com>, 2008.
# Eloy Cuadra <ecuadra@eloihr.net>, 2008, 2009.
# Dario Andres Rodriguez <andresbajotierra@gmail.com>, 2009.
# Dario Andres Rodriguez <andrebajotierra@gmail.com>, 2009.
# Javier Vinal <fjvinal@gmail.com>, 2009, 2010.
# Javier Viñal <fjvinal@gmail.com>, 2010.
Comment 1 Nick Shaforostoff 2010-09-13 13:36:21 UTC
i'll implement this for KDE 4.6.
in the meantime, could you post a link to the new standard?
Comment 2 Chusslove Illich 2010-09-14 18:28:06 UTC
Added to the Gettext manual:

http://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html#Header-Entry
Comment 3 Nick Shaforostoff 2010-09-16 09:38:47 UTC
well from that link i need to modify your expected results:
not
# Language:es
but
"Language: eh\n"
which goes in the first msgid/msgstr entry, usually called header entry.
Comment 4 Nick Shaforostoff 2010-11-30 19:06:41 UTC
SVN commit 1202398 by shaforo:

add support for Language: gettext header field
BUG: 247946
please reopen the bug if lokalize in kde 4.6 works not as expected for you


 M  +14 -2     gettextheader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1202398