[Kimchi-devel] [PATCH] add a make check-local command to verify the i18n string format
Sheldon
shaohef at linux.vnet.ibm.com
Wed Apr 2 05:45:04 UTC 2014
Thanks Christy, see V2 patch.
On 03/29/2014 05:51 AM, Christy Perez wrote:
> Tested-By: Christy Perez <christy at linux.vnet.ibm.com>
>
> I ran it locally and am not sure what to make of the error I got back:
>
> $ make -C src/kimchi/ check-local
> make: Entering directory `/home/christy/git/kimchi/src/kimchi'
> check the invalid string format:
> make: *** [check-local] Error 1
> make: Leaving directory `/home/christy/git/kimchi/src/kimchi'
>
> What does Error 1 mean?
>
> One other comment in-line below...
>
> On Thu, 2014-03-27 at 17:37 +0800, shaohef at linux.vnet.ibm.com wrote:
>> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>>
>> When I do i18n translation, I find some string format are wrong.
>> So I add a check-local command to help the developer to check their
>> string format.
>>
>> Every developers please run this command before submit your patch.
>> Thanks.
>>
>> After you run this command, it may report some invalid string formats.
>> $ make -C src/kimchi/ check-local
>> check the invalid string format:
>> "KCHREPOS0018E": _("Could not write repository configuration file
>> %(repo_file)"),
>>
>> You should check %(repo_file) is what you want.
>>
>> Ref:
>> http://docs.python.org/2/library/string.html
>>
>> Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>> ---
>> src/kimchi/Makefile.am | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/src/kimchi/Makefile.am b/src/kimchi/Makefile.am
>> index 957d2c9..cec705a 100644
>> --- a/src/kimchi/Makefile.am
>> +++ b/src/kimchi/Makefile.am
>> @@ -29,6 +29,10 @@ EXTRA_DIST = \
>>
>> kimchidir = $(pythondir)/kimchi
>>
>> +check-local:
>> + @echo "check the invalid string format:"
> A small suggestion: "Checking for invalid string formatting..."
>
>> + @grep -P "%\([^\)]*?\)[^0-9\.bcdeEfgGnosxX%]" i18n.py
>> +
>> install-data-local:
>> $(MKDIR_P) $(DESTDIR)$(kimchidir)
>> $(INSTALL_DATA) API.json $(DESTDIR)$(kimchidir)/API.json
> Regards,
>
> - Christy
>
>
>
--
Thanks and best regards!
Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center
More information about the Kimchi-devel
mailing list