From 718f7c133253f4fd0bfce04171dd163c8d005179 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 18 Feb 2012 18:59:40 +0530 Subject: [PATCH] apply translation strings to good translations --- manifests/ships/convert.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/manifests/ships/convert.py b/manifests/ships/convert.py index e730303..daaf4cc 100755 --- a/manifests/ships/convert.py +++ b/manifests/ships/convert.py @@ -245,3 +245,17 @@ def isNumerical(s): return True else: return False + + +def applyGoodTranslations(): + for t in Translation.objects.all(): + if t.string_trans.strip() != '': + string = t.string + trans = t.string_trans + print trans + for g in Good.objects.filter(description_string=string): + g.description_string_trans = trans + g.save() + + +