[issue33212] add several options to msgfmt.py

2018-04-03 Thread umedoblock

umedoblock  added the comment:

Sorry, I forgot to add a patch file.

--
keywords: +patch
Added file: https://bugs.python.org/file47518/a.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33212] add several options to msgfmt.py

2018-04-03 Thread umedoblock

New submission from umedoblock :

= Why do I add several options ?
I'd like to effectively know a progress of translate about some po files
when KiCad dev team announce to public KiCad 5.0 major.
Because KiCad dev team separates PCB design tools to exe files.
And I used the poedit to translate work.
Then I'd like to know progress per a po file.

Please take my idea in msgfmt.py.

== help
{{{
Usage: msgfmt.py [OPTIONS] filename.po

Options:
...
-d
--dump
Show all msg_id_NO, msgid and msgstr in filename.po.

-p
--progress
Show translate progress.

-r
--remaining
Show no translated msgid with msg_id_NO.
...
}}}

== progress option
{{{
$ python3 ~/KiCad/kicad-doc/src/translate-set/msgfmt.py --progress 
~/KiCad/kicad-doc/src/eeschema/po/ja.po 
translated: 1151 of 1427 (80%), Remaining: 276
}}}

== dump option
{{{
$ python3 ~/KiCad/kicad-doc/src/translate-set/msgfmt.py --dump 
~/KiCad/kicad-doc/src/eeschema/po/ja.po | head -20
msg_id_NO=1
Eeschema
Eeschema

msg_id_NO=2
_Reference manual_
_リファレンス・マニュアル_ 

msg_id_NO=3
*Copyright*

*著作権*
...
}}}

== remaining option
{{{
$ python3 ~/KiCad/kicad-doc/src/translate-set/msgfmt.py --remaining 
~/KiCad/kicad-doc/src/eeschema/po/ja.po | head -20
msg_id_NO=4
This document is Copyright (C) 2010-2018 by its contributors as listed below. Yo
u may distribute it and/or modify it under the terms of either the GNU General 
Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or 
the Creative Commons Attribution License 
(http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.

msg_id_NO=12
About KiCad translation: https://github.com/KiCad/kicad-i18n/issues

msg_id_NO=14
Published on May 30, 2015.

msg_id_NO=15
Symbol Annotation Tool
...
}}}

--
components: Demos and Tools
files: msgfmt.py
messages: 314862
nosy: umedoblock
priority: normal
severity: normal
status: open
title: add several options to msgfmt.py
type: enhancement
versions: Python 3.6
Added file: https://bugs.python.org/file47517/msgfmt.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com