script for language files update has new param to update existing translations

This commit is contained in:
zvolsky
2016-04-25 11:06:02 +02:00
parent 8ed6736e82
commit b6ee82bbde
2 changed files with 12 additions and 3 deletions
+8 -1
View File
@@ -30,8 +30,15 @@ if __name__ == '__main__':
dest="source",
help="Specify language file (ro) where seek for translations"
)
parser.add_argument(
'-f', '--force-update',
dest="force_update",
action="store_true",
default=False,
help="without it: add new + translate untranslated, if used: in addition update items if translation differs"
)
args = parser.parse_args()
update_from_langfile(args.target, args.source)
update_from_langfile(args.target, args.source, force_update=args.force_update)
print '%s was updated.' % args.target