Re: [Freeipa-devel] [freeipa-devel][PATCH] Added missing translation to automount.py method

2016-06-15 Thread Martin Basti



On 16.06.2016 08:31, Abhijeet Kasurde wrote:

Hi All,

Please review updated patch.

On 06/15/2016 07:56 PM, Abhijeet Kasurde wrote:



On 06/15/2016 07:29 PM, Martin Basti wrote:




On 15.06.2016 11:13, Abhijeet Kasurde wrote:

Hi All,

Please review the attached patch.

Fixes: https://fedorahosted.org/freeipa/ticket/5920





Thank you for the patch,

Please follow this page for howto create internationalized strings:
http://www.freeipa.org/page/Python_Coding_Style#Python_Internationalized_.28i18n.29_Strings

you must use named subsitution, because translators may need to know 
what should be there, or they may change the order of words 
depending on translated language


Martin^2


Thanks Martin for suggestion. I will implement this in current patch 
and re-submit it for code review.


--
Thanks,
Abhijeet Kasurde

IRC: akasurde
http://akasurde.github.io





--
Thanks,
Abhijeet Kasurde

IRC: akasurde
http://akasurde.github.io





Thank you!
ACK
Pushed to master: 6873ac5b0370562c314ada931416c110fc51c1b2

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [freeipa-devel][PATCH] Added missing translation to automount.py method

2016-06-15 Thread Abhijeet Kasurde

Hi All,

Please review updated patch.

On 06/15/2016 07:56 PM, Abhijeet Kasurde wrote:



On 06/15/2016 07:29 PM, Martin Basti wrote:




On 15.06.2016 11:13, Abhijeet Kasurde wrote:

Hi All,

Please review the attached patch.

Fixes: https://fedorahosted.org/freeipa/ticket/5920





Thank you for the patch,

Please follow this page for howto create internationalized strings:
http://www.freeipa.org/page/Python_Coding_Style#Python_Internationalized_.28i18n.29_Strings

you must use named subsitution, because translators may need to know 
what should be there, or they may change the order of words depending 
on translated language


Martin^2


Thanks Martin for suggestion. I will implement this in current patch 
and re-submit it for code review.


--
Thanks,
Abhijeet Kasurde

IRC: akasurde
http://akasurde.github.io





--
Thanks,
Abhijeet Kasurde

IRC: akasurde
http://akasurde.github.io

From 1d04e02adfc2dc49634e0e35f35ed545123ec228 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde 
Date: Wed, 15 Jun 2016 14:39:02 +0530
Subject: [PATCH] Added missing translation to automount.py method

Fixes: https://fedorahosted.org/freeipa/ticket/5920

Signed-off-by: Abhijeet Kasurde 
---
 ipaclient/plugins/automount.py | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/ipaclient/plugins/automount.py b/ipaclient/plugins/automount.py
index 57a80444608314de87cac1dc343fc0206f1fe66e..2d6b8d929da1d849af07f383f0ade905912d93a4 100644
--- a/ipaclient/plugins/automount.py
+++ b/ipaclient/plugins/automount.py
@@ -236,45 +236,45 @@ class automountlocation_import(Command):
 duplicatekeys = result['result']['duplicatekeys']
 skipped = result['result']['skipped']
 
-textui.print_plain('Imported maps:')
+textui.print_plain(_('Imported maps:'))
 for m in maps:
 textui.print_plain(
-'Added %s' % m
+_('Added %(map)s') % dict(map=m)
 )
 textui.print_plain('')
 
-textui.print_plain('Imported keys:')
+textui.print_plain(_('Imported keys:'))
 for k in keys:
 textui.print_plain(
-'Added %s to %s' % (
-k[0], k[1]
+_('Added %(src)s to %(dst)s') % dict(
+src=k[0], dst=k[1]
 )
 )
 textui.print_plain('')
 
 if len(skipped) > 0:
-textui.print_plain('Ignored keys:')
+textui.print_plain(_('Ignored keys:'))
 for k in skipped:
 textui.print_plain(
-'Ignored %s to %s' % (
-k[0], k[1]
+_('Ignored %(src)s to %(dst)s') % dict(
+src=k[0], dst=k[1]
 )
 )
 
 
 if options.get('continue', False) and len(duplicatemaps) > 0:
 textui.print_plain('')
-textui.print_plain('Duplicate maps skipped:')
+textui.print_plain(_('Duplicate maps skipped:'))
 for m in duplicatemaps:
 textui.print_plain(
-'Skipped %s' % m
+_('Skipped %(map)s') % dict(map=m)
 )
 
 
 if options.get('continue', False) and len(duplicatekeys) > 0:
 textui.print_plain('')
-textui.print_plain('Duplicate keys skipped:')
+textui.print_plain(_('Duplicate keys skipped:'))
 for k in duplicatekeys:
 textui.print_plain(
-'Skipped %s' % k
+_('Skipped %(key)s') % dict(key=k)
 )
-- 
2.4.11

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [freeipa-devel][PATCH] Added missing translation to automount.py method

2016-06-15 Thread Abhijeet Kasurde



On 06/15/2016 07:29 PM, Martin Basti wrote:




On 15.06.2016 11:13, Abhijeet Kasurde wrote:

Hi All,

Please review the attached patch.

Fixes: https://fedorahosted.org/freeipa/ticket/5920





Thank you for the patch,

Please follow this page for howto create internationalized strings:
http://www.freeipa.org/page/Python_Coding_Style#Python_Internationalized_.28i18n.29_Strings

you must use named subsitution, because translators may need to know 
what should be there, or they may change the order of words depending 
on translated language


Martin^2


Thanks Martin for suggestion. I will implement this in current patch and 
re-submit it for code review.


--
Thanks,
Abhijeet Kasurde

IRC: akasurde
http://akasurde.github.io

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [freeipa-devel][PATCH] Added missing translation to automount.py method

2016-06-15 Thread Martin Basti



On 15.06.2016 11:13, Abhijeet Kasurde wrote:

Hi All,

Please review the attached patch.

Fixes: https://fedorahosted.org/freeipa/ticket/5920





Thank you for the patch,

Please follow this page for howto create internationalized strings:
http://www.freeipa.org/page/Python_Coding_Style#Python_Internationalized_.28i18n.29_Strings

you must use named subsitution, because translators may need to know 
what should be there, or they may change the order of words depending on 
translated language


Martin^2
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code