This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: add several options to msgfmt.py
Type: enhancement Stage:
Components: Demos and Tools Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: umedoblock
Priority: normal Keywords: patch

Created on 2018-04-03 06:20 by umedoblock, last changed 2022-04-11 14:58 by admin.

Files
File name Uploaded Description Edit
msgfmt.py umedoblock, 2018-04-03 06:20 add several options(dump, progress and remaining) to msgfmt.py
a.patch umedoblock, 2018-04-03 06:27 patch file
Messages (2)
msg314862 - (view) Author: umedoblock (umedoblock) Date: 2018-04-03 06:20
= 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
...
}}}
msg314863 - (view) Author: umedoblock (umedoblock) Date: 2018-04-03 06:27
Sorry, I forgot to add a patch file.
History
Date User Action Args
2022-04-11 14:58:59adminsetgithub: 77393
2018-04-03 06:27:07umedoblocksetfiles: + a.patch
keywords: + patch
messages: + msg314863
2018-04-03 06:20:11umedoblockcreate